From 1d9adcd5a5a1ad88182e0dedb3260f8d09dfed6c Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Sun, 10 Sep 2023 19:21:26 +0200 Subject: [PATCH] fix remaining unaligned assets for mac (#3138) --- soh/src/code/gfxprint.c | 9 +++++++-- soh/src/code/z_parameter.c | 6 ++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/soh/src/code/gfxprint.c b/soh/src/code/gfxprint.c index 8637e86d5..8a0dbead4 100644 --- a/soh/src/code/gfxprint.c +++ b/soh/src/code/gfxprint.c @@ -1,4 +1,5 @@ #include "global.h" +#include "align_asset_macro.h" u16 sGfxPrintFontTLUT[64] = { 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, @@ -128,8 +129,12 @@ u8 sGfxPrintFontData[(16 * 256) / 2] = { // Can be used to set GFXP_FLAG_ENLARGE by default static u8 sDefaultSpecialFlags; -static const char rGfxPrintFontData[] = "__OTR__textures/font/sGfxPrintFontData"; -static const char rGfxPrintFontDataAlt[] = "__OTR__alt/textures/font/sGfxPrintFontData"; + +#define drGfxPrintFontData "__OTR__textures/font/sGfxPrintFontData"; +static const ALIGN_ASSET(2) char rGfxPrintFontData[] = drGfxPrintFontData; + +#define drGfxPrintFontDataAlt "__OTR__alt/textures/font/sGfxPrintFontData"; +static const ALIGN_ASSET(2) char rGfxPrintFontDataAlt[] = drGfxPrintFontDataAlt; // OTRTODO: this isn't as clean as it could be if we implemented // the GfxPrint texture extraction to `.otr` as described in diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 635bdce4d..571cbb947 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -210,8 +210,6 @@ static const char* actionsTbl[] = gNum8DoActionENGTex, }; -static const char gDoEmptyTexture[] = "__OTR__textures/virtual/gEmptyTexture"; - // original name: "alpha_change" void Interface_ChangeAlpha(u16 alphaType) { if (alphaType != gSaveContext.unk_13EA) { @@ -2859,7 +2857,7 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 l } char* segment = interfaceCtx->doActionSegment[loadOffset]; - interfaceCtx->doActionSegment[loadOffset] = action != DO_ACTION_NONE ? doAction : gDoEmptyTexture; + interfaceCtx->doActionSegment[loadOffset] = action != DO_ACTION_NONE ? doAction : gEmptyTexture; gSegments[7] = interfaceCtx->doActionSegment[loadOffset]; } @@ -2926,7 +2924,7 @@ void Interface_LoadActionLabelB(PlayState* play, u16 action) { interfaceCtx->unk_1FC = action; char* segment = interfaceCtx->doActionSegment[1]; - interfaceCtx->doActionSegment[1] = action != DO_ACTION_NONE ? doAction : gDoEmptyTexture; + interfaceCtx->doActionSegment[1] = action != DO_ACTION_NONE ? doAction : gEmptyTexture; osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); interfaceCtx->unk_1FA = 1;