forked from aburch/simutrans
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathdummy.h
39 lines (32 loc) · 726 Bytes
/
dummy.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
/*
* This file is part of the Simutrans-Extended project under the Artistic License.
* (see LICENSE.txt)
*/
#ifndef OBJ_DUMMY_H
#define OBJ_DUMMY_H
#include "simobj.h"
#include "../display/simimg.h"
/**
* A dummy type for old things, which are now ignored
*/
class dummy_obj_t : public obj_t
{
public:
dummy_obj_t(loadsave_t* file) :
#ifdef INLINE_OBJ_TYPE
obj_t(obj_t::undefined)
#else
obj_t()
#endif
{
rdwr(file);
// do not remove from this position, since there will be nothing
obj_t::set_flag(obj_t::not_on_map);
}
#ifdef INLINE_OBJ_TYPE
#else
typ get_typ() const OVERRIDE { return obj_t::undefined; }
#endif
image_id get_image() const OVERRIDE { return IMG_EMPTY; }
};
#endif