summaryrefslogtreecommitdiff
path: root/src/code/z_camera.c
AgeCommit message (Collapse)Author
2024-10-01[headers] Create zelda_arena.h, move protos to z64effect.h, and misc fixups ↵Dragorn421
(#2248) * [headers] Create z64malloc.h, move protos to z64effect.h, and misc fixups * zelda_arena.h * bss * bss2 * bss3 * bss
2024-09-28[PAL N64] Completely match pal-1.0 and pal-1.1 and add to CI (#2246)cadmic
* [PAL N64] Match pal-1.0 and pal-1.1 and add to CI * bss fixes from Jenkins
2024-09-27[headers] Create `gfxalloc.h`, `map.h`, move protos to `gfx.h`, ↵Dragorn421
`z64{player,view}.h` (#2233) * [headers] Create gfxalloc.h, map.h, move protos to z64{actor,player,view}.h * oops * bss * comment on player_lib protos & format * format map.h * Move SCREEN_{WIDTH,HEIGHT} and SET_FULLSCREEN_VIEWPORT to z64view.h * bss * revert move screen_width/height * bss
2024-09-26[headers] Move libultra protos to ultra64.h (as a temporary measure) (#2234)Dragorn421
* [headers] Move libultra protos to ultra64.h (as a temporary measure) * format ultra64.h * bss * bss * bss
2024-09-26Fix typos found by codespell (#2229)cadmic
2024-09-25[headers] Create letterbox.h, move more protos from functions.h (#2225)Dragorn421
* [headers] Create z64shrink_window.h, move more protos from functions.h * format * include * bss * letterbox.h
2024-09-25[headers] audio functions to z64audio.h and z64ocarina.h (#2223)Dragorn421
* [headers] audio functions to z64audio.h and z64ocarina.h * bss
2024-09-24[headers] gfx_setupdl.h and z64skin_matrix.h (#2221)Dragorn421
* [headers] gfx_setupdl.h and z64skin_matrix.h * include z64skin_matrix.h * bss * bss
2024-09-24create ucode_disas.h (#2222)mzxrules
* ucode_disas.h * create UcodeType * bss
2024-09-23Document Player Knockback related functions (#1601)mzxrules
* document knockback related functions * rotation -> yRot * implement some changes * Renames and comments * mq bss * format * Intangibility and Invulnerability * bss * .bss * add #pragma increment_block_number to z_en_item00.c * .bss
2024-09-23[headers] Move z_actor functions to z64actor.h (#2216)Dragorn421
* move * format * bss
2024-09-21PLAYER_STATE1_ACTOR_CARRY -> PLAYER_STATE1_CARRYING_ACTOR (#2213)fig02
2024-09-18[headers] z64inventory.h, move savectx/inventory macros to z64save.h (#2209)Dragorn421
* [headers] z64inventory.h * move savectx/inventory macros to z64save.h * commit the file * bss
2024-09-16Name `PLAYER_STATE1_CHARGING_SPIN_ATTACK` (#2203)fig02
* name charge state flag * format
2024-09-12[ntsc-1.2] Match ntsc-1.2 BSS and add to CI (#2187)cadmic
* Match ntsc-1.2 * Add ntsc-1.2 to CI * Apply fixes from Jenkins * Promote ntsc-1.2 to "supported" in Makefile * Declare D_80858AD8 as a u64 array * Tweak wording * Hopefully make ntsc-1.2 bss more stable * Restore segmented_address.h include
2024-09-08Name `PLAYER_STATE1_ACTOR_CARRY` (#2173)fig02
* actor carry flag * format and add comments * comment changes
2024-09-07Pause doc: World map points (#2141)Dragorn421
* Pause doc: World map points * bss * `WORLD_MAP_POINT_HYLIA_LAKESIDE` -> `_LAKE_HYLIA`
2024-09-06Miscellaneous libultra header fixes (#2139)cadmic
* Miscellaneous libultra header fixes * Fix bss? * Reword RCP timeout
2024-09-03[ntsc-1.2] Match z_camera.c (#2112)cadmic
* Add CAMERA_CHECK_BTN * Match Camera_Demo3
2024-08-24T() macro 3 (#2083)Dragorn421
* T() in z_camera.c * T() in z_parameter.c * T() in z_room.c * T() in z_kaleido_scope_call.c * T() in z_map_exp.c
2024-08-20Move non-libultra libc functions to src/libc/ (#2055)cadmic
* Move non-libultra libc functions to src/libc/ * Add explicit nops in delay slots * Don't rely on CPP expanding undefined macros to 0 * Delete old Makefile rules * Fix type of memset()
2024-08-12Add names to all typedef'd structs, unions, and enums (#2028)cadmic
* Add names to all typedef'd structs, unions, and enums * wtf vs code * Use a better regex
2024-08-09Match remaining GC retail versions (#2019)cadmic
* Match the remaining GC retail versions * Fix BSS ordering for existing versions * Disable clang-format for #pragma increment_block_number * sramResetCode -> sSramResetCode * Replace 0xFF3F with or-ing all buttons together * Revert "Disable clang-format for #pragma increment_block_number" This reverts commit 406b6d26c92911c676a7ea9f07a1612211760e11. --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-08-08gc-us OK (#2018)cadmic
Match BSS order and delete disassembly data
2024-08-02Automate fixing BSS ordering (#2009)cadmic
* Automate fixing BSS ordering * Typo * Some cleanups * Move pragma check after printing BSS info * Some proofreading * multiprocessing, require version, some colors * Tweak output * Black + mypy * Move logging and sys.exit out of helper functions * Use stdout instead of stderr in fix_bss.py * Add suggestion to conflicting offsets error Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Remove var = list[T]() * Improve error handling Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Add error if no pointers to BSS * Add comment about process_file_worker * Only print updates if stdout is a tty * Use new binary-search-esque candidate generation algorithm Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Add Wikipedia link * More comment tweaks --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-07-06Set up build system and disassembly for gc-us (#1982)cadmic
* Build gc-us * Set up gc-us disassembly * Don't disasm unchanged overlays * Fix gc-eu-mq BSS * romalign link_animetion for NTSC * Explicitly set CPP defines to 0/1 * Add #ifs to segment_symbols.h * Add sButtonTextures now * Fix message _SHIFTL usage * Don't ifdef LANGUAGE_MAX
2024-06-25Move `PlayState` to a new `z64play.h` (#1966)Anghelo Carvajal
* ActorContext * frameadvance * SfxSource * GameOverContext * RoomContext * TransitionActorContext * fix bss * Move PlayState * Move play functions to new header * SAC_ENABLE * no longer needed * SAC_ENABLE again * z_demo being silly * comment * format headers * fix retail bss * actually fix bss * Cutscene_ProcessScript comment * bss again * Update src/code/z_demo.c Co-authored-by: cadmic <cadmic24@gmail.com> * rename to frame_advance and remove it from z64.h * move macros too * review * Rename SequenceContext to SceneSequences --------- Co-authored-by: cadmic <cadmic24@gmail.com>
2024-04-14Match retail BSS ordering (#1927)cadmic
* Match retail BSS ordering * Revert moving some global variables to headers * Adjust block numbers after header changes * Fix debug build * Overlay bss ordering * Fix BSS ordering after header changes * gc-eu-mq OK * Implement preprocessor for #pragma increment_block_number * Transfer usage comment from reencode.sh * Use temporary directory instead of temporary file * Move ColChkMassType back
2024-03-30Match retail camera (#1917)cadmic
* Create CAM_DEBUG_RELOAD_PARAMS and CAM_DEBUG_RELOAD_PREG macros * Create debug macros for camera OREGs * Move static data into Camera_Demo5 * Match retail camera functions, except Camera_Battle1 * Match camera data and bss sizes * Restore R_CAM reg names, remove OREG_DEBUG[_SCALED] * CAM_DATA_n -> CAM_GLOBAL_n * Remove old debug macros * Add braces to CAM_DEBUG_RELOAD_PREG macro * Hackily match Camera_Battle1 * Format * Better Camera_Battle1 match * Format * Revert R_CAM_N comments for sOREGInit
2024-02-06Reorder boot/code spec includes for retail (#1667)cadmic
* Shuffle spec segments for retail * Remove z_text.o from retail * Un-#if DebugCamera_ScreenTextColored
2024-01-12Replace most osSyncPrintf calls with PRINTF macro (#1598)cadmic
* Replace most osSyncPrintf calls with PRINTF macro * DEBUG -> OOT_DEBUG
2024-01-09Create debug macros for common functions (#1597)cadmic
* Create debug macros for common functions * Revert NDEBUG change * MALLOCR -> MALLOC_R * DEBUG -> OOT_DEBUG * Use the same name for debug and non-debug matrix functions * Fix file/line argument order * Revert g[s]DPNoOp[Tag] * Use SystemArena_MallocDebug directly in GameAlloc_MallocDebug * MTXF_TO_MTX -> MATRIX_TO_MTX
2023-11-22Misc Cleanup (#1585)engineer124
* misc cleanup * more fake matches * revert for sym
2023-11-19Struct Returns (#1574)engineer124
* change args * PR Review * format
2023-11-19More Camera Flags (#1453)engineer124
* Generic Camera Flags * New flag names * Add flags to functions * Finish flag docs * More docs * More cleanup * More clarity * Better shrinkwindow flag docs * Improve name * CAM_INTERFACE_FLAGS * Better approach to edge cases * Change ordering for consistency * Oops * Add masks to macro * PR/Discord discussions * cleanup comment * Oops * PR Suggestions * More PR Feedback * More PR Suggestions * More Camera Flags * PR Suggestions * More flag style change * Small cleanup * More flag docs * Another flag * Fix flags * sync names with other PRs * more fixes * fix comments * update with hud visibility mode docs * missed one * fix comments * Roman PR Suggestions * interfaceField * small fix * letterbox cleanup * cleanup * fix macro arg * fix func declaration * many more docs * better docs? * missed some * oops, revert * add flags to name * cleanup * flag * double signal * simplify cam func name * more suggestions * PR Suggestion
2023-10-28Player Docs: public facing csAction things (#1561)fig02
* name public csAction functions * format * adjust function comment * format
2023-09-26Player Docs: csMode -> csAction (#1547)fig02
* csmode -> cs action * format
2023-09-13Document Camera Special9 (door) angle bug (#1525)fig02
* document special9 angle bug * Update src/code/z_camera.c Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2023-08-15Document z_lib Sfx Functions (#1470)engineer124
* document lib sfx * rename functions
2023-08-13Split `SaveContext` into sub-structs (#1393)Dragorn421
* Split SaveContext struct * run formatter * Remove temporary-until-split stuff in z_sram * . * run formatter
2023-01-12Document OnePointCutscene Init Field (#1465)engineer124
* player csmode enum * cleanup * missed one, player2 * spell out enum name * use CSMODE_MAX for data * doc OnePointDemo Field * PR Suggestions * another suggestion * duplicate word * adjust comment * cleanup comments * oops
2023-01-12DbCamera to DebugCamera (#1482)engineer124
* better dbCam prefix * missed some * PR Suggestions * alignment * more debug * cleanup
2023-01-10Fix misc 19 (#1488)Dragorn421
* "bgs sword" -> "biggoron sword" * Animation_ChangeImpl: last arg is `ANIMTAPER_` enum * TransitionTileStatus -> state * Tiny gbi.h formatting fixups * some cleanup on floormaster * misc float ops cleanup * sunsSongState = SUNSSONG_INACTIVE * continueFlag == CS_CMD_STOP * fix few camera names inconsistency * textual 0 padding? not on my lawn * libultra: construct address from end of dmem rather than oob from imem * more free1 -> 2 fixup
2022-12-30Document debug text drawing functions in z_debug.c (#1472)fig02
* name functions and clean up some stuff * clean up function call args and use enum, format * slightly change comment * review * make things more debug cam oriented * rename buffer * regs update comment * move enum
2022-12-26Misc. small cam doc (#1461)Dragorn421
* `Camera.posOffset` -> `Camera.playerToAtOffset` * calcSlopeYAdj bool cleanup * `Camera_CalcAtForLockOn` flags defines -> `CAM_LOCKON_AT_FLAG_` * yOffset * More cleanup * isOffGround
2022-12-24z_demo documentation (#1327)fig02
* commit old stuff * progress * progress * progress * progress * more progress, renaming cues next * small changes * enum values added for all actions * hardcoded values removed when possible * commands renamed * first pass of action -> cue * fix some matches * some more cleanup * scriptPtr * forgot one * remove cue rot union * more changes * some more stuff * more stuff * fix matching issues * some more things * progress, starting to rename destinations * small changes * name some destinations * more names * need to switch branch * progress * first pass of destination names * usages fixed * use destination enum * fix csdis * format * command descriptions * revert accidental zap changes * forgot some things * use a single macro for CutsceneCameraPoint (idk why i didnt think of this sooner) * typo * review1 * clarify ruby/sapphire comment * remove endframe for commands that dont use it * some more review * most review, but not all * scriptPtr -> script, and another small change * ocarina action * remove +1 from light settings command, change comment * actionIndex -> cueIdTemp (i guess) * _SetCueX -> _SetXFromCue * format * tweak fade out seq arg names * use spline terminology * more dragorn and engineer review * misc start/end frame note * cleanup StartPosRotFromCue vs PosRotFromCue * cleanup spline terminology * sPrevCamId -> sReturnToCamId * comment on debug cs data address * Cutscene_Init -> Cutscene_InitContext * single point types are not a list * remove todo comment * some more review * rumble struct names * some review * more review * missed one * reword pointer comment * even more review * match transition terminology with z_play * change condition and format * frame count * command specific structs with alignment * anon review * remove unneeded arg from time macro * yeet `CsCmdGeneric` * remove unused from single point types * typo * compromise attempt -- name endFrame everywhere * fixes * fix again * copied the wrong note * cutscene data note * review, format * compat defines * idk whats going on man Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-12-19OnePointCutscene Cleanup (#1467)engineer124
* cleanup * more cleanup * attention cs * remove comment
2022-12-17`z_play`: Camera Docs and Cleanup (#1460)engineer124
* begin docs * More suggestions * more docs * timer to duration * partial PR review * init data with player * consistent comments * withPlayer to usingPlayer
2022-12-12Introduce Player csMode enum (#1462)engineer124
* player csmode enum * cleanup * missed one, player2 * spell out enum name * use CSMODE_MAX for data
2022-12-11OnePointDemo ActionFlags Macros (#1451)engineer124
* actionflags * more macros * distinguish enums better * PR Suggestions * Update src/code/z_camera_data.inc.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/code/z_camera_data.inc.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>