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.
|
static |
Building properties of a coal power station.
|
static |
Building properties of a commercial zone.
|
static |
Building properties of a fire station.
|
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::putDownLand(), and Micropolis::putDownNetwork().
|
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.
|
static |
Building properties of a nuclear power station.
|
static |
Building properties of a police station.
|
static |
Building properties of a residential zone.
|
static |
Building properties of a seaport.
|
static |
Building properties of a stadium.