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
15{
27
33};
34
36{
39
40 ARTISANS_GNORC = 0x72
41
42
43};
44
46{
55
56};
57
59{
97
98};
99
101{
107
133
134
135//~~~~~~~
136//Structs
137//~~~~~~~
138typedef 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.
142
143
144// ~~~ FULL MOBY STRUCT ~~~
145
150typedef struct Moby
151{
153
156
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.
182
185
186
187 char UNK13;
188 char active; //FF for yes, 0 for no
189
191
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
211
212 char UNK19;
213
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 */
MobyHeldValues
Definition moby.h:46
@ LIFE_HELD_ID
Definition moby.h:48
@ ORB_HELD_ID
Definition moby.h:47
@ FIVE_GEM_HELD_ID
Definition moby.h:52
@ ONE_GEM_HELD_ID
Definition moby.h:50
@ BUTTERFLY_HELD_ID
Definition moby.h:49
@ TWO_GEM_HELD_ID
Definition moby.h:51
@ TEN_GEM_HELD_ID
Definition moby.h:53
@ TWENTYFIVE_GEM_HELD_ID
Definition moby.h:54
MobyColors
Definition moby.h:59
@ MOBY_COLOR_WHITE
Definition moby.h:61
@ MOBY_COLOR_EMERALD_GREEN
Definition moby.h:64
@ MOBY_COLOR_GREY
Definition moby.h:67
@ MOBY_COLOR_TRANSPARENT
Definition moby.h:60
@ MOBY_COLOR_MATTE_GREEN
Definition moby.h:92
@ MOBY_COLOR_DARK_RED
Definition moby.h:73
@ MOBY_COLOR_SHINY_PURPLE
Definition moby.h:85
@ MOBY_COLOR_SHINY_RED
Definition moby.h:81
@ MOBY_COLOR_DARK_GREEN
Definition moby.h:75
@ MOBY_COLOR_CYAN
Definition moby.h:89
@ MOBY_COLOR_NEON_RED
Definition moby.h:74
@ MOBY_COLOR_PURPLE
Definition moby.h:70
@ MOBY_COLOR_SKY_BLUE
Definition moby.h:88
@ MOBY_COLOR_BLACK
Definition moby.h:62
@ MOBY_COLOR_VIOLET
Definition moby.h:95
@ MOBY_COLOR_PINK
Definition moby.h:90
@ MOBY_COLOR_SHINY_GREEN
Definition moby.h:82
@ MOBY_COLOR_DARK_PURPLE
Definition moby.h:79
@ MOBY_COLOR_RED
Definition moby.h:68
@ MOBY_COLOR_NEON_PURPLE
Definition moby.h:80
@ MOBY_COLOR_GREEN
Definition moby.h:69
@ MOBY_COLOR_MATTE_GREY
Definition moby.h:63
@ MOBY_COLOR_BRIGHT_RED
Definition moby.h:96
@ MOBY_COLOR_SILVER
Definition moby.h:86
@ MOBY_COLOR_INDIGO
Definition moby.h:91
@ MOBY_COLOR_SHINY_BLUE
Definition moby.h:83
@ MOBY_COLOR_DARK_GOLD
Definition moby.h:78
@ MOBY_COLOR_NEON_GREEN
Definition moby.h:76
@ MOBY_COLOR_BLUE
Definition moby.h:65
@ MOBY_COLOR_GOLD
Definition moby.h:66
@ MOBY_COLOR_SHINY_GOLD
Definition moby.h:84
@ MOBY_COLOR_NEON_BLUE
Definition moby.h:77
@ MOBY_COLOR_MATTE_RED
Definition moby.h:87
@ MOBY_COLOR_BRIGHT_BLUE
Definition moby.h:94
@ MOBY_COLOR_CHEESE_YELLOW
Definition moby.h:72
@ MOBY_COLOR_NEON_LIME
Definition moby.h:93
@ MOBY_COLOR_NEON_YELLOW
Definition moby.h:71
HudMobyTypes
Definition moby.h:15
@ MOBY_ID_TEN_GEM
Definition moby.h:31
@ MOBY_ID_ONE_GEM
Definition moby.h:28
@ MOBY_ID_EGG
Definition moby.h:18
@ MOBY_ID_DRAGON_FIGURINE
Definition moby.h:23
@ MOBY_ID_LIFE_FIGURINE
Definition moby.h:17
@ MOBY_ID_VOLUME_BAR
Definition moby.h:26
@ MOBY_ID_WATERFALL_PARTICLE_SPAWNER
Definition moby.h:16
@ MOBY_ID_GEM_CHEST_2
Definition moby.h:25
@ MOBY_ID_TWENTYFIVE_GEM
Definition moby.h:32
@ MOBY_ID_SPYRO_HEAD
Definition moby.h:19
@ MOBY_ID_FIVE_GEM
Definition moby.h:30
@ MOBY_ID_COMMA
Definition moby.h:21
@ MOBY_ID_EXCAILMATION
Definition moby.h:20
@ MOBY_ID_KEY
Definition moby.h:22
@ MOBY_ID_TWO_GEM
Definition moby.h:29
@ MOBY_ID_GEM_CHEST
Definition moby.h:24
FullMobyTypes
Definition moby.h:36
@ ARTISANS_GNORC
Definition moby.h:40
@ DRAGON_MOBY_ID
Definition moby.h:37
@ CHEST_MOBY_ID
Definition moby.h:38
GemColors
Definition moby.h:101
@ GEM_COLOR_YELLOW
Definition moby.h:105
@ GEM_COLOR_WINE_RED
Definition moby.h:126
@ GEM_COLOR_MAGENTA
Definition moby.h:113
@ GEM_COLOR_BRONZE
Definition moby.h:117
@ GEM_COLOR_BROWN
Definition moby.h:110
@ GEM_COLOR_BLUE_PURPLE
Definition moby.h:120
@ GEM_COLOR_NEON_GREEN
Definition moby.h:125
@ GEM_COLOR_DARK_PURPLE
Definition moby.h:121
@ GEM_COLOR_NEON_PINK
Definition moby.h:124
@ GEM_COLOR_GOLD
Definition moby.h:119
@ GEM_COLOR_RED
Definition moby.h:102
@ GEM_COLOR_TURQUOISE
Definition moby.h:115
@ GEM_COLOR_LIGHT_PINK
Definition moby.h:123
@ GEM_COLOR_CAMO_GREEN
Definition moby.h:127
@ GEM_COLOR_TAN_YELLOW
Definition moby.h:130
@ GEM_COLOR_BLUE
Definition moby.h:104
@ GEM_COLOR_ORANGE
Definition moby.h:111
@ GEM_COLOR_PURPLE
Definition moby.h:112
@ GEM_COLOR_EMERALD_GREEN
Definition moby.h:129
@ GEM_COLOR_VIOLET
Definition moby.h:114
@ GEM_COLOR_SILVER
Definition moby.h:118
@ GEM_COLOR_WHITE
Definition moby.h:109
@ GEM_COLOR_GREEN
Definition moby.h:103
@ GEM_COLOR_BLACK
Definition moby.h:108
@ GEM_COLOR_LIME_GREEN
Definition moby.h:128
@ GEM_COLOR_PINK
Definition moby.h:106
@ GEM_COLOR_SUNSET
Definition moby.h:116
@ GEM_COLOR_BRIGHT_YELLOW
Definition moby.h:131
@ GEM_COLOR_SKY_BLUE
Definition moby.h:122
Vec3 position
Definition moby.h:140
This is the main moby/object struct.
Definition moby.h:151
struct Vec3_u8 rotation
Definition moby.h:190
int UNK3
Definition moby.h:164
char requiredHUD1
Definition moby.h:192
char UNK19
Definition moby.h:212
char visable
Definition moby.h:202
int * ptr_colision
Definition moby.h:155
char nextAnimation
Definition moby.h:179
char UNK13
Definition moby.h:187
short type
Definition moby.h:171
short requiredHUD2
Definition moby.h:210
struct Vec3 position
Definition moby.h:157
char nextKeyFrame
Definition moby.h:181
char heldValue
Definition moby.h:214
short UNK21
Definition moby.h:159
short scale
Definition moby.h:218
short UNK20
Definition moby.h:216
char canDropObject
Definition moby.h:174
char color
Definition moby.h:208
char currentAnimation
Definition moby.h:178
int UNK4
Definition moby.h:165
void * ptr_mobySpecificData
Definition moby.h:152
int UNK7
Definition moby.h:168
char animationSpeed
Definition moby.h:184
int empty1
Definition moby.h:154
char active
Definition moby.h:188
char currentKeyFrame
Definition moby.h:180
char subState
Definition moby.h:199
int UNK2
Definition moby.h:163
int UNK6
Definition moby.h:167
char UNK_shadowRelated
Definition moby.h:204
int UNK5
Definition moby.h:166
char speedRelated
Definition moby.h:183
unsigned char state
Definition moby.h:194
short UNK10
Definition moby.h:173
short subType
Definition moby.h:170
char howPickedUp
Definition moby.h:198
struct BGR_u8 RGB
Definition moby.h:206
char UNK22
Definition moby.h:175
short interactState
Definition moby.h:161
Definition vector.h:9