sotn-decomp/include
Luciano Ciccariello f86e111fc5
Extract cutscene scripts, portraits and normalize code (#1686)
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(),
```
2024-09-28 19:56:35 -07:00
..
psxsdk Decompile remaining functions in libgte reg03.c (#1599) 2024-09-13 10:39:42 -07:00
saturn Decompile func_06010008 (#366) 2023-07-17 21:22:21 +01:00
bios.h Replace BIOS Trampolines (#1133) 2024-05-17 08:45:26 +01:00
common.h RIC blueprint docs (#1577) 2024-09-07 01:29:56 +01:00
cutscene.h Extract cutscene scripts, portraits and normalize code (#1686) 2024-09-28 19:56:35 -07:00
disk.h Decompile PrologueScroll (#1358) 2024-06-27 19:52:31 -07:00
entity.h Decompile func_ptr_80170008_w_030 (#1676) 2024-09-28 01:53:55 -07:00
game.h Extract cutscene scripts, portraits and normalize code (#1686) 2024-09-28 19:56:35 -07:00
gte.inc Update splat (#247) 2023-06-12 06:04:25 +01:00
include_asm.h Add BOSS/MAR.BIN (#1608) 2024-09-15 21:49:56 +01:00
items.h Add AGPL license (#1565) 2024-09-06 16:14:55 -04:00
lba.h Add AGPL license (#1565) 2024-09-06 16:14:55 -04:00
log.h Update clang-format as self-contained binary (#1257) 2024-06-04 21:07:50 +01:00
macro.inc Use allegrex assembler for PSP (#1424) 2024-07-22 15:36:28 -04:00
main.inc Upload disassembly 2022-01-02 13:35:44 +00:00
memcard.h Add AGPL license (#1565) 2024-09-06 16:14:55 -04:00
objects.h MAD quick matches (#1287) 2024-06-08 23:02:00 +01:00
player.h Update clang-format as self-contained binary (#1257) 2024-06-04 21:07:50 +01:00
primitive.h Decompile EntityMariaCutscene of boss/mar (#1649) 2024-09-22 10:20:23 +01:00
servant.h Deduplicate tt_001 functions with tt_000 (#1681) 2024-09-26 19:45:06 -07:00
settings.h Update clang-format as self-contained binary (#1257) 2024-06-04 21:07:50 +01:00
sfx.h More sfxIDs (#1665) 2024-09-24 09:45:53 -07:00
stage.h Move Some cen Data to Logical Compile Unit (#1492) 2024-08-09 10:30:12 +01:00
types.h Enable spu init (#1344) 2024-06-19 09:37:07 -07:00
unkstruct.h RIC blueprint docs (#1577) 2024-09-07 01:29:56 +01:00
weapon.h Decompile w58 (Alucart Shield) Shield Spell (#1439) 2024-07-26 19:13:51 +01:00