82 const float weatherChance = rainChance + snowChance;
83 if (
frand() < weatherChance) {
CASSERT(lengthof(pa_format)==PA_NUM_EVENTS)
Terrain property table entry Terrain is defined by the file map_earth_terrain.png in pics/geoscape...
const char * getWeather(const byte *const color)
Translate color value to terrain type to random weather code.
const TerrainDef * findByName(const char *tname) const
#define MAX_TERRAINDEFS
Terrain property table Terrain is defined by the file map_earth_terrain.png in pics/geoscape. It is a map of the world where the different terrainTypes are drawn in different colors. The colors used in that map must have the exact RGB values as in the table, or they won't be recognized.
const char * pa_format[]
Player action format strings for netchannel transfer.
bool add(const TerrainDef *tdef)
Translate color value to terrain type to random weather code.
const TerrainDef * findByColor(const byte *const color) const
float getSnowChance(const byte *const color) const
const TerrainDef * terrainDefTable[MAX_TERRAINDEFS]
float frand(void)
Return random values between 0 and 1.
float getRainChance(const byte *const color) const