Spyro 1 Reverse Engineering
Decompilation of functions from Spyro 1 into human readable C
 
Loading...
Searching...
No Matches
Labeled Global Variables

Variables

bool _isPastTitleScreen
 If has started new game/continue game, then is 1 for true. Basically after you leave the title screen this is always 1.
Address: 0x8007566c.
 
bool _isLoading
 true/1 if is in loading screen.
Address: 0x800756B0
 
bool _isInsideOptionsMenu
 true/1 If inside options menu in start menu.
Address: 0x800757C8
 
bool _canFlyIn
 true/1 If can fly in to level. This is always 1. If set to 0, will just fade in instead of flying in. I assume this is a leftover from prototypes?
Address: 0x800756D0
 
int _globalTimer
 This is the global timer. It is running at all times from game boot up past BIOS.
Address: 0x800749e0.
 
int _pausedTimer
 This is the pause/inventory menu timer. It is only running in those menus.
Address: 0x800758B8.
 
int _loadingTimer
 This is the pause/inventory menu timer. It is only running in those menus.
Address: 0x8007588c.
 
int _levelTimerWhenActive
 This is a level specific timer. This timer is running when when you are able to control spyro, and doesn't reset until you enter a new level.
Address: 0x8007572C.
 
int _levelTimer_60fps
 This is a level specific timer that runs at 60fps. This timer is running at all times, and doesn't reset until you enter a new level.
Address: 0x800758C8.
 
int _vSyncTimer_60fps
 This is a global timer at 60fps. It is running at all times, and controls the vSync. If frozen, video freezes. Can be unfrozen.
Address: 0x800749E0.
 
int _wobbleAndOpacityTimer
 This is a timer that is often used for changing the opacity of things like lines, the shimmer of text, etc.
Address: 0x800770f4.
 
int _gameState
 Main gamestate. Gamestate values are stored in the GameState enums.
Address: 0x800757D8.
 
unsigned short _currentButtonsHeld
 Value coorsponding the the current button(s) being held.
Address: 0x80077380.
 
unsigned short _currentButtonsPressed
 Value coorsponding the the current button(s) that were pressed for 1 frame. Goes back to 0 after 1 frame.
Address: 0x80077378.
 
int _secondController
 STILL RESEARCHING
Address: 0x80078E50.
 
int _movementSubState
 Research this more. 0xA is the loop for example.
Address: 0x80078AD4.
 
int _isInPortal
 0x5 for in portal, 0xF for loading afterwards. Stays on 0xF until next portal.
Address: 0x80078C70
 
short _globalGemCount
 Total amount of global gems
Address: 0x80075860.
 
int _globalDragonCount
 Total amount of global dragons
Address: 0x80075750.
 
int _globalEggCount
 Total amount of global eggs
Address: 0x80075810.
 
int _levelID
 Current Level ID according to the LevelIDS enum
Address: 0x800758B4.
 
char _portalToExitFromInHW
 Level ID for which portal to exit from in Homeworld. Uses same LevelIDS enum
Address: 0x800758AC.
 
short _flyInAnimation
 This is what determines the fly in animation during the loading screen of a level
Address: 0x80076EA8.
 
Vec3 _cameraPosition
 Camera Position
Address: 0x80076DF8.
 
CameraAngle _cameraAngle
 Camera Angle (yaw, pitch, roll)
Address: 0x80076E1C.
 
short _cameraRotationMatrix [3][3]
 
short _cameraPureRotationMatrix [3][3]
 
short _sinArray [256]
 A scaled up sin lookup table
Address: 0x8006cbf8.
 
char _mainMenuState
 This is the current state of the main menu. Should make an enum for this
Address: 0x80078D88.
 
int _balloonistState
 The State for the balloonist. Should make an enum for this.
Address: 0x800777e8.
 
int _startMenuSelection
 This is the current option selected in the main start menu, according to the StartMenuSelections enum.
Address: 0x80075720.
 
int _inventoryMenuScreen
 This is the current homeworld menu in the inventory menu according to the InventoryMenuSelections enum's.
Address: 0x80075744.
 
char _whichCutscene
 Which cutscene is currently being played
Address: 0x80078D94.
 
char _effect_ScreenFadeIn
 This is what determines how much to fill the screen with a black fade in effect.
Address: 0x80075918.
 
char _effect_ScreenLetterBox
 This is what determines how much to fill the screen with the top and bottom letterbox effect.
Address: 0x800756C0.
 
char _collectablesStateFlags [1231]
 The array for what collectables you have collected globally so far.
Address: 0x80077900.
 
int * _ptr_levelMobys
 This is a pointer to the start of the level moby's array of stucts.
Address: 0x80075828.
 
int * _ptr_dynamicLevelMobys
 This is a pointer to the start of the dynamic level moby's array.
Address: 0x8007573C.
 
int * _ptr_levelMobySpecialData
 This is a pointer to the start of the level moby's special data array of structs.
Address: 0x80075930.
 
int * _ptr_primitivesArray
 
int * _ptr_arrayGraphicsRelatedPointers
 
int _ptrTextUnk
 
char * _ptr_hudMobys
 
char * _ptr_particleLinkedList
 
char _hudChestState
 
char _hudDragonState
 
char _hudLivesState
 
char _hudEggsState
 
char _hudAnimationState
 
int _hudElementsSpinTimer
 
int _unk_spinRelated
 
char * _localSoundEffects
 
int _musicLevelTrack
 The music track that is associated with the level you're currently in.
Address: 0x80075828.
 
int * _maybe_ptr_levelTextureRelated
 
byte _cdStatus
 
Spyro _spyro
 This is where the 1 instance of the spyro struct is.
Address: 0x80078A58.
 
int _spyroXPosition
 Spyro's X Position Coordinate
Address: 0x80078A58.
 
int _spyroYPosition
 Spyro's Y Position Coordinate
Address: 0x80078A5C.
 
int _spyroZPosition
 Spyro's Z Position Coordinate
0x80078A60.
 
int _spyroAngleYaw
 Spyro's Yaw Rotation Angle
Address: 0x80078b74.
 
int _spyroAnglePitch
 Spyro's Pitch Rotation Angle
Address: 0x80078b78.
 
int _spyroAngleRoll
 Spyro's Roll Rotation Angle
Address: 0x80078b7C.
 
RGBA_u8 _spyroColorFilter
 This is the color filter applied on top of spyro in RGBA format
Address: 0x80078a80.
 
int _spyroState
 This is spyro's current active state.
Address: 0x80078ad0s.
 
int _spyroSubState
 This is spyro's current active sub-state.
Address: 0x80078ad4.
 
int _spyroFramesInCurrentState
 The amount of time in frames spent in the current state.
Address: 0x80078ad8.
 
Vec3 _spyroGroundedChargeMomentum
 Spyros grouded charging momentum vector.
Address: 0x80078b28.
 
Vec3 _spyroWalkingChargeMomentum
 Spyros walking momentum vector.
Address: 0x80078b34.
 
Vec3 _spyroAirMomentum
 Spyros air momentum vector.
Address: 0x80078b4c.
 
int _spyroAbsoluteMomentum
 Spyros absolute momentum as a scalar.
Address: 0x80078b70.
 
int _spyroHasUsedGlide
 bool for if Spyro has used his glide or not yet.
Address: 0x80078ba8
 
int _spyroIsGliding
 bool for if Spyro is currently gliding or not.
Address: 0x80078bac
 
int _spyroIsGrounded
 bool for if Spyro is currently grounded or not.
Address: 0x80078bb4
 
int _spyroIFramesTimer
 Timer for how many more frames spyro should have invulnerability.
Address: 0x80078bb8.
 
int _spyroHealth
 Spyros current health
Address: 0x80078bbc.
 
int _spyroIsMovementLocked
 A timer that stops the player from being able to move spyro.
Address: 0x80078c48.
 
int _spyroCanSuperFly
 A bool for if spyro can superfly currently.
Address: 0x80078ca4.
 
int _spyroIsOnSuperchargeGround
 A bool for if spyro is currently on supercharge ground.
Address: 0x80078ca8.
 

Detailed Description

Functions we have labeled but not yet re-implemented

Variable Documentation

◆ _balloonistState

int _balloonistState
extern

The State for the balloonist. Should make an enum for this.
Address: 0x800777e8.

◆ _cameraAngle

CameraAngle _cameraAngle
extern

Camera Angle (yaw, pitch, roll)
Address: 0x80076E1C.

See also
CameraAngle

◆ _cameraPosition

Vec3 _cameraPosition
extern

Camera Position
Address: 0x80076DF8.

See also
Vec3

◆ _cameraPureRotationMatrix

short _cameraPureRotationMatrix[3][3]
extern

◆ _cameraRotationMatrix

short _cameraRotationMatrix[3][3]
extern

◆ _canFlyIn

bool _canFlyIn
extern

true/1 If can fly in to level. This is always 1. If set to 0, will just fade in instead of flying in. I assume this is a leftover from prototypes?
Address: 0x800756D0

◆ _cdStatus

byte _cdStatus
extern

◆ _collectablesStateFlags

char _collectablesStateFlags[1231]
extern

The array for what collectables you have collected globally so far.
Address: 0x80077900.

This is what the game references for loading gems/dragons into a level or not when you load into it/respawn. This is also the memory location for when you load a game from a save file. This is immediately where the data gets stored.

◆ _currentButtonsHeld

unsigned short _currentButtonsHeld
extern

Value coorsponding the the current button(s) being held.
Address: 0x80077380.

See also
Buttons

◆ _currentButtonsPressed

unsigned short _currentButtonsPressed
extern

Value coorsponding the the current button(s) that were pressed for 1 frame. Goes back to 0 after 1 frame.
Address: 0x80077378.

See also
Buttons

◆ _effect_ScreenFadeIn

char _effect_ScreenFadeIn
extern

This is what determines how much to fill the screen with a black fade in effect.
Address: 0x80075918.

Will automatically decrement the fade back to 0 by 1 every frame until 0

◆ _effect_ScreenLetterBox

char _effect_ScreenLetterBox
extern

This is what determines how much to fill the screen with the top and bottom letterbox effect.
Address: 0x800756C0.

Will automatically decrement the letterbox effect by 1 every frame until 0

◆ _flyInAnimation

short _flyInAnimation
extern

This is what determines the fly in animation during the loading screen of a level
Address: 0x80076EA8.

See also
LevelFlyInAnimations

◆ _gameState

int _gameState
extern

Main gamestate. Gamestate values are stored in the GameState enums.
Address: 0x800757D8.

See also
GameState

◆ _globalDragonCount

int _globalDragonCount
extern

Total amount of global dragons
Address: 0x80075750.

◆ _globalEggCount

int _globalEggCount
extern

Total amount of global eggs
Address: 0x80075810.

◆ _globalGemCount

short _globalGemCount
extern

Total amount of global gems
Address: 0x80075860.

◆ _globalTimer

int _globalTimer
extern

This is the global timer. It is running at all times from game boot up past BIOS.
Address: 0x800749e0.

◆ _hudAnimationState

char _hudAnimationState
extern

◆ _hudChestState

char _hudChestState
extern

◆ _hudDragonState

char _hudDragonState
extern

◆ _hudEggsState

char _hudEggsState
extern

◆ _hudElementsSpinTimer

int _hudElementsSpinTimer
extern

◆ _hudLivesState

char _hudLivesState
extern

◆ _inventoryMenuScreen

int _inventoryMenuScreen
extern

This is the current homeworld menu in the inventory menu according to the InventoryMenuSelections enum's.
Address: 0x80075744.

See also
InventoryMenuSelections

◆ _isInPortal

int _isInPortal
extern

0x5 for in portal, 0xF for loading afterwards. Stays on 0xF until next portal.
Address: 0x80078C70

Warning
Need to research more. Might be part of spyro struct

◆ _isInsideOptionsMenu

bool _isInsideOptionsMenu
extern

true/1 If inside options menu in start menu.
Address: 0x800757C8

◆ _isLoading

bool _isLoading
extern

true/1 if is in loading screen.
Address: 0x800756B0

◆ _isPastTitleScreen

bool _isPastTitleScreen
extern

If has started new game/continue game, then is 1 for true. Basically after you leave the title screen this is always 1.
Address: 0x8007566c.

◆ _levelID

int _levelID
extern

Current Level ID according to the LevelIDS enum
Address: 0x800758B4.

This LevelID is used to determine which level will be loaded when in a loading screen, amung other things.

See also
LevelIDS

◆ _levelTimer_60fps

int _levelTimer_60fps
extern

This is a level specific timer that runs at 60fps. This timer is running at all times, and doesn't reset until you enter a new level.
Address: 0x800758C8.

◆ _levelTimerWhenActive

int _levelTimerWhenActive
extern

This is a level specific timer. This timer is running when when you are able to control spyro, and doesn't reset until you enter a new level.
Address: 0x8007572C.

◆ _loadingTimer

int _loadingTimer
extern

This is the pause/inventory menu timer. It is only running in those menus.
Address: 0x8007588c.

◆ _localSoundEffects

char* _localSoundEffects
extern

◆ _mainMenuState

char _mainMenuState
extern

This is the current state of the main menu. Should make an enum for this
Address: 0x80078D88.

◆ _maybe_ptr_levelTextureRelated

int* _maybe_ptr_levelTextureRelated
extern

◆ _movementSubState

int _movementSubState
extern

Research this more. 0xA is the loop for example.
Address: 0x80078AD4.

Warning
Need to research more

◆ _musicLevelTrack

int _musicLevelTrack
extern

The music track that is associated with the level you're currently in.
Address: 0x80075828.

This variable is used to play the correct music track for the level you're in

◆ _pausedTimer

int _pausedTimer
extern

This is the pause/inventory menu timer. It is only running in those menus.
Address: 0x800758B8.

◆ _portalToExitFromInHW

char _portalToExitFromInHW
extern

Level ID for which portal to exit from in Homeworld. Uses same LevelIDS enum
Address: 0x800758AC.

This LevelID is used to determine which level portal you will come out of when you exit a level back to the homeworld.

See also
LevelIDS

◆ _ptr_arrayGraphicsRelatedPointers

int* _ptr_arrayGraphicsRelatedPointers
extern

◆ _ptr_dynamicLevelMobys

int* _ptr_dynamicLevelMobys
extern

This is a pointer to the start of the dynamic level moby's array.
Address: 0x8007573C.

Dynamic level moby's are the ones that don't spawn immediatly, but spawn from gameplay. Gems from chests/enemies, lives, etc.

◆ _ptr_hudMobys

char* _ptr_hudMobys
extern

◆ _ptr_levelMobys

int* _ptr_levelMobys
extern

This is a pointer to the start of the level moby's array of stucts.
Address: 0x80075828.

◆ _ptr_levelMobySpecialData

int* _ptr_levelMobySpecialData
extern

This is a pointer to the start of the level moby's special data array of structs.
Address: 0x80075930.

The special data is any data that is unique to that particular moby. The special data pointer is always the first element of any moby struct.

◆ _ptr_particleLinkedList

char* _ptr_particleLinkedList
extern

◆ _ptr_primitivesArray

int* _ptr_primitivesArray
extern

◆ _ptrTextUnk

int _ptrTextUnk
extern

◆ _secondController

int _secondController
extern

STILL RESEARCHING
Address: 0x80078E50.

Warning
Need to research more

◆ _sinArray

short _sinArray[256]
extern

A scaled up sin lookup table
Address: 0x8006cbf8.

See also
SinScaled()

◆ _spyro

Spyro _spyro
extern

This is where the 1 instance of the spyro struct is.
Address: 0x80078A58.

Functions we have labeled but not yet re-implemented

Most of spyros data lives here. I have also defined many variables from spyros struct globally for convienence sake, but all of those variables are actually part of the struct that starts here.

See also
Spyro

◆ _spyroAbsoluteMomentum

int _spyroAbsoluteMomentum
extern

Spyros absolute momentum as a scalar.
Address: 0x80078b70.

See also
Spyro

◆ _spyroAirMomentum

Vec3 _spyroAirMomentum
extern

Spyros air momentum vector.
Address: 0x80078b4c.

See also
Spyro

◆ _spyroAnglePitch

int _spyroAnglePitch
extern

Spyro's Pitch Rotation Angle
Address: 0x80078b78.

See also
Spyro

◆ _spyroAngleRoll

int _spyroAngleRoll
extern

Spyro's Roll Rotation Angle
Address: 0x80078b7C.

See also
Spyro

◆ _spyroAngleYaw

int _spyroAngleYaw
extern

Spyro's Yaw Rotation Angle
Address: 0x80078b74.

See also
Spyro

◆ _spyroCanSuperFly

int _spyroCanSuperFly
extern

A bool for if spyro can superfly currently.
Address: 0x80078ca4.

This can be set to true in any level

See also
Spyro

◆ _spyroColorFilter

RGBA_u8 _spyroColorFilter
extern

This is the color filter applied on top of spyro in RGBA format
Address: 0x80078a80.

This is what gets applied to spyro during superflame.

See also
Spyro RGBA_u8

◆ _spyroFramesInCurrentState

int _spyroFramesInCurrentState
extern

The amount of time in frames spent in the current state.
Address: 0x80078ad8.

Need to research sub-state more. Used for calculations for jumping, boking, damage, time sensitive states, etc

See also
Spyro

◆ _spyroGroundedChargeMomentum

Vec3 _spyroGroundedChargeMomentum
extern

Spyros grouded charging momentum vector.
Address: 0x80078b28.

See also
Spyro

◆ _spyroHasUsedGlide

int _spyroHasUsedGlide
extern

bool for if Spyro has used his glide or not yet.
Address: 0x80078ba8

This is used to only let you glide out of a charge once.

See also
Spyro

◆ _spyroHealth

int _spyroHealth
extern

Spyros current health
Address: 0x80078bbc.

This value is tied to sparx's color also. If spyro health reaches 0, sparx will disapear.

See also
Spyro

◆ _spyroIFramesTimer

int _spyroIFramesTimer
extern

Timer for how many more frames spyro should have invulnerability.
Address: 0x80078bb8.

Automatically decrements by 1 every frame until 0. Spyro will have invulnerability if it is any number above 0.

See also
Spyro

◆ _spyroIsGliding

int _spyroIsGliding
extern

bool for if Spyro is currently gliding or not.
Address: 0x80078bac

See also
Spyro

◆ _spyroIsGrounded

int _spyroIsGrounded
extern

bool for if Spyro is currently grounded or not.
Address: 0x80078bb4

See also
Spyro

◆ _spyroIsMovementLocked

int _spyroIsMovementLocked
extern

A timer that stops the player from being able to move spyro.
Address: 0x80078c48.

This timer decrements by 1 every frame until it reaches 0. Once it reaches 0 the player can input again.

See also
Spyro

◆ _spyroIsOnSuperchargeGround

int _spyroIsOnSuperchargeGround
extern

A bool for if spyro is currently on supercharge ground.
Address: 0x80078ca8.

This doesn't give spyro supercharge state, but gives him the weird properties of being on a supercharge ground, like the extra charge in air height.

See also
Spyro

◆ _spyroState

int _spyroState
extern

This is spyro's current active state.
Address: 0x80078ad0s.

Full list of states in the SpyroStates enum. (Walking, Gliding, Charging, etc.)

See also
Spyro SpyroStates

◆ _spyroSubState

int _spyroSubState
extern

This is spyro's current active sub-state.
Address: 0x80078ad4.

Need to research sub-state more.

See also
Spyro SpyroStates

◆ _spyroWalkingChargeMomentum

Vec3 _spyroWalkingChargeMomentum
extern

Spyros walking momentum vector.
Address: 0x80078b34.

See also
Spyro

◆ _spyroXPosition

int _spyroXPosition
extern

Spyro's X Position Coordinate
Address: 0x80078A58.

See also
Spyro

◆ _spyroYPosition

int _spyroYPosition
extern

Spyro's Y Position Coordinate
Address: 0x80078A5C.

See also
Spyro

◆ _spyroZPosition

int _spyroZPosition
extern

Spyro's Z Position Coordinate
0x80078A60.

See also
Spyro

◆ _startMenuSelection

int _startMenuSelection
extern

This is the current option selected in the main start menu, according to the StartMenuSelections enum.
Address: 0x80075720.

See also
StartMenuSelections

◆ _unk_spinRelated

int _unk_spinRelated
extern

◆ _vSyncTimer_60fps

int _vSyncTimer_60fps
extern

This is a global timer at 60fps. It is running at all times, and controls the vSync. If frozen, video freezes. Can be unfrozen.
Address: 0x800749E0.

◆ _whichCutscene

char _whichCutscene
extern

Which cutscene is currently being played
Address: 0x80078D94.

◆ _wobbleAndOpacityTimer

int _wobbleAndOpacityTimer
extern

This is a timer that is often used for changing the opacity of things like lines, the shimmer of text, etc.
Address: 0x800770f4.