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

prehistoricevents.cpp File Reference

The old event system of ASC, is only used to load old maps. More...

#include <stdio.h>
#include <cstring>
#include "global.h"
#include "prehistoricevents.h"
#include "gameeventsystem.h"
#include "gameevents.h"
#include "dialog.h"
#include "buildings.h"
#include "gamemap.h"

Include dependency graph for prehistoricevents.cpp:

Go to the source code of this file.

Defines

#define cconnection_destroy   1
#define cconnection_conquer   2
#define cconnection_lose   4
#define cconnection_seen   8
#define cconnection_areaentered_anyunit   16
#define cconnection_areaentered_specificunit   32
#define ceventtrigger_and   1
#define ceventtrigger_or   2
#define ceventtrigger_not   4
#define ceventtrigger_klammerauf   8
#define ceventtrigger_2klammerauf   16
#define ceventtrigger_2klammerzu   32
#define ceventtrigger_klammerzu   64
#define ceventactionnum   22

Typedefs

typedef tevent * pevent

Enumerations

enum  {
  cemessage, ceweatherchange, cenewtechnology, celosecampaign,
  cerunscript, cenewtechnologyresearchable, cemapchange, ceeraseevent,
  cecampaignend, cenextmap, cereinforcement, ceweatherchangecomplete,
  cenewvehicledeveloped, cepalettechange, cealliancechange, cewindchange,
  cenothing, cegameparamchange, ceellipse, ceremoveellipse,
  cechangebuildingdamage, ceaddobject
}
enum  {
  ceventt_turn = 1, ceventt_buildingconquered, ceventt_buildinglost, ceventt_buildingdestroyed,
  ceventt_unitlost, ceventt_technologyresearched, ceventt_event, ceventt_unitconquered,
  ceventt_unitdestroyed, ceventt_allenemyunitsdestroyed, ceventt_allunitslost, ceventt_allenemybuildingsdestroyed,
  ceventt_allbuildingslost, ceventt_energytribute, ceventt_materialtribute, ceventt_fueltribute,
  ceventt_any_unit_enters_polygon, ceventt_specific_unit_enters_polygon, ceventt_building_seen, ceventt_irrelevant
}

Functions

EventreadOldEvent (pnstream stream, GameMap *gamemap, map< int, int > &eventTranslation, map< EventTriggered *, int > &eventTriggerEvents)
void readOldEventLists (pnstream stream, bool passedEvents, GameMap *spfld)

Variables

const char * ceventtrigger []
const char * cconnections [6] = {"destroyed", "conquered", "lost", "seen", "area entererd by any unit", "area entered by specific unit"}
 The different connections of something, be it unit, building, or field, to an event.
const int ceventtriggernum = 21
const char * ceventtriggerconn [] = {"AND ", "OR ", "NOT ", "( ", "(( ", ")) ", ") ", "Clear "}
const char * ceventactions [ceventactionnum]
 All actions that can be performed by events.


Detailed Description

The old event system of ASC, is only used to load old maps.

Definition in file prehistoricevents.cpp.


Define Documentation

#define cconnection_areaentered_anyunit   16
 

Definition at line 259 of file prehistoricevents.cpp.

Referenced by AnyUnitEntersPolygon::fieldOperator(), and BaseVehicleMovement::moveunitxy().

#define cconnection_areaentered_specificunit   32
 

Definition at line 260 of file prehistoricevents.cpp.

Referenced by SpecificUnitEntersPolygon::arm(), SpecificUnitEntersPolygon::fieldOperator(), and BaseVehicleMovement::moveunitxy().

#define cconnection_conquer   2
 

Definition at line 256 of file prehistoricevents.cpp.

#define cconnection_destroy   1
 

Definition at line 255 of file prehistoricevents.cpp.

#define cconnection_lose   4
 

Definition at line 257 of file prehistoricevents.cpp.

#define cconnection_seen   8
 

Definition at line 258 of file prehistoricevents.cpp.

Referenced by BuildingSeen::arm(), and evaluatevisibilityfield().

#define ceventactionnum   22
 

Definition at line 283 of file prehistoricevents.cpp.

#define ceventtrigger_2klammerauf   16
 

Definition at line 271 of file prehistoricevents.cpp.

Referenced by readOldEvent().

#define ceventtrigger_2klammerzu   32
 

Definition at line 272 of file prehistoricevents.cpp.

Referenced by readOldEvent().

#define ceventtrigger_and   1
 

Definition at line 267 of file prehistoricevents.cpp.

Referenced by readOldEvent().

#define ceventtrigger_klammerauf   8
 

Definition at line 270 of file prehistoricevents.cpp.

Referenced by readOldEvent().

#define ceventtrigger_klammerzu   64
 

Definition at line 273 of file prehistoricevents.cpp.

Referenced by readOldEvent().

#define ceventtrigger_not   4
 

Definition at line 269 of file prehistoricevents.cpp.

Referenced by readOldEvent().

#define ceventtrigger_or   2
 

Definition at line 268 of file prehistoricevents.cpp.

Referenced by readOldEvent().


Typedef Documentation

typedef class tevent* pevent
 

Definition at line 165 of file prehistoricevents.cpp.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
cemessage 
ceweatherchange 
cenewtechnology 
celosecampaign 
cerunscript 
cenewtechnologyresearchable 
cemapchange 
ceeraseevent 
cecampaignend 
cenextmap 
cereinforcement 
ceweatherchangecomplete 
cenewvehicledeveloped 
cepalettechange 
cealliancechange 
cewindchange 
cenothing 
cegameparamchange 
ceellipse 
ceremoveellipse 
cechangebuildingdamage 
ceaddobject 

Definition at line 38 of file prehistoricevents.cpp.

anonymous enum
 

Enumeration values:
ceventt_turn 
ceventt_buildingconquered 
ceventt_buildinglost 
ceventt_buildingdestroyed 
ceventt_unitlost 
ceventt_technologyresearched 
ceventt_event 
ceventt_unitconquered 
ceventt_unitdestroyed 
ceventt_allenemyunitsdestroyed 
ceventt_allunitslost 
ceventt_allenemybuildingsdestroyed 
ceventt_allbuildingslost 
ceventt_energytribute 
ceventt_materialtribute 
ceventt_fueltribute 
ceventt_any_unit_enters_polygon 
ceventt_specific_unit_enters_polygon 
ceventt_building_seen 
ceventt_irrelevant 

Definition at line 49 of file prehistoricevents.cpp.


Function Documentation

Event * readOldEvent pnstream  stream,
GameMap gamemap,
map< int, int > &  eventTranslation,
map< EventTriggered *, int > &  eventTriggerEvents
 

Definition at line 477 of file prehistoricevents.cpp.

References PrehistoricEventStructure::a, Event::action, Event::AND, asc_malloc(), ceaddobject, cechangebuildingdamage, ceellipse, cegameparamchange, celosecampaign, cemapchange, cemessage, cenextmap, cenothing, ceremoveellipse, ceventactions, ceventt_allbuildingslost, ceventt_allenemybuildingsdestroyed, ceventt_allenemyunitsdestroyed, ceventt_allunitslost, ceventt_any_unit_enters_polygon, ceventt_building_seen, ceventt_buildingconquered, ceventt_buildingdestroyed, ceventt_buildinglost, ceventt_event, ceventt_specific_unit_enters_polygon, ceventt_technologyresearched, ceventt_turn, ceventt_unitconquered, ceventt_unitdestroyed, ceventt_unitlost, ceventtrigger, ceventtrigger_2klammerauf, ceventtrigger_2klammerzu, ceventtrigger_and, ceventtrigger_klammerauf, ceventtrigger_klammerzu, ceventtrigger_not, ceventtrigger_or, ceweatherchange, ceweatherchangecomplete, cewindchange, PrehistoricEventStructure::datasize, Event::description, PrehistoricEventStructure::description, displaymessage(), Event::id, PrehistoricEventStructure::id, PrehistoricEventStructure::intdata, magic, Event::OR, pi, PrehistoricEventStructure::rawdata, tnstream::readdata(), tnstream::readInt(), FieldAddressing::setField(), FieldAddressing::setGlobal(), EventAction::setMap(), FieldAddressing::setPolygon(), Event::trigger, PrehistoricEventStructure::trigger, PrehistoricEventStructure::trigger_data, PrehistoricEventStructure::triggerconnect, Event::triggerConnection, and Poly_gon::vertex.

Referenced by readOldEventLists().

void readOldEventLists pnstream  stream,
bool  passedEvents,
GameMap spfld
 

Definition at line 311 of file prehistoricevents.cpp.

References displaymessage(), GameMap::events, Event::Executed, tnstream::getLocation(), tnstream::readInt(), readOldEvent(), and Event::status.

Referenced by tsavegameloaders::loadgame(), and tnetworkloaders::loadnwgame().


Variable Documentation

const char * cconnections = {"destroyed", "conquered", "lost", "seen", "area entererd by any unit", "area entered by specific unit"}
 

The different connections of something, be it unit, building, or field, to an event.

Definition at line 290 of file prehistoricevents.cpp.

const char * ceventactions
 

Initial value:

 {"message", "weather change", "new technology discovered", "lose campaign", "run script + next map",
                                               "new technology researchable", "map change", "discarded [ was erase event ]", "end campaign", "next map",
                                               "reinforcement","weather change completed", "new vehicle developed","palette change",
                                               "alliance change","wind change", "nothing", "change game parameter","paint ellipse","remove ellipse",
                                               "change building damage", "add object"}
All actions that can be performed by events.

Definition at line 295 of file prehistoricevents.cpp.

Referenced by readOldEvent().

const char * ceventtrigger
 

Initial value:

 {"*NONE*", "turn/move >=", "building conquered", "building lost",
                                                 "building destroyed", "unit lost", "technology researched",
                                                 "event", "unit conquered", "unit destroyed", "all enemy units destroyed",
                                                 "all units lost", "all enemy buildings destroyed/captured", "all buildings lost",
                                                 "energy tribute <", "material tribute <", "fuel tribute <",
                                                 "any unit enters polygon", "specific unit enters polygon", "building is seen", "irrelevant (used internally)"}

Definition at line 301 of file prehistoricevents.cpp.

Referenced by readOldEvent().

const char * ceventtriggerconn = {"AND ", "OR ", "NOT ", "( ", "(( ", ")) ", ") ", "Clear "}
 

Definition at line 292 of file prehistoricevents.cpp.

const int ceventtriggernum = 21
 

Definition at line 265 of file prehistoricevents.cpp.


Generated on Tue Jun 24 02:05:41 2008 for Advanced Strategic Command by  doxygen 1.4.2