-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbiomes.h
285 lines (251 loc) · 11 KB
/
biomes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
#ifndef _BIOMES_H_
#define _BIOMES_H_
#include <string>
#include <tuple>
#include "libs/vectorMath.h"
#include <array>
#include <variant>
#include <vector>
// namespace Vegetation {
// std::array<> tree;
// std::array<> bush;
// std::array<> flower;
// std::array<> grass;
// }
// namespace Biome {
// std::array<>
// }
// ? INFO : Biome types determine the terrain height function
// TODO : Add more biome types 🙂
enum class BIOME : uint8_t
{
DESERT,
FOREST,
TAIGA,
NULL_BIOME,
// Num Biomes should be the last element in the list since it represents the total number of biomes
NUM_BIOMES,
};
// ? INFO : Liquid types determine the liquid height function
enum class LIQUID : uint8_t
{
OCEAN,
RIVER,
LAVA,
WATERFALL,
// SWAMP
NULL_LIQUID,
// Num Liquids should be the last element in the list since it represents the total number of biomes
NUM_LIQUIDS,
};
enum class MATERIAL : uint8_t
{
GRASS,
DIRT,
ROCK,
STONE,
NULL_MATERIAL,
// Num Materials should be the last element in the enum since it is used to determine the number of materials
NUM_MATERIALS,
};
enum class INSTANCE : uint8_t
{
TREE,
BUSH,
FLOWER,
GRASS,
ROCK,
STONE,
NULL_INSTANCE,
// Num Veggies should be the last element in the list since it represents the total number of instances
NUM_INSTANCES,
};
// enum class LAYER : uint8_t
// {
// VEGETATION,
// MINERALS,
// BUILDINGS,
// NULL_LAYER,
// // Num Layers should be the last element in the list since it represents the total number of layers
// NUM_LAYERS,
// };
// enum class VEGETATION : uint8_t
// {
// TREE,
// BUSH,
// FLOWER,
// GRASS,
// NULL_VEGETATION,
// // Num Veggies should be the last element in the list since it represents the total number of veggies
// NUM_VEGGIES,
// };
enum class TREE : uint8_t
{
SHORT_TREE,
MEDIUM_TREE,
TALL_TREE,
NULL_TREE,
// Num Trees should be the last element in the list since it represents the total number of trees
NUM_TREES,
};
enum class FLOWER : uint8_t
{
SHORT_FLOWER,
MEDIUM_FLOWER,
TALL_FLOWER,
NULL_FLOWER,
// Num Flowers should be the last element in the list since it represents the total number of flowers
NUM_FLOWERS,
};
// struct Variant {
// uint8_t id;
// // either a list of variants or a list of ids
// std::variant<std::vector<Variant>, std::vector<uint8_t>> types;
// };
// typedef std::vector<uint8_t> IL;
// typedef std::vector<Variant> VL;
// const static Variant VARIANTS_DATA = {
// (uint8_t)0, VL{
// Variant{
// (uint8_t)BIOME::DESERT, VL{
// Variant{
// (uint8_t)LAYER::VEGETATION, VL{
// Variant{
// (uint8_t)VEGETATION::TREE, IL{
// (uint8_t)TREE::SHORT_TREE,
// (uint8_t)TREE::MEDIUM_TREE,
// (uint8_t)TREE::TALL_TREE
// }
// }
// }
// }
// },
// },
// Variant{
// (uint8_t)BIOME::FOREST, VL{
// Variant{
// (uint8_t)LAYER::VEGETATION, VL{
// Variant{
// (uint8_t)VEGETATION::TREE, IL{
// (uint8_t)TREE::SHORT_TREE,
// (uint8_t)TREE::MEDIUM_TREE,
// (uint8_t)TREE::TALL_TREE
// }
// }
// }
// }
// }
// },
// Variant{
// (uint8_t)BIOME::FOREST, VL{
// Variant{
// (uint8_t)LAYER::VEGETATION, VL{
// Variant{
// (uint8_t)VEGETATION::TREE, IL{
// (uint8_t)TREE::SHORT_TREE,
// (uint8_t)TREE::MEDIUM_TREE,
// (uint8_t)TREE::TALL_TREE
// }
// }
// }
// }
// }
// }
// }
// };
// const VL VARIANTS_BIOME_ARRAY = std::get<VL>(VARIANTS_DATA.types);
// const int VARIANTS_NUM_BIOMES = VARIANTS_BIOME_ARRAY.size();
// const int VARIANTS_NUM_BIOMES = std::get<VL>(VARIANTS_DATA.types).size();
class UV
{
public:
float u;
float v;
};
// class Biome {
// public:
// float baseHeight;
// float amps[3][2];
// unsigned int color;
// uint8_t index;
// };
// const enum class BIOME : uint8_t {
// biPlains,
// biDesert,
// biExtremeHills,
// biForest,
// biTaiga,
// biNether,
// biEnd,
// biTundra,
// biIceMountains,
// biMushroomIsland,
// biMushroomShore,
// biBeach,
// biDesertHills,
// biForestHills,
// biTaigaHills,
// biExtremeHillsEdge,
// biJungle,
// biJungleHills,
// biJungleEdge,
// biStoneBeach,
// biColdBeach,
// biBirchForest,
// biBirchForestHills,
// biRoofedForest,
// biColdTaiga,
// biColdTaigaHills,
// biMegaTaiga,
// biMegaTaigaHills,
// biExtremeHillsPlus,
// biSavanna,
// biSavannaPlateau,
// biMesa,
// biMesaPlateauF,
// biMesaPlateau,
// biSunflowerPlains,
// biDesertM,
// biExtremeHillsM,
// biFlowerForest,
// biTaigaM,
// biSwamplandM,
// biIcePlainsSpikes,
// biJungleM,
// biJungleEdgeM,
// biBirchForestM,
// biBirchForestHillsM,
// biRoofedForestM,
// biColdTaigaM,
// biMegaSpruceTaiga,
// biMegaSpruceTaigaHills,
// biExtremeHillsPlusM,
// biSavannaM,
// biSavannaPlateauM,
// biMesaBryce,
// biMesaPlateauFM,
// biMesaPlateauM,
// NULL,
// // Num Biomes should be the last element in the list since it represents the total number of biomes
// NUM_BIOMES,
// };
// const BIOME BIOMES_TEMPERATURE_HUMIDITY[] {
// // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// /* 0 */ BIOME::biTundra, BIOME::biTundra, BIOME::biTundra, BIOME::biTundra, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert,
// /* 1 */ BIOME::biTundra, BIOME::biTundra, BIOME::biTundra, BIOME::biTundra, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert,
// /* 2 */ BIOME::biTundra, BIOME::biTundra, BIOME::biTundra, BIOME::biTundra, BIOME::biPlains, BIOME::biExtremeHills, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesertHills, BIOME::biDesertHills, BIOME::biDesert, BIOME::biDesert,
// /* 3 */ BIOME::biTundra, BIOME::biTundra, BIOME::biTundra, BIOME::biTundra, BIOME::biExtremeHills, BIOME::biExtremeHills, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biDesert, BIOME::biDesert, BIOME::biDesertHills, BIOME::biDesertHills, BIOME::biDesert, BIOME::biDesert,
// /* 4 */ BIOME::biTundra, BIOME::biTundra, BIOME::biIceMountains, BIOME::biIceMountains, BIOME::biExtremeHills, BIOME::biExtremeHills, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biForestHills, BIOME::biDesert, BIOME::biDesert, BIOME::biDesert, BIOME::biDesertHills, BIOME::biDesert,
// /* 5 */ BIOME::biTundra, BIOME::biTundra, BIOME::biIceMountains, BIOME::biIceMountains, BIOME::biExtremeHills, BIOME::biExtremeHills, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biPlains, BIOME::biForestHills, BIOME::biForestHills, BIOME::biDesert, BIOME::biDesert, BIOME::biDesertHills, BIOME::biDesert,
// /* 6 */ BIOME::biTundra, BIOME::biTundra, BIOME::biIceMountains, BIOME::biIceMountains, BIOME::biForestHills, BIOME::biForestHills, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForestHills, BIOME::biExtremeHills, BIOME::biDesert, BIOME::biDesertHills, BIOME::biDesert,
// /* 7 */ BIOME::biTundra, BIOME::biTundra, BIOME::biIceMountains, BIOME::biIceMountains, BIOME::biForestHills, BIOME::biForestHills, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForestHills, BIOME::biExtremeHills, BIOME::biExtremeHills, BIOME::biDesertHills, BIOME::biDesert,
// /* 8 */ BIOME::biTundra, BIOME::biTundra, BIOME::biTaiga, BIOME::biTaiga, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForestHills, BIOME::biExtremeHills, BIOME::biExtremeHills, BIOME::biPlains, BIOME::biDesert,
// /* 9 */ BIOME::biTundra, BIOME::biTundra, BIOME::biTaiga, BIOME::biTaiga, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForestHills, BIOME::biExtremeHills, BIOME::biExtremeHills, BIOME::biPlains, BIOME::biPlains,
// /* 10 */ BIOME::biTaiga, BIOME::biTaiga, BIOME::biTaiga, BIOME::biIceMountains, BIOME::biForestHills, BIOME::biForestHills, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biJungle, BIOME::biJungle, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland,
// /* 11 */ BIOME::biTaiga, BIOME::biTaiga, BIOME::biIceMountains, BIOME::biIceMountains, BIOME::biExtremeHills, BIOME::biForestHills, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biForest, BIOME::biJungle, BIOME::biJungle, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland,
// /* 12 */ BIOME::biTaiga, BIOME::biTaiga, BIOME::biIceMountains, BIOME::biIceMountains, BIOME::biExtremeHills, BIOME::biJungleHills, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland,
// /* 13 */ BIOME::biTaiga, BIOME::biTaiga, BIOME::biTaiga, BIOME::biIceMountains, BIOME::biJungleHills, BIOME::biJungleHills, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland,
// /* 14 */ BIOME::biTaiga, BIOME::biTaiga, BIOME::biTaiga, BIOME::biTaiga, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland,
// /* 15 */ BIOME::biTaiga, BIOME::biTaiga, BIOME::biTaiga, BIOME::biTaiga, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biJungle, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland, BIOME::biSwampland,
// };
#endif // _BIOMES_H_