Files
libsm64/src/decomp/global_state.h
T
NepuShiro ede2099ff5
Build libsm64 / Build libsm64 for linux (push) Successful in 33s
Build libsm64 / Build libsm64 for web (push) Successful in 30s
Build libsm64 / Build libsm64 for windows (push) Successful in 23s
Implement FakeObjects (Just poles for now)
2026-05-31 16:55:19 -05:00

60 lines
1.4 KiB
C

#pragma once
#include "include/types.h"
#include "game/area.h"
#include "../obj_pool.h"
struct GlobalState
{
// interaction.c
u8 msDelayInvincTimer;
s16 msInvulnerable;
// mario_actions_moving.c
Mat4 msFloorAlignMatrix;
// mario_actions_submerged.c
s16 msWasAtSurface;
s16 msSwimStrength;
s16 mD_80339FD0;
s16 mD_80339FD2;
f32 mD_80339FD4;
// mario_misc.c
struct MarioBodyState mgBodyStates[2];
s16 msMarioAttackAnimCounter;
// rendering_graph_node.c
u16 mgAreaUpdateCounter;
// misc
u32 mgGlobalTimer;
u8 mgSpecialTripleJump;
s16 mgCurrLevelNum;
s16 mgCameraMovementFlags;
u32 mgAudioRandom;
s8 mgShowDebugText;
s8 mgDebugLevelSelect;
s16 mgCurrSaveFileNum;
s32 mgMarioId;
struct Controller mgController;
struct SpawnInfo mgMarioSpawnInfoVal;
struct Area *mgCurrentArea;
struct Object *mgCurrentObject;
struct Object *mgMarioObject;
struct ObjPool mgFakeObjects;
struct MarioAnimation mD_80339D10;
struct MarioState mgMarioStateVal;
};
// From mario_actions_submerged.c, needed to initialize global state
#define MIN_SWIM_STRENGTH 160
extern struct GlobalState *g_state;
extern struct GlobalState *global_state_create(void);
extern void global_state_bind(struct GlobalState *state);
extern void global_state_delete(struct GlobalState *state);