mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-06 07:56:32 +00:00
More documentation for z_std_dma.c
(#1415)
* More documentation for z_std_dma * uintptr casts for rom symbols in z64animation.h and z_kanfont.c * Format * Suggested changes, more defines for static texture sizes * PI Interface -> PI * Further suggested changes * Format * Comments about item_name and map_name texture assumptions
This commit is contained in:
parent
40639e698d
commit
7ecafcfe7d
32 changed files with 549 additions and 320 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue