Mario Kart 64
Loading...
Searching...
No Matches
replays.c File Reference
#include <libultraship.h>
#include <macros.h>
#include <mk64.h>
#include <stubs.h>
#include <common_structs.h>
#include <defines.h>
#include <decode.h>
#include "main.h"
#include "code_800029B0.h"
#include "buffers.h"
#include "save.h"
#include "replays.h"
#include "code_8006E9C0.h"
#include "menu_items.h"
#include "code_80057C60.h"
#include "kart_dma.h"
#include "port/Game.h"
#include "courses/staff_ghost_data.h"
Include dependency graph for replays.c:

Macros

#define GHOST_UNLOCK_MARIO   9000
 
#define GHOST_UNLOCK_ROYAL   16000
 
#define GHOST_UNLOCK_LUIGI   11200
 
#define REPLAY_MASK   (ALL_BUTTONS ^ (A_BUTTON | B_BUTTON | Z_TRIG | R_TRIG | L_TRIG))
 

Functions

void load_course_ghost (void)
 
void load_post_time_trial_replay (void)
 
void load_player_ghost (void)
 
void set_staff_ghost (void)
 
s32 func_800051C4 (void)
 
void func_8000522C (void)
 
void func_800052A4 (void)
 
void func_80005310 (void)
 
void process_post_time_trial_replay (void)
 
void process_course_ghost_replay (void)
 
void process_player_ghost_replay (void)
 
void save_player_replay (void)
 
void func_80005AE8 (Player *ply)
 
void func_80005B18 (void)
 
void func_80005E6C (void)
 
void replays_loop (void)
 

Variables

u8 * sReplayGhostBuffer
 
size_t sReplayGhostBufferSize
 
s16 D_80162D86
 
static u16 sPlayerGhostButtonsPrev
 
static u32 sPlayerGhostFramesRemaining
 
static s16 sPlayerGhostReplayIdx
 
u32 * sPlayerGhostReplay
 
static u16 sButtonsPrevCourseGhost
 
static u32 sCourseGhostFramesRemaining
 
static s16 sCourseGhostReplayIdx
 
static u32 * sCourseGhostReplay
 
static u16 sPostTTButtonsPrev
 
static s32 sPostTTFramesRemaining
 
static s16 sPostTTReplayIdx
 
static u32 * sPostTTReplay
 
static s16 sPlayerInputIdx
 
static u32 * sPlayerInputs
 
uintptr_t staff_ghost_track_ptr
 
StaffGhostD_80162DC4
 
s32 D_80162DC8
 
s32 D_80162DCC
 
s32 D_80162DD0
 
u16 bPlayerGhostDisabled
 
u16 bCourseGhostDisabled
 
u16 D_80162DD8
 
s32 D_80162DDC
 
s32 D_80162DE0
 
s32 D_80162DE4
 
s32 D_80162DE8
 
s32 sUnusedReplayCounter
 
s32 gPauseTriggered
 
s32 D_80162DF4
 
s32 gPostTimeTrialReplayCannotSave
 
s32 D_80162DFC
 
s32 D_80162E00
 
u32 * sReplayGhostEncoded = (u32*) &D_802BFB80.arraySize8[0][2][3]
 
u32 * gReplayGhostCompressed = (u32*) &D_802BFB80.arraySize8[1][1][3]
 
s32 gLapCountByPlayerId []
 

Macro Definition Documentation

◆ GHOST_UNLOCK_LUIGI

#define GHOST_UNLOCK_LUIGI   11200

◆ GHOST_UNLOCK_MARIO

#define GHOST_UNLOCK_MARIO   9000

Activates staff ghost if time trial lap time is low enough

◆ GHOST_UNLOCK_ROYAL

#define GHOST_UNLOCK_ROYAL   16000

◆ REPLAY_MASK

#define REPLAY_MASK   (ALL_BUTTONS ^ (A_BUTTON | B_BUTTON | Z_TRIG | R_TRIG | L_TRIG))

Function Documentation

◆ func_800051C4()

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

◆ func_8000522C()

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

◆ func_800052A4()

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

◆ func_80005310()

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

◆ func_80005AE8()

void func_80005AE8 ( Player * ply)
Here is the caller graph for this function:

◆ func_80005B18()

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

◆ func_80005E6C()

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

◆ load_course_ghost()

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

◆ load_player_ghost()

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

◆ load_post_time_trial_replay()

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

◆ process_course_ghost_replay()

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

◆ process_player_ghost_replay()

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

◆ process_post_time_trial_replay()

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

◆ replays_loop()

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

◆ save_player_replay()

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

◆ set_staff_ghost()

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

Variable Documentation

◆ bCourseGhostDisabled

u16 bCourseGhostDisabled

◆ bPlayerGhostDisabled

u16 bPlayerGhostDisabled

◆ D_80162D86

s16 D_80162D86

◆ D_80162DC4

StaffGhost* D_80162DC4

◆ D_80162DC8

s32 D_80162DC8

◆ D_80162DCC

s32 D_80162DCC

◆ D_80162DD0

s32 D_80162DD0

◆ D_80162DD8

u16 D_80162DD8

◆ D_80162DDC

s32 D_80162DDC

◆ D_80162DE0

s32 D_80162DE0

◆ D_80162DE4

s32 D_80162DE4

◆ D_80162DE8

s32 D_80162DE8

◆ D_80162DF4

s32 D_80162DF4

◆ D_80162DFC

s32 D_80162DFC

◆ D_80162E00

s32 D_80162E00

◆ gLapCountByPlayerId

s32 gLapCountByPlayerId[]
extern

◆ gPauseTriggered

s32 gPauseTriggered

◆ gPostTimeTrialReplayCannotSave

s32 gPostTimeTrialReplayCannotSave

◆ gReplayGhostCompressed

u32* gReplayGhostCompressed = (u32*) &D_802BFB80.arraySize8[1][1][3]

◆ sButtonsPrevCourseGhost

u16 sButtonsPrevCourseGhost
static

◆ sCourseGhostFramesRemaining

u32 sCourseGhostFramesRemaining
static

◆ sCourseGhostReplay

u32* sCourseGhostReplay
static

◆ sCourseGhostReplayIdx

s16 sCourseGhostReplayIdx
static

◆ sPlayerGhostButtonsPrev

u16 sPlayerGhostButtonsPrev
static

◆ sPlayerGhostFramesRemaining

u32 sPlayerGhostFramesRemaining
static

◆ sPlayerGhostReplay

u32* sPlayerGhostReplay

◆ sPlayerGhostReplayIdx

s16 sPlayerGhostReplayIdx
static

◆ sPlayerInputIdx

s16 sPlayerInputIdx
static

◆ sPlayerInputs

u32* sPlayerInputs
static

◆ sPostTTButtonsPrev

u16 sPostTTButtonsPrev
static

◆ sPostTTFramesRemaining

s32 sPostTTFramesRemaining
static

◆ sPostTTReplay

u32* sPostTTReplay
static

◆ sPostTTReplayIdx

s16 sPostTTReplayIdx
static

◆ sReplayGhostBuffer

u8* sReplayGhostBuffer

◆ sReplayGhostBufferSize

size_t sReplayGhostBufferSize

◆ sReplayGhostEncoded

u32* sReplayGhostEncoded = (u32*) &D_802BFB80.arraySize8[0][2][3]

◆ staff_ghost_track_ptr

uintptr_t staff_ghost_track_ptr

◆ sUnusedReplayCounter

s32 sUnusedReplayCounter