1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 09:50:50 +00:00

Introduce OPEN_DISPS/CLOSE_DISPS macros (#360)

This commit is contained in:
Roman971 2020-08-30 01:00:17 +02:00 committed by GitHub
parent 1f1b5e39f5
commit 2a2fdf7f3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
134 changed files with 3133 additions and 3775 deletions

View file

@ -40,7 +40,7 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
gSaveContext.unk_13C7 = 1;
D_8011FB30 = 0;
this->state.running = false;
SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext)
SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext);
}
static SceneSelectEntry sScenes[] = {
@ -503,68 +503,57 @@ void Select_PrintCutsceneSetting(SelectContext* this, GfxPrint* printer, u16 csI
}
void Select_DrawMenu(SelectContext* this) {
s32 arg;
GraphicsContext* gfxCtx = this->state.gfxCtx;
GfxPrint* printer;
GraphicsContext* gfxCtx;
Gfx* dispRefs[4];
gfxCtx = this->state.gfxCtx;
Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 930);
OPEN_DISPS(gfxCtx, "../z_select.c", 930);
gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL);
gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL);
func_80095248(gfxCtx, 0, 0, 0);
SET_FULLSCREEN_VIEWPORT(&this->view)
SET_FULLSCREEN_VIEWPORT(&this->view);
func_800AAA50(&this->view, 0xF);
func_80094140(gfxCtx);
printer = alloca(sizeof(GfxPrint));
GfxPrint_Init(printer);
GfxPrint_Open(printer, gfxCtx->polyOpa.p);
GfxPrint_Open(printer, oGfxCtx->polyOpa.p);
Select_PrintMenu(this, printer);
arg = gSaveContext.linkAge;
Select_PrintAgeSetting(this, printer, arg);
arg = gSaveContext.cutsceneIndex;
Select_PrintCutsceneSetting(this, printer, arg);
gfxCtx->polyOpa.p = GfxPrint_Close(printer);
Select_PrintAgeSetting(this, printer, ((void)0, gSaveContext.linkAge));
Select_PrintCutsceneSetting(this, printer, ((void)0, gSaveContext.cutsceneIndex));
oGfxCtx->polyOpa.p = GfxPrint_Close(printer);
GfxPrint_Destroy(printer);
Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 966);
CLOSE_DISPS(gfxCtx, "../z_select.c", 966);
}
void Select_DrawLoadingScreen(SelectContext* this) {
s32 pad;
GraphicsContext* gfxCtx = this->state.gfxCtx;
GfxPrint* printer;
GraphicsContext* gfxCtx;
Gfx* dispRefs[4];
gfxCtx = this->state.gfxCtx;
Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 977);
OPEN_DISPS(gfxCtx, "../z_select.c", 977);
gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL);
gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL);
func_80095248(gfxCtx, 0, 0, 0);
SET_FULLSCREEN_VIEWPORT(&this->view)
SET_FULLSCREEN_VIEWPORT(&this->view);
func_800AAA50(&this->view, 0xF);
func_80094140(gfxCtx);
printer = alloca(sizeof(GfxPrint));
GfxPrint_Init(printer);
GfxPrint_Open(printer, gfxCtx->polyOpa.p);
GfxPrint_Open(printer, oGfxCtx->polyOpa.p);
Select_PrintLoadingMessage(this, printer);
gfxCtx->polyOpa.p = GfxPrint_Close(printer);
oGfxCtx->polyOpa.p = GfxPrint_Close(printer);
GfxPrint_Destroy(printer);
Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 1006);
CLOSE_DISPS(gfxCtx, "../z_select.c", 1006);
}
void Select_Draw(SelectContext* this) {
s32 pad;
GraphicsContext* gfxCtx;
Gfx* dispRefs[4];
GraphicsContext* gfxCtx = this->state.gfxCtx;
gfxCtx = this->state.gfxCtx;
Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 1013);
OPEN_DISPS(gfxCtx, "../z_select.c", 1013);
gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL);
gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL);
func_80095248(gfxCtx, 0, 0, 0);
SET_FULLSCREEN_VIEWPORT(&this->view)
SET_FULLSCREEN_VIEWPORT(&this->view);
func_800AAA50(&this->view, 0xF);
if (!this->state.running) {
@ -573,7 +562,7 @@ void Select_Draw(SelectContext* this) {
Select_DrawMenu(this);
}
Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 1037);
CLOSE_DISPS(gfxCtx, "../z_select.c", 1037);
}
void Select_Main(SelectContext* this) {