mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-26 22:40:33 +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(), ``` |
||
---|---|---|
.. | ||
psx | ||
asset_config.go | ||
build.go | ||
cutscene.go | ||
data_range.go | ||
go.mod | ||
go.sum | ||
graphics.go | ||
layer.go | ||
layout.go | ||
main.go | ||
paths.go | ||
room.go | ||
sprites.go | ||
tile_def.go | ||
tile_map.go | ||
utils.go |