Advanced Strategic Command
Classes | Macros | Typedefs | Enumerations | Functions | Variables
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.

Classes

class  PrehistoricEventStructure
 
class  PrehistoricEventStructure::LargeTriggerData
 
class  PrehistoricEventStructure::LargeTriggerData::PolygonEntered
 

Macros

#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 class 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 (tnstream *stream, GameMap *gamemap, map< int, int > &eventTranslation, map< EventTriggered *, int > &eventTriggerEvents)
 
void readOldEventLists (tnstream *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. More...
 
const int ceventtriggernum = 21
 
const char * ceventtriggerconn [] = {"AND ", "OR ", "NOT ", "( ", "(( ", ")) ", ") ", "Clear "}
 
const char * ceventactions [ceventactionnum]
 All actions that can be performed by events. More...
 

Detailed Description

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

Definition in file prehistoricevents.cpp.

Macro Definition Documentation

#define cconnection_areaentered_anyunit   16

Definition at line 259 of file prehistoricevents.cpp.

#define cconnection_areaentered_specificunit   32

Definition at line 260 of file prehistoricevents.cpp.

#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.

#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
Enumerator
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
Enumerator
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 ( tnstream stream,
GameMap gamemap,
map< int, int > &  eventTranslation,
map< EventTriggered *, int > &  eventTriggerEvents 
)

Definition at line 477 of file prehistoricevents.cpp.

References PrehistoricEventStructure::a, GameTime::abstime, Event::action, Event::AND, 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::LargeTriggerData::PolygonEntered::color, PrehistoricEventStructure::LargeTriggerData::PolygonEntered::data, PrehistoricEventStructure::datasize, PrehistoricEventStructure::LargeTriggerData::PolygonEntered::dataSize, Event::description, PrehistoricEventStructure::description, displaymessage(), Event::id, PrehistoricEventStructure::id, PrehistoricEventStructure::LargeTriggerData::id, PrehistoricEventStructure::intdata, EventTrigger::invert, magic, malloc(), GameTime::move(), PrehistoricEventStructure::LargeTriggerData::networkid, Event::OR, pi, PrehistoricEventStructure::rawdata, tnstream::readdata(), tnstream::readInt(), EventTrigger::setEvent(), FieldAddressing::setField(), FieldAddressing::setGlobal(), EventTrigger::setMap(), EventAction::setMap(), FieldAddressing::setPolygon(), PrehistoricEventStructure::LargeTriggerData::PolygonEntered::tempnwid, PrehistoricEventStructure::LargeTriggerData::PolygonEntered::tempxpos, PrehistoricEventStructure::LargeTriggerData::PolygonEntered::tempypos, PrehistoricEventStructure::LargeTriggerData::time, Event::trigger, PrehistoricEventStructure::trigger, PrehistoricEventStructure::trigger_data, PrehistoricEventStructure::triggerconnect, Event::triggerConnection, GameTime::turn(), PrehistoricEventStructure::LargeTriggerData::unitpolygon, PrehistoricEventStructure::LargeTriggerData::PolygonEntered::vehiclenetworkid, Poly_gon::vertex, PrehistoricEventStructure::LargeTriggerData::xpos, and PrehistoricEventStructure::LargeTriggerData::ypos.

Referenced by readOldEventLists().

void readOldEventLists ( tnstream stream,
bool  passedEvents,
GameMap spfld 
)

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.