summaryrefslogtreecommitdiff
path: root/src/code/z_actor.c
AgeCommit message (Collapse)Author
2024-01-12Name actor flags 1: `ACTOR_FLAG_REACT_TO_LENS`, ↵Dragorn421
`ACTOR_FLAG_IGNORE_POINT_LIGHTS` (#1583) * 7 -> `ACTOR_FLAG_REACT_TO_LENS` * move comment above actor flag * 22 -> `ACTOR_FLAG_IGNORE_POINT_LIGHTS` * newlines between flags --------- Co-authored-by: fig02 <fig02srl@gmail.com>
2024-01-12Replace most osSyncPrintf calls with PRINTF macro (#1598)cadmic
* Replace most osSyncPrintf calls with PRINTF macro * DEBUG -> OOT_DEBUG
2024-01-11Cleanup `z_collision_check` 1 (#1427)Dragorn421
* Cleanup `z_collision_check.c` and structs * Revert `other*` names to master, split to other pr * WIP/experimental: `ColliderCylinderElement` * Revert "WIP/experimental: `ColliderCylinderElement`" This reverts commit cfc8c32ace2970869a2c93be0666786f87ca5e1a. * ac/atHitInfo -> HitElem * rename some collider elements to "elem" (instead of item, info, hurtbox...) * cut down on more "hitbox" usage * name all `ColliderElement*` temps properly * rearrange colcheck structs * add collider shape name descriptions * reword collider shape descriptions * jntsph first again --------- Co-authored-by: fig02 <fig02srl@gmail.com>
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-12-10Doc Actor: En_Ma1 (Child Malon) (#1584)hiisuya
* started malon documentation * docd all event and inf table checks * doc cleanup * ran formatter * fixed misnamed eventcheck * revert isNotSinging oops * removed unnecessary comments * changed from handle to update * revert vec3f name change * moved texture information * isNotSinging to singingDisabled * rename of inftable and eventchk * small cleanup * anim enum change * enum names for child malon limbs
2023-11-30Document a bug in Actor_ChangeCategory where actors may not be updated ↵cadmic
correctly (#1587) * Document Actor_ChangeCategory bug * Reword * actor update function -> actor update
2023-11-19Struct Returns (#1574)engineer124
* change args * PR Review * format
2023-11-19Document Actor "OfferTalk" (#1567)engineer124
* OfferTalk * rm comment * exch to offer in comment * reword again * Partial PR Review * Actor_AcknowledgeTalking * Actor_TalkOfferAccepted * PR Review * rm part of comment * rm comment
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-10-27libc cleanup (#1568)Tharo
* libc cleanup * Suggested changes, small alloca tweak * Remove printf include
2023-10-17Use `long` over `int` for s32/u32 types (#1546)Tharo
* long s32 * Suggested changes
2023-10-07Player Docs: Propose Named Unions For Shared Variables (#1560)fig02
* make unions * format * adjust comment on halt thing
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>
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-08-13document bugs (#1519)fig02
2023-07-27Prefer clang-format-14 (#1517)Dragorn421
* Change preferred clang version to 14 (for formatting) * Add `--show-paths` arg to format.py for printing paths to clang-* binaries used * Run formatter (clang-format-14) * run formatter
2023-07-10Use intptr in most remaining code files (#1438)Roman971
* Use intptr in most remaining code files * Fix missing uintptr_t in actor * Use u8* casts for texture pointer arithmetic * Use bg + 1 instead of casting in Room_DrawBackground2D
2023-01-12DbCamera to DebugCamera (#1482)engineer124
* better dbCam prefix * missed some * PR Suggestions * alignment * more debug * cleanup
2022-12-30Name movement related functions in z_actor (#1476)fig02
* rename functions * dragorns name suggestions * Revert "dragorns name suggestions" This reverts commit dd4626ce5ead0a611e0ff9ca1a2a0e0466d7daf8. * lets try that again * reword comment * comments * projectile speed * arg name * more comments * minVelY comment * merge master and format
2022-12-24speedXZ -> speed (#1477)fig02
* speedXZ -> speed * += * revert arg in player function * anon review * engineer review * forgot one * last review * revert decimal
2022-12-18Name `Actor_PlaySfx` and `Player_PlaySfx` (#1469)engineer124
* name two main actor sfx functions * adjust comments * fix double s in player * fix commas
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-12`z_actor` documentation pass (#1445)Anghelo Carvajal
* Actor_Offer* and Actor_SetClosestSecretDistance * color filter stuff * KillAll * format * comment * Update src/code/z_actor.c Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * review Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * format * COLORFILTER_INTENSITY_FLAG * Remove - Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * yeet COLORFILTER_GET_XLUFLAG * bug * frug * Undo Actor_KillAllFromUnloadedRooms * update Actor_OfferGetItem comment * Update Actor_OfferGetItem description * diving Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-11-26Document Surface Material (#1447)engineer124
* material * cleanup * iron boots * climb * more docs * rename * small fix * comments * adjust bug comment * simplify comment
2022-11-26Name scenes (scene enum, entrance enum, various identifiers) (#1343)Dragorn421
* Comment names on titled scenes * Comment some more scene names * Comment some map assets symbol prefixes * Name collapse sequence scenes (from the non-collapse equivalent scene's name + `_COLLAPSE`) * Name ganon/ganondorf boss scenes (symbol prefix suffixed with `Scene` to prevent confusion with boss actors) * Fix symbol prefix for back alley night scene * Name the two grave scenes (normal and fairy's fountain variant) * Name most houses, name/update misc scenes Co-authored-by: fig02 <fig02srl@gmail.com> * (hakaana) `GRAVE` -> `REDEAD_GRAVE` to be more specific Co-authored-by: fig02 <fig02srl@gmail.com> * `miharigoya_scene`: `market_guard_house` * `kakariko_scene` -> `kakariko_center_house` * `richards_house` -> `dog_lady_house` (for localization differences) * Revert "Comment some map assets symbol prefixes" This reverts commit 210a38a6288d5d2fa318059f31988ca7ceb5c708. * remove other xml prefixes * ganon_boss, ganondorf_boss * comments to namefixer * `KAKARIKO_CENTER_HOUSE` -> `KAKARIKO_CENTER_GUEST_HOUSE` * two collapse sequence scenes -> `GANONS_TOWER_COLLAPSE_`interior/exterior * Run namefixer `find src include -type f -exec ./tools/namefixer.py {} \;` * run formatter Co-authored-by: fig02 <fig02srl@gmail.com>
2022-11-26Document HREG debugging system (#1351)fig02
* progress * progress * change * named most * name prerender things * fix and format * play prefix * address most comments (still a few more things to do) * fix error * reword input test comments * some more * rework env draw flags * add hilite * merge and format * init to proper values * rename env draw flag names * 7 to 6 * more small changes
2022-11-25Document NPC talking and player tracking (#1426)Lauri Koskela
* Rename npc dialog state variable * Rename and doc NPC actor talking funtion * Introduce NpcTalkState enum * Rename NPC_TALK_STATE enum values * Document NpcPlayerInteractionState and related functions * Rename player tracking opt enum variants * Rename npc functions, interact info * Minor npc actor function tweaks * Minor comment fixes for npc * Generalize NPC player tracking to point tracking * Change unused NpcInteractInfo field type and name Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Rename headRot and torsoRot * Rename GetTalkState to UpdateTalkState * Minor comment fixes * Rename rotateActorShape and clarify related comments * Remove unneeded parentheses in z_en_heishi4.c * Reformat * Remove unclear comment * Rename yPosOffset to yOffset Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2022-11-20Small `Actor_UpdateAll` doc (#1432)Dragorn421
* Small `Actor_UpdateAll` doc * improve, "freeze" * rename "freeze category masks" * shorten to "category freeze mask" everywhere
2022-11-16More documentation for `z_std_dma.c` (#1415)Tharo
* More documentation for z_std_dma * uintptr casts for rom symbols in z64animation.h and z_kanfont.c * Format * Suggested changes, more defines for static texture sizes * PI Interface -> PI * Further suggested changes * Format * Comments about item_name and map_name texture assumptions
2022-11-01Rename `vt.h` to `terminal.h` (#1339)Dragorn421
* `vt.h` -> `terminal.h` * `VT_` -> `T_` (as in Terminal) * `vt.h` -> `terminal.h` in includes too Pepega * Sort out tiny terminal.h include inconsistencies * Format * -> `TE_` * format * `TE_` -> back to `VT_` (parkour!) * explicit VT
2022-10-24Documentation pass on `DoorShutter` (#1352)Dragorn421
* Documentation pass on `DoorShutter` * lockTimer -> unlockTimer * Add `DOORSHUTTER_STYLE_FROM_SCENE` * `DoorShutter_SetupType` -> `DoorShutter_WaitForObject` * perpendicularly -> perpendicular * `DoorShutter_CheckShouldDraw` -> `DoorShutter_ShouldDraw` * Improve comment on `DoorShutter_GetPlayerSide` * `jabuDoorClosed`/`barsClosed` +`Amount` * attempt to improve a comment * fix shameful left-aligned numbers * unname closing/opening * action funcs names * run formatter * enums improvements Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2022-10-21improve matches (#1413)engineer124
2022-10-16Rename scene lists (#1344)fig02
* first pass * revert unwanted zap change * review * name Actor_InitContext, change arg name * change bzero to use type
2022-10-15Document Talon (En_Ta) (#1348)Lauri Koskela
* Rename flags related to Talon * Document Talon (ovl_En_Ta) * Formatting * ovl_En_Ta review fixes * Add horse eventinf flag usage comments * Rename TALON_STATE_FLAG_3 * Review fixes * More review fixes * Fix super-cucco zero-gravity time comment * Fix formatting * Talon review comment fixes * Review comment fixes * Rename waking up action funcs
2022-10-15Quake Documentation Pass (#1402)engineer124
* begin quake docs * continue cleanup * quake offset * many more docs * cleanup * more cleanup * cleanup headers * move quake value to internal * update, still need to test shake zoom/yaw * more docs * better docs * add file descriptions * fix comment * explain random index * cleanup comments * better type 6 docs * expand orientation comment * fix old names, add comment * remove comment, twas a mistake * easy PR feedback * duration in dec * rm offset, clear up roll * oops * merge shakeInfo and QuakeCamData * match order that always appears in code * more PR suggestions * adjust comment * zeroVec * rm extra space * roman PR suggestions
2022-10-12Document object_bdoor (boss doors) (#1403)Tom Overton
2022-10-12Doc dynapoly move flags (#1372)Dragorn421
* Doc dynapoly move flags * Use `DYNAPOLYMOVE_UPD_` more * remove `DynaPolyActor.unk_15A` (padding) * `DYNAPOLYMOVE_UPD_` -> `DYNA_MOVE_` * Remove `DYNA_MOVE_POS_AND_ROT_Y` * Actual docs * Update function names * transformFlags and Carried names Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Fixup comment on `DynaPolyActor_UpdateCarriedActorPos` * Format * `DYNA_TRANSFORM_NONE` -> 0 * Touch up mentioning the `DYNA_TRANSFORM_` flags in docs Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
2022-10-04Skip compiling C-included files during the build (#1386)Roman971
* Update the makefile to skip .inc.c files when building * Rename all C-included source files to .inc.c
2022-10-04Fix many missing NULLs (#1389)Roman971
* Fix many missing NULLs * Fix a raw actor id in en_horse
2022-10-02Use intptr types in more code files (#1385)Roman971
* Use intptr types for segments and a few system files * Use intptr types for more dma rom addresses * Use intptr types in data referring to rom files * Update and cleanup a few message casts * Change sys_cfb functions and debugHeapStart to use pointers * Update graph.c for the sys_cfb return type change
2022-09-27Rumble doc (#1375)Tharo
* Rumble doc * Fixes, suggested changes * Improve padmgr retrace callback related code * Name some rumble-adjacent things, further suggested changes * Further suggested changes * Suggested changes
2022-08-30Fix misc 16 (#1371)Dragorn421
* Replace tabs in exceptasm.s source * Replace tabs with \t in strings * Fix grammar in various comments * Fix "initalize" typos in code * (fix typo) `__osMallocIsInitalized` -> `__osMallocIsInitialized` * Some Link -> Player * Use `EXCH_ITEM_` more * "bgm music" -> "background music" * Fix typos in `place_title_cards.xml` * `SkelAnime_Update` returns a boolean * Run formatter
2022-08-30Fix RaycastFloor flags (#1328)mzxrules
* fix raycast floor flags * format.sh * Name flags * Rename RaycastFloor functions, clean up caller code, document z_bg_spot15_rrbox * change comment to prevent format wrap * change to "if BGCHECK_GROUND_CHECK_ON is set" * roman suggestions
2022-07-31sceneNum -> sceneId (#1338)Derek Hensley
* sceneNum -> sceneId * forgot to save play * scene -> sceneId where appropriate * Missed 1 + format * Update src/code/z_sram.c Co-authored-by: mzxrules <mzxrules@gmail.com> * Update src/code/z_sram.c Co-authored-by: mzxrules <mzxrules@gmail.com> * PR * Fix Co-authored-by: mzxrules <mzxrules@gmail.com>
2022-07-31Doc, macros, enums for `SurfaceType.data` (#1293)Dragorn421
* `SURFACETYPE`0/1 getter macros * Cleanup/assess/revert existing names * `SURFACETYPE0_30` -> "soft" * `SURFACETYPE0_`13/26 -> floortype/floorproperty * Introduce `SURFACETYPE_FLOORTYPE_` enum * Introduce `SURFACETYPE_FLOORPROPERTY_` enum * `SURFACETYPE0_21` -> "wall type", and maps to "wall flags" * Introduce `SURFACETYPE_WALLTYPE_` enum * Introduce `SURFACETYPE_WALLFLAG_` defines * `SURFACETYPE1_0` -> "sfx type" * `SurfaceType_GetSfx` -> `GetSfxId` and cleanup * Introduce `SURFACETYPE_SFXTYPE_` enum * Note oddity on `Player.unk_89E` (more docs needed) * `SURFACETYPE1_4` -> "floor effect" (not 100% set on the name, just something different from type and property) * Introduce `SURFACETYPE_FLOOREFFECT_` enum * Introduce `SURFACETYPE_CONVEYORSPEED_` enum * Add `SURFACETYPE_CONVEYORDIRECTION_TO_BINANG` macro * `wallDamage` -> `hasFlag27` * Be more underscore-happy * Revert "`SURFACETYPE`0/1 getter macros" This reverts commit e61cccf2e69a71c292a3680f9263b3eaf78c25f1. * remove mention to removed define * Remove surfacetype_ prefix, `SFX_TYPE_` -> `SURFACE_SFX_TYPE_`, `FLOOREFFECT_` -> `FLOOR_EFFECT_` * Formatting * 0-pad litteral to 8 nibbles
2022-07-30Doc pass on EnDoor and transition actors (#1243)Dragorn421
* Doc pass on EnDoor and transition actors * (re)Name things * Forgot to change gameplay_keep.xml * "actor transition index" -> "transition actor index" * Run formatter * Better names for `DOOR_DL_` enum * `TRANSITION_ACTOR_INDEX` -> `GET_TRANSITION_ACTOR_INDEX` * name endoor params macros with get/is, _mask to _flag for the doubledoor flag * Move last ; from `DOOR_ACTOR_BASE` expansion to usage
2022-07-30Fix various small gfx issues (#1313)Tharo
* Fix various small gfx issues * Use 0xFFFF instead of -1 for max prim depth * More fixed point numbers * scale -> texCoordScale, better cycle 2 render mode in z_title * GFXP_CHAR_* defines renamed to SPACING * Fix some gDPLoadMultiBlock uses