mirror of
https://github.com/zeldaret/oot
synced 2026-08-03 17:02:01 -04:00
z_select decompiled, 1 non matching left (#202)
* First pass z_select * lots of progress. 2 non matchings and data stuff needed * match Select_LoadGame * z_select almost ok, 1 func left * remove comments * remove comments and add description * remove unused flg_set asm * set_next_gamestate macro * pr suggestions 1 * pr suggestions 2 * map -> scene * pr suggestions 3 Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
This commit is contained in:
+2
-2
@@ -50,7 +50,7 @@ void FlagSet_Update(GlobalContext* globalCtx) {
|
||||
gfx = Graph_GfxPlusOne(polyOpa);
|
||||
gSPDisplayList(gfxCtx->overlay.p++, gfx);
|
||||
|
||||
GfxPrint_Ctor(&printer);
|
||||
GfxPrint_Init(&printer);
|
||||
GfxPrint_Open(&printer, gfx);
|
||||
GfxPrint_SetColor(&printer, 0xFA, 0x32, 0x32, 0xFF);
|
||||
GfxPrint_SetPos(&printer, 4, 13);
|
||||
@@ -137,7 +137,7 @@ void FlagSet_Update(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
gfx = GfxPrint_Close(&printer);
|
||||
GfxPrint_Dtor(&printer);
|
||||
GfxPrint_Destroy(&printer);
|
||||
gSPEndDisplayList(gfx++);
|
||||
Graph_BranchDlist(polyOpa, gfx);
|
||||
gfxCtx->polyOpa.p = gfx;
|
||||
|
||||
+2
-2
@@ -175,11 +175,11 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
|
||||
}
|
||||
|
||||
if (R_ENABLE_AUDIO_DBG & 1) {
|
||||
GfxPrint_Ctor(&printChars);
|
||||
GfxPrint_Init(&printChars);
|
||||
GfxPrint_Open(&printChars, newDList);
|
||||
func_800EEA50(&printChars);
|
||||
newDList = GfxPrint_Close(&printChars);
|
||||
GfxPrint_Dtor(&printChars);
|
||||
GfxPrint_Destroy(&printChars);
|
||||
}
|
||||
|
||||
if (R_ENABLE_ARENA_DBG < 0) {
|
||||
|
||||
+2
-2
@@ -341,7 +341,7 @@ GfxPrint* GfxPrint_Callback(GfxPrint* this, const char* str, size_t size) {
|
||||
return this;
|
||||
}
|
||||
|
||||
void GfxPrint_Ctor(GfxPrint* this) {
|
||||
void GfxPrint_Init(GfxPrint* this) {
|
||||
this->flag &= ~GFXPRINT_OPEN;
|
||||
|
||||
this->callback = &GfxPrint_Callback;
|
||||
@@ -364,7 +364,7 @@ void GfxPrint_Ctor(GfxPrint* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void GfxPrint_Dtor(GfxPrint* this) {
|
||||
void GfxPrint_Destroy(GfxPrint* this) {
|
||||
}
|
||||
|
||||
void GfxPrint_Open(GfxPrint* this, Gfx* dlist) {
|
||||
|
||||
+2
-2
@@ -112,7 +112,7 @@ GameStateOverlay* Graph_GetNextGameState(GameState* gameState) {
|
||||
if (gameStateInitFunc == TitleSetup_Init) {
|
||||
return &gGameStateOverlayTable[0];
|
||||
}
|
||||
if (gameStateInitFunc == func_80801E44) {
|
||||
if (gameStateInitFunc == Select_Init) {
|
||||
return &gGameStateOverlayTable[1];
|
||||
}
|
||||
if (gameStateInitFunc == Title_Init) {
|
||||
@@ -389,7 +389,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||
if (D_8012DBC0 && CHECK_PAD(gameState->input[0].press, Z_TRIG) &&
|
||||
CHECK_PAD(gameState->input[0].cur, L_TRIG | R_TRIG)) {
|
||||
gSaveContext.gameMode = 0;
|
||||
SET_NEXT_GAMESTATE(gameState, func_80801E44, char[0x240]); // TODO : SelectContext
|
||||
SET_NEXT_GAMESTATE(gameState, Select_Init, SelectContext);
|
||||
gameState->running = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) {
|
||||
u32 pad2[3];
|
||||
Gfx* gfx;
|
||||
Gfx* dispRefs[5];
|
||||
Viewport viewport;
|
||||
|
||||
uly = this->y;
|
||||
lry = this->y + 2;
|
||||
@@ -78,8 +77,8 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) {
|
||||
View_Init(&view, gfxCtx);
|
||||
view.flags = 0xA;
|
||||
|
||||
VIEWPORT_INIT(viewport, SCREEN_HEIGHT, SCREEN_WIDTH, 0, 0);
|
||||
View_SetViewport(&view, &viewport);
|
||||
SET_FULLSCREEN_VIEWPORT(&view);
|
||||
|
||||
gfx = gfxCtx->overlay.p;
|
||||
func_800AB9EC(&view, 0xF, &gfx);
|
||||
|
||||
@@ -123,8 +122,6 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC
|
||||
View view;
|
||||
Gfx* gfx;
|
||||
Gfx* dispRefs[5];
|
||||
Viewport viewport;
|
||||
u32 pad2;
|
||||
|
||||
if (this->maxval == 0) {
|
||||
osSyncPrintf(VT_FGCOL(RED));
|
||||
@@ -136,9 +133,8 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC
|
||||
View_Init(&view, gfxCtx);
|
||||
view.flags = 0xA;
|
||||
|
||||
VIEWPORT_INIT(viewport, SCREEN_HEIGHT, SCREEN_WIDTH, 0, 0);
|
||||
SET_FULLSCREEN_VIEWPORT(&view);
|
||||
|
||||
View_SetViewport(&view, &viewport);
|
||||
gfx = gfxCtx->overlay.p;
|
||||
func_800AB9EC(&view, 0xF, &gfx);
|
||||
|
||||
|
||||
+2
-2
@@ -224,7 +224,7 @@ void func_80063D7C(GraphicsContext* gfxCtx) {
|
||||
Gfx* dispRefs[4]; // stores state of GfxCtx next ptrs
|
||||
|
||||
Graph_OpenDisps(dispRefs, gfxCtx, "../z_debug.c", 628);
|
||||
GfxPrint_Ctor(&gfxPrint);
|
||||
GfxPrint_Init(&gfxPrint);
|
||||
sp78 = gfxCtx->polyOpa.p;
|
||||
tempRet = Graph_GfxPlusOne(gfxCtx->polyOpa.p);
|
||||
gSPDisplayList(gfxCtx->overlay.p++, tempRet);
|
||||
@@ -245,5 +245,5 @@ void func_80063D7C(GraphicsContext* gfxCtx) {
|
||||
gfxCtx->polyOpa.p = sp7C;
|
||||
if (0) {}
|
||||
Graph_CloseDisps(dispRefs, gfxCtx, "../z_debug.c", 664);
|
||||
GfxPrint_Dtor(&gfxPrint);
|
||||
GfxPrint_Destroy(&gfxPrint);
|
||||
}
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ void Cutscene_DrawDebugInfo(GlobalContext* globalCtx, Gfx** dlist, CutsceneConte
|
||||
GfxPrint printer;
|
||||
u8 pad2[8];
|
||||
|
||||
GfxPrint_Ctor(&printer);
|
||||
GfxPrint_Init(&printer);
|
||||
GfxPrint_Open(&printer, *dlist);
|
||||
GfxPrint_SetPos(&printer, 22, 25);
|
||||
GfxPrint_SetColor(&printer, 255, 255, 55, 32);
|
||||
@@ -70,7 +70,7 @@ void Cutscene_DrawDebugInfo(GlobalContext* globalCtx, Gfx** dlist, CutsceneConte
|
||||
GfxPrint_SetPos(&printer, 4, 26);
|
||||
GfxPrint_Printf(&printer, "%s", "SKIP=(START) or (Cursole Right)");
|
||||
*dlist = GfxPrint_Close(&printer);
|
||||
GfxPrint_Dtor(&printer);
|
||||
GfxPrint_Destroy(&printer);
|
||||
}
|
||||
|
||||
void func_8006450C(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
GameStateOverlay gGameStateOverlayTable[] = {
|
||||
GAMESTATE_OVERLAY_INTERNAL(TitleSetup_Init, TitleSetup_Destroy, sizeof(GameState)),
|
||||
GAMESTATE_OVERLAY(select, func_80801E44, func_80801E0C, 0x240), // TODO : sizeof(SelectContext)
|
||||
GAMESTATE_OVERLAY(select, Select_Init, Select_Destroy, sizeof(SelectContext)),
|
||||
GAMESTATE_OVERLAY(title, Title_Init, Title_Destroy, sizeof(TitleContext)),
|
||||
GAMESTATE_OVERLAY_INTERNAL(Gameplay_Init, Gameplay_Destroy, sizeof(GlobalContext)),
|
||||
GAMESTATE_OVERLAY(opening, Opening_Init, Opening_Destroy, sizeof(OpeningContext)),
|
||||
|
||||
@@ -3094,14 +3094,7 @@ void func_8008A8B8(GlobalContext* globalCtx, s32 topY, s32 bottomY, s32 leftX, s
|
||||
}
|
||||
|
||||
void func_8008A994(InterfaceContext* interfaceCtx) {
|
||||
Viewport viewport;
|
||||
|
||||
// clang-format off
|
||||
viewport.bottomY = SCREEN_HEIGHT; viewport.rightX = SCREEN_WIDTH;
|
||||
viewport.topY = 0; viewport.leftX = 0;
|
||||
// clang-format on
|
||||
|
||||
View_SetViewport(&interfaceCtx->view, &viewport);
|
||||
SET_FULLSCREEN_VIEWPORT(&interfaceCtx->view);
|
||||
func_800AB2C4(&interfaceCtx->view);
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -1135,14 +1135,12 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
|
||||
if ((globalCtx->transitionMode == 3) || (globalCtx->transitionMode == 11) ||
|
||||
(globalCtx->transitionCtx.transitionType >= 56)) {
|
||||
View view; // 0xA0
|
||||
Viewport viewport; // 0x90
|
||||
|
||||
View_Init(&view, gfxCtx);
|
||||
view.flags = 2 | 8;
|
||||
|
||||
VIEWPORT_INIT(viewport, SCREEN_HEIGHT, SCREEN_WIDTH, 0, 0);
|
||||
SET_FULLSCREEN_VIEWPORT(&view);
|
||||
|
||||
View_SetViewport(&view, &viewport);
|
||||
func_800AB9EC(&view, 15, &gfxP);
|
||||
globalCtx->transitionCtx.draw(&globalCtx->transitionCtx.data, &gfxP);
|
||||
}
|
||||
|
||||
+19
-19
@@ -52,31 +52,31 @@ void Sample_Destroy(SampleContext* this) {
|
||||
void Sample_SetupView(SampleContext* this) {
|
||||
View* view;
|
||||
GraphicsContext* gfxCtx;
|
||||
Viewport viewport;
|
||||
Vec3f v1;
|
||||
Vec3f v2;
|
||||
Vec3f v3;
|
||||
|
||||
|
||||
view = &this->view;
|
||||
gfxCtx = this->state.gfxCtx;
|
||||
|
||||
View_Init(view, gfxCtx);
|
||||
|
||||
VIEWPORT_INIT(viewport, SCREEN_HEIGHT, SCREEN_WIDTH, 0, 0);
|
||||
|
||||
View_SetViewport(view, &viewport);
|
||||
SET_FULLSCREEN_VIEWPORT(view);
|
||||
func_800AA460(view, 60, 10, 12800);
|
||||
|
||||
v1.x = 0;
|
||||
v1.y = 0;
|
||||
v2.x = 0;
|
||||
v2.y = 0;
|
||||
v2.z = 0;
|
||||
v3.x = 0;
|
||||
v3.z = 0;
|
||||
v1.z = 3000;
|
||||
v3.y = 1;
|
||||
{
|
||||
Vec3f v1;
|
||||
Vec3f v2;
|
||||
Vec3f v3;
|
||||
|
||||
func_800AA358(view, &v1, &v2, &v3);
|
||||
v1.x = 0;
|
||||
v1.y = 0;
|
||||
v2.x = 0;
|
||||
v2.y = 0;
|
||||
v2.z = 0;
|
||||
v3.x = 0;
|
||||
v3.z = 0;
|
||||
v1.z = 3000;
|
||||
v3.y = 1;
|
||||
|
||||
func_800AA358(view, &v1, &v2, &v3);
|
||||
}
|
||||
}
|
||||
|
||||
void Sample_LoadTitleStatic(SampleContext* this) {
|
||||
|
||||
@@ -1,25 +1,630 @@
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80800B90.s")
|
||||
/*
|
||||
* File: z_select.c
|
||||
* Overlay: ovl_select
|
||||
* Description: Debug Scene Select Menu
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80800BAC.s")
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <vt.h>
|
||||
#include <alloca.h>
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80800CB4.s")
|
||||
void Select_LoadTitle(SelectContext* this) {
|
||||
this->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&this->state, Title_Init, TitleContext);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80801614.s")
|
||||
void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
|
||||
osSyncPrintf(VT_FGCOL(BLUE));
|
||||
osSyncPrintf("\n\n\nFILE_NO=%x\n\n\n", gSaveContext.fileNum);
|
||||
osSyncPrintf(VT_RST);
|
||||
if (gSaveContext.fileNum == 0xFF) {
|
||||
func_800A82C8();
|
||||
gSaveContext.unk_13F6 = gSaveContext.magic;
|
||||
gSaveContext.magic = 0;
|
||||
gSaveContext.unk_13F4 = 0;
|
||||
gSaveContext.magicLevel = gSaveContext.magic;
|
||||
}
|
||||
gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[2] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[1] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[0] = BTN_ENABLED;
|
||||
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
|
||||
Audio_SetBGM(NA_BGM_STOP);
|
||||
gSaveContext.entranceIndex = entranceIndex;
|
||||
gSaveContext.respawnFlag = 0;
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = -1;
|
||||
gSaveContext.seqIndex = 0xFF;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.unk_13C7 = 1;
|
||||
D_8011FB30 = 0;
|
||||
this->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext)
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_808017F0.s")
|
||||
static SceneSelectEntry sScenes[] = {
|
||||
{ " 1:SPOT00", Select_LoadGame, 0x00CD },
|
||||
{ " 2:SPOT01", Select_LoadGame, 0x00DB },
|
||||
{ " 3:SPOT02", Select_LoadGame, 0x00E4 },
|
||||
{ " 4:SPOT03", Select_LoadGame, 0x00EA },
|
||||
{ " 5:SPOT04", Select_LoadGame, 0x00EE },
|
||||
{ " 6:SPOT05", Select_LoadGame, 0x00FC },
|
||||
{ " 7:SPOT06", Select_LoadGame, 0x0102 },
|
||||
{ " 8:SPOT07", Select_LoadGame, 0x0108 },
|
||||
{ " 9:SPOT08", Select_LoadGame, 0x010E },
|
||||
{ "10:SPOT09", Select_LoadGame, 0x0117 },
|
||||
{ "11:SPOT10", Select_LoadGame, 0x011E },
|
||||
{ "12:SPOT11", Select_LoadGame, 0x0123 },
|
||||
{ "13:SPOT12", Select_LoadGame, 0x0129 },
|
||||
{ "14:SPOT13", Select_LoadGame, 0x0130 },
|
||||
{ "15:SPOT15", Select_LoadGame, 0x0138 },
|
||||
{ "16:SPOT16", Select_LoadGame, 0x013D },
|
||||
{ "17:SPOT17", Select_LoadGame, 0x0147 },
|
||||
{ "18:SPOT18", Select_LoadGame, 0x014D },
|
||||
{ "19:SPOT20", Select_LoadGame, 0x0157 },
|
||||
{ "20:\x8Dトキノマ", Select_LoadGame, 0x0053 },
|
||||
{ "21:\x8Dケンジャノマ", Select_LoadGame, 0x006B },
|
||||
{ "22:\x8Dシャテキジョウ", Select_LoadGame, 0x003B },
|
||||
{ "23:\x8Cハイラル\x8Dニワ\x8Cゲーム", Select_LoadGame, 0x007A },
|
||||
{ "24:\x8Dハカシタトビコミアナ", Select_LoadGame, 0x031C },
|
||||
{ "25:\x8Dハカシタトビコミアナ 2", Select_LoadGame, 0x004B },
|
||||
{ "26:\x8Dオウケ ノ ハカアナ", Select_LoadGame, 0x002D },
|
||||
{ "27:\x8Dダイヨウセイノイズミ", Select_LoadGame, 0x0315 },
|
||||
{ "28:\x8Dトビコミ ヨウセイ アナ", Select_LoadGame, 0x036D },
|
||||
{ "29:\x8Dマホウセキ ヨウセイノイズミ", Select_LoadGame, 0x0371 },
|
||||
{ "30:\x8Cガノン\x8Dサイシュウセン", Select_LoadGame, 0x043F },
|
||||
{ "31:\x8Cハイラル\x8Dナカニワ", Select_LoadGame, 0x0400 },
|
||||
{ "32:\x8Dツリボリ", Select_LoadGame, 0x045F },
|
||||
{ "33:\x8Cボムチュウボーリング", Select_LoadGame, 0x0507 },
|
||||
{ "34:\x8Cロンロン\x8Dボクジョウ ソウコ 1", Select_LoadGame, 0x004F },
|
||||
{ "35:\x8Cロンロン\x8Dボクジョウ ソウコ 2", Select_LoadGame, 0x05D0 },
|
||||
{ "36:\x8Dミハリ ゴヤ", Select_LoadGame, 0x007E },
|
||||
{ "37:\x8Dマホウ ノ クスリヤ", Select_LoadGame, 0x0072 },
|
||||
{ "38:\x8Dタカラバコヤ", Select_LoadGame, 0x0063 },
|
||||
{ "39:\x8Dキン \x8Cスタルチュラ ハウス", Select_LoadGame, 0x0550 },
|
||||
{ "40:\x8Dジョウカマチ イリグチ", Select_LoadGame, 0x0033 },
|
||||
{ "41:\x8Dジョウカマチ", Select_LoadGame, 0x00B1 },
|
||||
{ "42:\x8Dウラロジ", Select_LoadGame, 0x00AD },
|
||||
{ "43:\x8Dトキノシンデン マエ", Select_LoadGame, 0x0171 },
|
||||
{ "44:\x8Dリンクノイエ", Select_LoadGame, 0x00BB },
|
||||
{ "45:\x8Cカカリコ\x8Dムラノナガヤ", Select_LoadGame, 0x02FD },
|
||||
{ "46:\x8Dウラロジノ イエ", Select_LoadGame, 0x043B },
|
||||
{ "47:\x8Dコキリノムラ モノシリキョウダイノイエ", Select_LoadGame, 0x00C9 },
|
||||
{ "48:\x8Dコキリノムラ フタゴノイエ", Select_LoadGame, 0x009C },
|
||||
{ "49:\x8Dコキリノムラ \x8Cミド\x8Dノイエ", Select_LoadGame, 0x0433 },
|
||||
{ "50:\x8Dコキリノムラ \x8Cサリア\x8Dノイエ", Select_LoadGame, 0x0437 },
|
||||
{ "51:\x8Dウマゴヤ", Select_LoadGame, 0x02F9 },
|
||||
{ "52:\x8Dハカモリノイエ", Select_LoadGame, 0x030D },
|
||||
{ "53:\x8Dウラロジ イヌオバサンノイエ", Select_LoadGame, 0x0398 },
|
||||
{ "54:\x8Dカカリコムラ \x8Cインパ\x8Dノイエ", Select_LoadGame, 0x039C },
|
||||
{ "55:\x8Cハイリア\x8D ケンキュウジョ", Select_LoadGame, 0x0043 },
|
||||
{ "56:\x8Cテント", Select_LoadGame, 0x03A0 },
|
||||
{ "57:\x8Dタテノミセ", Select_LoadGame, 0x00B7 },
|
||||
{ "58:\x8Dコキリゾクノミセ", Select_LoadGame, 0x00C1 },
|
||||
{ "59:\x8Cゴロン\x8Dノミセ", Select_LoadGame, 0x037C },
|
||||
{ "60:\x8Cゾーラ\x8Dノミセ", Select_LoadGame, 0x0380 },
|
||||
{ "61:\x8Cカカリコ\x8Dムラ クスリヤ", Select_LoadGame, 0x0384 },
|
||||
{ "62:\x8Dジョウカマチ クスリヤ", Select_LoadGame, 0x0388 },
|
||||
{ "63:\x8Dウラロジ ヨルノミセ", Select_LoadGame, 0x0390 },
|
||||
{ "64:\x8Dオメンヤ", Select_LoadGame, 0x0530 },
|
||||
{ "65:\x8Cゲルド\x8Dノシュウレンジョウ", Select_LoadGame, 0x0008 },
|
||||
{ "66:\x8Dヨウセイノキノ \x8Cダンジョン", Select_LoadGame, 0x0000 },
|
||||
{ "67:\x8Dヨウセイノキノ \x8Cダンジョン ボス", Select_LoadGame, 0x040F },
|
||||
{ "68:\x8Cドドンゴ ダンジョン", Select_LoadGame, 0x0004 },
|
||||
{ "69:\x8Cドドンゴ ダンジョン ボス", Select_LoadGame, 0x040B },
|
||||
{ "70:\x8Dキョダイギョ \x8Cダンジョン", Select_LoadGame, 0x0028 },
|
||||
{ "71:\x8Dキョダイギョ \x8Cダンジョン ボス", Select_LoadGame, 0x0301 },
|
||||
{ "72:\x8Dモリノシンデン", Select_LoadGame, 0x0169 },
|
||||
{ "73:\x8Dモリノシンデン \x8Cボス", Select_LoadGame, 0x000C },
|
||||
{ "74:\x8Dイドシタ \x8Cダンジョン", Select_LoadGame, 0x0098 },
|
||||
{ "75:\x8Dハカシタ \x8Cダンジョン", Select_LoadGame, 0x0037 },
|
||||
{ "76:\x8Dハカシタ \x8Cダンジョン ボス", Select_LoadGame, 0x0413 },
|
||||
{ "77:\x8Dヒノシンデン", Select_LoadGame, 0x0165 },
|
||||
{ "78:\x8Dヒノシンデン \x8Cボス", Select_LoadGame, 0x0305 },
|
||||
{ "79:\x8Dミズノシンデン", Select_LoadGame, 0x0010 },
|
||||
{ "80:\x8Dミズノシンデン \x8Cボス", Select_LoadGame, 0x0417 },
|
||||
{ "81:\x8Dジャシンゾウ \x8Cダンジョン", Select_LoadGame, 0x0082 },
|
||||
{ "82:\x8Dジャシンゾウ \x8Cダンジョン アイアンナック", Select_LoadGame, 0x008D },
|
||||
{ "83:\x8Dジャシンゾウ \x8Cダンジョン ボス", Select_LoadGame, 0x05EC },
|
||||
{ "84:\x8Cガノン\x8Dノトウ", Select_LoadGame, 0x041B },
|
||||
{ "85:\x8Cガノン\x8Dノトウ\x8Cボス", Select_LoadGame, 0x041F },
|
||||
{ "86:\x8Dコオリノドウクツ", Select_LoadGame, 0x0088 },
|
||||
{ "87:\x8Dハカシタ\x8Cリレー", Select_LoadGame, 0x044F },
|
||||
{ "88:\x8Cガノン\x8Dチカ \x8Cダンジョン", Select_LoadGame, 0x0467 },
|
||||
{ "89:\x8Cガノン\x8Dサイシュウセン \x8Cデモ & バトル", Select_LoadGame, 0x0517 },
|
||||
{ "90:\x8Cガノン\x8Dノトウ ソノゴ 1", Select_LoadGame, 0x0179 },
|
||||
{ "91:\x8Cガノン\x8Dノトウ ソノゴ 2", Select_LoadGame, 0x01B5 },
|
||||
{ "92:\x8Cガノン\x8Dノトウ ソノゴ 3", Select_LoadGame, 0x03DC },
|
||||
{ "93:\x8Cガノン\x8Dノトウ ソノゴ 4", Select_LoadGame, 0x03E4 },
|
||||
{ "94:\x8Cガノン\x8Dチカ ソノゴ", Select_LoadGame, 0x056C },
|
||||
{ "95:\x8Cゲルド\x8Dツウロ 1-2", Select_LoadGame, 0x0486 },
|
||||
{ "96:\x8Cゲルド\x8Dツウロ 3-4 9-10", Select_LoadGame, 0x048E },
|
||||
{ "97:\x8Cゲルド\x8Dツウロ 5-6", Select_LoadGame, 0x0496 },
|
||||
{ "98:\x8Cゲルド\x8Dツウロ 7-8", Select_LoadGame, 0x049E },
|
||||
{ "99:\x8Cゲルド\x8Dツウロ 11-12", Select_LoadGame, 0x04AE },
|
||||
{ "100:\x8Cゲルド\x8Dツウロ 13", Select_LoadGame, 0x0570 },
|
||||
{ "101:\x8Dカクシトビコミアナ 0", Select_LoadGame, 0x003F },
|
||||
{ "102:\x8Dカクシトビコミアナ 1", Select_LoadGame, 0x0598 },
|
||||
{ "103:\x8Dカクシトビコミアナ 2", Select_LoadGame, 0x059C },
|
||||
{ "104:\x8Dカクシトビコミアナ 3", Select_LoadGame, 0x05A0 },
|
||||
{ "105:\x8Dカクシトビコミアナ 4", Select_LoadGame, 0x05A4 },
|
||||
{ "106:\x8Dカクシトビコミアナ 5", Select_LoadGame, 0x05A8 },
|
||||
{ "107:\x8Dカクシトビコミアナ 6", Select_LoadGame, 0x05AC },
|
||||
{ "108:\x8Dカクシトビコミアナ 7", Select_LoadGame, 0x05B0 },
|
||||
{ "109:\x8Dカクシトビコミアナ 8", Select_LoadGame, 0x05B4 },
|
||||
{ "110:\x8Dカクシトビコミアナ 9", Select_LoadGame, 0x05B8 },
|
||||
{ "111:\x8Dカクシトビコミアナ 10", Select_LoadGame, 0x05BC },
|
||||
{ "112:\x8Dカクシトビコミアナ 11", Select_LoadGame, 0x05C0 },
|
||||
{ "113:\x8Dカクシトビコミアナ 12", Select_LoadGame, 0x05C4 },
|
||||
{ "114:\x8Dカクシトビコミアナ 13", Select_LoadGame, 0x05FC },
|
||||
{ "115:\x8Cハイラル デモ", Select_LoadGame, 0x00A0 },
|
||||
{ "116:\x8Dベッシツ (タカラバコ\x8Cワープ)", Select_LoadGame, 0x0520 },
|
||||
{ "117:\x8Dササ\x8Cテスト", Select_LoadGame, 0x0018 },
|
||||
{ "118:\x8Cテストマップ", Select_LoadGame, 0x0094 },
|
||||
{ "119:\x8Cテストルーム", Select_LoadGame, 0x0024 },
|
||||
{ "120:\x8Dチュウ\x8Cスタロフォス\x8Dベヤ", Select_LoadGame, 0x001C },
|
||||
{ "121:\x8Cボススタロフォス\x8Dベヤ", Select_LoadGame, 0x0020 },
|
||||
{ "122:Sutaru", Select_LoadGame, 0x0047 },
|
||||
{ "123:jikkenjyou", Select_LoadGame, 0x02EA },
|
||||
{ "124:depth\x8Cテスト", Select_LoadGame, 0x00B6 },
|
||||
{ "125:\x8Cハイラル\x8Dニワ\x8Cゲーム2", Select_LoadGame, 0x0076 },
|
||||
{ "title", Select_LoadTitle, 0x0000 },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_8080187C.s")
|
||||
#ifdef NON_MATCHING
|
||||
// mostly regalloc, a good amount of instruction ordering. confirmed equivalent in game.
|
||||
void Select_UpdateMenu(SelectContext* this) {
|
||||
Input* controller1;
|
||||
s32 pad;
|
||||
SceneSelectEntry* selectedScene;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_808018F0.s")
|
||||
controller1 = &this->state.input[0];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80801AAC.s")
|
||||
if (this->unk_21C == 0) {
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80801BF0.s")
|
||||
if (CHECK_PAD(controller1->press, A_BUTTON) || CHECK_PAD(controller1->press, START_BUTTON)) {
|
||||
selectedScene = &this->scenes[this->currentScene];
|
||||
if (selectedScene->loadFunc != NULL) {
|
||||
selectedScene->loadFunc(this, selectedScene->entranceIndex);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80801D04.s")
|
||||
if (CHECK_PAD(controller1->press, B_BUTTON)) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
gSaveContext.linkAge = 1;
|
||||
} else {
|
||||
gSaveContext.linkAge = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80801DE4.s")
|
||||
if (CHECK_PAD(controller1->press, Z_TRIG)) {
|
||||
if (gSaveContext.cutsceneIndex == 0x8000) {
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
} else if (gSaveContext.cutsceneIndex == 0) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF0) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF1) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF2) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF3) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF4) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF5;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF5) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF6) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF7;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF7) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF8) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF9;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF9) {
|
||||
gSaveContext.cutsceneIndex = 0xFFFA;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFFA) {
|
||||
gSaveContext.cutsceneIndex = 0x8000;
|
||||
}
|
||||
} else if (CHECK_PAD(controller1->press, R_TRIG)) {
|
||||
if (gSaveContext.cutsceneIndex == 0x8000) {
|
||||
gSaveContext.cutsceneIndex = 0xFFFA;
|
||||
} else if (gSaveContext.cutsceneIndex == 0) {
|
||||
gSaveContext.cutsceneIndex = 0x8000;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF0) {
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF1) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF2) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF3) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF4) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF5) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF6) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF5;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF7) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF8) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF7;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFF9) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||
} else if (gSaveContext.cutsceneIndex == 0xFFFA) {
|
||||
gSaveContext.cutsceneIndex = 0xFFF9;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80801E0C.s")
|
||||
gSaveContext.nightFlag = 0;
|
||||
if (gSaveContext.cutsceneIndex == 0) {
|
||||
gSaveContext.nightFlag = 1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/func_80801E44.s")
|
||||
// user can change "opt", but it doesn't do anything
|
||||
if (CHECK_PAD(controller1->press, U_CBUTTONS)) {
|
||||
this->opt--;
|
||||
}
|
||||
if (CHECK_PAD(controller1->press, D_CBUTTONS)) {
|
||||
this->opt++;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(controller1->press, U_JPAD)) {
|
||||
if (this->unk_22C == 1) {
|
||||
this->unk_224 = 0;
|
||||
}
|
||||
if (this->unk_224 == 0) {
|
||||
this->unk_224 = 0x14;
|
||||
this->unk_22C = 1;
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->unk_220 = SREG(30);
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_PAD(controller1->cur, U_JPAD) && this->unk_224 == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->unk_220 = SREG(30) * 3;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(controller1->press, D_JPAD)) {
|
||||
if (this->unk_230 == 1) {
|
||||
this->unk_228 = 0;
|
||||
}
|
||||
if (this->unk_228 == 0) {
|
||||
this->unk_228 = 0x14;
|
||||
this->unk_230 = 1;
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->unk_220 = -SREG(30);
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_PAD(controller1->cur, D_JPAD) && (this->unk_228 == 0)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->unk_220 = -SREG(30) * 3;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(controller1->press, L_JPAD) || CHECK_PAD(controller1->cur, L_JPAD)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->unk_220 = SREG(30);
|
||||
}
|
||||
|
||||
if (CHECK_PAD(controller1->press, R_JPAD) || CHECK_PAD(controller1->cur, R_JPAD)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->unk_220 = -SREG(30);
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_PAD(controller1->press, L_TRIG)) {
|
||||
this->unk_1DC = (++this->unk_1DC + 7) % 7;
|
||||
this->currentScene = this->unk_20C = this->unk_1E0[this->unk_1DC];
|
||||
}
|
||||
|
||||
this->unk_21C += this->unk_220;
|
||||
|
||||
if (this->unk_21C < -7) {
|
||||
this->unk_220 = 0;
|
||||
this->unk_21C = 0;
|
||||
|
||||
this->currentScene = (++this->currentScene + this->count) % this->count;
|
||||
if (this->currentScene == ((this->unk_20C + this->count + 0x13) % this->count)) {
|
||||
this->unk_20C = (++this->unk_20C + this->count) % this->count;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unk_21C >= 8) {
|
||||
this->unk_220 = 0;
|
||||
this->unk_21C = 0;
|
||||
|
||||
if (this->currentScene == this->unk_20C) {
|
||||
this->unk_20C = ((this->unk_20C - 2) + this->count) % this->count;
|
||||
}
|
||||
|
||||
this->currentScene = ((--this->currentScene) + this->count) % this->count;
|
||||
|
||||
if (this->currentScene == ((this->unk_20C + this->count) % this->count)) {
|
||||
this->unk_20C = (--this->unk_20C + this->count) % this->count;
|
||||
}
|
||||
}
|
||||
|
||||
this->currentScene = (this->currentScene + this->count) % this->count;
|
||||
this->unk_20C = (this->unk_20C + this->count) % this->count;
|
||||
|
||||
dREG(80) = this->currentScene;
|
||||
dREG(81) = this->unk_20C;
|
||||
dREG(82) = this->unk_1DC;
|
||||
|
||||
if (this->unk_224 != 0) {
|
||||
this->unk_224--;
|
||||
}
|
||||
|
||||
if (this->unk_224 == 0) {
|
||||
this->unk_22C = 0;
|
||||
}
|
||||
|
||||
if (this->unk_228 != 0) {
|
||||
this->unk_228--;
|
||||
}
|
||||
|
||||
if (this->unk_228 == 0) {
|
||||
this->unk_230 = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/Select_UpdateMenu.s")
|
||||
#endif
|
||||
|
||||
void Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
|
||||
s32 scene;
|
||||
s32 i;
|
||||
char* name;
|
||||
|
||||
GfxPrint_SetColor(printer, 255, 155, 150, 255);
|
||||
GfxPrint_SetPos(printer, 12, 2);
|
||||
GfxPrint_Printf(printer, "ZELDA MAP SELECT");
|
||||
GfxPrint_SetColor(printer, 255, 255, 255, 255);
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
GfxPrint_SetPos(printer, 9, i + 4);
|
||||
|
||||
scene = ((this->unk_20C + i) + this->count) % this->count;
|
||||
if (scene == this->currentScene) {
|
||||
GfxPrint_SetColor(printer, 255, 20, 20, 255);
|
||||
} else {
|
||||
GfxPrint_SetColor(printer, 200, 200, 55, 255);
|
||||
}
|
||||
|
||||
name = this->scenes[scene].name;
|
||||
if (name == NULL) {
|
||||
name = "**Null**";
|
||||
}
|
||||
|
||||
GfxPrint_Printf(printer, "%s", name);
|
||||
};
|
||||
|
||||
GfxPrint_SetColor(printer, 155, 55, 150, 255);
|
||||
GfxPrint_SetPos(printer, 20, 26);
|
||||
GfxPrint_Printf(printer, "OPT=%d", this->opt);
|
||||
}
|
||||
|
||||
static char* sLoadingMessages[] = {
|
||||
"\x8Dシバラクオマチクダサイ", // "Please wait a minute"
|
||||
"\x8Dチョット マッテネ", // "Hold on a sec"
|
||||
"\x8Cウェイト ア モーメント", // "Wait a moment"
|
||||
"\x8Cロード\x8Dチュウ", // "Loading"
|
||||
"\x8Dナウ ワーキング", // "Now working"
|
||||
"\x8Dイマ ツクッテマス", // "Now creating"
|
||||
"\x8Dコショウジャナイヨ", // "It's not broken"
|
||||
"\x8Cコーヒー ブレイク", // "Coffee Break"
|
||||
"\x8C\Bメンヲセットシテクダサイ", // "Please set B side"
|
||||
"\x8Dジット\x8Cガマン\x8Dノ\x8Cコ\x8Dデアッタ", // "Be patient, now"
|
||||
"\x8Dイマシバラクオマチクダサイ", // "Please wait just a minute"
|
||||
"\x8Dアワテナイアワテナイ。ヒトヤスミヒトヤスミ。", // "Don't worry, don't worry. Take a break, take a break"
|
||||
};
|
||||
|
||||
void Select_PrintLoadingMessage(SelectContext* this, GfxPrint* printer) {
|
||||
s32 randomMsg;
|
||||
|
||||
GfxPrint_SetPos(printer, 0xA, 0xF);
|
||||
GfxPrint_SetColor(printer, 255, 255, 255, 255);
|
||||
randomMsg = Math_Rand_ZeroOne() * ARRAY_COUNT(sLoadingMessages);
|
||||
GfxPrint_Printf(printer, "%s", sLoadingMessages[randomMsg]);
|
||||
}
|
||||
|
||||
static char* sAgeLabels[] = {
|
||||
"\x8D"
|
||||
"17(ワカモノ)", // "17(young)"
|
||||
"\x8D"
|
||||
"5(ワカスギ)", // "5(very young)"
|
||||
};
|
||||
|
||||
void Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 age) {
|
||||
GfxPrint_SetPos(printer, 4, 26);
|
||||
GfxPrint_SetColor(printer, 255, 255, 55, 255);
|
||||
GfxPrint_Printf(printer, "Age:%s", sAgeLabels[age]);
|
||||
}
|
||||
|
||||
void Select_PrintCutsceneSetting(SelectContext* this, GfxPrint* printer, u16 csIndex) {
|
||||
char* label;
|
||||
|
||||
GfxPrint_SetPos(printer, 4, 25);
|
||||
GfxPrint_SetColor(printer, 255, 255, 55, 255);
|
||||
|
||||
switch (csIndex) {
|
||||
case 0:
|
||||
label = "\x8D ヨル \x8Cゴロン";
|
||||
gSaveContext.dayTime = 0;
|
||||
break;
|
||||
case 0x8000:
|
||||
// clang-format off
|
||||
gSaveContext.dayTime = 0x8000; label = "\x8Dオヒル \x8Cジャラ";
|
||||
// clang-format on
|
||||
break;
|
||||
case 0xFFF0:
|
||||
// clang-format off
|
||||
gSaveContext.dayTime = 0x8000; label = "デモ00";
|
||||
// clang-format on
|
||||
break;
|
||||
case 0xFFF1:
|
||||
label = "デモ01";
|
||||
break;
|
||||
case 0xFFF2:
|
||||
label = "デモ02";
|
||||
break;
|
||||
case 0xFFF3:
|
||||
label = "デモ03";
|
||||
break;
|
||||
case 0xFFF4:
|
||||
label = "デモ04";
|
||||
break;
|
||||
case 0xFFF5:
|
||||
label = "デモ05";
|
||||
break;
|
||||
case 0xFFF6:
|
||||
label = "デモ06";
|
||||
break;
|
||||
case 0xFFF7:
|
||||
label = "デモ07";
|
||||
break;
|
||||
case 0xFFF8:
|
||||
label = "デモ08";
|
||||
break;
|
||||
case 0xFFF9:
|
||||
label = "デモ09";
|
||||
break;
|
||||
case 0xFFFA:
|
||||
label = "デモ0A";
|
||||
break;
|
||||
};
|
||||
|
||||
gSaveContext.environmentTime = gSaveContext.dayTime;
|
||||
GfxPrint_Printf(printer, "Stage:\x8C%s", label);
|
||||
}
|
||||
|
||||
void Select_DrawMenu(SelectContext* this) {
|
||||
s32 arg;
|
||||
GfxPrint* printer;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = this->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 930);
|
||||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL);
|
||||
func_80095248(gfxCtx, 0, 0, 0);
|
||||
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);
|
||||
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);
|
||||
GfxPrint_Destroy(printer);
|
||||
|
||||
Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 966);
|
||||
}
|
||||
|
||||
void Select_DrawLoadingScreen(SelectContext* this) {
|
||||
s32 pad;
|
||||
GfxPrint* printer;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = this->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 977);
|
||||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL);
|
||||
func_80095248(gfxCtx, 0, 0, 0);
|
||||
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);
|
||||
Select_PrintLoadingMessage(this, printer);
|
||||
gfxCtx->polyOpa.p = GfxPrint_Close(printer);
|
||||
GfxPrint_Destroy(printer);
|
||||
|
||||
Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 1006);
|
||||
}
|
||||
|
||||
void Select_Draw(SelectContext* this) {
|
||||
s32 pad;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = this->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, gfxCtx, "../z_select.c", 1013);
|
||||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL);
|
||||
func_80095248(gfxCtx, 0, 0, 0);
|
||||
SET_FULLSCREEN_VIEWPORT(&this->view)
|
||||
func_800AAA50(&this->view, 0xF);
|
||||
|
||||
if (!this->state.running) {
|
||||
Select_DrawLoadingScreen(this);
|
||||
} else {
|
||||
Select_DrawMenu(this);
|
||||
}
|
||||
|
||||
Graph_CloseDisps(dispRefs, gfxCtx, "../z_select.c", 1037);
|
||||
}
|
||||
|
||||
void Select_Main(SelectContext* this) {
|
||||
Select_UpdateMenu(this);
|
||||
Select_Draw(this);
|
||||
}
|
||||
|
||||
void Select_Destroy(SelectContext* this) {
|
||||
osSyncPrintf("%c", 7);
|
||||
// "view_cleanup will hang, so it won't be called"
|
||||
osSyncPrintf("*** view_cleanupはハングアップするので、呼ばない ***\n");
|
||||
}
|
||||
|
||||
void Select_Init(SelectContext* this) {
|
||||
u32 size;
|
||||
s32 pad[2];
|
||||
|
||||
this->state.main = Select_Main;
|
||||
this->state.destroy = Select_Destroy;
|
||||
this->scenes = sScenes;
|
||||
this->unk_20C = 0;
|
||||
this->currentScene = 0;
|
||||
this->unk_1E0[0] = 0;
|
||||
this->unk_1E0[1] = 0x13;
|
||||
this->unk_1E0[2] = 0x25;
|
||||
this->unk_1E0[3] = 0x33;
|
||||
this->unk_1E0[4] = 0x3B;
|
||||
this->unk_1E0[5] = 0x49;
|
||||
this->unk_1E0[6] = 0x5B;
|
||||
this->unk_1DC = 0;
|
||||
this->opt = 0;
|
||||
this->count = 126;
|
||||
View_Init(&this->view, this->state.gfxCtx);
|
||||
this->view.flags = 0xA;
|
||||
this->unk_21C = 0;
|
||||
this->unk_220 = 0;
|
||||
this->unk_224 = 0;
|
||||
this->unk_228 = 0;
|
||||
this->unk_22C = 0;
|
||||
this->unk_230 = 0;
|
||||
this->unk_234 = 0;
|
||||
|
||||
size = (u32)_z_select_staticSegmentRomEnd - (u32)_z_select_staticSegmentRomStart;
|
||||
|
||||
if ((dREG(80) >= 0) && (dREG(80) < this->count)) {
|
||||
this->currentScene = dREG(80);
|
||||
this->unk_20C = dREG(81);
|
||||
this->unk_1DC = dREG(82);
|
||||
}
|
||||
SREG(30) = 1;
|
||||
|
||||
this->staticSegment = GameState_Alloc(this, size, "../z_select.c", 1114);
|
||||
DmaMgr_SendRequest1(this->staticSegment, _z_select_staticSegmentRomStart, size, "../z_select.c", 1115);
|
||||
gSaveContext.cutsceneIndex = 0x8000;
|
||||
gSaveContext.linkAge = 1;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ void Title_PrintBuildInfo(Gfx** gfxp) {
|
||||
g = *gfxp;
|
||||
g = func_8009411C(g);
|
||||
printer = alloca(sizeof(GfxPrint));
|
||||
GfxPrint_Ctor(printer);
|
||||
GfxPrint_Init(printer);
|
||||
GfxPrint_Open(printer, g);
|
||||
GfxPrint_SetColor(printer, 0xFF, 0x9B, 0xFF, 0xFF);
|
||||
GfxPrint_SetPos(printer, 9, 21);
|
||||
@@ -30,7 +30,7 @@ void Title_PrintBuildInfo(Gfx** gfxp) {
|
||||
GfxPrint_SetPos(printer, 7, 24);
|
||||
GfxPrint_Printf(printer, "[Date:%s]", gBuildDate);
|
||||
g = GfxPrint_Close(printer);
|
||||
GfxPrint_Dtor(printer);
|
||||
GfxPrint_Destroy(printer);
|
||||
*gfxp = g;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user