summaryrefslogtreecommitdiff
path: root/src/code/z_message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/code/z_message.c')
-rw-r--r--src/code/z_message.c40
1 files changed, 24 insertions, 16 deletions
diff --git a/src/code/z_message.c b/src/code/z_message.c
index 330024a3d..7552c9970 100644
--- a/src/code/z_message.c
+++ b/src/code/z_message.c
@@ -14,6 +14,7 @@
#include "printf.h"
#include "segment_symbols.h"
#include "sequence.h"
+#include "stack_pad.h"
#include "regs.h"
#include "terminal.h"
#include "translation.h"
@@ -412,7 +413,7 @@ void Message_DrawTextChar(PlayState* play, void* textureImage, Gfx** p) {
Gfx* gfx = *p;
s16 x = msgCtx->textPosX;
s16 y = msgCtx->textPosY;
- s32 pad;
+ STACK_PAD(s32);
gDPPipeSync(gfx++);
@@ -1003,7 +1004,7 @@ f32 sFontWidths[144] = {
};
u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
- s32 pad;
+ STACK_PAD(s32);
Gfx* gfx = *p;
MessageContext* msgCtx = &play->msgCtx;
@@ -1422,7 +1423,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
*/
void Message_DrawText(PlayState* play, Gfx** gfxP) {
MessageContext* msgCtx = &play->msgCtx;
- s16 pad;
+ STACK_PAD(s16);
u8 character;
u16 j;
u16 i;
@@ -1751,19 +1752,27 @@ void Message_Decode(PlayState* play) {
s32 charTexIdx = 0;
s16 i;
#if !(PLATFORM_GC && OOT_PAL)
+#if OOT_NTSC
s16 j;
+#else
+ STACK_PAD(s16);
+#endif
#endif
s16 decodedBufPos = 0;
s16 numLines = 0;
s16 digits[4];
- s32 pad;
+ STACK_PAD(s32);
s16 playerNameLen;
s16 loadChar;
u16 value;
u8 curChar;
#if !(PLATFORM_GC && OOT_PAL)
+#if OOT_NTSC
u16 curCharWide;
u8* fontBuf;
+#else
+ STACK_PADS(s32, 2);
+#endif
#endif
msgCtx->textDelayTimer = 0;
@@ -2771,7 +2780,7 @@ void Message_ContinueTextbox(PlayState* play, u16 textId) {
MessageContext* msgCtx = &play->msgCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
#if PLATFORM_N64
- s32 pad2[3];
+ STACK_PADS(s32, 3);
#endif
PRINTF_COLOR_GREEN();
@@ -4007,7 +4016,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) {
static s16 sVarLastValue = 0;
static s16 sFillTimer = 0;
- s32 pad;
+ STACK_PAD(s32);
OPEN_DISPS(gfxCtx, "../z_message_PAL.c", 3485);
@@ -4034,9 +4043,9 @@ void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) {
}
void Message_DrawDebugText(PlayState* play, Gfx** p) {
- s32 pad;
+ STACK_PAD(s32);
GfxPrint printer;
- s32 pad1;
+ STACK_PAD(s32);
GfxPrint_Init(&printer);
GfxPrint_Open(&printer, *p);
@@ -4056,7 +4065,7 @@ void Message_Draw(PlayState* play) {
Gfx* plusOne;
Gfx* polyOpaP;
#if OOT_VERSION < GC_US
- s32 pad;
+ STACK_PAD(s32);
#endif
#if DEBUG_FEATURES
s16 watchVar;
@@ -4102,31 +4111,30 @@ void Message_Update(PlayState* play) {
static s16 sTextboxEndIconYOffset[] = {
59, 59, 59, 59, 34, 59,
};
- static s16 D_80153D3C[] = {
- // additional unreferenced data
+ UNUSED static s16 D_80153D3C[] = {
0x0400, 0x0400, 0x0200, 0x0000, 0x1038, 0x0008, 0x200A, 0x088B, 0x0007, 0x0009, 0x000A, 0x107E, 0x2008, 0x2007,
0x0015, 0x0016, 0x0017, 0x0003, 0x0000, 0x270B, 0x00C8, 0x012C, 0x012D, 0xFFDA, 0x0014, 0x0016, 0x0014, 0x0016,
};
#if OOT_VERSION < GC_US
- static s32 sUnknown = 0;
+ UNUSED static s32 sUnknown = 0;
#elif PLATFORM_IQUE
- static u16 sUnknown = 0;
+ UNUSED static u16 sUnknown = 0;
#endif
static char D_80153D74 = 0;
MessageContext* msgCtx = &play->msgCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
Player* player = GET_PLAYER(play);
- Input* input = &play->state.input[0];
+ UNUSED_NDEBUG Input* input = &play->state.input[0];
s16 var;
s16 focusScreenPosX;
s16 averageY;
s16 playerFocusScreenPosY;
s16 actorFocusScreenPosY;
#if OOT_VERSION < GC_US
- s32 pad1;
+ STACK_PAD(s32);
#endif
#if OOT_NTSC && OOT_VERSION < GC_US
- s32 pad2;
+ STACK_PAD(s32);
#endif
#if DEBUG_FEATURES