ScummVM API documentation
map_entity.h
1
/* ScummVM - Graphic Adventure Engine
2
*
3
* ScummVM is the legal property of its developers, whose names
4
* are too numerous to list here. Please refer to the COPYRIGHT
5
* file distributed with this source distribution.
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*
20
*/
21
22
#ifndef NUVIE_MISC_MAP_ENTITY_H
23
#define NUVIE_MISC_MAP_ENTITY_H
24
25
#include "ultima/nuvie/core/nuvie_defs.h"
26
27
namespace
Ultima {
28
namespace
Nuvie {
29
30
class
Actor;
31
class
MapCoord;
32
class
NuvieAnim;
33
class
Obj;
34
35
typedef
enum
{
36
ENT_NOTHING = 0,
37
ENT_ACTOR,
38
ENT_OBJ,
39
ENT_ANIM
40
} EntityType;
41
42
/* Any object on the map ("in the world") that isn't part of the map.
43
* WARNING: It just points to another object, and doesn't copy it.
44
*/
45
typedef
struct
MapEntity_s
{
46
EntityType entity_type;
47
union
{
48
char
*data;
49
Actor
*actor;
50
Obj
*obj;
51
NuvieAnim
*anim;
52
};
53
MapEntity_s
() {
54
entity_type = ENT_NOTHING;
55
data =
nullptr
;
56
}
57
MapEntity_s
(
Actor
*a) {
58
entity_type = ENT_ACTOR;
59
actor = a;
60
}
61
MapEntity_s
(
Obj
*o) {
62
entity_type = ENT_OBJ;
63
obj = o;
64
}
65
MapEntity_s
(
NuvieAnim
*a) {
66
entity_type = ENT_ANIM;
67
anim = a;
68
}
69
}
MapEntity
;
70
71
}
// End of namespace Nuvie
72
}
// End of namespace Ultima
73
74
#endif
Ultima::Nuvie::Actor
Definition:
actor.h:174
Ultima::Nuvie::NuvieAnim
Definition:
anim_manager.h:108
Ultima::Nuvie::Obj
Definition:
obj.h:84
Ultima::Nuvie::MapEntity_s
Definition:
map_entity.h:45
engines
ultima
nuvie
misc
map_entity.h
Generated on Sat Oct 24 2026 09:26:31 for ScummVM API documentation by
1.9.4