mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-10-07 02:24:01 +00:00
f86e111fc5
More research on how cutscenes work. I normalized all the various C files as `cutscene.c`, marked all the isolated function as `static` and renamed the main entity as `{STAGE}_CutsceneExec` (e.g. `CEN_CutsceneExec`). I am using the `OVL_EXPORT` to automate the names. TO-DO: - [x] Rename entity as `{STAGE}_EntityCutscene` for consistency - [x] CEN - [x] DRE - [x] NO3 - [x] NZ0 - [x] ST0 - [x] MAR ~~SEL~~ The offset of the portrait data seems to be hardcoded. I have no idea how to resolve these offsets at compilation time. The entire cutscene script thing is very sketchy and horribly designed by the original developers. What a nightmare to integrate into our project. This is how a cutscene script gets decompiled: ``` LOAD_PORTRAIT(0x80188D8C, 0), SET_PORTRAIT(1, 0), SCRIPT_UNKNOWN_11(), PLAY_SOUND(0x37B), WAIT_FOR_SOUND(), SET_SPEED(4), 'T','h','a','t',' ','v','o','i','c','e','!',' ', SET_WAIT(16), SET_SPEED(3), 'A','l','u','c','a','r','d',',', LINE_BREAK(), SET_WAIT(16), SET_FLAG(2), 'i','t','\'','s',' ','y','o','u','!', SET_WAIT(48), NEXT_DIALOG(), ``` |
||
---|---|---|
.. | ||
psxsdk | ||
saturn | ||
bios.h | ||
common.h | ||
cutscene.h | ||
disk.h | ||
entity.h | ||
game.h | ||
gte.inc | ||
include_asm.h | ||
items.h | ||
lba.h | ||
log.h | ||
macro.inc | ||
main.inc | ||
memcard.h | ||
objects.h | ||
player.h | ||
primitive.h | ||
servant.h | ||
settings.h | ||
sfx.h | ||
stage.h | ||
types.h | ||
unkstruct.h | ||
weapon.h |