Place variables from data_0DD0A0 to code_800029B0 (#477)

They match when placed there, although its not immediately clear
 that they truly belong there. But a match is a match.

Also cleaned up a bunch of .h files that had references to the
 newly matched variables.

Signed-off-by: Taggerung <tyler.taggerung@email.com>
This commit is contained in:
Tyler McGavran 2023-10-27 22:00:52 -04:00 committed by GitHub
parent 6e9f0ae130
commit 716b926260
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 64 additions and 172 deletions

View File

@ -1,51 +0,0 @@
# Mario Kart 64 (U) disassembly and split file
# generated by n64split v0.4a - N64 ROM splitter
.include "macros.inc"
.section .data
glabel gCurrentCourseId
.hword 0x0000, 0x0000
glabel gCurrentlyLoadedCourseId
.hword 0x00ff, 0x0000
glabel D_800DC5A8
.hword 0x0000, 0x0000
glabel D_800DC5AC
.word 0x00000000
glabel D_800DC5B0
.hword 0x0001, 0x0000
glabel D_800DC5B4
.hword 0x0000, 0x0000
glabel D_800DC5B8
.hword 0x0000, 0x0000
glabel D_800DC5BC
.hword 0x0000, 0x0000
glabel gIsInQuitToMenuTransition
.hword 0x0000, 0x0000
glabel gQuitToMenuTransitionCounter
.hword 0x0000, 0x0000
glabel D_800DC5C8
.hword 0x0000, 0x0000, 0x0000, 0x0000
glabel D_800DC5D0
.word 0x00000000
glabel D_800DC5D4
.word 0x00000000
glabel D_800DC5D8
.word 0x00000000
glabel D_800DC5DC
.word 0x00000040

View File

@ -6,7 +6,6 @@
#include "common_structs.h"
extern s8 gCharacterIdByGPOverallRank[8]; // D_8018D9D0
extern s16 gCurrentCourseId; // D_800DC5A0
extern s16 gGPCurrentRacePlayerIdByRank[8]; // D_80164360

View File

@ -204,7 +204,6 @@ SECTIONS
BUILD_DIR/src/os/ldiv.o(.text);
BUILD_DIR/data/rsp.o(.text);
BUILD_DIR/src/main.o(.data*);
BUILD_DIR/data/data_0DD0A0.o(.data);
BUILD_DIR/src/code_800029B0.o(.data);
BUILD_DIR/src/profiler.o(.data);
BUILD_DIR/src/crash_screen.o(.data);

View File

@ -9,6 +9,7 @@
#include "audio/data.h"
#include <sounds.h>
#include "port_eu.h"
#include "code_800029B0.h"
#include "code_80091750.h"
s8 D_8018EF10;

View File

@ -23,19 +23,29 @@
#include "courses/all_course_data.h"
#include "menus.h"
extern u16 D_800DC5A8;
extern s32 D_802BA038;
extern s16 D_802BA048;
extern s16 gCurrentlyLoadedCourseId;
extern struct ActorSpawnData d_course_moo_moo_farm_tree_spawn[];
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;
// This is tracking which credit "state" we're in, decides which credits are shown (and probably other stuff)
u16 D_800DC5E4 = 0;
// TODO: gPlayerWinningIndex (D_800DC5E8) accessed as word, D_800DC5EB as u8
@ -46,7 +56,18 @@ struct UnkStruct_800DC5EC *D_800DC5EC = &D_8015F480[0];
struct UnkStruct_800DC5EC *D_800DC5F0 = &D_8015F480[1];
struct UnkStruct_800DC5EC *D_800DC5F4 = &D_8015F480[2];
struct UnkStruct_800DC5EC *D_800DC5F8 = &D_8015F480[3];
u16 gIsGamePaused = 0;
u16 gIsGamePaused = 0; // 1 if the game is paused and 0 if the game is not paused
u8 *pAppNmiBuffer = (u8 *) &osAppNmiBuffer;
s32 gIsMirrorMode = 0;
f32 vtxStretchY = 1.0f;
Lights1 D_800DC610[] = {
gdSPDefLights1(175, 175, 175, 255, 255, 255, 0, 0, 120),
gdSPDefLights1(115, 115, 115, 255, 255, 255, 0, 0, 120),
};
static s32 pad_800029B0 = 0x80000000;
s16 gCreditsCourseId = COURSE_LUIGI_RACEWAY;
s16 gPlaceItemBoxes = 1;
// Technically a pointer to an array, but declaring it so creates regalloc issues.
mk64_surface_map_ram *gSurfaceMap;
@ -105,7 +126,6 @@ u16 D_8015F894;
// Indexed by Player ID. Track time in seconds since player has last crossed the finish line
f32 gTimePlayerLastTouchedFinishLine[8];
u8 *pAppNmiBuffer = (u8 *) &osAppNmiBuffer;
u8 *gNmiUnknown1;
u8 *gNmiUnknown2;
u8 *gNmiUnknown3;
@ -113,16 +133,6 @@ u8 *gNmiUnknown4;
u8 *gNmiUnknown5;
u8 *gNmiUnknown6;
s32 gIsMirrorMode = 0;
f32 vtxStretchY = 1.0f;
Lights1 D_800DC610[] = {
gdSPDefLights1(175, 175, 175, 255, 255, 255, 0, 0, 120),
gdSPDefLights1(115, 115, 115, 255, 255, 255, 0, 0, 120),
};
static s32 pad_800029B0 = 0x80000000;
s16 gCreditsCourseId = COURSE_LUIGI_RACEWAY;
s16 gPlaceItemBoxes = 1;
Vec3f D_8015F8D0;
s32 D_8015F8DC;

View File

@ -3,6 +3,7 @@
#include <macros.h>
#include <ultra64.h>
#include <types.h>
#include <actor_types.h>
/* Function Prototypes */
@ -13,11 +14,37 @@ void func_80002DAC(void);
void clear_nmi_buffer(void);
void func_80003040(void);
extern s16 gCurrentCourseId; // D_800DC5A0
extern s16 gCurrentlyLoadedCourseId;
extern u16 D_800DC5A8;
extern s32 D_800DC5AC;
extern u16 D_800DC5B0;
extern u16 D_800DC5B4;
extern u16 D_800DC5B8;
extern u16 D_800DC5BC;
extern u16 gIsInQuitToMenuTransition;
extern u16 gQuitToMenuTransitionCounter;
extern u16 D_800DC5C8;
extern u16 D_800DC5CC;
extern s32 D_800DC5D0;
extern s32 D_800DC5D4;
extern s32 D_800DC5D8;
extern s32 D_800DC5DC;
extern s32 D_800DC5E0;
// This is tracking which credit "state" we're in, decides which credits are shown (and probably other stuff)
extern u16 D_800DC5E4;
extern s32 gPlayerWinningIndex;
extern struct UnkStruct_800DC5EC D_8015F480[4];
extern struct UnkStruct_800DC5EC *D_800DC5EC;
extern struct UnkStruct_800DC5EC *D_800DC5F0;
extern struct UnkStruct_800DC5EC *D_800DC5F4;
extern struct UnkStruct_800DC5EC *D_800DC5F8;
extern u16 gIsGamePaused;
extern u8 *pAppNmiBuffer;
extern s32 gIsMirrorMode; // D_800DC604
extern s16 gCreditsCourseId;
extern s16 gPlaceItemBoxes;
extern mk64_surface_map_ram *gSurfaceMap;
extern u16 *D_8015F584;
@ -71,7 +98,6 @@ extern u16 D_8015F892;
extern u16 D_8015F894;
extern f32 gTimePlayerLastTouchedFinishLine[];
extern u8 *pAppNmiBuffer;
extern u8 *gNmiUnknown1;
extern u8 *gNmiUnknown2;
extern u8 *gNmiUnknown3;
@ -79,8 +105,6 @@ extern u8 *gNmiUnknown4;
extern u8 *gNmiUnknown5;
extern u8 *gNmiUnknown6;
extern s32 gIsMirrorMode; // D_800DC604
extern Vec3f D_8015F8D0;
extern s32 D_8015F8DC;
@ -89,7 +113,6 @@ extern f32 D_8015F8E4;
extern f32 D_8015F8E8;
extern s16 gPlayerPositionLUT[]; // Player index at each position
extern u16 gNumPermanentActors;
extern struct Actor gActorList[];
extern UNUSED u8 D_80162578[];
extern s16 gDebugPathCount;

View File

@ -243,7 +243,6 @@ extern Gfx D_0D0076F8[];
extern s8 D_801657E4;
extern bool8 D_801657E6;
extern s32 D_8018D2AC;
extern u16 D_800DC5B8;
extern bool8 D_801657F0;
extern s8 D_80165800[2];
extern s8 D_80165801;
@ -293,13 +292,6 @@ extern u8 *D_8018D4C8;
extern u16 gPlayerBalloonStatus[8][3]; // D_8018D5F0
extern s16 gPlayerBalloonCount[]; // D_8018D8C0
extern struct UnkStruct_800DC5EC *D_800DC5EC;
extern struct UnkStruct_800DC5EC *D_800DC5F0;
extern struct UnkStruct_800DC5EC *D_800DC5F4;
extern struct UnkStruct_800DC5EC *D_800DC5F8;
extern u16 gIsGamePaused;
extern s32 D_80164394;
extern s32 D_80164398;
extern s32 D_8016439C;

View File

@ -3,6 +3,7 @@
#include <memory.h>
#include <defines.h>
#include "code_800029B0.h"
#include "code_8006E9C0.h"
#include "code_80071F00.h"
#include "objects.h"
@ -463,7 +464,6 @@ block_26:
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006F008.s")
#endif
extern u16 gIsGamePaused;
extern s8 D_801657E4;
extern bool8 D_801657E6;
extern bool8 D_801657E8;

View File

@ -109,6 +109,7 @@ void func_80093C90(void);
void func_80093C98(s32);
void func_80093E20(void);
void func_80093E40(void);
void func_80093E60(void);
void func_80093F10(void);
void func_800940EC(s32);
void func_800942D0(void);
@ -382,9 +383,6 @@ extern u8 _textures_0bSegmentRomStart[];
extern s32 gCycleFlashMenu; // maybe?
extern s8 D_8018E7B0; // maybe?
// This is tracking which credit "state" we're in, decides which credits are shown (and probably other stuff)
extern u16 D_800DC5E4;
extern Unk_D_800E70A0 D_800E70A0[];
extern Unk_D_800E70A0 D_800E70E8[];
extern Unk_D_800E70A0 D_800E7108[][4];

View File

@ -8,9 +8,4 @@
void func_800AF9B0(void);
void func_800B0004(void);
/* This is where I'd put my static data, if I had any */
extern s16 gCurrentCourseId; // D_800DC5A0
extern s32 gIsMirrorMode; // D_800DC5F4
#endif /* CODE_800AF9B0_H */

View File

@ -203,7 +203,6 @@ void transition_sliding_borders(void);
/* This is where I'd put my static data, if I had any */
extern u16 D_800DC5E4;
extern s32 D_80283FCC;
extern s32 D_80283FF4;
extern f32 D_802856B0;

View File

@ -11,13 +11,10 @@ void func_80280268(s32 arg0);
void credits_loop(void);
void load_credits(void);
extern s16 gCreditsCourseId;
extern s16 gMatrixEffectCount;
extern u16 gIsInQuitToMenuTransition, gQuitToMenuTransitionCounter;
extern s32 D_802874A0;
extern u16 D_80164714, D_80164716, D_80164718;
extern u16 D_800DC5E4;
#endif

View File

@ -8,6 +8,7 @@
#include "variables.h"
#include "memory.h"
#include "camera.h"
#include "camera_junk.h"
#include "spawn_players.h"
#include "skybox_and_splitscreen.h"
#include "code_8006E9C0.h"
@ -16,8 +17,10 @@
#include "collision.h"
#include "code_80281C40.h"
#include "code_800029B0.h"
#include "code_80091750.h"
#include "main.h"
#include "menus.h"
#include "render_courses.h"
u8 defaultCharacterIds[] = {
1, 2, 3, 4, 5, 6, 7, 0

View File

@ -8,22 +8,6 @@ s32 func_80281880(s32 arg0);
void func_802818BC(void);
void load_ceremony_cutscene(void);
extern void func_80093E60(void);
extern void func_802816B8(void);
extern void func_80295C6C(void);
extern void func_802A4D18(void);
extern s16 gCurrentCourseId;
extern u16 D_800DC5B4;
extern s32 gIsMirrorMode;
extern u16 D_800DC5BC;
extern u16 D_800DC5C8;
extern struct UnkStruct_800DC5EC *D_800DC5EC;
extern s32 D_80287554;
extern f32 D_801647A4;

View File

@ -26,6 +26,7 @@
#include "collision.h"
#include "main.h"
#include "code_80086E70.h"
#include "code_800029B0.h"
#include "src/data/data_800E45C0.h"
#include "courses/all_course_data.h"
#include <vehicles.h>

View File

@ -443,8 +443,6 @@ extern s32 D_8018D3EC; // some blue
extern s32 D_8018D400;
extern struct UnkStruct_800DC5EC *D_800DC5F0;
// Probably aren't really part of this file, but don't have a better place to put them
extern u8 *gPortraitTLUTs[];
extern u8 *gPortraitTextures[];

View File

@ -247,16 +247,6 @@ extern u8 _common_texturesSegmentRomEnd[];
extern u8 _data_802BA370SegmentRomStart[];
extern u32 *D_801978D0; // Segment? Keeps track of segmented addresses?
extern s16 gCurrentlyLoadedCourseId;
extern s16 gCurrentCourseId;
extern s16 gMatrixEffectCount;
extern u16 gIsGamePaused; // 1 if the game is paused and 0 if the game is not paused
extern u16 gIsInQuitToMenuTransition;
extern struct UnkStruct_800DC5EC *D_800DC5EC;
extern u16 D_800DC5B0;
extern s32 gPlayerWinningIndex;
#endif

View File

@ -9,6 +9,7 @@
#include "code_800029B0.h"
#include "actors.h"
#include "audio/external.h"
#include "code_800029B0.h"
#include "code_80005FD0.h"
#include "code_80091750.h"
#include "code_800AF9B0.h"
@ -18,7 +19,6 @@
#include <sounds.h>
/** Externs to be put into headers **/
extern u32 D_800DC5AC; // data? from this file or another (main.c?)?
extern void rmonPrintf(const char *, ...); // not in a libultra header?
/** BSS **/

View File

@ -124,8 +124,6 @@ extern s16 gCurrentCourseId;
extern u16 isCrossingTriggeredByIndex[];
extern Lights1 D_800DC610[];
extern s16 gPlaceItemBoxes;
extern s8 D_0D004C68[];
extern Gfx D_0D005338[];
extern Gfx D_0D005368[];
@ -239,9 +237,6 @@ extern u8 gTextureShrub[];
extern s8 D_800DC628[];
extern s8 D_800DC630[];
extern u16 gIsGamePaused;
extern s8 D_802B8864[];
extern u16 D_800DC5BC;
#endif // ACTORS_H

View File

@ -31,15 +31,7 @@ extern s16 D_8016348C;
extern s32 gLapCountByPlayerId[];
extern u16 D_802BA048;
extern u16 D_800DC5B4;
extern u16 D_800DC5B0;
extern u16 D_800DC5B8;
extern s32 D_8018D2AC;
extern s16 gCurrentCourseId;
extern u32 D_800DC5AC;
extern s32 gPlayerWinningIndex;
extern u16 gIsInQuitToMenuTransition, gQuitToMenuTransitionCounter;
extern s32 D_802B91E0;
u16 D_802BA030;
@ -795,8 +787,6 @@ void func_8028F914(void) {
func_8028F588();
}
extern u16 D_800DC5A8;
void func_8028F970(void) {
s32 i;

View File

@ -36,12 +36,8 @@ void func_80295D88(void);
void func_802966A0(void);
void func_802969F8(void);
extern s16 gCurrentCourseId;
extern s32 D_8015F59C;
extern s32 D_800DC5DC;
extern s32 D_800DC5E0;
extern s32 D_802B87C4;
extern s32 D_802B87C8;
extern s32 D_802B87CC;
@ -65,6 +61,4 @@ extern Gfx D_090001D0[];
extern u16 D_8015F58A;
extern u16 D_800DC5BC; /* unable to generate initializer */
#endif

View File

@ -1362,9 +1362,6 @@ void copy_framebuffer(s32 arg0, s32 arg1, s32 width, s32 height, u16 *source, u1
}
}
extern s32 D_800DC5DC;
extern s32 D_800DC5E0;
void func_802A7728(void) {
s16 temp_v0;

View File

@ -56,26 +56,4 @@ void func_802A7940(void);
extern Vp D_802B8880[];
extern struct UnkStruct_800DC5EC *D_800DC5EC;
extern struct UnkStruct_800DC5EC *D_800DC5F0;
extern struct UnkStruct_800DC5EC *D_800DC5F4;
extern struct UnkStruct_800DC5EC *D_800DC5F8;
extern u16 D_800DC5B0;
extern u16 gIsInQuitToMenuTransition;
extern u16 gQuitToMenuTransitionCounter;
extern s32 D_800DC5D0;
extern s32 D_800DC5D4;
extern s32 D_800DC5D8;
extern u16 D_800DC5BC;
extern u16 D_800DC5B4;
extern u16 D_800DC5C8;
extern u16 D_800DC5B8;
extern struct UnkStruct_800DC5EC D_8015F480[];
extern s32 D_800DC5DC;
extern s32 D_800DC5E0;
#endif