Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Align remaining unaligned assets for mac #3138

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions soh/src/code/gfxprint.c
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions soh/src/code/z_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,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) {
Expand Down Expand Up @@ -2897,7 +2895,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];
}

Expand Down Expand Up @@ -2964,7 +2962,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;
Expand Down