Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation pass on the pause menu (kaleido_scope) #1366

Draft
wants to merge 151 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
9a5ca68
wip
Dragorn421 Aug 22, 2022
38cf1d0
Merge branch 'master' into doc_pause_menu
Dragorn421 Aug 26, 2022
118e3f8
wip 2, lots on `KaleidoScope_DrawQuestStatus`
Dragorn421 Aug 26, 2022
8ddd1c1
wip 3, comments in `KaleidoScope_DrawQuestStatus` and starting to fig…
Dragorn421 Aug 27, 2022
5337edd
Some doc, some regs, some bulk rename of wip enums, add enum for `R_P…
Dragorn421 Aug 28, 2022
c143fe8
Name a few more things, more KaleidoScope_DrawQuestStatus touches
Dragorn421 Aug 28, 2022
a02cbf5
Merge branch 'master' into doc_pause_menu
Dragorn421 Aug 28, 2022
236c060
Look at pause menu startup (wip)
Dragorn421 Aug 29, 2022
9ebd76d
`R_PAUSE_MENU_MODE` -> `R_PAUSE_BG_PRERENDER_STATE` and document values
Dragorn421 Aug 29, 2022
5fdf0f5
Some doActionSegment usage cleanup to check `R_START_LABEL_`
Dragorn421 Aug 29, 2022
4330108
Name pause states except saving/gameover and related/misc docs
Dragorn421 Aug 29, 2022
23d2ce1
idle -> `PAUSE_STATE_MAIN` and substates -> `PAUSE_MAIN_STATE_`, `mai…
Dragorn421 Aug 29, 2022
e8eb909
cleanup/finalize known main substates names
Dragorn421 Aug 29, 2022
1c6b7b0
`PAUSE_STATE_SAVE_PROMPT` and substates `PAUSE_SAVE_PROMPT_STATE_` an…
Dragorn421 Aug 29, 2022
739397f
cleanup
Dragorn421 Aug 29, 2022
d3ed4be
PauseContext: stickRel -> stickAdj
Dragorn421 Aug 29, 2022
0678609
Merge branch 'master' into doc_pause_menu
Dragorn421 Aug 30, 2022
1d546b3
format
Dragorn421 Aug 30, 2022
dfe0b2e
Fix merge
Dragorn421 Aug 30, 2022
c7ba9ad
Merge branch 'master' into doc_pause_menu
Dragorn421 Sep 4, 2022
306dbb6
Merge branch 'master' into doc_pause_menu
Dragorn421 Oct 7, 2022
4eae3ca
Merge branch 'master' into doc_pause_menu
Dragorn421 Oct 12, 2022
a831003
Doc page switch data and macros for age reqs
Dragorn421 Oct 12, 2022
67d7a4e
Figure out more of questVtx
Dragorn421 Oct 12, 2022
eee7850
doc page bg drawing / vtx making
Dragorn421 Oct 12, 2022
631f6d2
Merge branch 'master' into doc_pause_menu
Dragorn421 Oct 15, 2022
932e586
Merge branch 'master' into doc_pause_menu
Dragorn421 Oct 19, 2022
9bbdbcc
Merge branch 'master' into doc_pause_menu
Dragorn421 Oct 23, 2022
f8589bb
mainSubState -> mainState
Dragorn421 Oct 23, 2022
f8dcfc8
savePromptSubState -> savePromptState
Dragorn421 Oct 23, 2022
5b4137d
`rollRotPage*` -> `*PageRoll`
Dragorn421 Oct 23, 2022
957e702
`_SONG_PLAYER_PLAYING` -> `_SONG_PROMPT`
Dragorn421 Oct 23, 2022
69d723e
Add `IS_PAUSE_STATE_GAMEOVER` macro
Dragorn421 Oct 23, 2022
63d5494
bits
Dragorn421 Oct 23, 2022
3ac4a29
gameover states cleanup
Dragorn421 Oct 23, 2022
ac3a7e2
Merge branch 'master' into doc_pause_menu
Dragorn421 Oct 31, 2022
40538e7
some more bits on questpage
Dragorn421 Oct 31, 2022
ae89ec3
some cursorVtx doc
Dragorn421 Oct 31, 2022
f0a2b4f
figure out equipVtx
Dragorn421 Oct 31, 2022
6c77a9f
more equips page docs
Dragorn421 Oct 31, 2022
8c871e7
figure out a whole bunch of world map stuff
Dragorn421 Nov 1, 2022
32bde43
itemVtx quads and item page logics docs
Dragorn421 Nov 13, 2022
c57e145
`_InitVertices` -> `_SetVertices`
Dragorn421 Nov 13, 2022
b7f8f9a
`@bug` loading too many verts
Dragorn421 Nov 13, 2022
e40d588
saveVtx -> promptPageVtx and doc prompt quads
Dragorn421 Nov 13, 2022
359dfdb
`QUAD_QUEST_SKULL_TOKENS_AMOUNT_` -> `QUAD_QUEST_SKULL_TOKENS_`
Dragorn421 Nov 13, 2022
929724c
Merge branch 'master' into doc_pause_menu
Dragorn421 Nov 14, 2022
f752add
Merge branch 'master' into doc_pause_menu
Dragorn421 Nov 16, 2022
c8d0ca5
Add `IS_PAUSED` macro
Dragorn421 Nov 16, 2022
7af4298
Merge branch 'master' into doc_pause_menu
Dragorn421 Nov 17, 2022
5bd4d4d
Merge commit '274743738b0db3a07612d610059ee2490728667e' into doc_paus…
Dragorn421 Nov 27, 2022
5e38f2c
Merge commit 'eb0a82c513a2681de3aa92db623f60630689a525' into doc_paus…
Dragorn421 Nov 27, 2022
9863650
Merge branch 'master' into doc_pause_menu
Dragorn421 Nov 27, 2022
11e5a6c
Merge branch 'master' into doc_pause_menu
Dragorn421 Dec 2, 2022
61c4864
Merge branch 'master' into doc_pause_menu
Dragorn421 Dec 11, 2022
b4d3d1d
Merge branch 'master' into doc_pause_menu
Dragorn421 Dec 13, 2022
f8e8e58
Merge branch 'master' into doc_pause_menu
Dragorn421 Dec 19, 2022
7e32d9a
Merge branch 'master' into doc_pause_menu
Dragorn421 Dec 19, 2022
86a0ee0
Merge branch 'master' into doc_pause_menu
Dragorn421 Dec 20, 2022
a49731d
Merge branch 'master' into doc_pause_menu
Dragorn421 Dec 26, 2022
ae8cc17
Merge branch 'master' (early part) into doc_pause_menu
Dragorn421 Dec 30, 2022
4b2e9ce
Merge branch 'master' into doc_pause_menu
Dragorn421 Dec 30, 2022
6be902c
Merge branch 'master' into doc_pause_menu
Dragorn421 Jan 13, 2023
eb75e00
Merge branch 'master' into doc_pause_menu
Dragorn421 Jun 27, 2023
47bd5d9
Merge branch 'master' (early part) into doc_pause_menu
Dragorn421 Aug 15, 2023
121fc8f
Merge branch 'master' (early part) into doc_pause_menu
Dragorn421 Aug 15, 2023
fe43e33
Merge branch 'master' into doc_pause_menu
Dragorn421 Aug 15, 2023
d8440eb
format
Dragorn421 Aug 15, 2023
6b3e8d4
Merge commit 'd314cfe92395172612676a8ad007a0639c8d5666^' into doc_pau…
Dragorn421 Sep 20, 2023
74b74eb
Merge commit 'd314cfe92395172612676a8ad007a0639c8d5666' into doc_paus…
Dragorn421 Sep 20, 2023
d436136
Merge branch 'master' into doc_pause_menu
Dragorn421 Sep 20, 2023
7adb623
minor things/notes
Dragorn421 Sep 22, 2023
a2c5d8f
Merge branch 'main' (early part) into doc_pause_menu
Dragorn421 Sep 22, 2023
b4a7023
Merge branch 'main' (early part) into doc_pause_menu
Dragorn421 Sep 22, 2023
27bdb37
Merge branch 'main' (early part) into doc_pause_menu
Dragorn421 Sep 22, 2023
16dabb1
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 22, 2023
0e32070
Merge commit 'c73e2ab72618b01c96f63868a8f1001e86eaa461' into doc_paus…
Dragorn421 Nov 4, 2023
6b87848
Merge commit 'fefeb369dd19172d5eb419f8c8373cfb10d59d19' into doc_paus…
Dragorn421 Nov 4, 2023
ae80344
Merge branch 'main' into doc_pause_menu
Dragorn421 Nov 4, 2023
4f31278
Merge remote-tracking branch 'origin/doc_pause_menu' into doc_pause_menu
Dragorn421 Nov 4, 2023
4b1f978
investigated significance of garbage cursor position in magic arrows …
Dragorn421 Nov 4, 2023
f53d0ad
Merge commit '324db1d57830dcb2a45720445ac5d7904a6f5c6a^' into doc_pau…
Dragorn421 Jan 27, 2024
96aa181
Merge commit '324db1d57830dcb2a45720445ac5d7904a6f5c6a' into doc_paus…
Dragorn421 Jan 27, 2024
20c7fde
Merge branch 'main' into doc_pause_menu
Dragorn421 Jan 27, 2024
7405351
Merge branch 'main' into doc_pause_menu
Dragorn421 Feb 5, 2024
77d9a1e
Merge branch 'main' into doc_pause_menu
Dragorn421 Feb 28, 2024
4ee4b93
Merge branch 'main' into doc_pause_menu
Dragorn421 Mar 9, 2024
eca2c3e
Merge commit '39de6ce293d4f2ea31013a746404d730aca3f061' into doc_paus…
Dragorn421 Aug 1, 2024
0561d05
Merge commit '8456e4be8a61c586b84476e7b17a32d971099593' into doc_paus…
Dragorn421 Aug 1, 2024
3786fa4
Merge commit 'f643499462f8cf908ddf1ee77b5625ebaff2cf25' into doc_paus…
Dragorn421 Aug 1, 2024
2b24b8a
Merge commit '87a6e752429a7821ae81dcf8bffc6cdf13803084' into doc_paus…
Dragorn421 Aug 1, 2024
43931de
Merge commit '05c87518e7ef5b6f12792c38975aa6a06cbaaf60' into doc_paus…
Dragorn421 Aug 1, 2024
dc59991
Merge commit 'b2d80568b9f1a1e59e9e00f29d3936c7cd7e18c3' into doc_paus…
Dragorn421 Aug 1, 2024
1a5eb5c
Merge commit 'd8f2e9abc67163a366fa2e62ac5d2d7467dfdb65' into doc_paus…
Dragorn421 Aug 1, 2024
73ba1f8
Merge commit '24571203df84c3294c8410260160cd5a3e9cfa68' into doc_paus…
Dragorn421 Aug 1, 2024
2b425df
Merge commit '1b0e35c89ad8875272a568ae4ab1e301e99e9316' into doc_paus…
Dragorn421 Aug 1, 2024
7e49dfc
Merge commit 'baf1e8c1748b6440e5d594a8d0079d4eb2e3acee' into doc_paus…
Dragorn421 Aug 1, 2024
b6581fd
Merge commit 'bf3339a16d6bf1d48165853540f20aebfdf5367a' into doc_paus…
Dragorn421 Aug 1, 2024
74c4839
Merge commit 'ab2ca85227bb4ed245d3a39faedc25f793a39a45' into doc_paus…
Dragorn421 Aug 1, 2024
9169d88
Merge commit '7fcbf3f4b280e26284a8f62dbcb5b72d0e24dcc4' into doc_paus…
Dragorn421 Aug 1, 2024
4dd0649
Merge commit '8ee485d2e7b237a785ac0cf3870117944c923a07' into doc_paus…
Dragorn421 Aug 1, 2024
594e461
merge fixup
Dragorn421 Aug 1, 2024
c750eca
merge fixup 2
Dragorn421 Aug 1, 2024
cc7eef6
fix zfishing bss
Dragorn421 Aug 1, 2024
b5f68ac
Merge branch 'main' into doc_pause_menu
Dragorn421 Aug 11, 2024
d1c0e51
Merge branch 'main' into doc_pause_menu (but has bss issues for some …
Dragorn421 Aug 21, 2024
f476d67
bss
Dragorn421 Aug 21, 2024
d44ef53
format
Dragorn421 Aug 21, 2024
2a15686
better bss workaround
Dragorn421 Aug 21, 2024
fd7e858
Merge branch 'main' into doc_pause_menu
Dragorn421 Aug 22, 2024
538a12b
Merge branch 'main' into doc_pause_menu
Dragorn421 Aug 24, 2024
477a4cc
post-merge doc
Dragorn421 Aug 24, 2024
572bc4a
Merge branch 'main' (early part) into doc_pause_menu
Dragorn421 Sep 4, 2024
1aac857
Merge branch 'main' (early part) into doc_pause_menu
Dragorn421 Sep 4, 2024
1fb2dbd
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 4, 2024
0d027e7
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 4, 2024
d3a5e44
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 4, 2024
66a9ea6
disasm metadata
Dragorn421 Sep 4, 2024
e25b150
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 4, 2024
42f1446
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 4, 2024
657eb68
bss
Dragorn421 Sep 4, 2024
2c94444
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 5, 2024
b9bf859
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 7, 2024
e7e1b6a
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 7, 2024
33303e7
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 7, 2024
b37fe1a
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 7, 2024
8627347
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 8, 2024
488d04d
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 11, 2024
04fc09f
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 12, 2024
172c4a8
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 18, 2024
6fe4a7f
make a note that KaleidoScope_DrawQuestStatus (at least) doesnt match…
Dragorn421 Sep 18, 2024
721b2a2
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 22, 2024
d7a7fa7
Merge branch 'main' into doc_pause_menu (still not ok)
Dragorn421 Sep 24, 2024
80c4e7b
revert KaleidoScope_DrawQuestStatus for OK
Dragorn421 Sep 24, 2024
f0aab87
carry over KaleidoScope_DrawQuestStatus docs
Dragorn421 Sep 24, 2024
047f014
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 25, 2024
19f0e66
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 26, 2024
75a5337
QUAD_x -> x_QUAD
Dragorn421 Sep 26, 2024
9e561be
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 26, 2024
eff20d0
rm AMMO_{FIRST,MAX,LAST}, _UNITS -> _ONES
Dragorn421 Sep 27, 2024
daaf6d2
add back ITEM_QUAD_AMMO_FIRST (oops)
Dragorn421 Sep 27, 2024
b66aa1f
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 27, 2024
2a496cd
Merge branch 'main' into doc_pause_menu
Dragorn421 Sep 30, 2024
3a310c9
Merge branch 'main' into doc_pause_menu
Dragorn421 Oct 7, 2024
ed51494
misc fixups
Dragorn421 Oct 7, 2024
cfac89e
remove state comments
Dragorn421 Oct 7, 2024
9de0681
remove (main) state comments
Dragorn421 Oct 7, 2024
447dd89
rm PauseMenuPage comments
Dragorn421 Oct 7, 2024
0d063f6
remove (save prompt) state comment
Dragorn421 Oct 7, 2024
052e00a
Merge branch 'main' into doc_pause_menu
Dragorn421 Oct 9, 2024
1c12ec2
Merge branch 'main' into doc_pause_menu
Dragorn421 Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions include/regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
#define R_EPONAS_SONG_PLAYED DREG(53)
#define R_MAGIC_FILL_COLOR(i) ZREG(0 + (i))
#define R_PAUSE_PAGE_SWITCH_FRAME_ADVANCE_ON ZREG(13)
#define R_PAUSE_CURSOR_L_R_SELECTED_PRIM_TIMER ZREG(28)
#define R_C_BTN_COLOR(i) ZREG(39 + (i))
#define R_B_BTN_COLOR(i) ZREG(43 + (i))
#if OOT_NTSC
Expand Down Expand Up @@ -186,12 +187,19 @@
#define R_B_LABEL_DD WREG(0)
#define R_PAUSE_PAGES_Y_ORIGIN_2 WREG(2) // Complements PauseContext.pagesYOrigin1
#define R_PAUSE_DEPTH_OFFSET WREG(3) // Offset position of all pages away from the camera
#define R_PAUSE_UI_ANIM_ALPHA_ADD_DURATION WREG(4)
#define R_PAUSE_UI_ANIMS_DURATION WREG(6)
#if OOT_NTSC
#define R_B_LABEL_SCALE(i) WREG(8 + (i))
#define R_B_LABEL_X(i) WREG(10 + (i))
#define R_B_LABEL_Y(i) WREG(12 + (i))
#define R_A_LABEL_Z(i) WREG(14 + (i))
#endif
#define R_PAUSE_CURSOR_LEFT_X WREG(16)
#define R_PAUSE_CURSOR_RIGHT_X WREG(17)
#define R_PAUSE_CURSOR_LEFT_RIGHT_Y WREG(18)
#define R_PAUSE_CURSOR_LEFT_MOVE_OFFSET_X WREG(25)
#define R_PAUSE_CURSOR_RIGHT_MOVE_OFFSET_X WREG(26)
#define R_OW_MINIMAP_X WREG(29)
#define R_OW_MINIMAP_Y WREG(30)
#define R_MINIMAP_DISABLED WREG(31)
Expand All @@ -209,6 +217,8 @@
#endif
#define R_DGN_MINIMAP_X WREG(68)
#define R_DGN_MINIMAP_Y WREG(69)
#define R_PAUSE_NAME_DISPLAY_TIMER_MAX_ WREG(88)
#define R_PAUSE_NAME_DISPLAY_TIMER_THRESHOLD_ WREG(89)
#define R_TEXTBOX_X VREG(0)
#define R_TEXTBOX_Y VREG(1)
#define R_TEXTBOX_CLEF_XPOS VREG(7)
Expand Down
4 changes: 3 additions & 1 deletion include/z64pause.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ typedef enum PauseMenuPage {

#define PAUSE_EQUIP_PLAYER_WIDTH 64
#define PAUSE_EQUIP_PLAYER_HEIGHT 112
#define PAUSE_EQUIP_PLAYER_FRAG_HEIGHT (TMEM_SIZE / (PAUSE_EQUIP_PLAYER_WIDTH * G_IM_SIZ_16b_BYTES))
#define PAUSE_EQUIP_PLAYER_FRAG_NUM (((PAUSE_EQUIP_PLAYER_HEIGHT - 1) / PAUSE_EQUIP_PLAYER_FRAG_HEIGHT) + 1)

#define PAUSE_EQUIP_BUFFER_SIZE sizeof(u16[PAUSE_EQUIP_PLAYER_HEIGHT][PAUSE_EQUIP_PLAYER_WIDTH])
#define PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE 0x5000
Expand Down Expand Up @@ -92,7 +94,7 @@ typedef enum PauseMainState {
/* 4 */ PAUSE_MAIN_STATE_SONG_PROMPT_INIT, // Start the prompt for the player to play the song.
/* 5 */ PAUSE_MAIN_STATE_SONG_PROMPT, // Waiting for the player to play the song.
/* 6 */ PAUSE_MAIN_STATE_SONG_PROMPT_DONE, // The song prompt is done, the player either played the song successfully or made a mistake.
/* 7 */ PAUSE_MAIN_STATE_7,
/* 7 */ PAUSE_MAIN_STATE_EQUIP_CHANGED,
/* 8 */ PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG, // Like PAUSE_MAIN_STATE_IDLE, but the quest page is active and the cursor is positioned on a song.
/* 9 */ PAUSE_MAIN_STATE_SONG_PLAYBACK_START // Start playing the song back to the player.
} PauseMainState;
Expand Down
20 changes: 10 additions & 10 deletions src/code/z_construct.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void Regs_InitDataImpl(void) {
ZREG(25) = 4;
ZREG(26) = 20;
ZREG(27) = 10;
ZREG(28) = 20;
R_PAUSE_CURSOR_L_R_SELECTED_PRIM_TIMER = 20;
ZREG(29) = 4;
ZREG(30) = 20;
ZREG(31) = 10;
Expand Down Expand Up @@ -507,9 +507,9 @@ void Regs_InitDataImpl(void) {
XREG(95) = 200;
R_PAUSE_PAGES_Y_ORIGIN_2 = -6080;
R_PAUSE_DEPTH_OFFSET = 9355;
WREG(4) = 8;
R_PAUSE_UI_ANIM_ALPHA_ADD_DURATION = 8;
WREG(5) = 3;
WREG(6) = 8;
R_PAUSE_UI_ANIMS_DURATION = 8;
WREG(7) = 0;

#if OOT_NTSC
Expand All @@ -533,17 +533,17 @@ void Regs_InitDataImpl(void) {
WREG(15) = -350;
#endif

WREG(16) = -175;
WREG(17) = 155;
WREG(18) = 10;
R_PAUSE_CURSOR_LEFT_X = -175;
R_PAUSE_CURSOR_RIGHT_X = 155;
R_PAUSE_CURSOR_LEFT_RIGHT_Y = 10;
WREG(19) = 10;
WREG(20) = -50;
WREG(21) = -54;
WREG(22) = -32;
WREG(23) = -38;
WREG(24) = -36;
WREG(25) = 40;
WREG(26) = -40;
R_PAUSE_CURSOR_LEFT_MOVE_OFFSET_X = 40;
R_PAUSE_CURSOR_RIGHT_MOVE_OFFSET_X = -40;
WREG(27) = 0;
WREG(28) = 0;
R_OW_MINIMAP_X = 238;
Expand Down Expand Up @@ -590,8 +590,8 @@ void Regs_InitDataImpl(void) {
R_DGN_MINIMAP_X = 204;
R_DGN_MINIMAP_Y = 140;
WREG(87) = 80;
WREG(88) = 70;
WREG(89) = 40;
R_PAUSE_NAME_DISPLAY_TIMER_MAX_ = 70;
R_PAUSE_NAME_DISPLAY_TIMER_THRESHOLD_ = 40;
WREG(90) = 320;
WREG(91) = 40;
WREG(92) = 3;
Expand Down
2 changes: 2 additions & 0 deletions src/code/z_debug.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "global.h"

#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0"

typedef struct DebugCamTextBufferEntry {
/* 0x0 */ u8 x;
/* 0x1 */ u8 y;
Expand Down
13 changes: 8 additions & 5 deletions src/code/z_kaleido_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ void KaleidoSetup_Update(PlayState* play) {
// The start button was pressed, pause
gSaveContext.prevHudVisibilityMode = gSaveContext.hudVisibilityMode;

WREG(16) = -175;
WREG(17) = 155;
R_PAUSE_CURSOR_LEFT_X = -175;
R_PAUSE_CURSOR_RIGHT_X = 155;

pauseCtx->pageSwitchTimer = 0;

Expand Down Expand Up @@ -130,8 +130,11 @@ void KaleidoSetup_Init(PlayState* play) {
pauseCtx->state = PAUSE_STATE_OFF;
pauseCtx->debugState = 0;

// Setting the eye xz here is irrelevant, it's set on pausing in KaleidoSetup_Update
// x = -PAUSE_EYE_DIST * PAUSE_ITEM_X
pauseCtx->eye.x = pauseCtx->eye.y = 0.0f;
pauseCtx->eye.z = 64.0f;
pauseCtx->eye.z = -PAUSE_EYE_DIST * PAUSE_ITEM_Z;

pauseCtx->promptDepthOffset = 936.0f;
pauseCtx->itemPagePitch = pauseCtx->equipPagePitch = pauseCtx->mapPagePitch = pauseCtx->questPagePitch = 160.0f;

Expand All @@ -154,8 +157,8 @@ void KaleidoSetup_Init(PlayState* play) {
pauseCtx->cursorY[PAUSE_MAP] = 0;
pauseCtx->cursorX[PAUSE_QUEST] = 0;
pauseCtx->cursorY[PAUSE_QUEST] = 0;
pauseCtx->cursorX[PAUSE_EQUIP] = 1;
pauseCtx->cursorY[PAUSE_EQUIP] = 0;
pauseCtx->cursorX[PAUSE_EQUIP] = EQUIP_VALUE_SWORD_KOKIRI;
pauseCtx->cursorY[PAUSE_EQUIP] = EQUIP_TYPE_SWORD;

pauseCtx->cursorItem[PAUSE_ITEM] = PAUSE_ITEM_NONE;
pauseCtx->cursorItem[PAUSE_MAP] = VREG(30) + 3;
Expand Down
6 changes: 3 additions & 3 deletions src/overlays/actors/ovl_En_Mag/z_en_mag.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ void EnMag_Init(Actor* thisx, PlayState* play) {
this->fadeOutAlphaStep = 10;

VREG(19) = 99;
VREG(21) = 9;
VREG(23) = 10;
VREG(24) = 8;
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = 9;
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = 10;
R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = 8;

this->effectScroll = 0;
this->unk_E30C = 0;
Expand Down
9 changes: 9 additions & 0 deletions src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,15 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {

KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx);

// Handle part of the ocarina songs playback

if ((pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) &&
(pauseCtx->cursorSpecialPos == 0)) {
if ((cursor >= QUEST_SONG_MINUET) && (cursor < QUEST_KOKIRI_EMERALD)) {
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
// The cursor is on a learned song
// Set some things up for song playback

cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
pauseCtx->ocarinaSongIdx = gOcarinaSongItemMap[cursor - QUEST_SONG_MINUET];
sPlaybackSongStartDelayTimer = 10;
Expand All @@ -297,6 +302,9 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
}
sPlayedSongBtnsNum = 0;

// Have the player play a song, immediately cancelled below
// Also clear the playback staff
// This has no purpose (?)
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_Start((1 << pauseCtx->ocarinaSongIdx) + 0x8000);
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
Expand All @@ -311,6 +319,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {

pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG;

// Stop having the player play a song as done above
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
}
Expand Down
Loading