![]() |
Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
|
Go to the source code of this file.
Data Structures | |
struct | NumTimesCalled |
Macros | |
#define | TIME_STOP_UNKNOWN_0 (1 << 0) |
Flags for gTimeStopState. More... | |
#define | TIME_STOP_ENABLED (1 << 1) |
#define | TIME_STOP_UNKNOWN_2 (1 << 2) |
#define | TIME_STOP_MARIO_AND_DOORS (1 << 3) |
#define | TIME_STOP_ALL_OBJECTS (1 << 4) |
#define | TIME_STOP_MARIO_OPENED_DOOR (1 << 5) |
#define | TIME_STOP_ACTIVE (1 << 6) |
#define | OBJECT_POOL_CAPACITY 240 |
The maximum number of objects that can be loaded at once. More... | |
Enumerations | |
enum | ObjectList { OBJ_LIST_PLAYER, OBJ_LIST_UNUSED_1, OBJ_LIST_DESTRUCTIVE, OBJ_LIST_UNUSED_3, OBJ_LIST_GENACTOR, OBJ_LIST_PUSHABLE, OBJ_LIST_LEVEL, OBJ_LIST_UNUSED_7, OBJ_LIST_DEFAULT, OBJ_LIST_SURFACE, OBJ_LIST_POLELIKE, OBJ_LIST_SPAWNER, OBJ_LIST_UNIMPORTANT, NUM_OBJ_LISTS } |
Every object is categorized into an object list, which controls the order they are processed and which objects they can collide with. More... | |
Functions | |
void | bhv_mario_update (void) |
Mario's primary behavior update function. More... | |
void | set_object_respawn_info_bits (struct Object *obj, u8 bits) |
OR the object's respawn info with bits << 8. More... | |
void | unload_objects_from_area (s32 unused, s32 areaIndex) |
void | spawn_objects_from_info (s32 unused, struct SpawnInfo *spawnInfo) |
void | clear_objects (void) |
Clear objects, dynamic surfaces, and some miscellaneous level data used by objects. More... | |
void | update_objects (s32 unused) |
Variables | |
struct ObjectNode | gObjectListArray [] |
Nodes used to represent the doubly linked object lists. More... | |
s32 | gDebugInfoFlags |
Flags controlling what debug info is displayed. More... | |
s32 | gNumFindFloorMisses |
The number of times per frame find_floor found no floor beneath an object, and therefore either returned a dynamic floor or NULL. More... | |
UNUSED s32 | unused_8033BEF8 |
s32 | gUnknownWallCount |
An unused debug counter with the label "WALL". More... | |
u32 | gObjectCounter |
Roughly the number of objects that have been processed this frame so far. More... | |
struct NumTimesCalled | gNumCalls |
The number of times find_floor, find_ceil, and find_wall_collisions have been called respectively. More... | |
s16 | gDebugInfo [][8] |
An array of debug controls that could be used to tweak in-game parameters. More... | |
s16 | gDebugInfoOverwrite [][8] |
u32 | gTimeStopState |
A set of flags to control which objects are updated on a given frame. More... | |
struct Object | gObjectPool [] |
The pool that objects are allocated from. More... | |
struct Object | gMacroObjectDefaultParent |
A special object whose purpose is to act as a parent for macro objects. More... | |
struct ObjectNode * | gObjectLists |
A pointer to gObjectListArray. More... | |
struct ObjectNode | gFreeObjectList |
A singly linked list of available slots in the object pool. More... | |
struct Object * | gMarioObject |
The object representing mario. More... | |
struct Object * | gLuigiObject |
An object variable that may have been used to represent the planned second player. More... | |
struct Object * | gCurrentObject |
The object whose behavior script is currently being updated. More... | |
u32 * | gBehCommand |
The next object behavior command to be executed. More... | |
s16 | gPrevFrameObjectCount |
The number of objects that were processed last frame, which may miss some objects that were spawned last frame and all objects that were spawned this frame. More... | |
s32 | gSurfaceNodesAllocated |
The total number of surface nodes allocated (a node is allocated for each spatial partition cell that a surface intersects). More... | |
s32 | gSurfacesAllocated |
The total number of surfaces allocated. More... | |
s32 | gNumStaticSurfaceNodes |
The number of nodes that have been created for surfaces. More... | |
s32 | gNumStaticSurfaces |
The number of surfaces in the pool. More... | |
struct MemoryPool * | gObjectMemoryPool |
A pool used by chain chomp and wiggler to allocate their body parts. More... | |
#define OBJECT_POOL_CAPACITY 240 |
The maximum number of objects that can be loaded at once.
#define TIME_STOP_ACTIVE (1 << 6) |
#define TIME_STOP_ALL_OBJECTS (1 << 4) |
#define TIME_STOP_ENABLED (1 << 1) |
#define TIME_STOP_MARIO_AND_DOORS (1 << 3) |
#define TIME_STOP_MARIO_OPENED_DOOR (1 << 5) |
#define TIME_STOP_UNKNOWN_0 (1 << 0) |
Flags for gTimeStopState.
These control which objects are processed each frame and also track some miscellaneous info.
#define TIME_STOP_UNKNOWN_2 (1 << 2) |
enum ObjectList |
Every object is categorized into an object list, which controls the order they are processed and which objects they can collide with.
Clear objects, dynamic surfaces, and some miscellaneous level data used by objects.
OR the object's respawn info with bits << 8.
If bits = 0xFF, this prevents the object from respawning after leaving and re-entering the area. For macro objects, respawnInfo points to the 16 bit entry in the macro object list. For other objects, it points to the 32 bit behaviorArg in the SpawnInfo.
u32* gBehCommand |
The next object behavior command to be executed.
The object whose behavior script is currently being updated.
This object is used frequently in object behavior code, and so is often aliased as "o".
s16 gDebugInfo[][8] |
An array of debug controls that could be used to tweak in-game parameters.
The only used rows are [4] and [5] (effectinfo and enemyinfo).
s32 gDebugInfoFlags |
Flags controlling what debug info is displayed.
s16 gDebugInfoOverwrite[][8] |
struct ObjectNode gFreeObjectList |
A singly linked list of available slots in the object pool.
An object variable that may have been used to represent the planned second player.
This is speculation, based on its position and its usage in shadow.c.
A special object whose purpose is to act as a parent for macro objects.
struct NumTimesCalled gNumCalls |
The number of times find_floor, find_ceil, and find_wall_collisions have been called respectively.
s32 gNumFindFloorMisses |
The number of times per frame find_floor found no floor beneath an object, and therefore either returned a dynamic floor or NULL.
s32 gNumStaticSurfaceNodes |
The number of nodes that have been created for surfaces.
s32 gNumStaticSurfaces |
The number of surfaces in the pool.
u32 gObjectCounter |
Roughly the number of objects that have been processed this frame so far.
A bug in update_terrain_objects makes this count inaccurate.
struct ObjectNode gObjectListArray[] |
Nodes used to represent the doubly linked object lists.
struct ObjectNode* gObjectLists |
A pointer to gObjectListArray.
Given an object list index idx, gObjectLists[idx] is the head of a doubly linked list of all currently spawned objects in the list.
struct MemoryPool* gObjectMemoryPool |
A pool used by chain chomp and wiggler to allocate their body parts.
s16 gPrevFrameObjectCount |
The number of objects that were processed last frame, which may miss some objects that were spawned last frame and all objects that were spawned this frame.
It also includes objects that were unloaded last frame. Besides this, a bug in update_terrain_objects makes this count inaccurate.
s32 gSurfaceNodesAllocated |
The total number of surface nodes allocated (a node is allocated for each spatial partition cell that a surface intersects).
s32 gSurfacesAllocated |
The total number of surfaces allocated.
u32 gTimeStopState |
A set of flags to control which objects are updated on a given frame.
This is used during dialog and cutscenes to freeze most objects in place.
s32 gUnknownWallCount |
An unused debug counter with the label "WALL".