summaryrefslogtreecommitdiff
path: root/src/code/z_player_lib.c
AgeCommit message (Collapse)Author
2026-04-16Macro-ify access to pauseCtx->playerSegment regions (#2693)Tharo
* Macro-ify access to pauseCtx->playerSegment regions. Using macros to indicate which region in the player segment is being accessed makes the memory layout more obvious and indicates the intended level of memory ownership, particularly in the case of the texture image at the start of the segment. * Add clarifications for gameplay_keep details * Uniform macro name for the render texture * Comment
2026-02-22Fix misc 23 (#2699)Dragorn421
* remove noop macros Fault_SetFontColor Fault_SetCharPad under PLATFORM_N64 * remove duplicate declarations in sfx.h * use render mode presets more * decimal for alpha values * fix some z_camera comments typos * fix references to preprocess.sh (used to be preprocess.py) * remove outdated comment on deps in makefile * code_800AD920 was renamed to z_viszbuf * fix capitalization typo: gOcarinaofTimeDesignTex -> gOcarinaOfTimeDesignTex * fix typo: gLinkAdultEyesClosedfTex, gLinkChildEyesClosedfTex -> remove extra f * fix typo: gCrstalSwitchRedTex, gCrstalSwitchBlueTex -> gCrystal * fix PARAMS_GET_U amount of bits
2026-02-16Commit and split gameplay_keep (#2612)Tharo
* Commit and split gameplay_keep * Remove debugging bits * format * bss * merge gameplay_keep_0x400 into link_textures * Name some unused NTSC stuff * Rename files for some of the newly named unused NTSC stuff * name more gkeep files * format * spin_attack * name fish anims files * name some eff_ files * name a bunch more files * Add underscore in not-final names * cleanup limb enum names (remove g prefix) * split gameplay_keep_0x34020.c into gBugCrawlAnim.c + bug_skel.c * door.h -> door_skel.h * gArrowNAnim -> gArrowN_Anim * split arrow_anims into gArrow1_Anim + gArrow2_Anim * fix merge * bss * bss * Fix bss --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2025-06-07`WeaponInfo` docs (#1596)Dragorn421
* WeaponInfo docs * format * disasm metadata * merge fixup * Add MELEE_WEAPON_INFO_TIP and _BASE * format * Offset
2025-06-04Remove "z64" prefix from all headers (#2518)fig02
* z64 - a * z64 - b * z64 - c * z64 - d * z64 - e * z64 - f * z64 - g * z64 - h * z64 - i * z64 - l * z64 - m * z64 - o * z64 - p * z64 - q * z64 - r * z64 - s * z64 - t * z64 - v * restore file * fix merge * fix merge --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2025-06-01Document kaleido debug menu (#2506)Pepe20129
* Document kaleido debug menu * Fix BSS * bss * Address reviews * bss * add #pragma increment_block_number to z_parameter and let CI do its thing * bss * buffer -> digitBuf * reformat comments on sSectionPositions. trick clang-format into not ruining the array by adding // comments on their own line * rename to KaleidoScope_DrawInventoryEditor --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2025-05-31Fix Link eyes left/right (#2558)Dragorn421
* Fix gLinkAdultEyes Left/Right Tex names * swap PLAYER_EYES_ LEFT/RIGHT and related * comment on gLinkChildEyesLeftTex/Right appearing swapped
2025-05-29sPlayerFaces as array of structs instead of 2d array (#2559)Derek Hensley
2025-04-24Use official macros for Physical Address conversion (#2511)fig02
2025-02-16Reduce overlay dependencies on global.h (7) (#2472)mzxrules
* z64env_flags, z64quest_hint_commands * z64cutscene_spline, z64save.h moved from z64.h * bss * pr suggestion * bss * suggestions
2025-01-27Split z64debug_display.h, z64draw.h, z_en_item00.h (#2443)mzxrules
* z64debug_display.h * z64draw.h * z_en_item00.h * bss
2024-10-24Document `PLAYER_STATE1_SHIELDING` (#2279)Pepe20129
* Document `PLAYER_STATE1_SHIELDING` * Fix format
2024-10-14Rename RoomBehaviorType1 to RoomType (#2271)mzxrules
* Rename RoomBehaviorType1 to RoomType * suggestions * Update include/z64scene.h --------- Co-authored-by: fig02 <fig02srl@gmail.com>
2024-10-12Rename RoomBehaviorType2 (#2270)mzxrules
* Rename RoomBehavior2 * fig proposal * fig comment
2024-10-10Document `Player_Action_Idle` (#2266)fig02
* document Player_Action_Idle * Player_DecelerateToZero * cleanup R_RUN_SPEED_LIMIT usages * format * typo * reorder reg * shake timer is used for fall damage * comment on shake timer only being processed in one place * format and edit comment * shakeTimer -> fallDamageStunTimer
2024-10-09Player doc: some rotation logic/data (#1443)Dragorn421
* Docs: some player rotation logic/data * Improve misleading comment * rename temps * unk_6AE_rotFlags * format * disasm metadata
2024-10-01Actor flag: `ACTOR_FLAG_CARRY_X_ROT_INFLUENCE` (#2237)fig02
* document x rot carry flag * tweak comment * typo * review * flag tweak
2024-09-24Z-Targeting Loose Ends (#2217)fig02
* Z-Targeting loose ends * format * add stateflag comment * typo * unname PLAYER_STATE1_19 for now * tweak parallel comment * one more tweak
2024-09-23Standardize "ActorMovement" over "ActorMove" (#2214)fig02
* ActorMove -> ActorMovement * more move -> movement * ANIM_FLAG_ENABLE_MOVEMENT * format
2024-09-21PLAYER_STATE1_ACTOR_CARRY -> PLAYER_STATE1_CARRYING_ACTOR (#2213)fig02
2024-09-21Document `autoLockOnActor` (#2212)fig02
* document autoLockOnActor * format.py * backtick * grammar * comment adjustments * word * letter
2024-09-18[PAL N64] Create macros for 50-Hz-related values (#2206)cadmic
* [PAL N64] Create macros for 50-Hz-related values * Use FRAME_RATE_DEPENDENT for player speeds and boot data too * FRAME_RATE_DEPENDENT -> FRAMERATE_CONST
2024-09-17`PLAYER_STATE1_DEAD` (#2204)fig02
* PLAYER_STATE1_DEAD * change comment * format
2024-09-14More Player Z Target documentation (#2196)fig02
* document flag * Player_FriendlyLockOnOrParallel * quirk * z target functions * more comments * more comment changes * format * comment change
2024-09-13Hostile Lock-On (#2193)fig02
* document flag and functions * format * adjust comment * make the comment more public-facing-friendly
2024-09-11Colliders: colType -> colMaterial (#2186)Dragorn421
* colType -> colMaterial * fixups
2024-09-11Cleanup gSPMatrix, rename `Matrix_New` -> `Matrix_Finalize`, add ↵Dragorn421
`MATRIX_FINALIZE_AND_LOAD` (#1983) * clean up gSPMatrix usage * add weird hybrid macro gSPMATRIX_SET_NEW * Matrix_NewMtx, MATRIX_NEW -> Matrix_Finalize, MATRIX_FINALIZE * gSPMATRIX_SET_NEW -> MATRIX_FINALIZE_AND_LOAD * format
2024-09-10More target related state flags (#2184)fig02
* name some more flags * format * cdi suggestion
2024-09-09Boomerang related state flags (#2180)fig02
* boomerang state flags * finish comment
2024-09-08Name `PLAYER_STATE1_ACTOR_CARRY` (#2173)fig02
* actor carry flag * format and add comments * comment changes
2024-09-08Player Docs - Parallel (#2167)fig02
* name func and flag * rest of the docs * format and comment change * comment
2024-09-06[ntsc-1.2] Match more draw functions (#2145)cadmic
* Match z_vr_box.c * Match TitleCard_Draw * Match z_player_lib.c? * Match Lights_Draw
2024-09-05unk_664 -> focusActor [Target Docs 5/?] (#2126)fig02
* unk_664 -> focusActor * capitalization * missed a temp
2024-08-19Match ntsc-1.2 z_scene_table.c (#2050)cadmic
* Match z_scene_table.c * Attempt to fix bss ordering * Forward declare PlayState instead * Untangle circular includes in z64scene.h
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-07-27Document `ANIM_FLAG_PLAYER_2` as `ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT` ↵fig02
(#2001) * name ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT * reword * typo
2024-07-27Document bottle color bug (#2000)fig02
* bottle color bug * adjust wording * format * small thing * reword * missed a letter
2024-06-24Fix misc 22 (#1971)Dragorn421
* remove trailing whitespace * fix/docbug about dright for next page of fault menu * // size = ...; -> // size = ... * access `ColliderJntSph.elements` as an array * fixup doc in PreRender.c * empty line after decl * gdSPDefLights1 xyz arguments for direction are signed 8bit values * doc bug of bad use of free in EffDust actor * decimal for Actor.colorFilterTimer * shopItemEntries -> sShopItemEntries * HEISHI4_AT_KAKRIKO_ENTRANCE -> HEISHI4_AT_KAKARIKO_ENTRANCE * format
2024-06-21Rename `ANIM_FLAG_0` to `ANIM_FLAG_UPDATE_XZ` (#1964)fig02
* rename anim flag 0 * review * missed a word
2024-03-23Document Player's Face and z_actor FaceChange functions (#1928)fig02
* create some enums * gonna try struct instead of array * struct works. add docs too * inline function comments * fix function comment * name faces, move enums * rename textures * outnames * remove comments * change comment slightly * fixup face comments * review * offset comments * add and use PLAYER_FACE_MAX * typo * more comment on blinkDuration * another change to the comment
2024-02-01Retail `z_player_lib.c` OK (#1689)engineer124
* z_player_lib OK * space * line break
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-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-11-12Fix misc 21 (#1573)Dragorn421
* Make `sNew` in (unused) `code_800FC620.c` a string It is passed as a filename to `__osMallocDebug` so should be a nul-terminated string, not a char[3] missing an explicit \0 * Fix gcc warning in `JpegDecoder_ParseNextSymbol` about SLL on negative value -1U is an unsigned value, aka 0xFFFFFFFF I keep -1 because it seems that's what a jpeg standard has too References: https://stackoverflow.com/questions/40508958/shifting-a-negative-signed-value-is-undefined https://www.w3.org/Graphics/JPEG/itu-t81.pdf (page 105, figure F.12) * Small cleanup * Fix few mistakes (thanks gcc warnings) * Add `@bug` in file select settings draw code, using the wrong array * format * format main * rename arg for a happy formatter * Move important function call out of a printf
2023-11-12Changed gLinkChildSlinghotStringDL to gLinkChildSlingshotStringDL (#1576)Javarooster
2023-11-07Rename "ITEM_LAST_USED" (#1572)fig02
* rename * format * remove formatter changes * change model group comments
2023-10-17Use `long` over `int` for s32/u32 types (#1546)Tharo
* long s32 * Suggested changes
2023-09-26Player Docs: csMode -> csAction (#1547)fig02
* csmode -> cs action * format
2023-09-19Doc/Cleanup pass on object handling (#1227)Dragorn421
* `Object_InitBank` -> `Object_InitContext` * Add and use `OBJECT_SPACE_SIZE_BASE` * Remove `OBJECT_EXCHANGE_BANK_MAX` -> use `ARRAY_COUNT()` instead * "object status" -> "object load entry" * Misc. cleanup/renames * Partial docs and way too much batch renaming and cleanup for a single commit * ctrl shift h * format * format clang-11.1 * fix regressions * Improve a `@bug` comment * Move `OBJECT_SPACE_SIZE_BASE` from header to near `Object_InitContext` * "objectID" -> "objectId" * Revert iterator index to `i` in `Actor_KillActorsWithUnloadedObject` * "object load entry index" -> "object entry" * `Object_UpdateLoadEntries` -> `Object_UpdateEntries` * Run format.sh * "object entry" -> "object slot" (except internal usage) * Proper `Object_SpawnPersistent` doc Co-authored-by: fig02 <fig02srl@gmail.com> * fixup one comment "object bank index" -> "object slot" * Amend `Object_SpawnPersistent` comment to mention running out of free slots * `Actor_KillActorsWithUnloadedObject` -> `Actor_KillAllWithMissingObject` * Remove useless mention of what uses `Object_SpawnPersistent` * Fix mistake on `Object_SpawnPersistent` doing sync dma, not async * run formatter * `Object_InitContext` -> `Object_Init` * `waitObjectSlot` -> `requiredObjectSlot` * `Object_Init` -> `func_80097DD8` * one objectIndex -> objectSlot * Remove `OBJECT_SPACE_SIZE_BASE` * light fix on the merge (rm OBJECT_EXCHANGE_BANK_MAX) * `func_80097DD8` -> `Object_InitContext` --------- Co-authored-by: fig02 <fig02srl@gmail.com>