Advanced Strategic Command
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
FieldAddressing Class Referenceabstract

#include <gameevents.h>

Inheritance diagram for FieldAddressing:
Inheritance graph

Public Types

typedef vector< MapCoordinateFields
typedef vector< Poly_gonPolygons

Public Member Functions

void setField (const MapCoordinate &pos)
void setPolygon (const Poly_gon &poly_gon)
void setGlobal ()
virtual ~FieldAddressing ()

Protected Types

enum  AddressingMode { none, singleField, poly, global }

Protected Member Functions

 FieldAddressing (GameMap *&gamemap)
void readMapModificationData (tnstream &stream)
void writeMapModificationData (tnstream &stream)
virtual void fieldOperator (const MapCoordinate &mc)=0
void operate ()
void setpointabs (int x, int y)
void setup ()
- Protected Member Functions inherited from PolygonPainterSquareCoordinate
virtual void setpoint (int x, int y)
void setspecificpoint (int x, int y)
bool paintPolygon (const Poly_gon &poly)
- Protected Member Functions inherited from PolygonPainter< Poly_gon >
virtual void sortpolygon (Poly_gon &a)
virtual void painttriangle (typename Poly_gon::Point p[])
virtual void painthorizline (int x1, int x2, int y)
virtual void paintline (int x1, int y1, int x2, int y2)
virtual int getpolydir (const Poly_gon &a)
virtual double getsegmentdir (int dx, int dy)
virtual bool checkpolygon (const Poly_gon &poly)
 returns true if polygon correct More...
virtual bool checkline (typename Poly_gon::Point a, typename Poly_gon::Point b, typename Poly_gon::Point d, typename Poly_gon::Point e)
 returns true if lines a-b and c-d don't intersect More...
virtual ~PolygonPainter ()
bool paintPolygon (const Poly_gon &poly)

Protected Attributes

AddressingMode addressingMode
Fields fields
Polygons polygons


EventreadOldEvent (tnstream *stream, GameMap *gamemap, map< int, int > &eventTranslation, map< EventTriggered *, int > &eventTriggerEvents)

Detailed Description

Definition at line 86 of file gameevents.h.

Member Typedef Documentation

Definition at line 89 of file gameevents.h.

Definition at line 90 of file gameevents.h.

Member Enumeration Documentation


Definition at line 99 of file gameevents.h.

Constructor & Destructor Documentation

virtual FieldAddressing::~FieldAddressing ( )

Definition at line 95 of file gameevents.h.

FieldAddressing::FieldAddressing ( GameMap *&  gamemap)

Definition at line 98 of file gameevents.h.

Member Function Documentation

virtual void FieldAddressing::fieldOperator ( const MapCoordinate mc)
protectedpure virtual
void FieldAddressing::operate ( )
void FieldAddressing::readMapModificationData ( tnstream stream)
void FieldAddressing::setField ( const MapCoordinate pos)

Definition at line 1025 of file gameevents.cpp.

References addressingMode, fields, and singleField.

Referenced by readOldEvent().

void FieldAddressing::setGlobal ( )

Definition at line 1039 of file gameevents.cpp.

References addressingMode, and global.

Referenced by readOldEvent().

void FieldAddressing::setpointabs ( int  x,
int  y 

Implements PolygonPainterSquareCoordinate.

Definition at line 1003 of file gameevents.cpp.

References fieldOperator().

void FieldAddressing::setPolygon ( const Poly_gon poly_gon)

Definition at line 1032 of file gameevents.cpp.

References addressingMode, poly, and polygons.

Referenced by readOldEvent(), and CopyMap::selectArea().

void FieldAddressing::setup ( void  )
void FieldAddressing::writeMapModificationData ( tnstream stream)

Friends And Related Function Documentation

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

Definition at line 477 of file prehistoricevents.cpp.

Member Data Documentation

AddressingMode FieldAddressing::addressingMode
Fields FieldAddressing::fields
Polygons FieldAddressing::polygons

The documentation for this class was generated from the following files: