00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef spfstH
00028 #define spfstH
00029
00030 #include <sigc++/sigc++.h>
00031
00032
00033 #include "typen.h"
00034 #include "gamemap.h"
00035
00036
00038 extern void putbuilding( GameMap* gamemap,
00039 const MapCoordinate& entryPosition,
00040 int color,
00041 const BuildingType* buildingtyp,
00042 int completion,
00043 int ignoreunits = 0 );
00044
00045
00047 extern void calculateallobjects( GameMap* m );
00048
00056 extern void calculateobject(int x,
00057 int y,
00058 bool mof,
00059 const ObjectType* obj,
00060 GameMap* gamemap );
00061
00062 extern void calculateobject( const MapCoordinate& pos,
00063 bool mof,
00064 const ObjectType* obj,
00065 GameMap* gamemap );
00066
00067
00068
00076 extern int fieldAccessible( const MapField* field,
00077 const Vehicle* vehicle,
00078 int uheight = -2,
00079 const bool* attacked = NULL,
00080 bool ignoreVisibility = false );
00081
00082
00085 extern void checkunitsforremoval( GameMap* gamemap );
00086
00088 extern void checkobjectsforremoval( GameMap* gamemap );
00089
00091 extern int getmaxwindspeedforunit ( const Vehicle* eht );
00092
00096 extern int getwindheightforunit ( const Vehicle* eht, int uheight = -1 );
00097
00098
00107 extern int terrainaccessible ( const MapField* field, const Vehicle* vehicle, int uheight = -1 );
00108
00121 extern int terrainaccessible2 ( const MapField* field, const Vehicle* vehicle, int uheight = -1 );
00122
00123
00133 int terrainaccessible2 ( const MapField* field, const TerrainAccess& terrainAccess, int uheight );
00134
00135
00142 extern int getheightdelta ( const ContainerBase* c1, const ContainerBase* c2 );
00143
00149
00150 extern bool fieldvisiblenow( const MapField* pe, Vehicle* veh, int player );
00151 inline bool fieldvisiblenow( const MapField* pe, int player ) { return fieldvisiblenow( pe, NULL, player); };
00152 inline bool fieldvisiblenow( const MapField* pe, Vehicle* veh ) { return fieldvisiblenow( pe, veh, pe->getMap()->actplayer); };
00153 inline bool fieldvisiblenow( const MapField* pe ) { return fieldvisiblenow( pe, pe->getMap()->actplayer);};
00155
00161
00162 extern VisibilityStates fieldVisibility ( const MapField* pe );
00163 extern VisibilityStates fieldVisibility ( const MapField* pe, int player );
00165
00166
00167 extern SigC::Signal0<void> repaintMap;
00168 extern SigC::Signal0<void> repaintDisplay;
00169 extern SigC::Signal0<void> updateFieldInfo;
00170 extern SigC::Signal0<void> cursorMoved;
00171
00173 extern SigC::Signal0<void> viewChanged;
00174 extern SigC::Signal1<void,GameMap*> mapChanged;
00175 extern SigC::Signal1<void,ContainerBase*> showContainerInfo;
00176 extern SigC::Signal1<void,VehicleType*> showVehicleTypeInfo;
00177 extern SigC::Signal0<bool> idleEvent;
00178 extern SigC::Signal1<void, const Context&> fieldCrossed;
00179
00180 extern void displaymap();
00181
00182
00183 #endif
00184
00185