1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-11 17:30:25 +00:00

Use intptr types in overlays and dmadata (#1325)

This commit is contained in:
Roman971 2022-07-30 02:29:48 +02:00 committed by GitHub
parent 3122143f96
commit 7254adec9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 73 additions and 67 deletions

View file

@ -1871,7 +1871,7 @@ void FileSelect_Destroy(GameState* thisx) {
void FileSelect_Init(GameState* 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;
SREG(30) = 1;
@ -1879,12 +1879,12 @@ void FileSelect_Init(GameState* thisx) {
this->staticSegment = GameState_Alloc(&this->state, size, "../z_file_choose.c", 3392);
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);
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);
Matrix_Init(&this->state);

View file

@ -751,7 +751,7 @@ void MapSelect_Init(GameState* thisx) {
this->lockDown = 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)) {
this->currentScene = dREG(80);
@ -761,7 +761,7 @@ void MapSelect_Init(GameState* thisx) {
R_UPDATE_RATE = 1;
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.linkAge = LINK_AGE_CHILD;
}

View file

@ -154,13 +154,14 @@ void ConsoleLogo_Destroy(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;
this->staticSegment = GameState_Alloc(&this->state, size, "../z_title.c", 611);
osSyncPrintf("z_title.c\n");
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;
Matrix_Init(&this->state);
View_Init(&this->view, this->state.gfxCtx);