00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * (at your option) any later version. * 00007 * * 00008 ***************************************************************************/ 00009 00010 #ifndef weaponrangelayerH 00011 #define weaponrangelayerH 00012 00013 #include "typen.h" 00014 #include "vehicle.h" 00015 00016 00017 #include "mapdisplayinterface.h" 00018 00019 #include "mapdisplay.h" 00020 00021 00022 00023 00024 class UnitWeaponRangeLayer : public MapLayer { 00025 Surface& icon1; 00026 Surface& icon2; 00027 GameMap* gamemap; 00028 00029 map<MapCoordinate,int> fields; 00030 00031 void markField( const MapCoordinate& pos ); 00032 00033 bool addUnit( Vehicle* veh ); 00034 void reset(); 00035 00036 bool fieldVisible( const MapCoordinate& pos ); 00037 00038 public: 00039 00040 void operateField( GameMap* actmap, const MapCoordinate& pos ); 00041 00042 UnitWeaponRangeLayer(); 00043 00044 bool onLayer( int layer ) { return layer == 17; }; 00045 00046 void paintSingleField( const MapRenderer::FieldRenderInfo& fieldInfo, int layer, const SPoint& pos ); 00047 }; 00048 00049 00050 #endif
1.5.1