3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
8 * See LICENSING which should be included
9 * along with this file for more details
15 #include "ivancommon.h"
36 virtual void Draw (truth
) const = 0;
37 void Save (outputfile
&) const;
38 void Load (inputfile
&);
39 int GetFlag (v2 Pos
) const { return FlagMap
[Pos
.X
][Pos
.Y
]; }
40 void AddFlag (v2 Pos
, int What
) { FlagMap
[Pos
.X
][Pos
.Y
] |= What
; }
41 square
*GetSquare (v2 Pos
) const { return Map
[Pos
.X
][Pos
.Y
]; }
42 square
*GetSquare (int x
, int y
) const { return Map
[x
][y
]; }
43 int GetXSize () const { return XSize
; }
44 int GetYSize () const { return YSize
; }
45 void SendNewDrawRequest ();
46 void Initialize (int, int);
47 square
*GetNeighbourSquare (v2
, int) const;
48 truth
IsValidPos (v2 Pos
) const { return Pos
.X
>= 0 && Pos
.Y
>= 0 && Pos
.X
< XSize
&& Pos
.Y
< YSize
; }
49 truth
IsValidPos (int X
, int Y
) const { return X
>= 0 && Y
>= 0 && X
< XSize
&& Y
< YSize
; }
50 const rect
&GetBorder () const { return Border
; }
51 void SetEntryPos (int, v2
);
57 feuLong XSizeTimesYSize
;
59 std::map
<int, v2
> EntryMap
;