载入中...
搜索中...
未找到
Params.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include "common/Value.h"
6
7#include <cstdint>
8#include <string>
9
10namespace eve::procgen {
11
28public:
30 void setSeed(uint32_t seed);
32 uint32_t getSeed() const;
33
39 void setSize(int width, int height);
41 int getWidth() const;
43 int getHeight() const;
44
51 void setInt(const std::string &key, int value);
53 void setFloat(const std::string &key, float value);
59 void setBool(const std::string &key, bool value);
61 void setString(const std::string &key, const std::string &value);
63 bool has(const std::string &key) const;
64
73 int getInt(const std::string &key, int defaultValue) const;
81 float getFloat(const std::string &key, float defaultValue) const;
89 bool getBool(const std::string &key, bool defaultValue) const;
91 std::string getString(const std::string &key, const std::string &defaultValue) const;
92
101 [[nodiscard]] std::string canonicalString() const;
102
103private:
104 uint32_t seed_ = 1;
105 int width_ = 32;
106 int height_ = 32;
107 eve::Value::Object values_;
108};
109
110} // namespace eve::procgen
double value
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::uint32_t key
std::uint32_t height
std::uint32_t width
std::uint32_t seed
Definition PointSet.cpp:807
Owning, renderer-independent dynamic values.
std::map< std::string, Value > Object
Definition Value.h:34
Owning, typed generation parameters.
Definition Params.h:27
const char * defaultValue