#include <appconfig.h>
#include <tileheader.h>
Go to the source code of this file.
Data Structures | |
struct | _appConfig_01 |
appliation configuration. More... | |
struct | _defence_unit |
a defence unit structure More... | |
struct | _game_struct05 |
Structure kept around for historic purposes. More... | |
struct | _game_struct06a |
the central game structure. More... | |
struct | _history |
the structure containing graphical history More... | |
struct | _moveable_object |
a moveable item on the map More... | |
struct | _stat_to_value |
the statistic to value structure More... | |
struct | _vgame_struct |
volatile game structure More... | |
struct | _visual_tag |
game visual entities related to the game, but not the simulation More... | |
struct | zoneTypeValue |
the zone types for querying More... | |
Defines | |
#define | STATS_PER 4 |
the number of statistics held for a year/decade | |
#define | STATS_COUNT 10 |
number of years/decades kept | |
#define | STAT_ENTRIES (STATS_PER * STATS_COUNT) |
number of entries in array | |
#define | OFFSET_FOR_CASHFLOW_BC (1UL<<31) |
value for normalizing the cashflow within the range | |
#define | OFFSET_FOR_CASHFLOW_STAT ((~(Uint16)0) >> 1) |
this offset is 1/2 the value of an unsigned int16 | |
#define | CASHFLOW_STATMASK (0xffff) |
this is the mask for setting the cashflow value | |
#define | SIM_GAME_LOOP_DISASTER 2 |
how often the disasters are updated - in seconds | |
#define | SPEED_SLOW 15 |
the number of seconds in a month at slow speed | |
#define | SPEED_MEDIUM 10 |
the number of seconds in a month at medium speed | |
#define | SPEED_FAST 5 |
the number of seconds in a month at fast speed | |
#define | SPEED_TURBO 1 |
the number of seconds in a month at turbo speed | |
#define | SPEED_PAUSED 0 |
the number of seconds in a month at pause speed | |
#define | HORIZONTAL_TILESIZE 32 |
the number of tiles that are stored laterally on a 'tilestripe' | |
#define | SUPPLY_POWER_PLANT 100 |
number of power units supplied by a coal power plant | |
#define | SUPPLY_NUCLEAR_PLANT 300 |
number of power units supplied by a nuclear power plant | |
#define | SUPPLY_WATER_PUMP 200 |
number of zones supplied by a water pump | |
#define | INCOME_RESIDENTIAL 25 |
income from a residential zone per value level | |
#define | INCOME_COMMERCIAL 35 |
income from a commercial zone per value level | |
#define | INCOME_INDUSTRIAL 30 |
income from an industrial zone per value level | |
#define | UPKEEP_BRIDGE 10 |
upkeep cost of a bridge | |
#define | UPKEEP_ROAD 2 |
upkeep cost of a road | |
#define | UPKEEP_POWERLINE 1 |
upkeep cost of a powerline | |
#define | UPKEEP_NUCLEARPLANT 500 |
upkeep cost of a coal power plant | |
#define | UPKEEP_POWERPLANT 200 |
upkeep cost of a nuclear power plant | |
#define | UPKEEP_FIRE_STATIONS 150 |
upkeep cost of a fire station | |
#define | UPKEEP_POLICE_STATIONS 100 |
upkeep cost of a police station | |
#define | UPKEEP_MILITARY_BASES 500 |
upkeep cost of a military base | |
#define | NUM_OF_OBJECTS 10 |
the number of objects that may be on the screen at a time. | |
#define | OBJ_CHANCE_OF_TURNING 5 |
Chance of object turning either clockwise or anti-clockwise. | |
#define | NUM_OF_UNITS 10 |
the number of defence units that may be on the screen at a time. | |
#define | DEF_POLICE_START 0 |
index in object array that police units start from | |
#define | DEF_POLICE_END 2 |
index in object array that police units end at | |
#define | DEF_FIREMEN_START 3 |
index in object array that fireman units start from | |
#define | DEF_FIREMEN_END 7 |
index in object array that fireman units end at | |
#define | DEF_MILITARY_START 8 |
index in object array that military units start from | |
#define | DEF_MILITARY_END 9 |
index in object array that military units end at | |
#define | GRID_POWER (UInt8)1 |
code to say to update the power grid | |
#define | GRID_WATER (UInt8)2 |
code to say to update the water grid | |
#define | GRID_ALL (GRID_POWER|GRID_WATER) |
code to say to update both water and power grids | |
#define | CITYNAMELEN 20 |
the maximum length of the city name string | |
#define | CONFIG_VERSION 1 |
version number of the configuration file | |
#define | SAVEGAMEVERSION "PC07" |
save game version | |
#define | getMapWidth() (GG.mapx) |
get the map size | |
#define | getMapHeight() (GG.mapy) |
get the map height | |
#define | setMapVariables(X, Y) |
set the map variables for the vgame structure | |
#define | MapMul() (vgame.mapmul) |
get the map array size | |
#define | WorldSize() (vgame.mapmul) |
get the world pointer size .. based on map | |
#define | AddGridUpdate(T) (GG.gridsToUpdate |= (T)) |
add a grid to be updated | |
#define | NeedsUpdate(T) (GG.gridsToUpdate & (T)) |
Check if a grid need updating. | |
#define | ClearUpdate(T) (GG.gridsToUpdate &= (UInt8)(~(UInt8)(T))) |
Clear the need to update a sertain grid. | |
#define | WORLDPOS(x, y) ((x) + (y) * (getMapWidth())) |
get the position of a map location in the world array | |
#define | SaveSpeed() |
save the current speed, and change the speed to paused | |
#define | RestoreSpeed() |
restore the saved game speed | |
#define | getMonthsElapsed() (GG.TimeElapsed >> 2) |
get the number of months that have elapsed in the game | |
Typedefs | |
typedef UInt8 | welem_t |
the type of the world elements | |
typedef UInt8 | selem_t |
the type of the world status flags | |
typedef _history | stat_item |
the structure containing graphical history | |
typedef _moveable_object | MoveableObject |
a moveable item on the map | |
typedef _defence_unit | DefenceUnit |
a defence unit structure | |
typedef _game_struct05 | GameStruct05 |
Structure kept around for historic purposes. | |
typedef _game_struct06a | GameStruct06 |
the central game structure. | |
typedef _stat_to_value | stat_to_value |
the statistic to value structure | |
typedef GameStruct06 | GameStruct |
currently supported save game version | |
typedef _vgame_struct | vGameStruct |
volatile game structure | |
typedef _visual_tag | vGameVisuals |
game visual entities related to the game, but not the simulation | |
typedef _appConfig_01 | appConfig_01_t |
appliation configuration. | |
typedef appConfig_01_t | AppConfig_t |
currently used application conofiguration version | |
Enumerations | |
enum | disaster_t { diSTART = 0, diFireOutbreak, diPlantExplosion, diMonster, diDragon, diMeteor, diEND } |
the possible errors/warnings. More... | |
enum | syserror_t { seOutOfMemory = 1 } |
enum | problem_t { peSTART = 0, peFineOnMoney, peLowOnMoney, peOutOfMoney, peFineOnPower, peLowOnPower, peOutOfPower, peFineOnWater, peLowOnWater, peOutOfWater, peEND } |
enum | zoneType { ztWhat = 0, ztCommercial = Z_COMMERCIAL_SLUM, ztResidential, ztIndustrial } |
zone identification for scoring More... | |
enum | dirType { dtUp = 0, dtRight, dtDown, dtLeft } |
directions for checking power distribution routines More... | |
enum | StatisticItem { st_cashflow = 0, st_pollution, st_crime, st_residential, st_commercial, st_industrial, st_tail } |
the statistics structure. More... | |
enum | BuildCount { bc_count_residential = 0, bc_value_residential, bc_count_commercial, bc_value_commercial, bc_count_industrial, bc_value_industrial, bc_count_roads, bc_value_roads, bc_count_trees, bc_value_trees, bc_water, bc_coalplants, bc_nuclearplants, bc_powerlines, bc_waterpumps, bc_waterpipes, bc_waste , bc_fire, bc_fire_stations, bc_police_departments, bc_military_bases, bc_cashflow, bc_pollution, bc_crime, bc_count_rail, bc_value_rail, bc_tail } |
elements for the BuildCount[] array More... | |
enum | Objects { obj_monster = 0, obj_dragon, obj_chopper, obj_plane, obj_ship, obj_train, obj_power, obj_water } |
type of object More... | |
enum | DefenceUnitTypes |
The type of a defence unit. | |
enum | UpkeepEntries { ue_traffic = 0, ue_power, ue_defense, ue_tail } |
the entries in the upkeep array. More... | |
Functions | |
char * | getMonthString (UInt16 month, Char *string, UInt16 length) |
Function to return the character string for a month (short). | |
Variables | |
stat_to_value | statvalues [] |
the statistic to value array |
This consists of all the important types and structures that are needed to make the game function correctly.
Definition in file zakdef.h.
|
add a grid to be updated
Definition at line 195 of file zakdef.h. Referenced by Build_Destroy(), BuildSomething(), forceRedistribute(), InitGameStruct(), and PostLoadGame(). |
|
Clear the need to update a sertain grid.
Definition at line 206 of file zakdef.h. Referenced by Sim_Distribute_Specific(), and Sim_DoPhase(). |
|
Check if a grid need updating.
Definition at line 201 of file zakdef.h. Referenced by Sim_DoPhase(). |
|
the number of objects that may be on the screen at a time. Currently defined as a fixed count, if you exceed this value then it will cause an overflow of an array in the savegame structure Definition at line 120 of file zakdef.h. Referenced by DrawFieldWithoutInit(), LoadGameByIndex(), and MoveAllObjects(). |
|
the number of defence units that may be on the screen at a time. Currently defined as a fixed count, if you exceed this value then it will cause an overflow of an array in the savegame structure Definition at line 132 of file zakdef.h. Referenced by Build_Defence(), ContainsDefence(), DrawFieldWithoutInit(), LoadGameByIndex(), RemoveAllDefence(), and RemoveDefence(). |
|
Value: { \ GG.gameLoopSeconds = vgame.oldLoopSeconds; \ }
|
|
Value: { \ vgame.oldLoopSeconds = GG.gameLoopSeconds; \ GG.gameLoopSeconds = SPEED_PAUSED; \ }
|
|
Value: { \ GG.mapx = X; \ GG.mapy = Y; \ vgame.mapmul = (UInt16)GG.mapx * GG.mapy; \ }
Definition at line 179 of file zakdef.h. Referenced by PostLoadGame(), and setMapSize(). |
|
get the position of a map location in the world array
Definition at line 214 of file zakdef.h. Referenced by Build_Bulldoze(), Build_Destroy(), Build_Generic(), Build_Generic4(), Build_PowerLine(), Build_Rail(), Build_Road(), Build_WaterPipe(), BuildSomething(), BurnField(), CreateDragon(), CreateForest(), CreateFullRiver(), CreateMeteor(), CreateMonster(), CreateWaste(), DrawFieldWithoutInit(), GetZoneScore(), hoverUpdate(), RenderMaps(), UIDrawPlayArea(), and UpdateDisasters(). |
|
appliation configuration. This contains configuration information for an application; not for an individual game. |
|
the central game structure. This is the central game struct only one of this exists at a time and is called 'game'. This entire struct will be saved between games. Anything with an underscore will be removed later on. |
|
the structure containing graphical history the entries are logarithmically scaled. We have: 4 entries per year for the first 10 years Then we have: 4 entries per decade for the next 100 years |
|
volatile game structure Items that are needed during the execution of the game, but not needed for persistence. |
|
elements for the BuildCount[] array
Definition at line 351 of file zakdef.h. Referenced by RecordStatistics(). |
|
directions for checking power distribution routines
Definition at line 299 of file zakdef.h. Referenced by DistributeMoveOn(), MoveCursor(), ScrollDisplay(), and UIScrollDisplay(). |
|
the possible errors/warnings. Make sure they don't intersect as the overlap in the warning dialogs.
Definition at line 262 of file zakdef.h. Referenced by DoSpecificDisaster(). |
|
type of object
|
|
Definition at line 276 of file zakdef.h. Referenced by UIProblemNotify(). |
|
the statistics structure. This is used by the simulation to record the varoius values for use in the graph screen. The items are obtained using the buildcount array, so we need a mapping of the items in the build count array to the entries in the statistics array
Definition at line 323 of file zakdef.h. Referenced by RecordStatistics(). |
|
|
|
the entries in the upkeep array. If you add something here you will have to add it to the savegame structure so it will require revving up the savegame version. |
|
zone identification for scoring
Definition at line 291 of file zakdef.h. Referenced by GetScoreFor(), GetZoneScore(), and IsZone(). |
|
Function to return the character string for a month (short). Uses strftime to get the brief month name for a specific month.
Definition at line 18 of file pglobals.c. Referenced by getDate(). |
|
the statistic to value array this is used to produce the graphs. As all the values in the BuildCount array are 32bit values and all the statistic items are 16 bit values an amount of shifting is done to the build count value once it exceeds the maximum 16bit value |