Micropolis
|
Implements tool actions and effects for Micropolis game. More...
#include "micropolis.h"
Go to the source code of this file.
Functions | |
static short | checkBigZone (MapTile id, short *deltaHPtr, short *deltaVPtr) |
Variables | |
static const short | gCostOf [] |
static const short | gToolSize [] |
static short | idArray [29] |
static const BuildingProperties | residentialZoneBuilding |
static const BuildingProperties | commercialZoneBuilding |
static const BuildingProperties | industrialZoneBuilding |
static const BuildingProperties | policeStationBuilding |
static const BuildingProperties | fireStationBuilding |
static const BuildingProperties | stadiumBuilding |
static const BuildingProperties | coalPowerBuilding |
static const BuildingProperties | nuclearPowerBuilding |
static const BuildingProperties | seaportBuilding |
static const BuildingProperties | airportBuilding |
Implements tool actions and effects for Micropolis game.
This file defines the behavior and effects of various tools (like bulldozer, road construction, zone creation) used in Micropolis. It includes functions for handling tool actions, applying their effects to the game world, and managing the cost and consequences of these actions. The file also contains logic for specific tools such as query, wire, park, land alteration, and various zone constructions (residential, commercial, industrial, etc.).
Definition in file tool.cpp.
|
static |
Compute where the 'center' (at (1,1)) of the zone is, depending on where the user clicked.
Only inner tiles are recognized, and possibly not even complete (ie stadium while game is playing).
id | Tile character value of the tile that the user clicked on. |
deltaHPtr | Pointer where horizontal position correction is written to. |
deltaVPtr | Pointer where vertical position correction is written to. |
0
if clicked outside zone). Definition at line 402 of file tool.cpp.
References COALSMOKE3, NUCLEAR, PORT, POWERPLANT, and STADIUM.
Referenced by Micropolis::bulldozerTool().
|
static |
Building properties of a airport.
Definition at line 1278 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Building properties of a coal power station.
Definition at line 1266 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Building properties of a commercial zone.
Definition at line 1246 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Building properties of a fire station.
Definition at line 1258 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Cost of each tool. Maybe move this information to eg BuildingProperties?
Definition at line 216 of file tool.cpp.
Referenced by Micropolis::buildBuilding(), Micropolis::bulldozerTool(), Micropolis::prepareBuildingSite(), Micropolis::putDownForest(), Micropolis::putDownLand(), Micropolis::putDownNetwork(), Micropolis::putDownPark(), and Micropolis::putDownWater().
|
static |
Size of each tool.
Definition at line 230 of file tool.cpp.
Referenced by Micropolis::toolDrag().
|
static |
|
static |
Building properties of a industrial zone.
Definition at line 1250 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Building properties of a nuclear power station.
Definition at line 1270 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Building properties of a police station.
Definition at line 1254 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Building properties of a residential zone.
Definition at line 1242 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Building properties of a seaport.
Definition at line 1274 of file tool.cpp.
Referenced by Micropolis::doTool().
|
static |
Building properties of a stadium.
Definition at line 1262 of file tool.cpp.
Referenced by Micropolis::doTool().