Micropolis
|
Defines tools, building properties, and tool effects for the Micropolis game. More...
#include <map>
#include <list>
Go to the source code of this file.
Classes | |
class | ToolEffects |
class | BuildingProperties |
Typedefs | |
typedef unsigned short | MapValue |
typedef unsigned short | MapTile |
typedef std::map< Position, MapValue > | WorldModificationsMap |
typedef std::list< FrontendMessage * > | FrontendMessages |
Enumerations | |
enum | MapTileBits { PWRBIT = 0x8000 , CONDBIT = 0x4000 , BURNBIT = 0x2000 , BULLBIT = 0x1000 , ANIMBIT = 0x0800 , ZONEBIT = 0x0400 , ALLBITS = ZONEBIT | ANIMBIT | BULLBIT | BURNBIT | CONDBIT | PWRBIT , LOMASK = 0x03ff , BLBNBIT = BULLBIT | BURNBIT , BLBNCNBIT = BULLBIT | BURNBIT | CONDBIT , BNCNBIT = BURNBIT | CONDBIT } |
enum | EditingTool { TOOL_RESIDENTIAL , TOOL_COMMERCIAL , TOOL_INDUSTRIAL , TOOL_FIRESTATION , TOOL_POLICESTATION , TOOL_QUERY , TOOL_WIRE , TOOL_BULLDOZER , TOOL_RAILROAD , TOOL_ROAD , TOOL_STADIUM , TOOL_PARK , TOOL_SEAPORT , TOOL_COALPOWER , TOOL_NUCLEARPOWER , TOOL_AIRPORT , TOOL_NETWORK , TOOL_WATER , TOOL_LAND , TOOL_FOREST , TOOL_COUNT , TOOL_FIRST = TOOL_RESIDENTIAL , TOOL_LAST = TOOL_FOREST } |
Defines tools, building properties, and tool effects for the Micropolis game.
This header file includes definitions for various tools used in the game, along with the properties of buildings and the effects tools have on the game's world. It encompasses the core functionalities of tools, such as building, bulldozing, and querying, and their impact on the game's map and financial aspects. The classes and enumerations in this file form an integral part of the game's interaction mechanics, allowing players to modify and interact with the game world.
Definition in file tool.h.
typedef std::list<FrontendMessage *> FrontendMessages |
typedef unsigned short MapTile |
Value of a tile in the map array excluding the MapTileBits (that is, just a value from #MapCharacters).
typedef unsigned short MapValue |
Value of a tile in the map array incuding the MapTileBits.
typedef std::map<Position, MapValue> WorldModificationsMap |
enum EditingTool |
enum MapTileBits |
Status bits of a map tile.
ALLBITS should end with MASK.
Decide what to do with ANIMBIT (since sim-backend may not be the optimal place to do animation).
How many of these bits can be derived from the displayed tile?
Enumerator | |
---|---|
PWRBIT | bit 15, tile has power. |
CONDBIT | bit 14. tile can conduct electricity. |
BURNBIT | bit 13, tile can be lit. |
BULLBIT | bit 12, tile is bulldozable. |
ANIMBIT | bit 11, tile is animated. |
ZONEBIT | bit 10, tile is the center tile of the zone. |
ALLBITS | Mask for the bits-part of the tile. |
LOMASK | Mask for the Tiles part of the tile. |