Pol  Revision:cb584c9
miscrgn.h
Go to the documentation of this file.
1 
7 #ifndef MISCRGN_H
8 #define MISCRGN_H
9 
10 
11 #include "../clib/compilerspecifics.h"
12 #include "region.h"
13 #include "zone.h"
14 
15 namespace Pol
16 {
17 namespace Clib
18 {
19 class ConfigElem;
20 } // namespace Clib
21 } // namespace Pol
22 
23 namespace Pol
24 {
25 namespace Realms
26 {
27 class Realm;
28 }
29 namespace Core
30 {
31 class NoCastRegion : public Region
32 {
33  typedef Region base;
34 
35 public:
37  virtual size_t estimateSize() const POL_OVERRIDE;
38  bool nocast() const;
39 
40 private:
41  bool nocast_;
42 };
43 
44 inline bool NoCastRegion::nocast() const
45 {
46  return nocast_;
47 }
48 
49 
50 class LightRegion : public Region
51 {
52  typedef Region base;
53 
54 public:
56  virtual size_t estimateSize() const POL_OVERRIDE;
57  unsigned lightlevel;
58 };
59 
60 
61 class WeatherRegion : public Region
62 {
63  typedef Region base;
64 
65 public:
67  virtual size_t estimateSize() const POL_OVERRIDE;
68  void setweather( unsigned char weathertype, unsigned char severity, unsigned char aux );
69  unsigned char weathertype;
70  unsigned char severity;
71  unsigned char aux;
72  int lightoverride; // if -1, no override
73 };
74 
76 {
77 public:
78  WeatherDef( const char* name );
79  virtual ~WeatherDef();
80  void copy_default_regions();
81  virtual size_t estimateSize() const POL_OVERRIDE;
82 
83  bool assign_zones_to_region( const char* regionname, unsigned short x1, unsigned short y1,
84  unsigned short x2, unsigned short y2, Realms::Realm* realm );
85 
86 private:
87  RegionRealms default_regionrealms;
88 };
89 }
90 }
91 
92 #endif
#define POL_OVERRIDE
int lightlevel(unsigned short x, unsigned short y)
unsigned short RegionId
Definition: zone.h:23
std::string name
Definition: osmod.cpp:943
Definition: berror.cpp:12
RegionRealms default_regionrealms
Definition: miscrgn.h:87