summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-10-23 21:44:45 -0300
committerGitHub <noreply@github.com>2021-10-23 20:44:45 -0400
commit9b89ec5fac324f7204cda20ebc4f8527ee49b856 (patch)
treee08905685b80c5e41abbe3808a3030554c5d7a81 /src
parent4b10b22baabfaf1753d7d7cc2d7339579ee05ed6 (diff)
Document `ovl_select` (#966)
* Some renames * Some renames * Some more renames * pageDown * Last name update * Translate scene entries * formatter * Review * A bunch of suggestions * Run formatter * Roman's suggestions
Diffstat (limited to 'src')
-rw-r--r--src/code/db_camera.c35
-rw-r--r--src/code/z_camera.c10
-rw-r--r--src/code/z_debug.c22
-rw-r--r--src/code/z_map_mark.c8
-rw-r--r--src/overlays/actors/ovl_player_actor/z_player.c6
-rw-r--r--src/overlays/gamestates/ovl_select/z_select.c450
6 files changed, 276 insertions, 255 deletions
diff --git a/src/code/db_camera.c b/src/code/db_camera.c
index f686a7f37..2a9738228 100644
--- a/src/code/db_camera.c
+++ b/src/code/db_camera.c
@@ -1293,8 +1293,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll, &D_8012D084[10], 3);
func_8006376C(0x10, 0x16, (dbCamera->sub.unk_0A == 2) ? 7 : 4, D_8012D084);
func_8006376C(0xF, 0x17, (dbCamera->sub.unk_0A == 3) ? 7 : 4,
- (dbCamera->sub.mode == 1) ? D_8012CF14
- : (dbCamera->sub.mode == 0) ? *D_8012CF18 : D_8012CFB0);
+ (dbCamera->sub.mode == 1) ? D_8012CF14
+ : (dbCamera->sub.mode == 0) ? *D_8012CF18
+ : D_8012CFB0);
if (dbCamera->sub.unk_0C) {
D_8012D05C[80] = '>';
} else {
@@ -1319,9 +1320,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
if (dbCamera->sub.mode != 1) {
func_8006376C(3, 0x16,
- ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144)
- ? 7
- : !D_80161144 ? 4 : 3,
+ ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) ? 7
+ : !D_80161144 ? 4
+ : 3,
D_8012CF30);
sp110 = 'X';
DbCamera_SetTextValue(dbCamera->at.x, &sp111, 6);
@@ -1332,10 +1333,11 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
sp110 = 'Z';
DbCamera_SetTextValue(dbCamera->at.z, &sp111, 6);
func_8006376C(3, 0x19, 2, &sp110);
- func_8006376C(
- 0x1E, 0x16,
- ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7 : D_80161144 ? 4 : 3,
- D_8012CF34);
+ func_8006376C(0x1E, 0x16,
+ ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7
+ : D_80161144 ? 4
+ : 3,
+ D_8012CF34);
sp110 = 'X';
DbCamera_SetTextValue(dbCamera->eye.x, &sp111, 6);
func_8006376C(0x1E, 0x17, 2, &sp110);
@@ -1350,9 +1352,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
OLib_Vec3fDiffToVecSphGeo(&spFC, sp90, sp7C);
spFC.yaw -= cam->playerPosRot.rot.y;
func_8006376C(3, 0x16,
- ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144)
- ? 7
- : !D_80161144 ? 4 : 3,
+ ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) ? 7
+ : !D_80161144 ? 4
+ : 3,
D_8012CF30);
DbCamera_SetTextValue(spFC.pitch * 0.00549325f, &D_8012D0E4[10], 4);
func_8006376C(3, 0x17, 3, D_8012D0E4);
@@ -1362,10 +1364,11 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
func_8006376C(3, 0x19, 3, D_8012D0D4);
OLib_Vec3fDiffToVecSphGeo(&spFC, sp90, sp80);
spFC.yaw -= cam->playerPosRot.rot.y;
- func_8006376C(
- 0x1E, 0x16,
- ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7 : D_80161144 ? 4 : 3,
- D_8012CF34);
+ func_8006376C(0x1E, 0x16,
+ ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7
+ : D_80161144 ? 4
+ : 3,
+ D_8012CF34);
DbCamera_SetTextValue(spFC.pitch * 0.00549325f, &D_8012D0E4[10], 4);
func_8006376C(0x1C, 0x17, 3, D_8012D0E4);
DbCamera_SetTextValue(spFC.yaw * 0.00549325f, &D_8012D0F8[10], 4);
diff --git a/src/code/z_camera.c b/src/code/z_camera.c
index 9f6483186..fd287f673 100644
--- a/src/code/z_camera.c
+++ b/src/code/z_camera.c
@@ -1690,9 +1690,9 @@ s32 Camera_Normal2(Camera* camera) {
anim->unk_20 = BGCAM_ROT(bgData).x;
anim->unk_22 = BGCAM_ROT(bgData).y;
anim->unk_24 = playerPosRot->pos.y;
- anim->unk_1C = BGCAM_FOV(bgData) == -1
- ? norm2->unk_14
- : BGCAM_FOV(bgData) >= 0x169 ? PCT(BGCAM_FOV(bgData)) : BGCAM_FOV(bgData);
+ anim->unk_1C = BGCAM_FOV(bgData) == -1 ? norm2->unk_14
+ : BGCAM_FOV(bgData) >= 0x169 ? PCT(BGCAM_FOV(bgData))
+ : BGCAM_FOV(bgData);
anim->unk_28 = BGCAM_JFIFID(bgData) == -1 ? 0 : BGCAM_JFIFID(bgData);
@@ -2920,7 +2920,9 @@ s32 Camera_Battle1(Camera* camera) {
}
anim->roll += (((OREG(36) * camera->speedRatio) * (1.0f - distRatio)) - anim->roll) * PCT(OREG(37));
camera->roll = DEGF_TO_BINANG(anim->roll);
- camera->fov = Camera_LERPCeilF((player->swordState != 0 ? 0.8f : gSaveContext.health <= 0x10 ? 0.8f : 1.0f) *
+ camera->fov = Camera_LERPCeilF((player->swordState != 0 ? 0.8f
+ : gSaveContext.health <= 0x10 ? 0.8f
+ : 1.0f) *
(fov - ((fov * 0.05f) * distRatio)),
camera->fov, camera->fovUpdateRate, 1.0f);
}
diff --git a/src/code/z_debug.c b/src/code/z_debug.c
index 21b0fee3e..55eedb17f 100644
--- a/src/code/z_debug.c
+++ b/src/code/z_debug.c
@@ -151,19 +151,15 @@ void func_8006390C(Input* input) {
gGameInfo->dpadLast = dpad;
}
- increment = CHECK_BTN_ANY(dpad, BTN_DRIGHT)
- ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B)
- ? 1000
- : CHECK_BTN_ALL(input->cur.button, BTN_A)
- ? 100
- : CHECK_BTN_ALL(input->cur.button, BTN_B) ? 10 : 1)
- : CHECK_BTN_ANY(dpad, BTN_DLEFT)
- ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B)
- ? -1000
- : CHECK_BTN_ALL(input->cur.button, BTN_A)
- ? -100
- : CHECK_BTN_ALL(input->cur.button, BTN_B) ? -10 : -1)
- : 0;
+ increment = CHECK_BTN_ANY(dpad, BTN_DRIGHT) ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) ? 1000
+ : CHECK_BTN_ALL(input->cur.button, BTN_A) ? 100
+ : CHECK_BTN_ALL(input->cur.button, BTN_B) ? 10
+ : 1)
+ : CHECK_BTN_ANY(dpad, BTN_DLEFT) ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) ? -1000
+ : CHECK_BTN_ALL(input->cur.button, BTN_A) ? -100
+ : CHECK_BTN_ALL(input->cur.button, BTN_B) ? -10
+ : -1)
+ : 0;
gGameInfo->data[gGameInfo->regCur + regGroup] += increment;
if (CHECK_BTN_ANY(dpad, BTN_DUP)) {
diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c
index 8718b8de4..a096a9b56 100644
--- a/src/code/z_map_mark.c
+++ b/src/code/z_map_mark.c
@@ -63,10 +63,10 @@ void MapMark_Init(GlobalContext* globalCtx) {
Overlay_Load(overlay->vromStart, overlay->vromEnd, overlay->vramStart, overlay->vramEnd, overlay->loadedRamAddr);
sLoadedMarkDataTable = gMapMarkDataTable;
- sLoadedMarkDataTable = (void*)(u32)(
- (overlay->vramTable != NULL)
- ? (void*)((u32)overlay->vramTable - (s32)((u32)overlay->vramStart - (u32)overlay->loadedRamAddr))
- : NULL);
+ sLoadedMarkDataTable = (void*)(u32)((overlay->vramTable != NULL)
+ ? (void*)((u32)overlay->vramTable -
+ (s32)((u32)overlay->vramStart - (u32)overlay->loadedRamAddr))
+ : NULL);
}
void MapMark_ClearPointers(GlobalContext* globalCtx) {
diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c
index c72f212be..ed3664e06 100644
--- a/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/src/overlays/actors/ovl_player_actor/z_player.c
@@ -10089,9 +10089,9 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
func_80837B9C(this, globalCtx);
} else if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & 0x8000000)) {
func_80836448(globalCtx, this,
- func_808332B8(this)
- ? &gPlayerAnim_003310
- : (this->shockTimer != 0) ? &gPlayerAnim_002F08 : &gPlayerAnim_002878);
+ func_808332B8(this) ? &gPlayerAnim_003310
+ : (this->shockTimer != 0) ? &gPlayerAnim_002F08
+ : &gPlayerAnim_002878);
}
} else {
if ((this->actor.parent == NULL) &&
diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c
index fe006f299..8d1b2531f 100644
--- a/src/overlays/gamestates/ovl_select/z_select.c
+++ b/src/overlays/gamestates/ovl_select/z_select.c
@@ -43,144 +43,163 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext);
}
+// "Translation" ("Actual name")
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 },
+ { " 1:SPOT00", Select_LoadGame, 0x00CD }, // "1: SPOT00" (Hyrule Field)
+ { " 2:SPOT01", Select_LoadGame, 0x00DB }, // "2: SPOT01" (Kakariko Village)
+ { " 3:SPOT02", Select_LoadGame, 0x00E4 }, // "3: SPOT02" (Graveyard)
+ { " 4:SPOT03", Select_LoadGame, 0x00EA }, // "4: SPOT03" (Zora's River)
+ { " 5:SPOT04", Select_LoadGame, 0x00EE }, // "5: SPOT04" (Kokiri Forest)
+ { " 6:SPOT05", Select_LoadGame, 0x00FC }, // "6: SPOT05" (Sacred Forest Meadow)
+ { " 7:SPOT06", Select_LoadGame, 0x0102 }, // "7: SPOT06" (Lake Hylia)
+ { " 8:SPOT07", Select_LoadGame, 0x0108 }, // "8: SPOT07" (Zora's Domain)
+ { " 9:SPOT08", Select_LoadGame, 0x010E }, // "9: SPOT08" (Zora's Fountain)
+ { "10:SPOT09", Select_LoadGame, 0x0117 }, // "10: SPOT09" (Gerudo Valley)
+ { "11:SPOT10", Select_LoadGame, 0x011E }, // "11: SPOT10" (Lost Woods)
+ { "12:SPOT11", Select_LoadGame, 0x0123 }, // "12: SPOT11" (Desert Colossus)
+ { "13:SPOT12", Select_LoadGame, 0x0129 }, // "13: SPOT12" (Gerudo's Fortress)
+ { "14:SPOT13", Select_LoadGame, 0x0130 }, // "14: SPOT13" (Haunted Wasteland)
+ { "15:SPOT15", Select_LoadGame, 0x0138 }, // "15: SPOT15" (Hyrule Castle)
+ { "16:SPOT16", Select_LoadGame, 0x013D }, // "16: SPOT16" (Death Mountain Trail)
+ { "17:SPOT17", Select_LoadGame, 0x0147 }, // "17: SPOT17" (Death Mountain Crater)
+ { "18:SPOT18", Select_LoadGame, 0x014D }, // "18: SPOT18" (Goron City)
+ { "19:SPOT20", Select_LoadGame, 0x0157 }, // "19: SPOT20" (Lon Lon Ranch)
+ { "20:\x8Dトキノマ", Select_LoadGame, 0x0053 }, // "20: Chamber of Time" (Temple Of Time)
+ { "21:\x8Dケンジャノマ", Select_LoadGame, 0x006B }, // "21: Chamber of the Sages" (Chamber of the Sages)
+ { "22:\x8Dシャテキジョウ", Select_LoadGame, 0x003B }, // "22: Target Range" (Shooting Gallery)
+ { "23:\x8Cハイラル\x8Dニワ\x8Cゲーム", Select_LoadGame, 0x007A }, // "23: Hyrule Garden Game" (Hyrule Garden Minigame)
+ { "24:\x8Dハカシタトビコミアナ", Select_LoadGame, 0x031C }, // "24: Grave Dive Hole" (Grave (Redead))
+ { "25:\x8Dハカシタトビコミアナ 2", Select_LoadGame, 0x004B }, // "25: Grave Dive Hole 2" (Grave (Fairy's Fountain))
+ { "26:\x8Dオウケ ノ ハカアナ", Select_LoadGame, 0x002D }, // "26: Royal Family's Grave" (Royal Family's Tomb)
+ { "27:\x8Dダイヨウセイノイズミ", Select_LoadGame,
+ 0x0315 }, // "27: Great Fairy's Fountain" (Great Fairy's Fountain (Upgrades))
+ { "28:\x8Dトビコミ ヨウセイ アナ", Select_LoadGame, 0x036D }, // "28: Fairy Dive Hole" (Fairy's Fountain (Healing Fairies))
+ { "29:\x8Dマホウセキ ヨウセイノイズミ", Select_LoadGame,
+ 0x0371 }, // "29: Magic Stone Fairy's Fountain" (Great Fairy's Fountain (Spells))
+ { "30:\x8Cガノン\x8Dサイシュウセン", Select_LoadGame, 0x043F }, // "30: Final Battle With Ganon" (Battle With Ganon)
+ { "31:\x8Cハイラル\x8Dナカニワ", Select_LoadGame, 0x0400 }, // "31: Hyrule Inner Garden" (Castle Courtyard)
+ { "32:\x8Dツリボリ", Select_LoadGame, 0x045F }, // "32: Fishing" (Fishing Pond)
+ { "33:\x8Cボムチュウボーリング", Select_LoadGame, 0x0507 }, // "33: Bombchu Bowling" (Bombchu Bowling Alley)
+ { "34:\x8Cロンロン\x8Dボクジョウ ソウコ 1", Select_LoadGame, 0x004F }, // "34: Lon Lon Ranch - Storehouse 1" (Talon's House)
+ { "35:\x8Cロンロン\x8Dボクジョウ ソウコ 2", Select_LoadGame, 0x05D0 }, // "35: Lon Lon Ranch - Storehouse 2" (Ranch Silo)
+ { "36:\x8Dミハリ ゴヤ", Select_LoadGame, 0x007E }, // "36: Lookout Hut" (Guard House)
+ { "37:\x8Dマホウ ノ クスリヤ", Select_LoadGame, 0x0072 }, // "37: Magic Potion Shop" (Granny's Potion Shop)
+ { "38:\x8Dタカラバコヤ", Select_LoadGame, 0x0063 }, // "38: Treasure Chest Shop" (Treasure Chest Game)
+ { "39:\x8Dキン \x8Cスタルチュラ ハウス", Select_LoadGame, 0x0550 }, // "39: Gold Skulltula House" (House of Skulltula)
+ { "40:\x8Dジョウカマチ イリグチ", Select_LoadGame, 0x0033 }, // "40: Castle Town - Entrance" (Market Entrance)
+ { "41:\x8Dジョウカマチ", Select_LoadGame, 0x00B1 }, // "41: Castle Town" (Market)
+ { "42:\x8Dウラロジ", Select_LoadGame, 0x00AD }, // "42: Back Alley" (Back Alley)
+ { "43:\x8Dトキノシンデン マエ", Select_LoadGame, 0x0171 }, // "43: In Front of the Temple of Time" (Temple of Time Exterior)
+ { "44:\x8Dリンクノイエ", Select_LoadGame, 0x00BB }, // "44: Link's House" (Link's House)
+ { "45:\x8Cカカリコ\x8Dムラノナガヤ", Select_LoadGame, 0x02FD }, // "45: Kakariko Village Row House" (Carpenter Boss's House)
+ { "46:\x8Dウラロジノ イエ", Select_LoadGame, 0x043B }, // "46: Back Alley House" (Back Alley House (Man in Green))
+ { "47:\x8Dコキリノムラ モノシリキョウダイノイエ", Select_LoadGame,
+ 0x00C9 }, // "47: Kokiri Village - Know-It-All Brothers' House" (Know-It-All Brothers' House)
+ { "48:\x8Dコキリノムラ フタゴノイエ", Select_LoadGame, 0x009C }, // "48: Kokiri Village - Twins' House" (Twins' House)
+ { "49:\x8Dコキリノムラ \x8Cミド\x8Dノイエ", Select_LoadGame, 0x0433 }, // "49: Kokiri Village - Mido's House" (Mido's House)
+ { "50:\x8Dコキリノムラ \x8Cサリア\x8Dノイエ", Select_LoadGame, 0x0437 }, // "50: Kokiri Village - Saria's House" (Saria's House)
+ { "51:\x8Dウマゴヤ", Select_LoadGame, 0x02F9 }, // "51: Stable" (Stable)
+ { "52:\x8Dハカモリノイエ", Select_LoadGame, 0x030D }, // "52: Grave Keeper's House" (Gravekeeper's Hut)
+ { "53:\x8Dウラロジ イヌオバサンノイエ", Select_LoadGame, 0x0398 }, // "53: Back Alley - Dog Lady's House" (Back Alley House)
+ { "54:\x8Dカカリコムラ \x8Cインパ\x8Dノイエ", Select_LoadGame,
+ 0x039C }, // "54: Kakariko Village - Impa's House" (Impa's House)
+ { "55:\x8Cハイリア\x8D ケンキュウジョ", Select_LoadGame, 0x0043 }, // "55: Hylia Laboratory" (Lakeside Laboratory)
+ { "56:\x8Cテント", Select_LoadGame, 0x03A0 }, // "56: Tent" (Carpenters' Tent)
+ { "57:\x8Dタテノミセ", Select_LoadGame, 0x00B7 }, // "57: Shield Shop" (Bazaar)
+ { "58:\x8Dコキリゾクノミセ", Select_LoadGame, 0x00C1 }, // "58: Kokiri Shop" (Kokiri Shop)
+ { "59:\x8Cゴロン\x8Dノミセ", Select_LoadGame, 0x037C }, // "59: Goron Shop" (Goron Shop)
+ { "60:\x8Cゾーラ\x8Dノミセ", Select_LoadGame, 0x0380 }, // "60: Zora Shop" (Zora Shop)
+ { "61:\x8Cカカリコ\x8Dムラ クスリヤ", Select_LoadGame,
+ 0x0384 }, // "61: Kakariko Village - Potion Shop" (Kakariko Potion Shop)
+ { "62:\x8Dジョウカマチ クスリヤ", Select_LoadGame, 0x0388 }, // "62: Castle Town - Potion Shop" (Market Potion Shop)
+ { "63:\x8Dウラロジ ヨルノミセ", Select_LoadGame, 0x0390 }, // "63: Back Alley - Night Shop" (Bombchu Shop)
+ { "64:\x8Dオメンヤ", Select_LoadGame, 0x0530 }, // "64: Mask Shop" (Happy Mask Shop)
+ { "65:\x8Cゲルド\x8Dノシュウレンジョウ", Select_LoadGame, 0x0008 }, // "65: Gerudo Training Area" (Gerudo Training Ground)
+ { "66:\x8Dヨウセイノキノ \x8Cダンジョン", Select_LoadGame, 0x0000 }, // "66: Fairy Tree Dungeon" (Inside the Deku Tree)
+ { "67:\x8Dヨウセイノキノ \x8Cダンジョン ボス", Select_LoadGame, 0x040F }, // "67: Fairy Tree Dungeon - Boss" (Gohma's Lair)
+ { "68:\x8Cドドンゴ ダンジョン", Select_LoadGame, 0x0004 }, // "68: Dondogo Dungeon" (Dodongo's Cavern)
+ { "69:\x8Cドドンゴ ダンジョン ボス", Select_LoadGame, 0x040B }, // "69: Dondogo Dungeon - Boss" (King Dodongo's Lair)
+ { "70:\x8Dキョダイギョ \x8Cダンジョン", Select_LoadGame, 0x0028 }, // "70: Giant Fish Dungeon" (Inside Jabu-Jabu's Belly)
+ { "71:\x8Dキョダイギョ \x8Cダンジョン ボス", Select_LoadGame, 0x0301 }, // "71: Giant Fish Dungeon - Boss" (Barinade's Lair)
+ { "72:\x8Dモリノシンデン", Select_LoadGame, 0x0169 }, // "72: Forest Temple" (Forest Temple)
+ { "73:\x8Dモリノシンデン \x8Cボス", Select_LoadGame, 0x000C }, // "73: Forest Temple - Boss" (Phantom Ganon's Lair)
+ { "74:\x8Dイドシタ \x8Cダンジョン", Select_LoadGame, 0x0098 }, // "74: Dungeon Below the Well" (Bottom of the Well)
+ { "75:\x8Dハカシタ \x8Cダンジョン", Select_LoadGame, 0x0037 }, // "75: Dungeon Beneath the Graves" (Shadow Temple)
+ { "76:\x8Dハカシタ \x8Cダンジョン ボス", Select_LoadGame,
+ 0x0413 }, // "76: Dungeon Beneath the Graves - Boss" (Bongo Bongo's Lair)
+ { "77:\x8Dヒノシンデン", Select_LoadGame, 0x0165 }, // "77: Fire Temple" (Fire Temple)
+ { "78:\x8Dヒノシンデン \x8Cボス", Select_LoadGame, 0x0305 }, // "78: Fire Temple - Boss" (Volvagia's Lair)
+ { "79:\x8Dミズノシンデン", Select_LoadGame, 0x0010 }, // "79: Water Temple" (Water Temple)
+ { "80:\x8Dミズノシンデン \x8Cボス", Select_LoadGame, 0x0417 }, // "80: Water Temple - Boss" (Morpha's Lair)
+ { "81:\x8Dジャシンゾウ \x8Cダンジョン", Select_LoadGame, 0x0082 }, // "81: Evil Goddess Statue Dungeon" (Spirit Temple)
+ { "82:\x8Dジャシンゾウ \x8Cダンジョン アイアンナック", Select_LoadGame,
+ 0x008D }, // "82: Evil Goddess Statue Dungeon - Iron Knuckle" (Iron Knuckle's Lair)
+ { "83:\x8Dジャシンゾウ \x8Cダンジョン ボス", Select_LoadGame,
+ 0x05EC }, // "83: Evil Goddess Statue Dungeon - Boss" (Twinrova's Lair)
+ { "84:\x8Cガノン\x8Dノトウ", Select_LoadGame, 0x041B }, // "84: Ganon's Tower" (Ganon's Tower)
+ { "85:\x8Cガノン\x8Dノトウ\x8Cボス", Select_LoadGame, 0x041F }, // "85: Ganon's Tower - Boss" (Ganondorf's Lair)
+ { "86:\x8Dコオリノドウクツ", Select_LoadGame, 0x0088 }, // "86: Ice Cavern" (Ice Cavern)
+ { "87:\x8Dハカシタ\x8Cリレー", Select_LoadGame, 0x044F }, // "87: Relay Beneath the Graves" (Dampé's Grave)
+ { "88:\x8Cガノン\x8Dチカ \x8Cダンジョン", Select_LoadGame,
+ 0x0467 }, // "88: Ganon's Basement Dungeon" (Inside Ganon's Castle)
+ { "89:\x8Cガノン\x8Dサイシュウセン \x8Cデモ & バトル", Select_LoadGame,
+ 0x0517 }, // "89: Final Battle With Ganon - Cutscene & Battle" (Ganondorf's Death Scene & Tower Escape Exterior)
+ { "90:\x8Cガノン\x8Dノトウ ソノゴ 1", Select_LoadGame,
+ 0x0179 }, // "90: Ganon's Tower Aftermath 1" (Escaping Ganon's Tower 1)
+ { "91:\x8Cガノン\x8Dノトウ ソノゴ 2", Select_LoadGame,
+ 0x01B5 }, // "91: Ganon's Tower Aftermath 2" (Escaping Ganon's Tower 2)
+ { "92:\x8Cガノン\x8Dノトウ ソノゴ 3", Select_LoadGame,
+ 0x03DC }, // "92: Ganon's Tower Aftermath 3" (Escaping Ganon's Tower 3)
+ { "93:\x8Cガノン\x8Dノトウ ソノゴ 4", Select_LoadGame,
+ 0x03E4 }, // "93: Ganon's Tower Aftermath 4" (Escaping Ganon's Tower 4)
+ { "94:\x8Cガノン\x8Dチカ ソノゴ", Select_LoadGame, 0x056C }, // "94: Ganon's Basement Aftermath" (Escaping Ganon's Castle)
+ { "95:\x8Cゲルド\x8Dツウロ 1-2", Select_LoadGame, 0x0486 }, // "95: Gerudo Passage 1-2" (Thieves' Hideout 1)
+ { "96:\x8Cゲルド\x8Dツウロ 3-4 9-10", Select_LoadGame, 0x048E }, // "96: Gerudo Passage 3-4 9-10" (Thieves' Hideout 2)
+ { "97:\x8Cゲルド\x8Dツウロ 5-6", Select_LoadGame, 0x0496 }, // "97: Gerudo Passage 5-6" (Thieves' Hideout 3)
+ { "98:\x8Cゲルド\x8Dツウロ 7-8", Select_LoadGame, 0x049E }, // "98: Gerudo Passage 7-8" (Thieves' Hideout 4)
+ { "99:\x8Cゲルド\x8Dツウロ 11-12", Select_LoadGame, 0x04AE }, // "99: Gerudo Passage 11-12" (Thieves' Hideout 5)
+ { "100:\x8Cゲルド\x8Dツウロ 13", Select_LoadGame, 0x0570 }, // "100: Gerudo Passage 13" (Thieves' Hideout 6)
+ { "101:\x8Dカクシトビコミアナ 0", Select_LoadGame, 0x003F }, // "101: Hidden Dive Hole 0" (Grotto 0 - Gossip Stone & Chest)
+ { "102:\x8Dカクシトビコミアナ 1", Select_LoadGame,
+ 0x0598 }, // "102: Hidden Dive Hole 1" (Grotto 1 - Skulltula & Gold Skulltula)
+ { "103:\x8Dカクシトビコミアナ 2", Select_LoadGame,
+ 0x059C }, // "103: Hidden Dive Hole 2" (Grotto 2 - Business Scrub & Heart Piece)
+ { "104:\x8Dカクシトビコミアナ 3", Select_LoadGame, 0x05A0 }, // "104: Hidden Dive Hole 3" (Grotto 3 - Redeads)
+ { "105:\x8Dカクシトビコミアナ 4", Select_LoadGame, 0x05A4 }, // "105: Hidden Dive Hole 4" (Grotto 4 - 3 Business Scrubs)
+ { "106:\x8Dカクシトビコミアナ 5", Select_LoadGame,
+ 0x05A8 }, // "106: Hidden Dive Hole 5" (Grotto 5 - Gossip Stone, Skulltula, Cow)
+ { "107:\x8Dカクシトビコミアナ 6", Select_LoadGame, 0x05AC }, // "107: Hidden Dive Hole 6" (Grotto 6 - Octorok)
+ { "108:\x8Dカクシトビコミアナ 7", Select_LoadGame,
+ 0x05B0 }, // "108: Hidden Dive Hole 7" (Grotto 7 - Business Scrub & Deku Nut Upgrade)
+ { "109:\x8Dカクシトビコミアナ 8", Select_LoadGame, 0x05B4 }, // "109: Hidden Dive Hole 8" (Grotto 8 - 2 Wolfos)
+ { "110:\x8Dカクシトビコミアナ 9", Select_LoadGame, 0x05B8 }, // "110: Hidden Dive Hole 9" (Grotto 9 - Bombable Walls)
+ { "111:\x8Dカクシトビコミアナ 10", Select_LoadGame, 0x05BC }, // "111: Hidden Dive Hole 10" (Grotto 10 - 2 Business Scrubs)
+ { "112:\x8Dカクシトビコミアナ 11", Select_LoadGame,
+ 0x05C0 }, // "112: Hidden Dive Hole 11" (Grotto 11 - Tektite & Heart Piece)
+ { "113:\x8Dカクシトビコミアナ 12", Select_LoadGame, 0x05C4 }, // "113: Hidden Dive Hole 12" (Grotto 12 - Deku Stage)
+ { "114:\x8Dカクシトビコミアナ 13", Select_LoadGame, 0x05FC }, // "114: Hidden Dive Hole 13" (Grotto 13 - Rupees & Cow)
+ { "115:\x8Cハイラル デモ", Select_LoadGame, 0x00A0 }, // "115: Hyrule Cutscenes" (Cutscene Map)
+ { "116:\x8Dベッシツ (タカラバコ\x8Cワープ)", Select_LoadGame,
+ 0x0520 }, // "116: Special Room (Treasure Chest Warp)" (Ganondorf Test Room)
+ { "117:\x8Dササ\x8Cテスト", Select_LoadGame, 0x0018 }, // "117: Sasaki Test" (Sasa Test)
+ { "118:\x8Cテストマップ", Select_LoadGame, 0x0094 }, // "118: Test Map" (Jungle Gym)
+ { "119:\x8Cテストルーム", Select_LoadGame, 0x0024 }, // "119: Test Room" (Treasure Chest Room)
+ { "120:\x8Dチュウ\x8Cスタロフォス\x8Dベヤ", Select_LoadGame, 0x001C }, // "120: Stalfos Miniboss Room" (Stalfos Miniboss Room)
+ { "121:\x8Cボススタロフォス\x8Dベヤ", Select_LoadGame, 0x0020 }, // "121: Boss Stalfos Room" (Stalfos Boss Room)
+ { "122:Sutaru", Select_LoadGame, 0x0047 }, // "122: Stal" (Sutaru)
+ { "123:jikkenjyou", Select_LoadGame, 0x02EA }, // "123: Test Area" (Shooting Gallery)
+ { "124:depth\x8Cテスト", Select_LoadGame, 0x00B6 }, // "124: Depth Test" (Depth Test)
+ { "125:\x8Cハイラル\x8Dニワ\x8Cゲーム2", Select_LoadGame,
+ 0x0076 }, // "125: Hyrule Garden Game 2" (Early Hyrule Garden Game)
+ { "title", (void*)Select_LoadTitle, 0x0000 }, // "title" (Title Screen)
};
void Select_UpdateMenu(SelectContext* this) {
- Input* controller1;
+ Input* controller1 = &this->state.input[0];
s32 pad;
SceneSelectEntry* selectedScene;
- controller1 = &this->state.input[0];
-
- if (this->unk_21C == 0) {
-
+ if (this->verticalInputAccumulator == 0) {
if (CHECK_BTN_ALL(controller1->press.button, BTN_A) || CHECK_BTN_ALL(controller1->press.button, BTN_START)) {
selectedScene = &this->scenes[this->currentScene];
if (selectedScene->loadFunc != NULL) {
@@ -268,111 +287,112 @@ void Select_UpdateMenu(SelectContext* this) {
}
if (CHECK_BTN_ALL(controller1->press.button, BTN_DUP)) {
- if (this->unk_22C == 1) {
- this->unk_224 = 0;
+ if (this->lockUp == true) {
+ this->timerUp = 0;
}
- if (this->unk_224 == 0) {
- this->unk_224 = 0x14;
- this->unk_22C = 1;
+ if (this->timerUp == 0) {
+ this->timerUp = 20;
+ this->lockUp = true;
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- this->unk_220 = R_UPDATE_RATE;
+ this->verticalInput = R_UPDATE_RATE;
}
}
- if (CHECK_BTN_ALL(controller1->cur.button, BTN_DUP) && this->unk_224 == 0) {
+ if (CHECK_BTN_ALL(controller1->cur.button, BTN_DUP) && this->timerUp == 0) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- this->unk_220 = R_UPDATE_RATE * 3;
+ this->verticalInput = R_UPDATE_RATE * 3;
}
if (CHECK_BTN_ALL(controller1->press.button, BTN_DDOWN)) {
- if (this->unk_230 == 1) {
- this->unk_228 = 0;
+ if (this->lockDown == true) {
+ this->timerDown = 0;
}
- if (this->unk_228 == 0) {
- this->unk_228 = 0x14;
- this->unk_230 = 1;
+ if (this->timerDown == 0) {
+ this->timerDown = 20;
+ this->lockDown = true;
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- this->unk_220 = -R_UPDATE_RATE;
+ this->verticalInput = -R_UPDATE_RATE;
}
}
- if (CHECK_BTN_ALL(controller1->cur.button, BTN_DDOWN) && (this->unk_228 == 0)) {
+ if (CHECK_BTN_ALL(controller1->cur.button, BTN_DDOWN) && (this->timerDown == 0)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- this->unk_220 = -R_UPDATE_RATE * 3;
+ this->verticalInput = -R_UPDATE_RATE * 3;
}
if (CHECK_BTN_ALL(controller1->press.button, BTN_DLEFT) || CHECK_BTN_ALL(controller1->cur.button, BTN_DLEFT)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- this->unk_220 = R_UPDATE_RATE;
+ this->verticalInput = R_UPDATE_RATE;
}
if (CHECK_BTN_ALL(controller1->press.button, BTN_DRIGHT) ||
CHECK_BTN_ALL(controller1->cur.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- this->unk_220 = -R_UPDATE_RATE;
+ this->verticalInput = -R_UPDATE_RATE;
}
}
if (CHECK_BTN_ALL(controller1->press.button, BTN_L)) {
- this->unk_1DC++;
- this->unk_1DC = (this->unk_1DC + 7) % 7;
- this->currentScene = this->unk_20C = this->unk_1E0[this->unk_1DC];
+ this->pageDownIndex++;
+ this->pageDownIndex =
+ (this->pageDownIndex + ARRAY_COUNT(this->pageDownStops)) % ARRAY_COUNT(this->pageDownStops);
+ this->currentScene = this->topDisplayedScene = this->pageDownStops[this->pageDownIndex];
}
- this->unk_21C += this->unk_220;
+ this->verticalInputAccumulator += this->verticalInput;
- if (this->unk_21C < -7) {
- this->unk_220 = 0;
- this->unk_21C = 0;
+ if (this->verticalInputAccumulator < -7) {
+ this->verticalInput = 0;
+ this->verticalInputAccumulator = 0;
this->currentScene++;
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->unk_20C + this->count) % this->count;
+ if (this->currentScene == ((this->topDisplayedScene + this->count + 19) % this->count)) {
+ this->topDisplayedScene++;
+ this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count;
}
}
- if (this->unk_21C >= 8) {
- this->unk_220 = 0;
- this->unk_21C = 0;
+ if (this->verticalInputAccumulator > 7) {
+ this->verticalInput = 0;
+ this->verticalInputAccumulator = 0;
- if (this->currentScene == this->unk_20C) {
- this->unk_20C -= 2;
- this->unk_20C = (this->unk_20C + this->count) % this->count;
+ if (this->currentScene == this->topDisplayedScene) {
+ this->topDisplayedScene -= 2;
+ this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count;
}
this->currentScene--;
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->unk_20C + this->count) % this->count;
+ if (this->currentScene == ((this->topDisplayedScene + this->count) % this->count)) {
+ this->topDisplayedScene--;
+ this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count;
}
}
this->currentScene = (this->currentScene + this->count) % this->count;
- this->unk_20C = (this->unk_20C + this->count) % this->count;
+ this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count;
dREG(80) = this->currentScene;
- dREG(81) = this->unk_20C;
- dREG(82) = this->unk_1DC;
+ dREG(81) = this->topDisplayedScene;
+ dREG(82) = this->pageDownIndex;
- if (this->unk_224 != 0) {
- this->unk_224--;
+ if (this->timerUp != 0) {
+ this->timerUp--;
}
- if (this->unk_224 == 0) {
- this->unk_22C = 0;
+ if (this->timerUp == 0) {
+ this->lockUp = false;
}
- if (this->unk_228 != 0) {
- this->unk_228--;
+ if (this->timerDown != 0) {
+ this->timerDown--;
}
- if (this->unk_228 == 0) {
- this->unk_230 = 0;
+ if (this->timerDown == 0) {
+ this->lockDown = false;
}
}
@@ -389,7 +409,7 @@ void Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
for (i = 0; i < 20; i++) {
GfxPrint_SetPos(printer, 9, i + 4);
- scene = ((this->unk_20C + i) + this->count) % this->count;
+ scene = (this->topDisplayedScene + i + this->count) % this->count;
if (scene == this->currentScene) {
GfxPrint_SetColor(printer, 255, 20, 20, 255);
} else {
@@ -409,32 +429,32 @@ void Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
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"
+static const 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"
+ "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_SetPos(printer, 10, 15);
GfxPrint_SetColor(printer, 255, 255, 255, 255);
randomMsg = Rand_ZeroOne() * ARRAY_COUNT(sLoadingMessages);
GfxPrint_Printf(printer, "%s", sLoadingMessages[randomMsg]);
}
-static char* sAgeLabels[] = {
+static const char* sAgeLabels[] = {
"\x8D"
"17(ワカモノ)", // "17(young)"
"\x8D"
@@ -575,7 +595,7 @@ void Select_Main(GameState* thisx) {
}
void Select_Destroy(GameState* thisx) {
- osSyncPrintf("%c", 7);
+ osSyncPrintf("%c", '\a'); // ASCII BEL character, plays an alert tone
// "view_cleanup will hang, so it won't be called"
osSyncPrintf("*** view_cleanupはハングアップするので、呼ばない ***\n");
}
@@ -588,34 +608,34 @@ void Select_Init(GameState* thisx) {
this->state.main = Select_Main;
this->state.destroy = Select_Destroy;
this->scenes = sScenes;
- this->unk_20C = 0;
+ this->topDisplayedScene = 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->pageDownStops[0] = 0; // Hyrule Field
+ this->pageDownStops[1] = 19; // Temple Of Time
+ this->pageDownStops[2] = 37; // Treasure Chest Game
+ this->pageDownStops[3] = 51; // Gravekeeper's Hut
+ this->pageDownStops[4] = 59; // Zora Shop
+ this->pageDownStops[5] = 73; // Bottom of the Well
+ this->pageDownStops[6] = 91; // Escaping Ganon's Tower 3
+ this->pageDownIndex = 0;
this->opt = 0;
- this->count = 126;
+ this->count = ARRAY_COUNT(sScenes);
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->view.flags = (0x08 | 0x02);
+ this->verticalInputAccumulator = 0;
+ this->verticalInput = 0;
+ this->timerUp = 0;
+ this->timerDown = 0;
+ this->lockUp = 0;
+ this->lockDown = 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);
+ this->topDisplayedScene = dREG(81);
+ this->pageDownIndex = dREG(82);
}
R_UPDATE_RATE = 1;