oot/include
Leonid Kapitonov b11fdab792
Document `Save.cutsceneIndex` and adjacent data / code (#2286)
* introduce `enum CutsceneIndex` as a first step

* crudely rename `enum CutsceneIndex` entries

* run `check_format.py ...` separetely

so that it doesn't clutter previous commit. still, allowing `clangd LSP` to run format-on-save yields inconsistent results for me with the project's tooling, especially for header files

* apply a draft PR suggestion

Co-authored-by: mzxrules <mzxrules@gmail.com>

* rename `CS_INDEX_*` with PR suggestions

and some additional observations
reverified with
> `check_format.py ...`
> `make ...`

additionally:
- current clang-format lacks a rule for trailing commas
- compiler says about them `cfe: Warning 624`

* improve `CS_INDEX_*` naming, rem `ENTRANCE` suffix

https://github.com/zeldaret/oot/pull/2286#discussion_r1829165205

reverified with
> `check_format.py ...`
> `make ...`

* apply Jenkins fixes

https://jenkins.deco.mp/job/OOT/job/PR-2286/4/console

hmm, i do need this automation locally to

* apply a PR suggestion

https://github.com/zeldaret/oot/pull/2286#discussion_r1829219841

* remove redundant comments, fix the header comment

and add a comment chunk from https://github.com/zeldaret/oot/pull/2286#discussion_r1829108940

* rename the flag for freeing `nextCutsceneIndex`

* rename the flag for automatic `sceneLayer` calc

it gets assigned to the `nextCutsceneIndex`,
so `CS_INDEX_NONE` name was misleading

* use explicit scene layer names instead of numbers

* ok, now the last two `CS_INDEX_*` are less unknown

the purpose of `CS_INDEX_BARRIER` is not quite clear still

* apply Jenkins fixes

https://jenkins.deco.mp/job/OOT/job/PR-2286/14/console

* run `fix_bss` locally

`ntsc-1.2` refused to comply though

* revert all local to the branch bss shifts

* ugh, use defines instead of an enum

probably size of enum entries doesn't match well? originally these were
just numbers. besides, not like it's a real enumeration from zero to a
value or some bit flags

* still, add a BSS pragma for `z_demo.c`

* apply review changes

* factor out a cutscene layer formula

* give scene layers names throughout code

* apply Jenkins fixes

https://jenkins.deco.mp/job/OOT/job/PR-2286/32/console

* tweak `CS_INDEX` descriptions

* apply PR review suggestions

* rename "auto" -> "default"

* apply PR review suggestions

https://github.com/zeldaret/oot/pull/2286#discussion_r1868693980

essentially reverts 106cb1021b, except for 2 generic `z_scene.c` lines

* apply Jenkins fixes

https://jenkins.deco.mp/job/OOT/job/PR-2286/77/console

* Apply suggestions from code review

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: mzxrules <mzxrules@gmail.com>

* apply Jenkins fixes

https://jenkins.deco.mp/job/OOT/job/PR-2286/175/console

* Move CS_INDEX_* macros to z64save.h, with the definition of gSaveContext.save.cutsceneIndex

* `#define CS_INDEX_D 0xFFFD` and co.

Co-authored-by: cadmic <cadmic24@gmail.com>

* add comment on CS_INDEX_D

* review

* CS_INDEX_NONE is back

* bss

* expand comment about 0xFFFD

* fix comment about 0xFFFF usage

* review

---------

Co-authored-by: mzxrules <mzxrules@gmail.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: cadmic <cadmic24@gmail.com>
2025-06-17 15:54:52 +02:00
..
audio Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
libc [iQue] Define EGCS macro instead of relying on `__GNUC__` (#2423) 2025-01-13 08:32:25 -05:00
libc64 Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
libu64 Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
tables Finish matching ique-cn (#2451) 2025-02-04 06:55:04 -05:00
ultra64 Remove Variables.h; Decouple z64.h from global.h (#2507) 2025-04-19 22:04:08 -04:00
actor.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
actor_profile.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
alignment.h
animation.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
animation_legacy.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
array_count.h add array_count.h (#2514) 2025-04-26 18:17:02 -04:00
attributes.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
audio.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
audiomgr.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
audiothread_cmd.h SoundMode -> SoundOutputMode (#2475) 2025-03-27 01:47:44 -04:00
avoid_ub.h macros.h 3/5: Split various macros (#2512) 2025-04-25 21:12:35 -04:00
bgcheck.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
boot.h
buffers.h Delete macros.h; Delete global.h (#2516) 2025-04-27 12:48:11 -04:00
build.h variables.h: migrate all remaining varaibles, remove other dependencies except z64.h (#2505) 2025-04-16 08:22:42 -04:00
camera.h Introduce `CAM_DATA_SET_`, `CAM_ITEM_TYPE_` and name `Player_SetTurnAroundCamera`, `Player_RequestCameraSetting` (#2608) 2025-06-10 22:18:00 -04:00
carthandle.h variables.h: migrate all remaining varaibles, remove other dependencies except z64.h (#2505) 2025-04-16 08:22:42 -04:00
cic6105.h Fix some more GCC warnings, mark some bugs based on GCC warnings (#2309) 2024-12-02 04:40:49 -05:00
collision_check.h fixup rename hitBacklash (#2638) 2025-06-17 14:01:13 +02:00
color.h macros.h 3/5: Split various macros (#2512) 2025-04-25 21:12:35 -04:00
command_macros_base.h
console_logo_state.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
controller.h
curve.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
cutscene.h Document `Save.cutsceneIndex` and adjacent data / code (#2286) 2025-06-17 15:54:52 +02:00
cutscene_commands.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
cutscene_flags.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
cutscene_spline.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
db_camera.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
debug.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
debug_arena.h Reduce overlay dependencies on global.h (8) (#2478) 2025-02-19 05:54:39 -05:00
debug_display.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
dma.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
draw.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
effect.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
environment.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
face_change.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
face_reaction.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
fault.h macros.h 3/5: Split various macros (#2512) 2025-04-25 21:12:35 -04:00
file_select_state.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
flag_set.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
font.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
frame_advance.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
game.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
game_over.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
gamealloc.h Reduce overlay dependencies on global.h (8) (#2478) 2025-02-19 05:54:39 -05:00
gfx.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
gfx_setupdl.h
gfxalloc.h
horse.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
ichain.h
idle.h variables.h: migrate all remaining varaibles, remove other dependencies except z64.h (#2505) 2025-04-16 08:22:42 -04:00
inflate.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
interface.h Commit `do_action_static` (#2597) 2025-06-07 21:31:57 -04:00
inventory.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
irqmgr.h Reduce dependencies on global.h (10) (#2490) 2025-02-26 17:18:30 -05:00
is_debug.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
item.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
jpeg.h
kaleido_manager.h
kanread.h Reduce overlay dependencies on global.h (8) (#2478) 2025-02-19 05:54:39 -05:00
language_array.h macros.h 3/5: Split various macros (#2512) 2025-04-25 21:12:35 -04:00
letterbox.h
lifemeter.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
light.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
line_numbers.h Reduce dependencies on global.h (10) (#2490) 2025-02-26 17:18:30 -05:00
listalloc.h Reduce dependencies on global.h (10) (#2490) 2025-02-26 17:18:30 -05:00
macro.inc
main.h
map.h variables.h: migrate all remaining varaibles, remove other dependencies except z64.h (#2505) 2025-04-16 08:22:42 -04:00
map_mark.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
map_select_state.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
memory_utils.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
mempak.h
message.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
message_data_fmt.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
message_data_static.h [iQue] Match z_kanfont (#2428) 2025-01-19 19:41:14 -05:00
mio0.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
n64dd.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
object.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
ocarina.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
olib.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
one_point_cutscene.h
padmgr.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
path.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
pause.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
play_state.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
player.h `WeaponInfo` docs (#1596) 2025-06-07 23:37:13 -04:00
prenmi_buff.h Clean out z64.h (#2484) 2025-02-22 14:01:09 -05:00
prenmi_state.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
prerender.h Some functions.h and variables.h work (#2491) 2025-03-26 16:08:10 -04:00
printf.h macros.h 1/?: `PRINTF` and `T` (#2509) 2025-04-23 19:31:49 -04:00
quake.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
quest_hint.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
quest_hint_commands.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
rand.h
region.h
regs.h Some functions.h and variables.h work (#2491) 2025-03-26 16:08:10 -04:00
romfile.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
room.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
rumble.h
sample_state.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
save.h Document `Save.cutsceneIndex` and adjacent data / code (#2286) 2025-06-17 15:54:52 +02:00
scene.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
sched.h Some functions.h and variables.h work (#2491) 2025-03-26 16:08:10 -04:00
segment_symbols.h Reduce overlay dependencies on global.h (7) (#2472) 2025-02-16 15:33:55 -05:00
segmented_address.h
seqcmd.h SoundMode -> SoundOutputMode (#2475) 2025-03-27 01:47:44 -04:00
sequence.h
setup_state.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
sfx.h Macroify PlaySfxGeneral calls: introduce `SFX_PLAY_CENTERED` and `SFX_PLAY_AT_POS` (#2633) 2025-06-15 18:28:37 -04:00
sfx_source.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
skin.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
skin_matrix.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
skybox.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
speed_meter.h Reduce dependencies on global.h (10) (#2490) 2025-02-26 17:18:30 -05:00
sram.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
ss_sram.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
stack.h
stackcheck.h
sys_cfb.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
sys_debug_controller.h Reduce dependencies on global.h (10) (#2490) 2025-02-26 17:18:30 -05:00
sys_freeze.h Reduce dependencies on global.h (10) (#2490) 2025-02-26 17:18:30 -05:00
sys_math.h
sys_math3d.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
sys_matrix.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
sys_ucode.h Reduce overlay dependencies on global.h (6) (#2468) 2025-02-13 18:15:14 -05:00
terminal.h
tex_len.h Introduce TEX_LEN macro for texture arrays lengths (#2541) 2025-05-25 12:33:24 -04:00
tha.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
thga.h
thread.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
title_setup_state.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
transition.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
transition_circle.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
transition_fade.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
transition_instances.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
transition_tile.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
transition_triforce.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
transition_wipe.h Remove functions.h (#2501) 2025-04-05 19:16:52 -04:00
translation.h T() macro loose ends 2 (#2564) 2025-06-04 13:15:01 -04:00
ucode_disas.h
ultra64.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
unk.h
versions.h Set up build system for ique-cn (#2382) 2024-12-21 14:13:56 -05:00
vi_mode.h Some functions.h and variables.h work (#2491) 2025-03-26 16:08:10 -04:00
view.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
vis.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
yaz0.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
z_actor_dlftbls.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
z_en_a_obj.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
z_en_item00.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
z_game_dlftbls.h Reduce dependencies on global.h (10) (#2490) 2025-02-26 17:18:30 -05:00
z_lib.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
z_locale.h Cleanup includes in header files (#2540) 2025-05-24 16:20:51 -04:00
z_math.h Remove "z64" prefix from all headers (#2518) 2025-06-04 14:38:33 -04:00
zelda_arena.h Reduce dependencies on global.h (9) (#2488) 2025-02-24 20:55:55 -05:00