spfst.h

Go to the documentation of this file.
00001 
00007 /*
00008     This file is part of Advanced Strategic Command; http://www.asc-hq.de
00009     Copyright (C) 1994-2010  Martin Bickel  and  Marc Schellenberger
00010 
00011     This program is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     This program is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU General Public License for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with this program; see the file COPYING. If not, write to the 
00023     Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
00024     Boston, MA  02111-1307  USA
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 

Generated on Mon May 21 01:26:37 2012 for Advanced Strategic Command by  doxygen 1.5.1