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
Document pause page switching #1550
Conversation
pauseCtx->alpha = 255; | ||
Interface_LoadActionLabelB(play, DO_ACTION_SAVE); | ||
} else if (pauseCtx->unk_1EA == 64) { | ||
} else if (pauseCtx->switchPageTimer == (4 * 16 * 1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do these 3 numbers mean for the timer? The (4 * 16)
appears a few times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timer increases in increments of 4
pauseCtx->switchPageTimer += 4 * ZREG(46);
(ZREG(46)
is always 1)
-> hence 4*16
The if before this else has (4 * 16 * ZREG(47))
and ZREG(47)
is always 1
-> so the 4*16*1
is for symmetry
I assume at some point the dev tried ZREG(47)
== 2 or 3 (or whatever) then this else if would pass at (resp.) 1/2 or 1/3rd of the full animation but idk
(note inside this else if is dead code as the existing "
`ZREG(47)` is always 1 so this normally never happens
" comment tries to say, is it unclear?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
16 is now a macro: PAGE_SWITCH_NSTEPS
#define SWITCH_PAGE_LEFT_PT 0 | ||
#define SWITCH_PAGE_RIGHT_PT 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the PT
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It comes from this debug string
osSyncPrintf("kscope->kscp_pos+pt = %d\n", pauseCtx->pageIndex + pt); |
PT values are for the pt variable
I guess I could rename it to direction or something maybe?
Pure guess with no proof: maybe "pt" stands for "page turn" 8)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for review delay. Distracted by retail, and also this stuff is pretty intimidating.
My comments may come from a place of ignorance, as I have not put as much time into learning how this system works as you have. But I guess its a good test for trying to make the docs understandable to someone new.
I added a bunch more docs/comments, lmk if it helps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these explanations are what I needed, thanks.
Small suggestion with ascii art below
No description provided.