Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Advanced Strategic Command Documentation

short walk through the source

THE central class of ASC is GameMap in gamemap.h . It is the anchor where nearly all elements of ASC are chained to. The global variable actmap is a pointer to the active map. There can be a maximum of 8 Player on a map, plus neutral units (which are handled like a 9th Player). Hence the array of 9 #tmap::player classes in #tmap.

Each player has units and buildings, which are stored in the lists Player::vehicleList and Player::buildingList . The terms units and vehicles are used synonymously in ASC. Since unit was a reserved word in Borland Pascal (the language that ASC was originally written in), we decided to use the term vehicle instead. But now, with ASC written in C++, 'unit' is also used.

Every building and unit is of a certain 'type': Vehicletype and BuildingType . These are stored in the data files which are loaded on startup and are globally available. They are not modified during runtime in any way and are referenced by the instances of Vehicle and Building. The Vehicletype has information that are shared by all vehicles of this 'type', like speed, weapon systems, accessable terrain etc, while the vehicle stores things like remaining movement for this turn, ammo, fuel and cargo.

The primary contents of a map are its fields ( tfield ). Each field has again a pointer to a certain weather of a TerrainType. Each TerrainType has up to 5 different weathers ("dry (standard)","light rain", "heavy rain", "few snow", "lot of snow"). If there is a unit or a building standing on a field, the field has a pointer to it: tfield::vehicle and tfield::building .

On the field can be several instances of Object. Objects are another central class of ASC. Roads, pipleines, trenches and woods are examples of objects. Vehicle and Building are NOT objects.

basic design of ASC

ClassDiagram1.png

Paragui

ASC uses the Paragui as widget engine. The documentation is available at terdon.asc-hq.org.
Generated on Fri May 9 01:27:50 2008 for Advanced Strategic Command by  doxygen 1.4.2