Add comments for some music and movie file functions - #3220
Conversation
- no code changes, comments only
| &g_StreamInfo0, | ||
| &g_StreamInfo1, | ||
| &g_StreamInfo2, | ||
| &g_StreamInfo3, |
There was a problem hiding this comment.
Nice work!
I think we could probably rename these to reference the specific cinematics you found rather than generically named
JoshSchreuder
left a comment
There was a problem hiding this comment.
Looks good to me, nice research! I think this opens up the door to a number of renames to make the code clearer
| CSOP_LOAD_PORTRAIT, | ||
| CSOP_SCRIPT_UNKNOWN_20, | ||
|
|
||
| CSOP_SCRIPT_UNKNOWN_20, // same as CSOP_PLAY_SOUND, but always runs |
There was a problem hiding this comment.
Probably we could rename this something like CSOP_PLAY_SOUND_IGNORE_SKIP or similar
| CSOP_WAIT_FOR_SOUND, // wait for CD audio playback to begin | ||
| // (does nothing if cutscene is being skipped) | ||
|
|
||
| CSOP_SCRIPT_UNKNOWN_11, // wait for CD audio playback to stop |
There was a problem hiding this comment.
Similarly here we could probably rename this as CSOP_WAIT_FOR_SOUND_BEGIN and CSOP_WAIT_FOR_SOUND_END
| extern u8 g_SfxScriptModeCopy[4]; | ||
| extern u32 g_DebugCurPal; | ||
| extern s16 D_8013901C; | ||
| extern s16 D_8013901C; // likely: "has CD music actually started playing?" |
There was a problem hiding this comment.
Let's name it and it can be iterated on later g_XaPlaying for example could work
| // seems like: cutscenes and dialogue tend to use this after starting a music | ||
| // track to wait until playback has actually started (or, to wait to know a | ||
| // playing track that was requested to stop has actually ended) | ||
| bool func_80131F68(void) { |
There was a problem hiding this comment.
name IsXaPlaying or similar?
| // Sectors:23113-24544, Size:2932736 | ||
| // - Video: Sectors:23113-24543, Frame Count:143, Sector Frames:23113-24534 | ||
| // - audio: Sectors:23120-24240 | ||
| StreamInfo g_StreamInfo0 = { |
There was a problem hiding this comment.
If we know what these are now let's just give them names? g_LogoStreamInfo etc.
|
Waiting for @binary1230 answer to feedback before merging |
(resubmitted after lint and branch fix on fork)
No actual code changes, just filling in some comments around:
Future work:
A. The cutscene code is duplicated all over the place, I just added the comments in one section only for now. I might take a stab at de-duplicating it later.
B. We could probably safely rename a few things but... I'm not quite sure that's the only meaning of this is related to music (it PROBABLY is). Those renames would be: