Spyro 1 Reverse Engineering
Decompilation of functions from Spyro 1 into human readable C
Loading...
Searching...
No Matches
moby.h
Go to the documentation of this file.
1
#ifndef MOBY_H
2
#define MOBY_H
3
4
#include <
common.h
>
5
6
//~~~~~~~~~
7
//Constants
8
//~~~~~~~~~
9
#define MOBY_SIZE 0x58
10
11
#define ARROW_RIGHT 0
12
#define ARROW_LEFT 1
13
14
enum
HudMobyTypes
15
{
16
MOBY_ID_WATERFALL_PARTICLE_SPAWNER
= 0xB,
17
MOBY_ID_LIFE_FIGURINE
= 0xE,
18
MOBY_ID_EGG
= 0x22,
19
MOBY_ID_SPYRO_HEAD
= 0x3A,
20
MOBY_ID_EXCAILMATION
= 0x4B,
21
MOBY_ID_COMMA
= 0x4C,
22
MOBY_ID_KEY
= 0xAD,
23
MOBY_ID_DRAGON_FIGURINE
= 0x1FA,
24
MOBY_ID_GEM_CHEST
= 0x1D7,
25
MOBY_ID_GEM_CHEST_2
= 0x1D9,
26
MOBY_ID_VOLUME_BAR
= 0x1B2,
27
28
MOBY_ID_ONE_GEM
= 0x53,
29
MOBY_ID_TWO_GEM
= 0x54,
30
MOBY_ID_FIVE_GEM
= 0x55,
31
MOBY_ID_TEN_GEM
= 0x56,
32
MOBY_ID_TWENTYFIVE_GEM
= 0x57
33
};
34
35
enum
FullMobyTypes
36
{
37
DRAGON_MOBY_ID
= 0xFA,
38
CHEST_MOBY_ID
= 0xC2,
39
40
ARTISANS_GNORC
= 0x72
41
42
43
};
44
45
enum
MobyHeldValues
46
{
47
ORB_HELD_ID
= 0xFF,
48
LIFE_HELD_ID
= 0xE,
49
BUTTERFLY_HELD_ID
= 0x10,
50
ONE_GEM_HELD_ID
= 0x53,
51
TWO_GEM_HELD_ID
= 0x54,
52
FIVE_GEM_HELD_ID
= 0x55,
53
TEN_GEM_HELD_ID
= 0x56,
54
TWENTYFIVE_GEM_HELD_ID
= 0x57
55
56
};
57
58
enum
MobyColors
59
{
60
MOBY_COLOR_TRANSPARENT
= 0x00,
61
MOBY_COLOR_WHITE
= 0x01,
62
MOBY_COLOR_BLACK
= 0x06,
63
MOBY_COLOR_MATTE_GREY
= 0x07,
64
MOBY_COLOR_EMERALD_GREEN
= 0x09,
65
MOBY_COLOR_BLUE
= 0x0A,
66
MOBY_COLOR_GOLD
= 0x0B,
67
MOBY_COLOR_GREY
= 0x0C,
68
MOBY_COLOR_RED
= 0x0D,
69
MOBY_COLOR_GREEN
= 0x0E,
70
MOBY_COLOR_PURPLE
= 0x17,
71
MOBY_COLOR_NEON_YELLOW
= 0x18,
72
MOBY_COLOR_CHEESE_YELLOW
= 0x19,
73
MOBY_COLOR_DARK_RED
= 0x1F,
74
MOBY_COLOR_NEON_RED
= 0x20,
75
MOBY_COLOR_DARK_GREEN
= 0x21,
76
MOBY_COLOR_NEON_GREEN
= 0x22,
77
MOBY_COLOR_NEON_BLUE
= 0x24,
78
MOBY_COLOR_DARK_GOLD
= 0x25,
79
MOBY_COLOR_DARK_PURPLE
= 0x27,
80
MOBY_COLOR_NEON_PURPLE
= 0x28,
81
MOBY_COLOR_SHINY_RED
= 0x29,
82
MOBY_COLOR_SHINY_GREEN
= 0x2A,
83
MOBY_COLOR_SHINY_BLUE
= 0x2B,
84
MOBY_COLOR_SHINY_GOLD
= 0x2C,
85
MOBY_COLOR_SHINY_PURPLE
= 0x2D,
86
MOBY_COLOR_SILVER
= 0x2E,
87
MOBY_COLOR_MATTE_RED
= 0x30,
88
MOBY_COLOR_SKY_BLUE
= 0x39,
89
MOBY_COLOR_CYAN
= 0x7E,
90
MOBY_COLOR_PINK
= 0xA5,
91
MOBY_COLOR_INDIGO
= 0xA6,
92
MOBY_COLOR_MATTE_GREEN
= 0xAC,
93
MOBY_COLOR_NEON_LIME
= 0xAD,
94
MOBY_COLOR_BRIGHT_BLUE
= 0xB1,
95
MOBY_COLOR_VIOLET
= 0xB2,
96
MOBY_COLOR_BRIGHT_RED
= 0xB3
97
98
};
99
100
enum
GemColors
101
{
102
GEM_COLOR_RED
= 0x01,
103
GEM_COLOR_GREEN
= 0x02,
104
GEM_COLOR_BLUE
= 0x03,
105
GEM_COLOR_YELLOW
= 0x04,
106
GEM_COLOR_PINK
= 0x05,
107
108
GEM_COLOR_BLACK
= 0x00,
109
GEM_COLOR_WHITE
= 0x7c,
110
GEM_COLOR_BROWN
= 0x31,
111
GEM_COLOR_ORANGE
= 0x76,
112
GEM_COLOR_PURPLE
= 0x36,
113
GEM_COLOR_MAGENTA
= 0xA4,
114
GEM_COLOR_VIOLET
= 0x8D,
115
GEM_COLOR_TURQUOISE
= 0x3C,
116
GEM_COLOR_SUNSET
= 0x35,
117
GEM_COLOR_BRONZE
= 0x3B,
118
GEM_COLOR_SILVER
= 0x13,
119
GEM_COLOR_GOLD
= 0x78,
120
GEM_COLOR_BLUE_PURPLE
= 0x36,
121
GEM_COLOR_DARK_PURPLE
= 0x3A,
122
GEM_COLOR_SKY_BLUE
= 0x37,
123
GEM_COLOR_LIGHT_PINK
= 0xAE,
124
GEM_COLOR_NEON_PINK
= 0x40,
125
GEM_COLOR_NEON_GREEN
= 0x42,
126
GEM_COLOR_WINE_RED
= 0x0B,
127
GEM_COLOR_CAMO_GREEN
= 0x70,
128
GEM_COLOR_LIME_GREEN
= 0x74,
129
GEM_COLOR_EMERALD_GREEN
= 0xF6,
130
GEM_COLOR_TAN_YELLOW
= 0xAC,
131
GEM_COLOR_BRIGHT_YELLOW
= 0xFE
132
};
133
134
135
//~~~~~~~
136
//Structs
137
//~~~~~~~
138
typedef
struct
HudMobyInfo
139
{
140
Vec3
position
;
// Coords in hud act different than in world space. X and Y act like 2D plane. Z is effective size in HUD.
141
}
HudMobyInfo
;
142
143
144
// ~~~ FULL MOBY STRUCT ~~~
145
150
typedef
struct
Moby
151
{
152
void
*
ptr_mobySpecificData
;
153
154
int
empty1
;
155
int
*
ptr_colision
;
156
157
struct
Vec3
position
;
158
159
short
UNK21
;
160
161
short
interactState
;
//0 for alive, 1 for flamed, 2 for charged.
162
163
int
UNK2
;
164
int
UNK3
;
165
int
UNK4
;
166
int
UNK5
;
167
int
UNK6
;
168
int
UNK7
;
169
170
short
subType
;
// Research this more
171
short
type
;
// Determines what type of moby it is
172
173
short
UNK10
;
174
char
canDropObject
;
//7D and lower yes, 80 and higher no
175
char
UNK22
;
176
177
178
char
currentAnimation
;
//Should use next animation for setting animations.
179
char
nextAnimation
;
180
char
currentKeyFrame
;
181
char
nextKeyFrame
;
182
183
char
speedRelated
;
184
char
animationSpeed
;
185
186
187
char
UNK13
;
188
char
active
;
//FF for yes, 0 for no
189
190
struct
Vec3_u8
rotation
;
191
192
char
requiredHUD1
;
193
194
unsigned
char
state
;
// 00 still active, FD picked up. Had to make unsinged because, apparently its negative, so I have to force it to be positive.
195
196
union
197
{
198
char
howPickedUp
;
// 01 picked up by spyro, 03 picked up by sparx
199
char
subState
;
200
};
201
202
char
visable
;
// FF visable, any other value not
203
204
char
UNK_shadowRelated
;
// 1-10 only shadow appears?
205
206
struct
BGR_u8
RGB
;
207
208
char
color
;
// Determines the color of the shaded moby. (01 red, 02 green, etc.) This can be poked outside of its normal range to get some awesome colors.
209
210
short
requiredHUD2
;
211
212
char
UNK19
;
213
214
char
heldValue
;
215
216
short
UNK20
;
217
218
short
scale
;
// Determines the scale of the moby. Range from 0x0000 - 0xFFFF. (0 normal sized, 0xFFFF smallest size)
219
220
}
Moby
;
221
222
//* ~~~ Functions ~~~
223
224
225
#endif
/* MOBY_H */
common.h
MobyHeldValues
MobyHeldValues
Definition
moby.h:46
LIFE_HELD_ID
@ LIFE_HELD_ID
Definition
moby.h:48
ORB_HELD_ID
@ ORB_HELD_ID
Definition
moby.h:47
FIVE_GEM_HELD_ID
@ FIVE_GEM_HELD_ID
Definition
moby.h:52
ONE_GEM_HELD_ID
@ ONE_GEM_HELD_ID
Definition
moby.h:50
BUTTERFLY_HELD_ID
@ BUTTERFLY_HELD_ID
Definition
moby.h:49
TWO_GEM_HELD_ID
@ TWO_GEM_HELD_ID
Definition
moby.h:51
TEN_GEM_HELD_ID
@ TEN_GEM_HELD_ID
Definition
moby.h:53
TWENTYFIVE_GEM_HELD_ID
@ TWENTYFIVE_GEM_HELD_ID
Definition
moby.h:54
MobyColors
MobyColors
Definition
moby.h:59
MOBY_COLOR_WHITE
@ MOBY_COLOR_WHITE
Definition
moby.h:61
MOBY_COLOR_EMERALD_GREEN
@ MOBY_COLOR_EMERALD_GREEN
Definition
moby.h:64
MOBY_COLOR_GREY
@ MOBY_COLOR_GREY
Definition
moby.h:67
MOBY_COLOR_TRANSPARENT
@ MOBY_COLOR_TRANSPARENT
Definition
moby.h:60
MOBY_COLOR_MATTE_GREEN
@ MOBY_COLOR_MATTE_GREEN
Definition
moby.h:92
MOBY_COLOR_DARK_RED
@ MOBY_COLOR_DARK_RED
Definition
moby.h:73
MOBY_COLOR_SHINY_PURPLE
@ MOBY_COLOR_SHINY_PURPLE
Definition
moby.h:85
MOBY_COLOR_SHINY_RED
@ MOBY_COLOR_SHINY_RED
Definition
moby.h:81
MOBY_COLOR_DARK_GREEN
@ MOBY_COLOR_DARK_GREEN
Definition
moby.h:75
MOBY_COLOR_CYAN
@ MOBY_COLOR_CYAN
Definition
moby.h:89
MOBY_COLOR_NEON_RED
@ MOBY_COLOR_NEON_RED
Definition
moby.h:74
MOBY_COLOR_PURPLE
@ MOBY_COLOR_PURPLE
Definition
moby.h:70
MOBY_COLOR_SKY_BLUE
@ MOBY_COLOR_SKY_BLUE
Definition
moby.h:88
MOBY_COLOR_BLACK
@ MOBY_COLOR_BLACK
Definition
moby.h:62
MOBY_COLOR_VIOLET
@ MOBY_COLOR_VIOLET
Definition
moby.h:95
MOBY_COLOR_PINK
@ MOBY_COLOR_PINK
Definition
moby.h:90
MOBY_COLOR_SHINY_GREEN
@ MOBY_COLOR_SHINY_GREEN
Definition
moby.h:82
MOBY_COLOR_DARK_PURPLE
@ MOBY_COLOR_DARK_PURPLE
Definition
moby.h:79
MOBY_COLOR_RED
@ MOBY_COLOR_RED
Definition
moby.h:68
MOBY_COLOR_NEON_PURPLE
@ MOBY_COLOR_NEON_PURPLE
Definition
moby.h:80
MOBY_COLOR_GREEN
@ MOBY_COLOR_GREEN
Definition
moby.h:69
MOBY_COLOR_MATTE_GREY
@ MOBY_COLOR_MATTE_GREY
Definition
moby.h:63
MOBY_COLOR_BRIGHT_RED
@ MOBY_COLOR_BRIGHT_RED
Definition
moby.h:96
MOBY_COLOR_SILVER
@ MOBY_COLOR_SILVER
Definition
moby.h:86
MOBY_COLOR_INDIGO
@ MOBY_COLOR_INDIGO
Definition
moby.h:91
MOBY_COLOR_SHINY_BLUE
@ MOBY_COLOR_SHINY_BLUE
Definition
moby.h:83
MOBY_COLOR_DARK_GOLD
@ MOBY_COLOR_DARK_GOLD
Definition
moby.h:78
MOBY_COLOR_NEON_GREEN
@ MOBY_COLOR_NEON_GREEN
Definition
moby.h:76
MOBY_COLOR_BLUE
@ MOBY_COLOR_BLUE
Definition
moby.h:65
MOBY_COLOR_GOLD
@ MOBY_COLOR_GOLD
Definition
moby.h:66
MOBY_COLOR_SHINY_GOLD
@ MOBY_COLOR_SHINY_GOLD
Definition
moby.h:84
MOBY_COLOR_NEON_BLUE
@ MOBY_COLOR_NEON_BLUE
Definition
moby.h:77
MOBY_COLOR_MATTE_RED
@ MOBY_COLOR_MATTE_RED
Definition
moby.h:87
MOBY_COLOR_BRIGHT_BLUE
@ MOBY_COLOR_BRIGHT_BLUE
Definition
moby.h:94
MOBY_COLOR_CHEESE_YELLOW
@ MOBY_COLOR_CHEESE_YELLOW
Definition
moby.h:72
MOBY_COLOR_NEON_LIME
@ MOBY_COLOR_NEON_LIME
Definition
moby.h:93
MOBY_COLOR_NEON_YELLOW
@ MOBY_COLOR_NEON_YELLOW
Definition
moby.h:71
HudMobyTypes
HudMobyTypes
Definition
moby.h:15
MOBY_ID_TEN_GEM
@ MOBY_ID_TEN_GEM
Definition
moby.h:31
MOBY_ID_ONE_GEM
@ MOBY_ID_ONE_GEM
Definition
moby.h:28
MOBY_ID_EGG
@ MOBY_ID_EGG
Definition
moby.h:18
MOBY_ID_DRAGON_FIGURINE
@ MOBY_ID_DRAGON_FIGURINE
Definition
moby.h:23
MOBY_ID_LIFE_FIGURINE
@ MOBY_ID_LIFE_FIGURINE
Definition
moby.h:17
MOBY_ID_VOLUME_BAR
@ MOBY_ID_VOLUME_BAR
Definition
moby.h:26
MOBY_ID_WATERFALL_PARTICLE_SPAWNER
@ MOBY_ID_WATERFALL_PARTICLE_SPAWNER
Definition
moby.h:16
MOBY_ID_GEM_CHEST_2
@ MOBY_ID_GEM_CHEST_2
Definition
moby.h:25
MOBY_ID_TWENTYFIVE_GEM
@ MOBY_ID_TWENTYFIVE_GEM
Definition
moby.h:32
MOBY_ID_SPYRO_HEAD
@ MOBY_ID_SPYRO_HEAD
Definition
moby.h:19
MOBY_ID_FIVE_GEM
@ MOBY_ID_FIVE_GEM
Definition
moby.h:30
MOBY_ID_COMMA
@ MOBY_ID_COMMA
Definition
moby.h:21
MOBY_ID_EXCAILMATION
@ MOBY_ID_EXCAILMATION
Definition
moby.h:20
MOBY_ID_KEY
@ MOBY_ID_KEY
Definition
moby.h:22
MOBY_ID_TWO_GEM
@ MOBY_ID_TWO_GEM
Definition
moby.h:29
MOBY_ID_GEM_CHEST
@ MOBY_ID_GEM_CHEST
Definition
moby.h:24
FullMobyTypes
FullMobyTypes
Definition
moby.h:36
ARTISANS_GNORC
@ ARTISANS_GNORC
Definition
moby.h:40
DRAGON_MOBY_ID
@ DRAGON_MOBY_ID
Definition
moby.h:37
CHEST_MOBY_ID
@ CHEST_MOBY_ID
Definition
moby.h:38
GemColors
GemColors
Definition
moby.h:101
GEM_COLOR_YELLOW
@ GEM_COLOR_YELLOW
Definition
moby.h:105
GEM_COLOR_WINE_RED
@ GEM_COLOR_WINE_RED
Definition
moby.h:126
GEM_COLOR_MAGENTA
@ GEM_COLOR_MAGENTA
Definition
moby.h:113
GEM_COLOR_BRONZE
@ GEM_COLOR_BRONZE
Definition
moby.h:117
GEM_COLOR_BROWN
@ GEM_COLOR_BROWN
Definition
moby.h:110
GEM_COLOR_BLUE_PURPLE
@ GEM_COLOR_BLUE_PURPLE
Definition
moby.h:120
GEM_COLOR_NEON_GREEN
@ GEM_COLOR_NEON_GREEN
Definition
moby.h:125
GEM_COLOR_DARK_PURPLE
@ GEM_COLOR_DARK_PURPLE
Definition
moby.h:121
GEM_COLOR_NEON_PINK
@ GEM_COLOR_NEON_PINK
Definition
moby.h:124
GEM_COLOR_GOLD
@ GEM_COLOR_GOLD
Definition
moby.h:119
GEM_COLOR_RED
@ GEM_COLOR_RED
Definition
moby.h:102
GEM_COLOR_TURQUOISE
@ GEM_COLOR_TURQUOISE
Definition
moby.h:115
GEM_COLOR_LIGHT_PINK
@ GEM_COLOR_LIGHT_PINK
Definition
moby.h:123
GEM_COLOR_CAMO_GREEN
@ GEM_COLOR_CAMO_GREEN
Definition
moby.h:127
GEM_COLOR_TAN_YELLOW
@ GEM_COLOR_TAN_YELLOW
Definition
moby.h:130
GEM_COLOR_BLUE
@ GEM_COLOR_BLUE
Definition
moby.h:104
GEM_COLOR_ORANGE
@ GEM_COLOR_ORANGE
Definition
moby.h:111
GEM_COLOR_PURPLE
@ GEM_COLOR_PURPLE
Definition
moby.h:112
GEM_COLOR_EMERALD_GREEN
@ GEM_COLOR_EMERALD_GREEN
Definition
moby.h:129
GEM_COLOR_VIOLET
@ GEM_COLOR_VIOLET
Definition
moby.h:114
GEM_COLOR_SILVER
@ GEM_COLOR_SILVER
Definition
moby.h:118
GEM_COLOR_WHITE
@ GEM_COLOR_WHITE
Definition
moby.h:109
GEM_COLOR_GREEN
@ GEM_COLOR_GREEN
Definition
moby.h:103
GEM_COLOR_BLACK
@ GEM_COLOR_BLACK
Definition
moby.h:108
GEM_COLOR_LIME_GREEN
@ GEM_COLOR_LIME_GREEN
Definition
moby.h:128
GEM_COLOR_PINK
@ GEM_COLOR_PINK
Definition
moby.h:106
GEM_COLOR_SUNSET
@ GEM_COLOR_SUNSET
Definition
moby.h:116
GEM_COLOR_BRIGHT_YELLOW
@ GEM_COLOR_BRIGHT_YELLOW
Definition
moby.h:131
GEM_COLOR_SKY_BLUE
@ GEM_COLOR_SKY_BLUE
Definition
moby.h:122
BGR_u8
Definition
common.h:201
HudMobyInfo
Definition
moby.h:139
HudMobyInfo::position
Vec3 position
Definition
moby.h:140
Moby
This is the main moby/object struct.
Definition
moby.h:151
Moby::rotation
struct Vec3_u8 rotation
Definition
moby.h:190
Moby::UNK3
int UNK3
Definition
moby.h:164
Moby::requiredHUD1
char requiredHUD1
Definition
moby.h:192
Moby::UNK19
char UNK19
Definition
moby.h:212
Moby::visable
char visable
Definition
moby.h:202
Moby::ptr_colision
int * ptr_colision
Definition
moby.h:155
Moby::nextAnimation
char nextAnimation
Definition
moby.h:179
Moby::UNK13
char UNK13
Definition
moby.h:187
Moby::type
short type
Definition
moby.h:171
Moby::requiredHUD2
short requiredHUD2
Definition
moby.h:210
Moby::position
struct Vec3 position
Definition
moby.h:157
Moby::nextKeyFrame
char nextKeyFrame
Definition
moby.h:181
Moby::heldValue
char heldValue
Definition
moby.h:214
Moby::UNK21
short UNK21
Definition
moby.h:159
Moby::scale
short scale
Definition
moby.h:218
Moby::UNK20
short UNK20
Definition
moby.h:216
Moby::canDropObject
char canDropObject
Definition
moby.h:174
Moby::color
char color
Definition
moby.h:208
Moby::currentAnimation
char currentAnimation
Definition
moby.h:178
Moby::UNK4
int UNK4
Definition
moby.h:165
Moby::ptr_mobySpecificData
void * ptr_mobySpecificData
Definition
moby.h:152
Moby::UNK7
int UNK7
Definition
moby.h:168
Moby::animationSpeed
char animationSpeed
Definition
moby.h:184
Moby::empty1
int empty1
Definition
moby.h:154
Moby::active
char active
Definition
moby.h:188
Moby::currentKeyFrame
char currentKeyFrame
Definition
moby.h:180
Moby::subState
char subState
Definition
moby.h:199
Moby::UNK2
int UNK2
Definition
moby.h:163
Moby::UNK6
int UNK6
Definition
moby.h:167
Moby::UNK_shadowRelated
char UNK_shadowRelated
Definition
moby.h:204
Moby::UNK5
int UNK5
Definition
moby.h:166
Moby::speedRelated
char speedRelated
Definition
moby.h:183
Moby::state
unsigned char state
Definition
moby.h:194
Moby::UNK10
short UNK10
Definition
moby.h:173
Moby::subType
short subType
Definition
moby.h:170
Moby::howPickedUp
char howPickedUp
Definition
moby.h:198
Moby::RGB
struct BGR_u8 RGB
Definition
moby.h:206
Moby::UNK22
char UNK22
Definition
moby.h:175
Moby::interactState
short interactState
Definition
moby.h:161
Vec3_u8
Definition
vector.h:38
Vec3
Definition
vector.h:9
include
moby.h
Generated by
1.9.7