forked from aburch/simutrans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpillar.h
53 lines (40 loc) · 1.17 KB
/
pillar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef obj_pillar_h
#define obj_pillar_h
#include "../simobj.h"
#include "../descriptor/bridge_desc.h"
/**
* Bridge piece (visible)
*
* Hj. Malthaner
*/
class loadsave_t;
class karte_t;
class pillar_t : public obj_t
{
const bridge_desc_t *desc;
uint8 dir;
bool asymmetric;
image_id image;
protected:
void rdwr(loadsave_t *file);
public:
pillar_t(loadsave_t *file);
pillar_t(koord3d pos, player_t *player, const bridge_desc_t *desc, bridge_desc_t::img_t img, int hoehe);
const char* get_name() const { return "Pillar"; }
typ get_typ() const { return obj_t::pillar; }
const bridge_desc_t* get_desc() const { return desc; }
image_id get_image() const { return asymmetric ? IMG_EMPTY : image; }
// asymmetric pillars are placed at the southern/eastern boundary of the tile
// thus the images have to be displayed after vehicles
image_id get_front_image() const { return asymmetric ? image : IMG_EMPTY;}
// needs to check for hiding asymmetric pillars
void calc_image();
/**
* @return Einen Beschreibungsstring fuer das Objekt, der z.B. in einem
* Beobachtungsfenster angezeigt wird.
* @author Hj. Malthaner
*/
void show_info();
void rotate90();
};
#endif