OpenMW
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
components
esm
defs.hpp
Go to the documentation of this file.
1
#ifndef OPENMW_ESM_DEFS_H
2
#define OPENMW_ESM_DEFS_H
3
4
#include <stdint.h>
5
6
#include <osg/Vec3f>
7
8
namespace
ESM
9
{
10
11
struct
TimeStamp
12
{
13
float
mHour
;
14
int
mDay
;
15
};
16
17
// Pixel color value. Standard four-byte rr,gg,bb,aa format.
18
typedef
uint32_t
Color
;
19
20
enum
Specialization
21
{
22
SPC_Combat
= 0,
23
SPC_Magic
= 1,
24
SPC_Stealth
= 2
25
};
26
27
enum
RangeType
28
{
29
RT_Self
= 0,
30
RT_Touch
= 1,
31
RT_Target
= 2
32
};
33
34
#pragma pack(push)
35
#pragma pack(1)
36
37
// Position and rotation
38
struct
Position
39
{
40
float
pos
[3];
41
42
// In radians
43
float
rot
[3];
44
45
osg::Vec3f
asVec3
()
const
46
{
47
return
osg::Vec3f(
pos
[0],
pos
[1],
pos
[2]);
48
}
49
};
50
#pragma pack(pop)
51
52
template
<
int
a,
int
b,
int
c,
int
d>
53
struct
FourCC
54
{
55
static
const
unsigned
int
value
= (((((d << 8) | c) << 8) | b) << 8) | a;
56
};
57
58
enum
RecNameInts
59
{
60
// format 0 / legacy
61
REC_ACTI
= 0x49544341,
62
REC_ALCH
= 0x48434c41,
63
REC_APPA
= 0x41505041,
64
REC_ARMO
= 0x4f4d5241,
65
REC_BODY
= 0x59444f42,
66
REC_BOOK
= 0x4b4f4f42,
67
REC_BSGN
= 0x4e475342,
68
REC_CELL
= 0x4c4c4543,
69
REC_CLAS
= 0x53414c43,
70
REC_CLOT
= 0x544f4c43,
71
REC_CNTC
= 0x43544e43,
72
REC_CONT
= 0x544e4f43,
73
REC_CREA
= 0x41455243,
74
REC_CREC
= 0x43455243,
75
REC_DIAL
= 0x4c414944,
76
REC_DOOR
= 0x524f4f44,
77
REC_ENCH
= 0x48434e45,
78
REC_FACT
= 0x54434146,
79
REC_GLOB
= 0x424f4c47,
80
REC_GMST
= 0x54534d47,
81
REC_INFO
= 0x4f464e49,
82
REC_INGR
= 0x52474e49,
83
REC_LAND
= 0x444e414c,
84
REC_LEVC
= 0x4356454c,
85
REC_LEVI
= 0x4956454c,
86
REC_LIGH
= 0x4847494c,
87
REC_LOCK
= 0x4b434f4c,
88
REC_LTEX
= 0x5845544c,
89
REC_MGEF
= 0x4645474d,
90
REC_MISC
= 0x4353494d,
91
REC_NPC_
= 0x5f43504e,
92
REC_NPCC
= 0x4343504e,
93
REC_PGRD
= 0x44524750,
94
REC_PROB
= 0x424f5250,
95
REC_RACE
= 0x45434152,
96
REC_REGN
= 0x4e474552,
97
REC_REPA
= 0x41504552,
98
REC_SCPT
= 0x54504353,
99
REC_SKIL
= 0x4c494b53,
100
REC_SNDG
= 0x47444e53,
101
REC_SOUN
= 0x4e554f53,
102
REC_SPEL
= 0x4c455053,
103
REC_SSCR
= 0x52435353,
104
REC_STAT
= 0x54415453,
105
REC_WEAP
= 0x50414557,
106
107
// format 0 - saved games
108
REC_SAVE
=
FourCC<'S','A','V','E'>::value
,
109
REC_JOUR_LEGACY
=
FourCC<0xa4,'U','O','R'>::value
,
// "\xa4UOR", rather than "JOUR", little oversight when magic numbers were
110
// calculated by hand, needs to be supported for older files now
111
REC_JOUR
=
FourCC<'J','O','U','R'>::value
,
112
REC_QUES
=
FourCC<'Q','U','E','S'>::value
,
113
REC_GSCR
=
FourCC<'G','S','C','R'>::value
,
114
REC_PLAY
=
FourCC<'P','L','A','Y'>::value
,
115
REC_CSTA
=
FourCC<'C','S','T','A'>::value
,
116
REC_GMAP
=
FourCC<'G','M','A','P'>::value
,
117
REC_DIAS
=
FourCC<'D','I','A','S'>::value
,
118
REC_WTHR
=
FourCC<'W','T','H','R'>::value
,
119
REC_KEYS
=
FourCC<'K','E','Y','S'>::value
,
120
REC_DYNA
=
FourCC<'D','Y','N','A'>::value
,
121
REC_ASPL
=
FourCC<'A','S','P','L'>::value
,
122
REC_ACTC
=
FourCC<'A','C','T','C'>::value
,
123
REC_MPRJ
=
FourCC<'M','P','R','J'>::value
,
124
REC_PROJ
=
FourCC<'P','R','O','J'>::value
,
125
REC_DCOU
=
FourCC<'D','C','O','U'>::value
,
126
REC_MARK
=
FourCC<'M','A','R','K'>::value
,
127
REC_ENAB
=
FourCC<'E','N','A','B'>::value
,
128
REC_CAM_
=
FourCC<'C','A','M','_'>::value
,
129
REC_STLN
=
FourCC<'S','T','L','N'>::value
,
130
REC_INPU
=
FourCC<'I','N','P','U'>::value
,
131
132
// format 1
133
REC_FILT
=
FourCC<'F','I','L','T'>::value
,
134
REC_DBGP
=
FourCC<'D','B','G','P'>::value
135
};
136
138
enum
SubRecNameInts
139
{
140
SREC_DELE
=
ESM::FourCC<'D','E','L','E'>::value
,
141
SREC_NAME
=
ESM::FourCC<'N','A','M','E'>::value
142
};
143
144
}
145
#endif
ESM::REC_ARMO
Definition:
defs.hpp:64
ESM::SPC_Magic
Definition:
defs.hpp:23
ESM::SREC_DELE
Definition:
defs.hpp:140
ESM::REC_ENCH
Definition:
defs.hpp:77
ESM::REC_ASPL
Definition:
defs.hpp:121
ESM::REC_QUES
Definition:
defs.hpp:112
ESM::REC_CAM_
Definition:
defs.hpp:128
ESM::REC_WEAP
Definition:
defs.hpp:105
ESM::REC_CSTA
Definition:
defs.hpp:115
ESM::Position::pos
float pos[3]
Definition:
defs.hpp:40
ESM::TimeStamp
Definition:
defs.hpp:11
ESM::REC_FILT
Definition:
defs.hpp:133
ESM::REC_STLN
Definition:
defs.hpp:129
ESM::REC_SSCR
Definition:
defs.hpp:103
ESM::REC_FACT
Definition:
defs.hpp:78
ESM::REC_LEVI
Definition:
defs.hpp:85
ESM::RT_Touch
Definition:
defs.hpp:30
ESM::REC_MPRJ
Definition:
defs.hpp:123
ESM::REC_LEVC
Definition:
defs.hpp:84
ESM::REC_MISC
Definition:
defs.hpp:90
ESM::FourCC::value
static const unsigned int value
Definition:
defs.hpp:55
ESM::REC_SAVE
Definition:
defs.hpp:108
ESM::Position::asVec3
osg::Vec3f asVec3() const
Definition:
defs.hpp:45
ESM::REC_PGRD
Definition:
defs.hpp:93
ESM::REC_DOOR
Definition:
defs.hpp:76
ESM::REC_INPU
Definition:
defs.hpp:130
ESM::REC_WTHR
Definition:
defs.hpp:118
ESM::SPC_Combat
Definition:
defs.hpp:22
ESM::REC_ACTC
Definition:
defs.hpp:122
ESM::REC_CREC
Definition:
defs.hpp:74
ESM::REC_GSCR
Definition:
defs.hpp:113
ESM::REC_DIAS
Definition:
defs.hpp:117
ESM::REC_JOUR
Definition:
defs.hpp:111
ESM::REC_BSGN
Definition:
defs.hpp:67
ESM::REC_RACE
Definition:
defs.hpp:95
ESM::REC_GMST
Definition:
defs.hpp:80
ESM::REC_STAT
Definition:
defs.hpp:104
ESM::RangeType
RangeType
Definition:
defs.hpp:27
ESM::REC_KEYS
Definition:
defs.hpp:119
ESM::REC_CREA
Definition:
defs.hpp:73
ESM::REC_JOUR_LEGACY
Definition:
defs.hpp:109
ESM::REC_LIGH
Definition:
defs.hpp:86
ESM::REC_MARK
Definition:
defs.hpp:126
ESM::REC_GMAP
Definition:
defs.hpp:116
ESM::REC_PROJ
Definition:
defs.hpp:124
ESM::Specialization
Specialization
Definition:
defs.hpp:20
ESM::RecNameInts
RecNameInts
Definition:
defs.hpp:58
ESM::REC_REGN
Definition:
defs.hpp:96
ESM::REC_SOUN
Definition:
defs.hpp:101
ESM::REC_LTEX
Definition:
defs.hpp:88
ESM::REC_LAND
Definition:
defs.hpp:83
ESM::REC_REPA
Definition:
defs.hpp:97
ESM::REC_APPA
Definition:
defs.hpp:63
ESM::REC_ENAB
Definition:
defs.hpp:127
ESM::REC_CLAS
Definition:
defs.hpp:69
ESM::TimeStamp::mHour
float mHour
Definition:
defs.hpp:13
ESM::REC_DBGP
only used in project files
Definition:
defs.hpp:134
ESM::REC_SPEL
Definition:
defs.hpp:102
ESM::SPC_Stealth
Definition:
defs.hpp:24
ESM::REC_BODY
Definition:
defs.hpp:65
ESM::REC_GLOB
Definition:
defs.hpp:79
ESM::REC_PLAY
Definition:
defs.hpp:114
ESM::REC_CNTC
Definition:
defs.hpp:71
ESM::Color
uint32_t Color
Definition:
defs.hpp:18
ESM::Position
Definition:
defs.hpp:38
ESM::REC_INGR
Definition:
defs.hpp:82
ESM::REC_PROB
Definition:
defs.hpp:94
ESM::REC_SNDG
Definition:
defs.hpp:100
ESM::REC_ACTI
Definition:
defs.hpp:61
ESM::REC_INFO
Definition:
defs.hpp:81
ESM::FourCC
Definition:
defs.hpp:53
ESM::REC_MGEF
Definition:
defs.hpp:89
ESM::REC_SKIL
Definition:
defs.hpp:99
ESM::REC_SCPT
Definition:
defs.hpp:98
ESM::REC_ALCH
Definition:
defs.hpp:62
ESM::Position::rot
float rot[3]
Definition:
defs.hpp:43
ESM::REC_BOOK
Definition:
defs.hpp:66
ESM::REC_DYNA
Definition:
defs.hpp:120
ESM::SubRecNameInts
SubRecNameInts
Common subrecords.
Definition:
defs.hpp:138
ESM::REC_CELL
Definition:
defs.hpp:68
ESM::REC_CONT
Definition:
defs.hpp:72
ESM::RT_Target
Definition:
defs.hpp:31
ESM::REC_LOCK
Definition:
defs.hpp:87
ESM::REC_NPC_
Definition:
defs.hpp:91
ESM::REC_CLOT
Definition:
defs.hpp:70
ESM::REC_NPCC
Definition:
defs.hpp:92
ESM::SREC_NAME
Definition:
defs.hpp:141
ESM::REC_DIAL
Definition:
defs.hpp:75
ESM::RT_Self
Definition:
defs.hpp:29
ESM::REC_DCOU
Definition:
defs.hpp:125
ESM::TimeStamp::mDay
int mDay
Definition:
defs.hpp:14
Generated on Tue Jan 24 2017 02:05:52 for OpenMW by
1.8.6