mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 06:54:33 +00:00
Some doActionSegment usage cleanup to check R_START_LABEL_
This commit is contained in:
parent
9ebd76d9af
commit
5fdf0f529f
3 changed files with 17 additions and 16 deletions
|
@ -625,6 +625,11 @@ typedef enum {
|
|||
/* 0x1D */ DO_ACTION_MAX
|
||||
} DoAction;
|
||||
|
||||
// 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 {
|
||||
/* 0x0000 */ View view;
|
||||
/* 0x0128 */ Vtx* actionVtx;
|
||||
|
|
|
@ -40,7 +40,7 @@ void Interface_Init(PlayState* play) {
|
|||
DmaMgr_SendRequest1(interfaceCtx->parameterSegment, (u32)_parameter_staticSegmentRomStart, parameterSize,
|
||||
"../z_construct.c", 162);
|
||||
|
||||
interfaceCtx->doActionSegment = GameState_Alloc(&play->state, 0x480, "../z_construct.c", 166);
|
||||
interfaceCtx->doActionSegment = GameState_Alloc(&play->state, 3 * DO_ACTION_TEX_SIZE, "../z_construct.c", 166);
|
||||
|
||||
osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480); // "DO Action Texture Initialization"
|
||||
osSyncPrintf("parameter->do_actionSegment=%x\n", interfaceCtx->doActionSegment);
|
||||
|
@ -48,26 +48,26 @@ void Interface_Init(PlayState* play) {
|
|||
ASSERT(interfaceCtx->doActionSegment != NULL, "parameter->do_actionSegment != NULL", "../z_construct.c", 169);
|
||||
|
||||
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||
doActionOffset = 0;
|
||||
doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
|
||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||
doActionOffset = 0x2B80;
|
||||
doActionOffset = (LANGUAGE_GER * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
|
||||
} else {
|
||||
doActionOffset = 0x5700;
|
||||
doActionOffset = (LANGUAGE_FRA * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
|
||||
}
|
||||
|
||||
DmaMgr_SendRequest1(interfaceCtx->doActionSegment, (u32)_do_action_staticSegmentRomStart + doActionOffset, 0x300,
|
||||
"../z_construct.c", 174);
|
||||
|
||||
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||
doActionOffset = 0x480;
|
||||
doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
|
||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||
doActionOffset = 0x3000;
|
||||
doActionOffset = (LANGUAGE_GER * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
|
||||
} else {
|
||||
doActionOffset = 0x5B80;
|
||||
doActionOffset = (LANGUAGE_FRA * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
|
||||
}
|
||||
|
||||
DmaMgr_SendRequest1(interfaceCtx->doActionSegment + 0x300, (u32)_do_action_staticSegmentRomStart + doActionOffset,
|
||||
0x180, "../z_construct.c", 178);
|
||||
DmaMgr_SendRequest1(interfaceCtx->doActionSegment + DO_ACTION_TEX_SIZE * 2,
|
||||
(u32)_do_action_staticSegmentRomStart + doActionOffset, 0x180, "../z_construct.c", 178);
|
||||
|
||||
interfaceCtx->iconItemSegment = GameState_Alloc(&play->state, 0x4000, "../z_construct.c", 190);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -2080,8 +2075,9 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 l
|
|||
action += DO_ACTION_MAX;
|
||||
}
|
||||
|
||||
if ((action != DO_ACTION_NONE) && (action != DO_ACTION_MAX + DO_ACTION_NONE) &&
|
||||
(action != 2 * DO_ACTION_MAX + DO_ACTION_NONE)) {
|
||||
if ((action != LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_NONE) &&
|
||||
(action != LANGUAGE_GER * DO_ACTION_MAX + DO_ACTION_NONE) &&
|
||||
(action != LANGUAGE_FRA * DO_ACTION_MAX + DO_ACTION_NONE)) {
|
||||
osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1);
|
||||
DmaMgr_SendRequest2(&interfaceCtx->dmaRequest_160,
|
||||
interfaceCtx->doActionSegment + (loadOffset * DO_ACTION_TEX_SIZE),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue