| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#ifndef __signpost_h__ |
| 19 |
#define __signpost_h__ |
| 20 |
|
| 21 |
#include "glbdef.h" |
| 22 |
#include "itemstack.h" |
| 23 |
|
| 24 |
class SRAMSTREAM; |
| 25 |
|
| 26 |
class SIGNPOSTDATA |
| 27 |
{ |
| 28 |
public: |
| 29 |
SIGNPOSTDATA() {} |
| 30 |
SIGNPOSTDATA(int zero) {} |
| 31 |
|
| 32 |
void init(SIGNPOST_NAMES sign, int x, int y); |
| 33 |
|
| 34 |
bool isPos(int x, int y) const; |
| 35 |
void getPos(int &x, int &y) const; |
| 36 |
SIGNPOST_NAMES getSign() const; |
| 37 |
|
| 38 |
void save(SRAMSTREAM &os) const; |
| 39 |
void load(SRAMSTREAM &is); |
| 40 |
|
| 41 |
protected: |
| 42 |
unsigned int myPos:10; |
| 43 |
unsigned int mySign:6; |
| 44 |
}; |
| 45 |
|
| 46 |
|
| 47 |
class SIGNLIST |
| 48 |
{ |
| 49 |
public: |
| 50 |
SIGNLIST(); |
| 51 |
~SIGNLIST(); |
| 52 |
|
| 53 |
SIGNPOST_NAMES find(int x, int y) const; |
| 54 |
void append(SIGNPOST_NAMES sign, int x, int y); |
| 55 |
int entries() const { return myPosts.entries(); } |
| 56 |
|
| 57 |
void save(SRAMSTREAM &os) const; |
| 58 |
void load(SRAMSTREAM &is); |
| 59 |
|
| 60 |
protected: |
| 61 |
PTRSTACK<SIGNPOSTDATA> myPosts; |
| 62 |
}; |
| 63 |
|
| 64 |
#endif |
| 65 |
|