Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
petrie911 committed Dec 27, 2024
1 parent 044214b commit 2e25264
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions include/mods.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/engine/fox_std_lib.c
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions src/mods/object_ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -430,24 +430,24 @@ 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)
Graphics_DisplaySmallText(x + 26, y, 1.0f, 1.0f, "-");

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);
Expand All @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 };
Expand Down
6 changes: 3 additions & 3 deletions src/mods/sfxjukebox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 2e25264

Please sign in to comment.