Pol  Revision:cb584c9
udatfile.h
Go to the documentation of this file.
1 
7 #ifndef UDATFILE_H
8 #define UDATFILE_H
9 
10 #include <vector>
11 
12 #include "clidata.h"
13 
14 namespace Pol
15 {
16 namespace Core
17 {
18 struct StaticRec
19 {
20  unsigned int flags;
21  unsigned short graphic;
22  signed char z;
23  char height;
24 
25  StaticRec( unsigned short graphic, signed char z )
26  : flags( tile_uoflags( graphic ) ),
27  graphic( graphic ),
28  z( z ),
29  height( tileheight( graphic ) )
30  {
31  }
32  StaticRec( unsigned short graphic, signed char z, unsigned int flags, char height )
33  : flags( flags ), graphic( graphic ), z( z ), height( height )
34  {
35  }
36 };
37 
38 typedef std::vector<StaticRec> StaticList;
39 
40 // TODO: the functions below are only used for uotool or uoconvert. Consider moving to a separate
41 // include.
42 void readstatics( StaticList& vec, unsigned short x, unsigned short y );
43 void readstatics( StaticList& vec, unsigned short x, unsigned short y, unsigned int flags );
44 void readallstatics( StaticList& vec, unsigned short x, unsigned short y );
45 bool findstatic( unsigned short x, unsigned short y, unsigned short graphic );
46 }
47 }
48 #endif
StaticRec(unsigned short graphic, signed char z)
Definition: udatfile.h:25
std::vector< StaticRec > StaticList
Definition: udatfile.h:38
void readstatics(StaticList &vec, unsigned short x, unsigned short y)
Definition: uofile07.cpp:20
void readallstatics(StaticList &vec, unsigned short x, unsigned short y)
Definition: uofile07.cpp:84
unsigned int tile_uoflags(unsigned short tilenum)
Definition: polfile2.cpp:61
char tileheight(unsigned short tilenum)
Definition: polfile2.cpp:34
StaticRec(unsigned short graphic, signed char z, unsigned int flags, char height)
Definition: udatfile.h:32
unsigned int flags
Definition: udatfile.h:20
bool findstatic(unsigned short x, unsigned short y, unsigned short graphic)
signed char z
Definition: udatfile.h:22
unsigned short graphic
Definition: udatfile.h:21
Definition: berror.cpp:12