|
SpaghettiKart
|
#include <libultraship.h>#include <macros.h>#include <mk64.h>#include <stubs.h>#include "code_800029B0.h"#include "TrackBrowser.h"#include "memory.h"#include "waypoints.h"#include "actors.h"#include "actor_types.h"#include "math_util.h"#include "audio/external.h"#include <defines.h>#include "collision.h"#include "menu_items.h"#include "skybox_and_splitscreen.h"#include "code_8006E9C0.h"#include "spawn_players.h"#include "replays.h"#include "render_courses.h"#include "main.h"#include "courses/all_course_data.h"#include "courses/all_course_packed.h"#include "menus.h"#include <assets/textures/other_textures.h>#include <assets/models/tracks/mario_raceway/mario_raceway_data.h>#include <assets/models/tracks/moo_moo_farm/moo_moo_farm_data.h>#include "port/Game.h"#include "engine/CoreMath.h"Functions | |
| void | set_mirror_mode (s32 mirror) |
| void | update_music_volume (s32 target) |
| void | func_800029B0 (void) |
| void | setup_race (void) |
| void | setup_editor (void) |
| void | func_80002DAC (void) |
| void | clear_nmi_buffer (void) |
| void | credits_spawn_actors (void) |
| void clear_nmi_buffer | ( | void | ) |
The nmi buffer allows developers to save 64 bytes of data through a soft reset.
| void credits_spawn_actors | ( | void | ) |
Also spawns water features
| void func_800029B0 | ( | void | ) |
| void func_80002DAC | ( | void | ) |
| void set_mirror_mode | ( | s32 | mirror | ) |
| void setup_editor | ( | void | ) |
| void setup_race | ( | void | ) |
| void update_music_volume | ( | s32 | target | ) |
| bool bDrawSkybox = false |
| bool bFog = false |
| s32 code_800029B0_bss_pad[48] |
| s32 code_800029B0_bss_pad2[44] |
| u16 D_800DC5A8 = 0 |
| s32 D_800DC5AC = 0 |
| u16 D_800DC5B0 = 1 |
| u16 D_800DC5B8 = 0 |
| u16 D_800DC5C8 = 0 |
| UNUSED u16 D_800DC5CC = 0 |
| s32 D_800DC5D0 = 0 |
| s32 D_800DC5D4 = 0 |
| s32 D_800DC5D8 = 0 |
| s32 D_800DC5DC = 64 |
| s32 D_800DC5E0 = 32 |
| u16 D_800DC5E4 = 0 |
| Lights1 D_800DC610[] |
| u32 D_8015F58C |
| Vec3f D_8015F590 |
| s32 D_8015F59C |
| s32 D_8015F5A0 |
| s32 D_8015F5A4 |
| s16 D_8015F6F4 |
| s16 D_8015F6F6 |
| u16 D_8015F6F8 |
| s16 D_8015F6FA |
| s16 D_8015F6FC |
| u16 D_8015F700 |
| u16 D_8015F702 |
| f32 D_8015F704 |
| Vec3f D_8015F708 |
| UNUSED u32 D_8015F718[3] |
| Vec3f D_8015F738 |
| Vec3f D_8015F748 |
| Vec3f D_8015F758 |
| Vec3f D_8015F768 |
| Vec3f D_8015F778 |
| s32 D_8015F790[64] |
| u16 D_8015F890 |
| u16 D_8015F892 |
| u16 D_8015F894 |
| Vec3f D_8015F8D0 |
| s32 D_8015F8DC |
| s32 D_8015F8E0 |
| uintptr_t D_801625F8 |
| f32 D_801625FC |
|
extern |
|
extern |
| struct Actor gActorList[100] |
| u16* gCollisionIndices |
| CollisionTriangle* gCollisionMesh |
| u16 gCollisionMeshCount |
| s16 gCreditsCourseId = TRACK_LUIGI_RACEWAY |
| s16 gCurrentCourseId = 0 |
| uintptr_t gCurrentlyLoadedTrackAddr = NULL |
| s16 gDebugPathCount |
| struct RGBA8 gFogColour |
| uintptr_t gFreeMemoryCourseAnchor |
This repoints gNextFreeMemoryAddress to the point in the memory pool just after a track was loaded. This allows players to retry or reset a track without reloading the whole track. Memory allocated after track load is not zeroed or reset. But should get overwritten by future allocations.
This is a relatively unsafe way to architect a memory pool as old memory could accidentally be used if future allocations do not zero or fully overwrite their free memory.
| uintptr_t gFreeMemoryResetAnchor |
| size_t gFreeMemorySize |
| uintptr_t gHeapEndPtr |
| u16 gIsGamePaused = false |
| u16 gIsInQuitToMenuTransition = 0 |
| s32 gIsMirrorMode = 0 |
| uintptr_t gNextFreeMemoryAddress |
| u8* gNmiUnknown1 |
| u8* gNmiUnknown2 |
| u8* gNmiUnknown3 |
| u8* gNmiUnknown4 |
| u8* gNmiUnknown5 |
| u8* gNmiUnknown6 |
| u16 gNumCollisionTriangles |
| u16 gNumPermanentActors |
| s32 gNumScreens |
| u16 gNumSpawnedShells |
Incremented by one every time the player spawns a new shell actor. A cleaning routine runs once twenty-one shells have spawned.
| s16 gPlaceItemBoxes = 1 |
| s16 gPlayerPositionLUT[8] |
| s32 gPlayerWinningIndex = 0 |
| u16 gQuitToMenuTransitionCounter = 0 |
| ALIGNED16 ScreenContext gScreenContexts[4] = { 0 } |
| ScreenContext* gScreenFourCtx = &gScreenContexts[3] |
| ScreenContext* gScreenOneCtx = &gScreenContexts[0] |
| ScreenContext* gScreenThreeCtx = &gScreenContexts[2] |
| ScreenContext* gScreenTwoCtx = &gScreenContexts[1] |
| f32 gTimePlayerLastTouchedFinishLine[NUM_PLAYERS] |
| f32 gTrackDirection |
| s16 gTrackMaxX |
| s16 gTrackMaxY |
| s16 gTrackMaxZ |
| s16 gTrackMinX |
| s16 gTrackMinY |
| s16 gTrackMinZ |
| Vec3f gVtxStretch = {1.0f, 1.0f, 1.0f} |
| f32 gWaterLevel |
| f32 gWaterVelocity |
| UNUSED s32 pad_800029B0 = 0x80000000 |
| u8* pAppNmiBuffer = (u8*) &osAppNmiBuffer |
| s16 sIsController1Unplugged |
| Vtx* vtxBuffer[32] |