00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __MINIMAP_H__
00031 #define __MINIMAP_H__
00032
00034
00035
00036
00037
00038
00039 class CMinimap
00040 {
00041 template <const int BPP>
00042 void UpdateMapTerrain(void *const mpixels, const int mpitch,
00043 const void *const tpixels, const int tpitch);
00044
00045 void UpdateTerrain();
00046
00047 template <const int BPP>
00048 void UpdateSeen(void *const pixels, const int pitch);
00049
00050 public:
00051 CMinimap() : X(0), Y(0), W(0), H(0), XOffset(0), YOffset(0),
00052 WithTerrain(false), ShowSelected(false),
00053 Transparent(false), UpdateCache(false) {}
00054
00055 void UpdateXY(const Vec2i &pos);
00056 void UpdateSeenXY(const Vec2i &) {}
00057 void Update();
00058 void Create();
00059 void FreeOpenGL();
00060 void Reload();
00061 void Destroy();
00062 void Draw(int vx, int vy);
00063 void DrawCursor(int vx, int vy);
00064 void AddEvent(int x, int y, Uint32 color);
00065
00066 int Screen2MapX(int x);
00067 int Screen2MapY(int y);
00068
00069 int X;
00070 int Y;
00071 int W;
00072 int H;
00073 int XOffset;
00074 int YOffset;
00075 bool WithTerrain;
00076 bool ShowSelected;
00077 bool Transparent;
00078 bool UpdateCache;
00079 };
00080
00082
00083 #endif // !__MINIMAP_H__