completely reworked worldmap generator and configuration; "points of interests" now...
[k8-i-v-a-n.git] / src / game / wsquare.h
blobb19cb8f5def26c09837c184c118d8192d9c56f5f
1 /*
3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
6 * Public License
8 * See LICENSING which should be included
9 * along with this file for more details
12 #ifndef __WSQUARE_H__
13 #define __WSQUARE_H__
15 #include "ivancommon.h"
17 #include "square.h"
18 #include "worldmap.h"
21 class gwterrain;
22 class owterrain;
23 struct blitdata;
26 class wsquare : public square {
27 friend class worldmap;
28 public:
29 wsquare (worldmap *, v2);
30 virtual ~wsquare ();
32 virtual void Save (outputfile &) const;
33 virtual void Load (inputfile &);
34 void Draw (blitdata &);
35 void SetGWTerrain (gwterrain *);
36 gwterrain *GetGWTerrain () const { return GWTerrain; }
37 owterrain *GetOWTerrain () const { return OWTerrain; }
38 //void ChangeWTerrain (gwterrain *, owterrain *);
39 worldmap *GetWorldMap () const { return static_cast<worldmap*>(AreaUnder); }
40 void SetWorldMapUnder (worldmap *What) { AreaUnder = What; }
41 void UpdateMemorizedDescription (truth = false);
42 virtual gterrain *GetGTerrain () const;
43 virtual oterrain *GetOTerrain () const;
44 void ChangeGWTerrain (gwterrain *);
45 void ChangeOWTerrain (owterrain *);
46 void SetWTerrain (gwterrain *, owterrain *);
47 truth SignalSeen ();
48 void CalculateLuminance ();
49 wsquare* GetNeighbourWSquare (int I) const { return static_cast<worldmap*>(AreaUnder)->GetNeighbourWSquare(Pos, I); }
50 int GetWalkability () const;
51 virtual int GetSquareWalkability () const { return GetWalkability(); }
52 virtual truth CanBeSeenByPlayer (truth = false) const;
53 virtual truth CanBeSeenFrom (v2, sLong, truth = false) const;
55 protected:
56 void SetOWTerrain (owterrain *);
58 protected:
59 gwterrain *GWTerrain;
60 owterrain *OWTerrain;
64 #endif