mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 09:45:02 +00:00
Use intptr types in overlays and dmadata (#1325)
This commit is contained in:
parent
3122143f96
commit
7254adec9f
9 changed files with 73 additions and 67 deletions
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
// dmadata Table definition
|
// dmadata Table definition
|
||||||
#define DEFINE_DMA_ENTRY(name, _1) \
|
#define DEFINE_DMA_ENTRY(name, _1) \
|
||||||
{ (u32)_##name##SegmentRomStart, (u32)_##name##SegmentRomEnd, (u32)_##name##SegmentRomStart, 0 },
|
{ (uintptr_t)_##name##SegmentRomStart, (uintptr_t)_##name##SegmentRomEnd, (uintptr_t)_##name##SegmentRomStart, 0 },
|
||||||
|
|
||||||
DmaEntry gDmaDataTable[] = {
|
DmaEntry gDmaDataTable[] = {
|
||||||
#include "tables/dmadata_table.h"
|
#include "tables/dmadata_table.h"
|
||||||
|
|
|
@ -11,7 +11,7 @@ typedef void (*BgJyaCobraActionFunc)(struct BgJyaCobra*, PlayState*);
|
||||||
#define COBRA_SHADOW_TEX_WIDTH 64
|
#define COBRA_SHADOW_TEX_WIDTH 64
|
||||||
#define COBRA_SHADOW_TEX_HEIGHT 64
|
#define COBRA_SHADOW_TEX_HEIGHT 64
|
||||||
#define COBRA_SHADOW_TEX_SIZE (COBRA_SHADOW_TEX_WIDTH * COBRA_SHADOW_TEX_HEIGHT * G_IM_SIZ_8b_BYTES)
|
#define COBRA_SHADOW_TEX_SIZE (COBRA_SHADOW_TEX_WIDTH * COBRA_SHADOW_TEX_HEIGHT * G_IM_SIZ_8b_BYTES)
|
||||||
#define COBRA_SHADOW_TEX_PTR(this) (u8*)ALIGN16((u32)(&this->shadowTextureBuffer))
|
#define COBRA_SHADOW_TEX_PTR(this) (u8*)ALIGN16((uintptr_t)&(this)->shadowTextureBuffer)
|
||||||
|
|
||||||
typedef struct BgJyaCobra {
|
typedef struct BgJyaCobra {
|
||||||
/* 0x0000 */ DynaPolyActor dyna;
|
/* 0x0000 */ DynaPolyActor dyna;
|
||||||
|
|
|
@ -1864,7 +1864,7 @@ void DemoEffect_DrawLightEffect(Actor* thisx, PlayState* play) {
|
||||||
if (this->light.flicker == 0) {
|
if (this->light.flicker == 0) {
|
||||||
this->light.flicker = 1;
|
this->light.flicker = 1;
|
||||||
} else {
|
} else {
|
||||||
disp = (Gfx*)(u32)gEffFlash1DL; // necessary to match, should be able to remove after fake matches are fixed
|
disp = (Gfx*)(uintptr_t)gEffFlash1DL; // necessary to match but probably fake
|
||||||
alpha = &this->light.alpha;
|
alpha = &this->light.alpha;
|
||||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, this->primXluColor[0], this->primXluColor[1],
|
gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, this->primXluColor[0], this->primXluColor[1],
|
||||||
|
|
|
@ -859,7 +859,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
|
||||||
translateZ = this->unk_150[i].unk_C.z + this->unk_150[i].unk_0.z;
|
translateZ = this->unk_150[i].unk_C.z + this->unk_150[i].unk_0.z;
|
||||||
|
|
||||||
if (this->unk_150[i].unk_22 < 2) {
|
if (this->unk_150[i].unk_22 < 2) {
|
||||||
disp = (Gfx*)(u32)gEffFlash1DL;
|
disp = (Gfx*)(uintptr_t)gEffFlash1DL; // necessary to match but probably fake
|
||||||
if (linkAge != LINK_AGE_ADULT) {
|
if (linkAge != LINK_AGE_ADULT) {
|
||||||
Matrix_Translate(translateX, translateY, translateZ, MTXMODE_NEW);
|
Matrix_Translate(translateX, translateY, translateZ, MTXMODE_NEW);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -9311,7 +9311,7 @@ void Player_Init(Actor* thisx, PlayState* play2) {
|
||||||
Player_SetEquipmentData(play, this);
|
Player_SetEquipmentData(play, this);
|
||||||
this->prevBoots = this->currentBoots;
|
this->prevBoots = this->currentBoots;
|
||||||
Player_InitCommon(this, play, gPlayerSkelHeaders[((void)0, gSaveContext.linkAge)]);
|
Player_InitCommon(this, play, gPlayerSkelHeaders[((void)0, gSaveContext.linkAge)]);
|
||||||
this->giObjectSegment = (void*)(((u32)ZeldaArena_MallocDebug(0x3008, "../z_player.c", 17175) + 8) & ~0xF);
|
this->giObjectSegment = (void*)(((uintptr_t)ZeldaArena_MallocDebug(0x3008, "../z_player.c", 17175) + 8) & ~0xF);
|
||||||
|
|
||||||
respawnFlag = gSaveContext.respawnFlag;
|
respawnFlag = gSaveContext.respawnFlag;
|
||||||
|
|
||||||
|
|
|
@ -1871,7 +1871,7 @@ void FileSelect_Destroy(GameState* thisx) {
|
||||||
|
|
||||||
void FileSelect_Init(GameState* thisx) {
|
void FileSelect_Init(GameState* thisx) {
|
||||||
FileSelectState* this = (FileSelectState*)thisx;
|
FileSelectState* this = (FileSelectState*)thisx;
|
||||||
u32 size = (u32)_title_staticSegmentRomEnd - (u32)_title_staticSegmentRomStart;
|
u32 size = (uintptr_t)_title_staticSegmentRomEnd - (uintptr_t)_title_staticSegmentRomStart;
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
|
||||||
SREG(30) = 1;
|
SREG(30) = 1;
|
||||||
|
@ -1879,12 +1879,12 @@ void FileSelect_Init(GameState* thisx) {
|
||||||
|
|
||||||
this->staticSegment = GameState_Alloc(&this->state, size, "../z_file_choose.c", 3392);
|
this->staticSegment = GameState_Alloc(&this->state, size, "../z_file_choose.c", 3392);
|
||||||
ASSERT(this->staticSegment != NULL, "this->staticSegment != NULL", "../z_file_choose.c", 3393);
|
ASSERT(this->staticSegment != NULL, "this->staticSegment != NULL", "../z_file_choose.c", 3393);
|
||||||
DmaMgr_SendRequest1(this->staticSegment, (u32)_title_staticSegmentRomStart, size, "../z_file_choose.c", 3394);
|
DmaMgr_SendRequest1(this->staticSegment, (uintptr_t)_title_staticSegmentRomStart, size, "../z_file_choose.c", 3394);
|
||||||
|
|
||||||
size = (u32)_parameter_staticSegmentRomEnd - (u32)_parameter_staticSegmentRomStart;
|
size = (uintptr_t)_parameter_staticSegmentRomEnd - (uintptr_t)_parameter_staticSegmentRomStart;
|
||||||
this->parameterSegment = GameState_Alloc(&this->state, size, "../z_file_choose.c", 3398);
|
this->parameterSegment = GameState_Alloc(&this->state, size, "../z_file_choose.c", 3398);
|
||||||
ASSERT(this->parameterSegment != NULL, "this->parameterSegment != NULL", "../z_file_choose.c", 3399);
|
ASSERT(this->parameterSegment != NULL, "this->parameterSegment != NULL", "../z_file_choose.c", 3399);
|
||||||
DmaMgr_SendRequest1(this->parameterSegment, (u32)_parameter_staticSegmentRomStart, size, "../z_file_choose.c",
|
DmaMgr_SendRequest1(this->parameterSegment, (uintptr_t)_parameter_staticSegmentRomStart, size, "../z_file_choose.c",
|
||||||
3400);
|
3400);
|
||||||
|
|
||||||
Matrix_Init(&this->state);
|
Matrix_Init(&this->state);
|
||||||
|
|
|
@ -751,7 +751,7 @@ void MapSelect_Init(GameState* thisx) {
|
||||||
this->lockDown = 0;
|
this->lockDown = 0;
|
||||||
this->unk_234 = 0;
|
this->unk_234 = 0;
|
||||||
|
|
||||||
size = (u32)_z_select_staticSegmentRomEnd - (u32)_z_select_staticSegmentRomStart;
|
size = (uintptr_t)_z_select_staticSegmentRomEnd - (uintptr_t)_z_select_staticSegmentRomStart;
|
||||||
|
|
||||||
if ((dREG(80) >= 0) && (dREG(80) < this->count)) {
|
if ((dREG(80) >= 0) && (dREG(80) < this->count)) {
|
||||||
this->currentScene = dREG(80);
|
this->currentScene = dREG(80);
|
||||||
|
@ -761,7 +761,7 @@ void MapSelect_Init(GameState* thisx) {
|
||||||
R_UPDATE_RATE = 1;
|
R_UPDATE_RATE = 1;
|
||||||
|
|
||||||
this->staticSegment = GameState_Alloc(&this->state, size, "../z_select.c", 1114);
|
this->staticSegment = GameState_Alloc(&this->state, size, "../z_select.c", 1114);
|
||||||
DmaMgr_SendRequest1(this->staticSegment, (u32)_z_select_staticSegmentRomStart, size, "../z_select.c", 1115);
|
DmaMgr_SendRequest1(this->staticSegment, (uintptr_t)_z_select_staticSegmentRomStart, size, "../z_select.c", 1115);
|
||||||
gSaveContext.cutsceneIndex = 0x8000;
|
gSaveContext.cutsceneIndex = 0x8000;
|
||||||
gSaveContext.linkAge = LINK_AGE_CHILD;
|
gSaveContext.linkAge = LINK_AGE_CHILD;
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,13 +154,14 @@ void ConsoleLogo_Destroy(GameState* thisx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleLogo_Init(GameState* thisx) {
|
void ConsoleLogo_Init(GameState* thisx) {
|
||||||
u32 size = (u32)_nintendo_rogo_staticSegmentRomEnd - (u32)_nintendo_rogo_staticSegmentRomStart;
|
u32 size = (uintptr_t)_nintendo_rogo_staticSegmentRomEnd - (uintptr_t)_nintendo_rogo_staticSegmentRomStart;
|
||||||
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
|
ConsoleLogoState* this = (ConsoleLogoState*)thisx;
|
||||||
|
|
||||||
this->staticSegment = GameState_Alloc(&this->state, size, "../z_title.c", 611);
|
this->staticSegment = GameState_Alloc(&this->state, size, "../z_title.c", 611);
|
||||||
osSyncPrintf("z_title.c\n");
|
osSyncPrintf("z_title.c\n");
|
||||||
ASSERT(this->staticSegment != NULL, "this->staticSegment != NULL", "../z_title.c", 614);
|
ASSERT(this->staticSegment != NULL, "this->staticSegment != NULL", "../z_title.c", 614);
|
||||||
DmaMgr_SendRequest1(this->staticSegment, (u32)_nintendo_rogo_staticSegmentRomStart, size, "../z_title.c", 615);
|
DmaMgr_SendRequest1(this->staticSegment, (uintptr_t)_nintendo_rogo_staticSegmentRomStart, size, "../z_title.c",
|
||||||
|
615);
|
||||||
R_UPDATE_RATE = 1;
|
R_UPDATE_RATE = 1;
|
||||||
Matrix_Init(&this->state);
|
Matrix_Init(&this->state);
|
||||||
View_Init(&this->view, this->state.gfxCtx);
|
View_Init(&this->view, this->state.gfxCtx);
|
||||||
|
|
|
@ -1348,8 +1348,8 @@ void KaleidoScope_UpdateNamePanel(PlayState* play) {
|
||||||
sp2A += 12;
|
sp2A += 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
DmaMgr_SendRequest1(pauseCtx->nameSegment, (u32)_map_name_staticSegmentRomStart + (sp2A * 0x400), 0x400,
|
DmaMgr_SendRequest1(pauseCtx->nameSegment, (uintptr_t)_map_name_staticSegmentRomStart + (sp2A * 0x400),
|
||||||
"../z_kaleido_scope_PAL.c", 2093);
|
0x400, "../z_kaleido_scope_PAL.c", 2093);
|
||||||
} else {
|
} else {
|
||||||
osSyncPrintf("zoom_name=%d\n", pauseCtx->namedItem);
|
osSyncPrintf("zoom_name=%d\n", pauseCtx->namedItem);
|
||||||
|
|
||||||
|
@ -1362,7 +1362,7 @@ void KaleidoScope_UpdateNamePanel(PlayState* play) {
|
||||||
|
|
||||||
osSyncPrintf("J_N=%d point=%d\n", gSaveContext.language, sp2A);
|
osSyncPrintf("J_N=%d point=%d\n", gSaveContext.language, sp2A);
|
||||||
|
|
||||||
DmaMgr_SendRequest1(pauseCtx->nameSegment, (u32)_item_name_staticSegmentRomStart + (sp2A * 0x400),
|
DmaMgr_SendRequest1(pauseCtx->nameSegment, (uintptr_t)_item_name_staticSegmentRomStart + (sp2A * 0x400),
|
||||||
0x400, "../z_kaleido_scope_PAL.c", 2120);
|
0x400, "../z_kaleido_scope_PAL.c", 2120);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2437,11 +2437,12 @@ void KaleidoScope_LoadDungeonMap(PlayState* play) {
|
||||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
|
||||||
DmaMgr_SendRequest1(interfaceCtx->mapSegment, (u32)_map_48x85_staticSegmentRomStart + (R_MAP_TEX_INDEX * 2040),
|
DmaMgr_SendRequest1(interfaceCtx->mapSegment,
|
||||||
2040, "../z_kaleido_scope_PAL.c", 3467);
|
(uintptr_t)_map_48x85_staticSegmentRomStart + (R_MAP_TEX_INDEX * 2040), 2040,
|
||||||
|
"../z_kaleido_scope_PAL.c", 3467);
|
||||||
|
|
||||||
DmaMgr_SendRequest1(interfaceCtx->mapSegment + 0x800,
|
DmaMgr_SendRequest1(interfaceCtx->mapSegment + 0x800,
|
||||||
(u32)_map_48x85_staticSegmentRomStart + ((R_MAP_TEX_INDEX + 1) * 2040), 2040,
|
(uintptr_t)_map_48x85_staticSegmentRomStart + ((R_MAP_TEX_INDEX + 1) * 2040), 2040,
|
||||||
"../z_kaleido_scope_PAL.c", 3471);
|
"../z_kaleido_scope_PAL.c", 3471);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2522,16 +2523,16 @@ void KaleidoScope_Update(PlayState* play) {
|
||||||
pauseCtx->unk_204 = -314.0f;
|
pauseCtx->unk_204 = -314.0f;
|
||||||
|
|
||||||
//! @bug messed up alignment, should match `ALIGN64`
|
//! @bug messed up alignment, should match `ALIGN64`
|
||||||
pauseCtx->playerSegment = (void*)(((u32)play->objectCtx.spaceStart + 0x30) & ~0x3F);
|
pauseCtx->playerSegment = (void*)(((uintptr_t)play->objectCtx.spaceStart + 0x30) & ~0x3F);
|
||||||
|
|
||||||
size1 = func_80091738(play, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime);
|
size1 = func_80091738(play, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime);
|
||||||
osSyncPrintf("プレイヤー size1=%x\n", size1);
|
osSyncPrintf("プレイヤー size1=%x\n", size1);
|
||||||
|
|
||||||
pauseCtx->iconItemSegment = (void*)ALIGN16((u32)pauseCtx->playerSegment + size1);
|
pauseCtx->iconItemSegment = (void*)ALIGN16((uintptr_t)pauseCtx->playerSegment + size1);
|
||||||
|
|
||||||
size0 = (u32)_icon_item_staticSegmentRomEnd - (u32)_icon_item_staticSegmentRomStart;
|
size0 = (uintptr_t)_icon_item_staticSegmentRomEnd - (uintptr_t)_icon_item_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item size0=%x\n", size0);
|
osSyncPrintf("icon_item size0=%x\n", size0);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemSegment, (u32)_icon_item_staticSegmentRomStart, size0,
|
DmaMgr_SendRequest1(pauseCtx->iconItemSegment, (uintptr_t)_icon_item_staticSegmentRomStart, size0,
|
||||||
"../z_kaleido_scope_PAL.c", 3662);
|
"../z_kaleido_scope_PAL.c", 3662);
|
||||||
|
|
||||||
gSegments[8] = VIRTUAL_TO_PHYSICAL(pauseCtx->iconItemSegment);
|
gSegments[8] = VIRTUAL_TO_PHYSICAL(pauseCtx->iconItemSegment);
|
||||||
|
@ -2542,14 +2543,14 @@ void KaleidoScope_Update(PlayState* play) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pauseCtx->iconItem24Segment = (void*)ALIGN16((u32)pauseCtx->iconItemSegment + size0);
|
pauseCtx->iconItem24Segment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemSegment + size0);
|
||||||
|
|
||||||
size = (u32)_icon_item_24_staticSegmentRomEnd - (u32)_icon_item_24_staticSegmentRomStart;
|
size = (uintptr_t)_icon_item_24_staticSegmentRomEnd - (uintptr_t)_icon_item_24_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item24 size=%x\n", size);
|
osSyncPrintf("icon_item24 size=%x\n", size);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItem24Segment, (u32)_icon_item_24_staticSegmentRomStart, size,
|
DmaMgr_SendRequest1(pauseCtx->iconItem24Segment, (uintptr_t)_icon_item_24_staticSegmentRomStart, size,
|
||||||
"../z_kaleido_scope_PAL.c", 3675);
|
"../z_kaleido_scope_PAL.c", 3675);
|
||||||
|
|
||||||
pauseCtx->iconItemAltSegment = (void*)ALIGN16((u32)pauseCtx->iconItem24Segment + size);
|
pauseCtx->iconItemAltSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItem24Segment + size);
|
||||||
|
|
||||||
switch (play->sceneNum) {
|
switch (play->sceneNum) {
|
||||||
case SCENE_YDAN:
|
case SCENE_YDAN:
|
||||||
|
@ -2571,10 +2572,12 @@ void KaleidoScope_Update(PlayState* play) {
|
||||||
case SCENE_JYASINBOSS:
|
case SCENE_JYASINBOSS:
|
||||||
case SCENE_HAKADAN_BS:
|
case SCENE_HAKADAN_BS:
|
||||||
sInDungeonScene = true;
|
sInDungeonScene = true;
|
||||||
size2 = (u32)_icon_item_dungeon_staticSegmentRomEnd - (u32)_icon_item_dungeon_staticSegmentRomStart;
|
size2 = (uintptr_t)_icon_item_dungeon_staticSegmentRomEnd -
|
||||||
|
(uintptr_t)_icon_item_dungeon_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_dungeon dungeon-size2=%x\n", size2);
|
osSyncPrintf("icon_item_dungeon dungeon-size2=%x\n", size2);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemAltSegment, (u32)_icon_item_dungeon_staticSegmentRomStart,
|
DmaMgr_SendRequest1(pauseCtx->iconItemAltSegment,
|
||||||
size2, "../z_kaleido_scope_PAL.c", 3712);
|
(uintptr_t)_icon_item_dungeon_staticSegmentRomStart, size2,
|
||||||
|
"../z_kaleido_scope_PAL.c", 3712);
|
||||||
|
|
||||||
interfaceCtx->mapPalette[28] = 6;
|
interfaceCtx->mapPalette[28] = 6;
|
||||||
interfaceCtx->mapPalette[29] = 99;
|
interfaceCtx->mapPalette[29] = 99;
|
||||||
|
@ -2583,33 +2586,34 @@ void KaleidoScope_Update(PlayState* play) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
sInDungeonScene = false;
|
sInDungeonScene = false;
|
||||||
size2 = (u32)_icon_item_field_staticSegmentRomEnd - (u32)_icon_item_field_staticSegmentRomStart;
|
size2 = (uintptr_t)_icon_item_field_staticSegmentRomEnd -
|
||||||
|
(uintptr_t)_icon_item_field_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_field field-size2=%x\n", size2);
|
osSyncPrintf("icon_item_field field-size2=%x\n", size2);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemAltSegment, (u32)_icon_item_field_staticSegmentRomStart,
|
DmaMgr_SendRequest1(pauseCtx->iconItemAltSegment, (uintptr_t)_icon_item_field_staticSegmentRomStart,
|
||||||
size2, "../z_kaleido_scope_PAL.c", 3726);
|
size2, "../z_kaleido_scope_PAL.c", 3726);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pauseCtx->iconItemLangSegment = (void*)ALIGN16((u32)pauseCtx->iconItemAltSegment + size2);
|
pauseCtx->iconItemLangSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemAltSegment + size2);
|
||||||
|
|
||||||
if (gSaveContext.language == LANGUAGE_ENG) {
|
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||||
size = (u32)_icon_item_nes_staticSegmentRomEnd - (u32)_icon_item_nes_staticSegmentRomStart;
|
size = (uintptr_t)_icon_item_nes_staticSegmentRomEnd - (uintptr_t)_icon_item_nes_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (u32)_icon_item_nes_staticSegmentRomStart, size,
|
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart,
|
||||||
"../z_kaleido_scope_PAL.c", 3739);
|
size, "../z_kaleido_scope_PAL.c", 3739);
|
||||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||||
size = (u32)_icon_item_ger_staticSegmentRomEnd - (u32)_icon_item_ger_staticSegmentRomStart;
|
size = (uintptr_t)_icon_item_ger_staticSegmentRomEnd - (uintptr_t)_icon_item_ger_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (u32)_icon_item_ger_staticSegmentRomStart, size,
|
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_ger_staticSegmentRomStart,
|
||||||
"../z_kaleido_scope_PAL.c", 3746);
|
size, "../z_kaleido_scope_PAL.c", 3746);
|
||||||
} else {
|
} else {
|
||||||
size = (u32)_icon_item_fra_staticSegmentRomEnd - (u32)_icon_item_fra_staticSegmentRomStart;
|
size = (uintptr_t)_icon_item_fra_staticSegmentRomEnd - (uintptr_t)_icon_item_fra_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (u32)_icon_item_fra_staticSegmentRomStart, size,
|
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_fra_staticSegmentRomStart,
|
||||||
"../z_kaleido_scope_PAL.c", 3753);
|
size, "../z_kaleido_scope_PAL.c", 3753);
|
||||||
}
|
}
|
||||||
|
|
||||||
pauseCtx->nameSegment = (void*)ALIGN16((u32)pauseCtx->iconItemLangSegment + size);
|
pauseCtx->nameSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemLangSegment + size);
|
||||||
|
|
||||||
osSyncPrintf("サイズ=%x\n", size2 + size1 + size0 + size);
|
osSyncPrintf("サイズ=%x\n", size2 + size1 + size0 + size);
|
||||||
osSyncPrintf("item_name I_N_PT=%x\n", 0x800);
|
osSyncPrintf("item_name I_N_PT=%x\n", 0x800);
|
||||||
|
@ -2619,23 +2623,23 @@ void KaleidoScope_Update(PlayState* play) {
|
||||||
if (((void)0, gSaveContext.worldMapArea) < 22) {
|
if (((void)0, gSaveContext.worldMapArea) < 22) {
|
||||||
if (gSaveContext.language == LANGUAGE_ENG) {
|
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||||
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
||||||
(u32)_map_name_staticSegmentRomStart +
|
(uintptr_t)_map_name_staticSegmentRomStart +
|
||||||
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x9000,
|
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x9000,
|
||||||
0xA00, "../z_kaleido_scope_PAL.c", 3776);
|
0xA00, "../z_kaleido_scope_PAL.c", 3776);
|
||||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||||
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
||||||
(u32)_map_name_staticSegmentRomStart +
|
(uintptr_t)_map_name_staticSegmentRomStart +
|
||||||
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x16C00,
|
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x16C00,
|
||||||
0xA00, "../z_kaleido_scope_PAL.c", 3780);
|
0xA00, "../z_kaleido_scope_PAL.c", 3780);
|
||||||
} else {
|
} else {
|
||||||
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
||||||
(u32)_map_name_staticSegmentRomStart +
|
(uintptr_t)_map_name_staticSegmentRomStart +
|
||||||
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x24800,
|
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x24800,
|
||||||
0xA00, "../z_kaleido_scope_PAL.c", 3784);
|
0xA00, "../z_kaleido_scope_PAL.c", 3784);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sPreRenderCvg = (void*)ALIGN16((u32)pauseCtx->nameSegment + 0x400 + 0xA00);
|
sPreRenderCvg = (void*)ALIGN16((uintptr_t)pauseCtx->nameSegment + 0x400 + 0xA00);
|
||||||
|
|
||||||
PreRender_Init(&sPlayerPreRender);
|
PreRender_Init(&sPlayerPreRender);
|
||||||
PreRender_SetValuesSave(&sPlayerPreRender, PAUSE_EQUIP_PLAYER_WIDTH, PAUSE_EQUIP_PLAYER_HEIGHT,
|
PreRender_SetValuesSave(&sPlayerPreRender, PAUSE_EQUIP_PLAYER_WIDTH, PAUSE_EQUIP_PLAYER_HEIGHT,
|
||||||
|
@ -3139,41 +3143,42 @@ void KaleidoScope_Update(PlayState* play) {
|
||||||
Interface_ChangeAlpha(1);
|
Interface_ChangeAlpha(1);
|
||||||
|
|
||||||
//! @bug messed up alignment, should match `ALIGN64`
|
//! @bug messed up alignment, should match `ALIGN64`
|
||||||
pauseCtx->iconItemSegment = (void*)(((u32)play->objectCtx.spaceStart + 0x30) & ~0x3F);
|
pauseCtx->iconItemSegment = (void*)(((uintptr_t)play->objectCtx.spaceStart + 0x30) & ~0x3F);
|
||||||
size0 = (u32)_icon_item_staticSegmentRomEnd - (u32)_icon_item_staticSegmentRomStart;
|
size0 = (uintptr_t)_icon_item_staticSegmentRomEnd - (uintptr_t)_icon_item_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item size0=%x\n", size0);
|
osSyncPrintf("icon_item size0=%x\n", size0);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemSegment, (u32)_icon_item_staticSegmentRomStart, size0,
|
DmaMgr_SendRequest1(pauseCtx->iconItemSegment, (uintptr_t)_icon_item_staticSegmentRomStart, size0,
|
||||||
"../z_kaleido_scope_PAL.c", 4356);
|
"../z_kaleido_scope_PAL.c", 4356);
|
||||||
|
|
||||||
pauseCtx->iconItem24Segment = (void*)ALIGN16((u32)pauseCtx->iconItemSegment + size0);
|
pauseCtx->iconItem24Segment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemSegment + size0);
|
||||||
size = (u32)_icon_item_24_staticSegmentRomEnd - (u32)_icon_item_24_staticSegmentRomStart;
|
size = (uintptr_t)_icon_item_24_staticSegmentRomEnd - (uintptr_t)_icon_item_24_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item24 size=%x\n", size);
|
osSyncPrintf("icon_item24 size=%x\n", size);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItem24Segment, (u32)_icon_item_24_staticSegmentRomStart, size,
|
DmaMgr_SendRequest1(pauseCtx->iconItem24Segment, (uintptr_t)_icon_item_24_staticSegmentRomStart, size,
|
||||||
"../z_kaleido_scope_PAL.c", 4363);
|
"../z_kaleido_scope_PAL.c", 4363);
|
||||||
|
|
||||||
pauseCtx->iconItemAltSegment = (void*)ALIGN16((u32)pauseCtx->iconItem24Segment + size);
|
pauseCtx->iconItemAltSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItem24Segment + size);
|
||||||
size2 = (u32)_icon_item_gameover_staticSegmentRomEnd - (u32)_icon_item_gameover_staticSegmentRomStart;
|
size2 = (uintptr_t)_icon_item_gameover_staticSegmentRomEnd -
|
||||||
|
(uintptr_t)_icon_item_gameover_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_dungeon gameover-size2=%x\n", size2);
|
osSyncPrintf("icon_item_dungeon gameover-size2=%x\n", size2);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemAltSegment, (u32)_icon_item_gameover_staticSegmentRomStart, size2,
|
DmaMgr_SendRequest1(pauseCtx->iconItemAltSegment, (uintptr_t)_icon_item_gameover_staticSegmentRomStart,
|
||||||
"../z_kaleido_scope_PAL.c", 4370);
|
size2, "../z_kaleido_scope_PAL.c", 4370);
|
||||||
|
|
||||||
pauseCtx->iconItemLangSegment = (void*)ALIGN16((u32)pauseCtx->iconItemAltSegment + size2);
|
pauseCtx->iconItemLangSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemAltSegment + size2);
|
||||||
|
|
||||||
if (gSaveContext.language == LANGUAGE_ENG) {
|
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||||
size = (u32)_icon_item_nes_staticSegmentRomEnd - (u32)_icon_item_nes_staticSegmentRomStart;
|
size = (uintptr_t)_icon_item_nes_staticSegmentRomEnd - (uintptr_t)_icon_item_nes_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (u32)_icon_item_nes_staticSegmentRomStart, size,
|
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart,
|
||||||
"../z_kaleido_scope_PAL.c", 4379);
|
size, "../z_kaleido_scope_PAL.c", 4379);
|
||||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||||
size = (u32)_icon_item_ger_staticSegmentRomEnd - (u32)_icon_item_ger_staticSegmentRomStart;
|
size = (uintptr_t)_icon_item_ger_staticSegmentRomEnd - (uintptr_t)_icon_item_ger_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (u32)_icon_item_ger_staticSegmentRomStart, size,
|
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_ger_staticSegmentRomStart,
|
||||||
"../z_kaleido_scope_PAL.c", 4386);
|
size, "../z_kaleido_scope_PAL.c", 4386);
|
||||||
} else {
|
} else {
|
||||||
size = (u32)_icon_item_fra_staticSegmentRomEnd - (u32)_icon_item_fra_staticSegmentRomStart;
|
size = (uintptr_t)_icon_item_fra_staticSegmentRomEnd - (uintptr_t)_icon_item_fra_staticSegmentRomStart;
|
||||||
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
osSyncPrintf("icon_item_dungeon dungeon-size=%x\n", size);
|
||||||
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (u32)_icon_item_fra_staticSegmentRomStart, size,
|
DmaMgr_SendRequest1(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_fra_staticSegmentRomStart,
|
||||||
"../z_kaleido_scope_PAL.c", 4393);
|
size, "../z_kaleido_scope_PAL.c", 4393);
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8082AB8C = 255;
|
D_8082AB8C = 255;
|
||||||
|
|
Loading…
Reference in a new issue