|
UFO: Alien Invasion
|
#include <q_shared.h>

Public Member Functions | |
| TerrainDefs () | |
| ~TerrainDefs () | |
| bool | add (const TerrainDef *tdef) |
| Translate color value to terrain type to random weather code. | |
| const char * | getWeather (const byte *const color) |
| Translate color value to terrain type to random weather code. | |
| float | getSurvivalChance (const byte *const color) const |
| Translate color value to terrain type and then to survival probability. | |
| float | getRainChance (const byte *const color) const |
| float | getSnowChance (const byte *const color) const |
| const char * | getTerrainName (const byte *const color) const |
| Translate color value to terrain type. | |
Private Member Functions | |
| const TerrainDef * | findByColor (const byte *const color) const |
| const TerrainDef * | findByColor (byte red, byte green, byte blue) const |
| const TerrainDef * | findByName (const char *tname) const |
Private Attributes | |
| const TerrainDef * | terrainDefTable [MAX_TERRAINDEFS] |
Definition at line 389 of file q_shared.h.
|
inline |
Definition at line 417 of file q_shared.h.
References terrainDefTable.
|
inline |
Definition at line 420 of file q_shared.h.
References i, MAX_TERRAINDEFS, and terrainDefTable.
| bool TerrainDefs::add | ( | const TerrainDef * | tdef | ) |
Translate color value to terrain type to random weather code.
| [in] | tdef | The terrain definition to add |
Definition at line 53 of file q_shared.cpp.
References findByColor(), findByName(), i, MAX_TERRAINDEFS, TerrainDef::rgbBlue, TerrainDef::rgbGreen, TerrainDef::rgbRed, terrainDefTable, and TerrainDef::terrainName.
|
inlineprivate |
Definition at line 396 of file q_shared.h.
References green, i, MAX_TERRAINDEFS, red, TerrainDef::rgbBlue, TerrainDef::rgbGreen, TerrainDef::rgbRed, and terrainDefTable.
|
inlineprivate |
Definition at line 393 of file q_shared.h.
References findByColor().
Referenced by add(), findByColor(), getRainChance(), getSnowChance(), getSurvivalChance(), and getTerrainName().
|
inlineprivate |
Definition at line 406 of file q_shared.h.
References i, MAX_TERRAINDEFS, Q_streq, terrainDefTable, and TerrainDef::terrainName.
Referenced by add().
|
inline |
Definition at line 439 of file q_shared.h.
References findByColor(), and TerrainDef::rainChance.
Referenced by getWeather().
|
inline |
Definition at line 443 of file q_shared.h.
References findByColor(), and TerrainDef::snowChance.
Referenced by getWeather().
|
inline |
Translate color value to terrain type and then to survival probability.
| [in] | color | the color value from the terrain mask |
Definition at line 435 of file q_shared.h.
References findByColor(), and TerrainDef::survivalChance.
|
inline |
Translate color value to terrain type.
| [in] | color | the color value from the terrain mask |
Definition at line 455 of file q_shared.h.
References findByColor(), and TerrainDef::terrainName.
| const char * TerrainDefs::getWeather | ( | const byte *const | color | ) |
Translate color value to terrain type to random weather code.
| [in] | color | The color value from the terrain mask |
Definition at line 78 of file q_shared.cpp.
References EQUAL_EPSILON, frand(), getRainChance(), and getSnowChance().
|
private |
Definition at line 391 of file q_shared.h.
Referenced by add(), findByColor(), findByName(), TerrainDefs(), and ~TerrainDefs().