@@ -31,7 +31,9 @@ class BiomeManager;
31
31
// // Biome
32
32
// //
33
33
34
- #define BIOME_NONE ((u8)0 )
34
+ typedef u8 biome_t ;
35
+
36
+ #define BIOME_NONE ((biome_t )0 )
35
37
36
38
// TODO(hmmmm): Decide whether this is obsolete or will be used in the future
37
39
enum BiomeType {
@@ -101,7 +103,7 @@ class BiomeGen {
101
103
// Gets all biomes in current chunk using each corresponding element of
102
104
// heightmap as the y position, then stores the results by biome index in
103
105
// biomemap (also returned)
104
- virtual u8 *getBiomes (s16 *heightmap) = 0;
106
+ virtual biome_t *getBiomes (s16 *heightmap) = 0;
105
107
106
108
// Gets a single biome at the specified position, which must be contained
107
109
// in the region formed by m_pmin and (m_pmin + m_csize - 1).
@@ -111,7 +113,7 @@ class BiomeGen {
111
113
virtual Biome *getBiomeAtIndex (size_t index, s16 y) const = 0;
112
114
113
115
// Result of calcBiomes bulk computation.
114
- u8 *biomemap;
116
+ biome_t *biomemap;
115
117
116
118
protected:
117
119
BiomeManager *m_bmgr;
@@ -157,7 +159,7 @@ class BiomeGenOriginal : public BiomeGen {
157
159
Biome *calcBiomeAtPoint (v3s16 pos) const ;
158
160
void calcBiomeNoise (v3s16 pmin);
159
161
160
- u8 *getBiomes (s16 *heightmap);
162
+ biome_t *getBiomes (s16 *heightmap);
161
163
Biome *getBiomeAtPoint (v3s16 pos) const ;
162
164
Biome *getBiomeAtIndex (size_t index, s16 y) const ;
163
165
@@ -218,9 +220,6 @@ class BiomeManager : public ObjDefManager {
218
220
219
221
virtual void clear ();
220
222
221
- // Looks for pos in the biome cache, and if non-existent, looks up by noise
222
- u8 getBiomeAtPoint (v3s16 pos);
223
-
224
223
private:
225
224
IGameDef *m_gamedef;
226
225
0 commit comments