diff options
Diffstat (limited to 'src/code/z_parameter.c')
| -rw-r--r-- | src/code/z_parameter.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index f23bc9348..90996bc9f 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -4,11 +4,6 @@ #include "assets/textures/do_action_static/do_action_static.h" #include "assets/textures/icon_item_static/icon_item_static.h" -// TODO extract this information from the texture definitions themselves -#define DO_ACTION_TEX_WIDTH 48 -#define DO_ACTION_TEX_HEIGHT 16 -#define DO_ACTION_TEX_SIZE ((DO_ACTION_TEX_WIDTH * DO_ACTION_TEX_HEIGHT) / 2) // (sizeof(gCheckDoActionENGTex)) - typedef struct { /* 0x00 */ u8 sceneId; /* 0x01 */ u8 flags1; @@ -1277,10 +1272,10 @@ void Interface_LoadItemIcon1(PlayState* play, u16 button) { InterfaceContext* interfaceCtx = &play->interfaceCtx; osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1); - DmaMgr_SendRequest2(&interfaceCtx->dmaRequest_160, interfaceCtx->iconItemSegment + button * 0x1000, + DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->iconItemSegment + button * ICON_ITEM_TEX_SIZE, (uintptr_t)_icon_item_staticSegmentRomStart + - (gSaveContext.equips.buttonItems[button] * 0x1000), - 0x1000, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1171); + (gSaveContext.equips.buttonItems[button] * ICON_ITEM_TEX_SIZE), + ICON_ITEM_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1171); osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); } @@ -1288,10 +1283,10 @@ void Interface_LoadItemIcon2(PlayState* play, u16 button) { InterfaceContext* interfaceCtx = &play->interfaceCtx; osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1); - DmaMgr_SendRequest2(&interfaceCtx->dmaRequest_180, interfaceCtx->iconItemSegment + button * 0x1000, + DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_180, interfaceCtx->iconItemSegment + button * ICON_ITEM_TEX_SIZE, (uintptr_t)_icon_item_staticSegmentRomStart + - (gSaveContext.equips.buttonItems[button] * 0x1000), - 0x1000, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1193); + (gSaveContext.equips.buttonItems[button] * ICON_ITEM_TEX_SIZE), + ICON_ITEM_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1193); osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); } @@ -2086,7 +2081,7 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 l if ((action != DO_ACTION_NONE) && (action != DO_ACTION_MAX + DO_ACTION_NONE) && (action != 2 * DO_ACTION_MAX + DO_ACTION_NONE)) { osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1); - DmaMgr_SendRequest2(&interfaceCtx->dmaRequest_160, + DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->doActionSegment + (loadOffset * DO_ACTION_TEX_SIZE), (uintptr_t)_do_action_staticSegmentRomStart + (action * DO_ACTION_TEX_SIZE), DO_ACTION_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 2145); @@ -2150,7 +2145,7 @@ void Interface_LoadActionLabelB(PlayState* play, u16 action) { interfaceCtx->unk_1FC = action; osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1); - DmaMgr_SendRequest2(&interfaceCtx->dmaRequest_160, interfaceCtx->doActionSegment + DO_ACTION_TEX_SIZE, + DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->doActionSegment + DO_ACTION_TEX_SIZE, (uintptr_t)_do_action_staticSegmentRomStart + (action * DO_ACTION_TEX_SIZE), DO_ACTION_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 2228); osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); |
