Mario Kart 64
Loading...
Searching...
No Matches
code_800029B0.c File Reference
#include <ultra64.h>
#include <macros.h>
#include <mk64.h>
#include "code_800029B0.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 "code_80091750.h"
#include "skybox_and_splitscreen.h"
#include "code_8006E9C0.h"
#include "spawn_players.h"
#include "staff_ghosts.h"
#include "render_courses.h"
#include "main.h"
#include "courses/all_course_data.h"
#include "courses/all_course_packed.h"
#include "menus.h"
#include "data/other_textures.h"
Include dependency graph for code_800029B0.c:

Functions

void func_800029B0 (void)
 
void setup_race (void)
 
void func_80002DAC (void)
 
void clear_nmi_buffer (void)
 
void func_80003040 (void)
 

Variables

s32 D_802BA038
 
s16 D_802BA048
 
s16 gCurrentCourseId = 0
 
s16 gCurrentlyLoadedCourseId = 0xFF
 
u16 D_800DC5A8 = 0
 
s32 D_800DC5AC = 0
 
u16 D_800DC5B0 = 1
 
u16 D_800DC5B4 = 0
 
u16 D_800DC5B8 = 0
 
u16 D_800DC5BC = 0
 
u16 gIsInQuitToMenuTransition = 0
 
u16 gQuitToMenuTransitionCounter = 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
 
s32 gPlayerWinningIndex = 0
 
ALIGNED16 struct UnkStruct_800DC5EC D_8015F480 [4]
 
struct UnkStruct_800DC5ECD_800DC5EC = &D_8015F480[0]
 
struct UnkStruct_800DC5ECD_800DC5F0 = &D_8015F480[1]
 
struct UnkStruct_800DC5ECD_800DC5F4 = &D_8015F480[2]
 
struct UnkStruct_800DC5ECD_800DC5F8 = &D_8015F480[3]
 
u16 gIsGamePaused = 0
 
u8pAppNmiBuffer = (u8*) &osAppNmiBuffer
 
s32 gIsMirrorMode = 0
 
f32 vtxStretchY = 1.0f
 
Lights1 D_800DC610 []
 
UNUSED s32 pad_800029B0 = 0x80000000
 
s16 gCreditsCourseId = COURSE_LUIGI_RACEWAY
 
s16 gPlaceItemBoxes = 1
 
CollisionTrianglegCollisionMesh
 
u16gCollisionIndices
 
u16 gCollisionMeshCount
 
u16 gNumCollisionTriangles
 
u32 D_8015F58C
 
Vec3f D_8015F590
 
s32 D_8015F59C
 
s32 D_8015F5A0
 
s32 D_8015F5A4
 
s32 code_800029B0_bss_pad [48]
 
Vtx * vtxBuffer [32]
 
s16 gCourseMaxX
 
s16 gCourseMinX
 
s16 gCourseMaxY
 
s16 gCourseMinY
 
s16 gCourseMaxZ
 
s16 gCourseMinZ
 
s16 D_8015F6F4
 
s16 D_8015F6F6
 
u16 D_8015F6F8
 
s16 D_8015F6FA
 
s16 D_8015F6FC
 
u16 gNumSpawnedShells
 
u16 D_8015F700
 
u16 D_8015F702
 
f32 D_8015F704
 
Vec3f D_8015F708
 
UNUSED u32 D_8015F718 [3]
 
size_t gFreeMemorySize
 
uintptr_t gNextFreeMemoryAddress
 
uintptr_t gHeapEndPtr
 
u32 D_8015F730
 
uintptr_t gFreeMemoryResetAnchor
 
Vec3f D_8015F738
 
Vec3f D_8015F748
 
Vec3f D_8015F758
 
Vec3f D_8015F768
 
Vec3f D_8015F778
 
f32 gCourseDirection
 
s32 D_8015F788
 
s32 D_8015F790 [64]
 
u16 D_8015F890
 
u16 D_8015F892
 
u16 D_8015F894
 
f32 gTimePlayerLastTouchedFinishLine [8]
 
u8gNmiUnknown1
 
u8gNmiUnknown2
 
u8gNmiUnknown3
 
u8gNmiUnknown4
 
u8gNmiUnknown5
 
u8gNmiUnknown6
 
Vec3f D_8015F8D0
 
s32 D_8015F8DC
 
s32 D_8015F8E0
 
f32 D_8015F8E4
 
f32 D_8015F8E8
 
s16 gPlayerPositionLUT [8]
 
u16 gNumPermanentActors
 
s32 code_800029B0_bss_pad2 [44]
 
struct Actor gActorList [ACTOR_LIST_SIZE]
 
UNUSED u8 D_80162578 [sizeof(struct Actor)]
 
s16 gDebugPathCount
 
s16 sIsController1Unplugged
 
s32 D_801625EC
 
s32 D_801625F0
 
s32 D_801625F4
 
s32 D_801625F8
 
f32 D_801625FC
 

Function Documentation

◆ clear_nmi_buffer()

void clear_nmi_buffer ( void )

The nmi buffer allows developers to save 64 bytes of data through a soft reset.

Here is the caller graph for this function:

◆ func_800029B0()

void func_800029B0 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80002DAC()

void func_80002DAC ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80003040()

void func_80003040 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_race()

void setup_race ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ code_800029B0_bss_pad

s32 code_800029B0_bss_pad[48]

◆ code_800029B0_bss_pad2

s32 code_800029B0_bss_pad2[44]

◆ D_800DC5A8

u16 D_800DC5A8 = 0

◆ D_800DC5AC

s32 D_800DC5AC = 0

◆ D_800DC5B0

u16 D_800DC5B0 = 1

◆ D_800DC5B4

u16 D_800DC5B4 = 0

◆ D_800DC5B8

u16 D_800DC5B8 = 0

◆ D_800DC5BC

u16 D_800DC5BC = 0

◆ D_800DC5C8

u16 D_800DC5C8 = 0

◆ D_800DC5CC

UNUSED u16 D_800DC5CC = 0

◆ D_800DC5D0

s32 D_800DC5D0 = 0

◆ D_800DC5D4

s32 D_800DC5D4 = 0

◆ D_800DC5D8

s32 D_800DC5D8 = 0

◆ D_800DC5DC

s32 D_800DC5DC = 64

◆ D_800DC5E0

s32 D_800DC5E0 = 32

◆ D_800DC5E4

u16 D_800DC5E4 = 0

◆ D_800DC5EC

struct UnkStruct_800DC5EC* D_800DC5EC = &D_8015F480[0]

◆ D_800DC5F0

struct UnkStruct_800DC5EC* D_800DC5F0 = &D_8015F480[1]

◆ D_800DC5F4

struct UnkStruct_800DC5EC* D_800DC5F4 = &D_8015F480[2]

◆ D_800DC5F8

struct UnkStruct_800DC5EC* D_800DC5F8 = &D_8015F480[3]

◆ D_800DC610

Lights1 D_800DC610
Initial value:
= {
gdSPDefLights1(175, 175, 175, 255, 255, 255, 0, 0, 120),
gdSPDefLights1(115, 115, 115, 255, 255, 255, 0, 0, 120),
}

◆ D_8015F480

ALIGNED16 struct UnkStruct_800DC5EC D_8015F480[4]

◆ D_8015F58C

u32 D_8015F58C

◆ D_8015F590

Vec3f D_8015F590

◆ D_8015F59C

s32 D_8015F59C

◆ D_8015F5A0

s32 D_8015F5A0

◆ D_8015F5A4

s32 D_8015F5A4

◆ D_8015F6F4

s16 D_8015F6F4

◆ D_8015F6F6

s16 D_8015F6F6

◆ D_8015F6F8

u16 D_8015F6F8

◆ D_8015F6FA

s16 D_8015F6FA

◆ D_8015F6FC

s16 D_8015F6FC

◆ D_8015F700

u16 D_8015F700

◆ D_8015F702

u16 D_8015F702

◆ D_8015F704

f32 D_8015F704

◆ D_8015F708

Vec3f D_8015F708

◆ D_8015F718

UNUSED u32 D_8015F718[3]

◆ D_8015F730

u32 D_8015F730

◆ D_8015F738

Vec3f D_8015F738

◆ D_8015F748

Vec3f D_8015F748

◆ D_8015F758

Vec3f D_8015F758

◆ D_8015F768

Vec3f D_8015F768

◆ D_8015F778

Vec3f D_8015F778

◆ D_8015F788

s32 D_8015F788

◆ D_8015F790

s32 D_8015F790[64]

◆ D_8015F890

u16 D_8015F890

◆ D_8015F892

u16 D_8015F892

◆ D_8015F894

u16 D_8015F894

◆ D_8015F8D0

Vec3f D_8015F8D0

◆ D_8015F8DC

s32 D_8015F8DC

◆ D_8015F8E0

s32 D_8015F8E0

◆ D_8015F8E4

f32 D_8015F8E4

◆ D_8015F8E8

f32 D_8015F8E8

◆ D_80162578

UNUSED u8 D_80162578[sizeof(struct Actor)]
Warning
todo: Is this apart of the actor array?

◆ D_801625EC

s32 D_801625EC

◆ D_801625F0

s32 D_801625F0

◆ D_801625F4

s32 D_801625F4

◆ D_801625F8

s32 D_801625F8

◆ D_801625FC

f32 D_801625FC

◆ D_802BA038

s32 D_802BA038
extern

◆ D_802BA048

u16 D_802BA048
extern

◆ gActorList

struct Actor gActorList[ACTOR_LIST_SIZE]

◆ gCollisionIndices

u16* gCollisionIndices

◆ gCollisionMesh

CollisionTriangle* gCollisionMesh

◆ gCollisionMeshCount

u16 gCollisionMeshCount

◆ gCourseDirection

f32 gCourseDirection

◆ gCourseMaxX

s16 gCourseMaxX

◆ gCourseMaxY

s16 gCourseMaxY

◆ gCourseMaxZ

s16 gCourseMaxZ

◆ gCourseMinX

s16 gCourseMinX

◆ gCourseMinY

s16 gCourseMinY

◆ gCourseMinZ

s16 gCourseMinZ

◆ gCreditsCourseId

s16 gCreditsCourseId = COURSE_LUIGI_RACEWAY

◆ gCurrentCourseId

s16 gCurrentCourseId = 0

◆ gCurrentlyLoadedCourseId

s16 gCurrentlyLoadedCourseId = 0xFF

◆ gDebugPathCount

s16 gDebugPathCount

◆ gFreeMemoryResetAnchor

uintptr_t gFreeMemoryResetAnchor

◆ gFreeMemorySize

size_t gFreeMemorySize

◆ gHeapEndPtr

uintptr_t gHeapEndPtr

◆ gIsGamePaused

u16 gIsGamePaused = 0

◆ gIsInQuitToMenuTransition

u16 gIsInQuitToMenuTransition = 0

◆ gIsMirrorMode

s32 gIsMirrorMode = 0

◆ gNextFreeMemoryAddress

uintptr_t gNextFreeMemoryAddress

◆ gNmiUnknown1

u8* gNmiUnknown1

◆ gNmiUnknown2

u8* gNmiUnknown2

◆ gNmiUnknown3

u8* gNmiUnknown3

◆ gNmiUnknown4

u8* gNmiUnknown4

◆ gNmiUnknown5

u8* gNmiUnknown5

◆ gNmiUnknown6

u8* gNmiUnknown6

◆ gNumCollisionTriangles

u16 gNumCollisionTriangles

◆ gNumPermanentActors

u16 gNumPermanentActors

◆ gNumSpawnedShells

u16 gNumSpawnedShells

Incremented by one every time the player spawns a new shell actor. A cleaning routine runs once twenty-one shells have spawned.

◆ gPlaceItemBoxes

s16 gPlaceItemBoxes = 1

◆ gPlayerPositionLUT

s16 gPlayerPositionLUT[8]

◆ gPlayerWinningIndex

s32 gPlayerWinningIndex = 0
Todo
gPlayerWinningIndex (D_800DC5E8) accessed as word, D_800DC5EB as u8

◆ gQuitToMenuTransitionCounter

u16 gQuitToMenuTransitionCounter = 0

◆ gTimePlayerLastTouchedFinishLine

f32 gTimePlayerLastTouchedFinishLine[8]

◆ pad_800029B0

UNUSED s32 pad_800029B0 = 0x80000000

◆ pAppNmiBuffer

u8* pAppNmiBuffer = (u8*) &osAppNmiBuffer

◆ sIsController1Unplugged

s16 sIsController1Unplugged

◆ vtxBuffer

Vtx* vtxBuffer[32]

◆ vtxStretchY

f32 vtxStretchY = 1.0f