From 2e252641a309ea340db84a308376789bfac184c6 Mon Sep 17 00:00:00 2001 From: petrie911 Date: Thu, 26 Dec 2024 22:12:51 -0600 Subject: [PATCH] format --- include/mods.h | 4 ++-- include/variables.h | 2 +- src/engine/fox_std_lib.c | 6 +++--- src/mods/object_ram.c | 16 ++++++++-------- src/mods/sfxjukebox.c | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/mods.h b/include/mods.h index d205baff..5e9118a0 100644 --- a/include/mods.h +++ b/include/mods.h @@ -9,7 +9,7 @@ * For the full list of game states, see sf64thread.h. */ // #define MODS_BOOT_STATE 3 // main menu -#define MODS_BOOT_STATE 4 // map +// #define MODS_BOOT_STATE 4 // map /** * Level Select: @@ -54,7 +54,7 @@ * Use D-Pad to move the cursor and change values * Press L to edit the highlighted value */ -#define MODS_RAM_MOD 1 +#define MODS_RAM_MOD 0 /** * Spawner: diff --git a/include/variables.h b/include/variables.h index eb224f68..a5eb7724 100644 --- a/include/variables.h +++ b/include/variables.h @@ -163,7 +163,7 @@ extern s32 D_hud_80161730; extern s32 gShowBossHealth; // 0x80161734 // fox_std_lib -extern char D_801619A0[]; +extern char gGfxPrintBuffer[]; // fox_play extern u8 gSavedZoSearchlightStatus; diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index 777cae9c..eef28eab 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -1,7 +1,7 @@ #include "global.h" #include "assets/ast_text.h" -char D_801619A0[100]; +char gGfxPrintBuffer[100]; char* Graphics_ClearPrintBuffer(char* buf, s32 fill, s32 len) { s32 i; @@ -18,8 +18,8 @@ s32 Graphics_Printf(const char* fmt, ...) { va_list args; va_start(args, fmt); - Graphics_ClearPrintBuffer(D_801619A0, 0, 100); - Lib_vsPrintf(D_801619A0, fmt, args); + Graphics_ClearPrintBuffer(gGfxPrintBuffer, 0, 100); + Lib_vsPrintf(gGfxPrintBuffer, fmt, args); va_end(args); return 0; diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index 298c83b9..da7f5829 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -52,7 +52,7 @@ void ObjectRam_PrintFieldName(RamEntry* entry) { } else { Graphics_Printf("%s-%d-", field->name, entry->element); } - ObjectRam_Capitalize(D_801619A0); + ObjectRam_Capitalize(gGfxPrintBuffer); } void ObjectRam_EditPosition(RamEntry* entry) { @@ -430,7 +430,7 @@ void ObjectRam_DrawEntry(RamEntry* entry, s32 num) { if (entry->type == ORAM_NONE) { // Graphics_Printf("%X %X %X", entry->index); - // Graphics_DisplaySmallText(x + 50, y, 1.0f, 1.0f, D_801619A0); + // Graphics_DisplaySmallText(x + 50, y, 1.0f, 1.0f, gGfxPrintBuffer); return; } SET_DRAW_COLOR(EDM_MAX) @@ -438,16 +438,16 @@ void ObjectRam_DrawEntry(RamEntry* entry, s32 num) { SET_DRAW_COLOR(EDM_INDEX) Graphics_Printf("%02d", entry->index); - Graphics_DisplaySmallText(x + 32, y, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(x + 32, y, 1.0f, 1.0f, gGfxPrintBuffer); SET_DRAW_COLOR(EDM_MAX) Graphics_DisplaySmallText(x + 50, y, 1.0f, 1.0f, "."); SET_DRAW_COLOR(EDM_OFFSET) // Graphics_Printf("%03X", entry->offset); - // Graphics_DisplaySmallText(x + 56, y, 1.0f, 1.0f, D_801619A0); + // Graphics_DisplaySmallText(x + 56, y, 1.0f, 1.0f, gGfxPrintBuffer); ObjectRam_PrintFieldName(entry); - Graphics_DisplaySmallText(x + 56, y, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(x + 56, y, 1.0f, 1.0f, gGfxPrintBuffer); // if(objArrays[entry->type].fields != NULL && (nameStr = ObjectRam_GetFieldName(entry))!= NULL) { // ObjectRam_Capitalize(nameStr); @@ -458,7 +458,7 @@ void ObjectRam_DrawEntry(RamEntry* entry, s32 num) { // Graphics_DisplaySmallText(x + 90, y, 1.0f, 1.0f, fmtTypes[entry->fmt]); // SET_DRAW_COLOR(EDM_WIDTH) // Graphics_Printf("%-2d", 1 << (entry->width + 3)); - // Graphics_DisplaySmallText(x + 100, y, 1.0f, 1.0f, D_801619A0); + // Graphics_DisplaySmallText(x + 100, y, 1.0f, 1.0f, gGfxPrintBuffer); if ((num != selectNum) || !editingValue) { data.i = ObjectRam_GetData(entry); @@ -488,7 +488,7 @@ void ObjectRam_DrawEntry(RamEntry* entry, s32 num) { break; // } } - Graphics_DisplaySmallText(x + 25, y + 12, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(x + 25, y + 12, 1.0f, 1.0f, gGfxPrintBuffer); } void ObjectRam_FieldInit(RamEntry* entry) { @@ -869,7 +869,7 @@ void CheatRam_DrawEntry(CheatMode mode, s32 x, s32 y, s32 option) { Graphics_Printf("%s: %s %s", cheatNames[mode], (option > 3) ? "DOWN" : "HEAL", teamNames[option % 4]); break; } - Graphics_DisplaySmallText(x, y, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(x, y, 1.0f, 1.0f, gGfxPrintBuffer); } s32 medalCount[] = { 150, 200, 150, 300, 0, 200, 100, 250, 200, 0, 150, 100, 150, 50, 0, 150, 150, 100, 200 }; diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index a3e4d376..aee6c7e9 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -198,17 +198,17 @@ void Jukebox_Update(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_Printf("SFX ID: %08X", sfx); - Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, gGfxPrintBuffer); Graphics_DisplaySmallText(20, 80, 1.0f, 1.0f, "B ID X R S FLAG IMP"); Graphics_Printf("%d %02X %d %d %d %d%d%d%d%d%d%d%d %02X", sfxBank, sfxId, sfxFlag, sfxRange, 1, sfxFlags[0], sfxFlags[1], sfxFlags[2], sfxFlags[3], sfxFlags[4], sfxFlags[5], sfxFlags[6], sfxFlags[7], sfxImport); - Graphics_DisplaySmallText(20, 70, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(20, 70, 1.0f, 1.0f, gGfxPrintBuffer); // Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString); for (i = 0; i < 3; i++) { Graphics_Printf("%5.0f", sfxSource[i]); - Graphics_DisplaySmallText(20 + 90 * i, 100, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(20 + 90 * i, 100, 1.0f, 1.0f, gGfxPrintBuffer); } Graphics_DisplaySmallText(45, 110, 1.0f, 1.0f, "X"); Graphics_DisplaySmallText(135, 110, 1.0f, 1.0f, "Y");