summaryrefslogtreecommitdiff
path: root/src/code/z_actor.c
AgeCommit message (Collapse)Author
2026-05-27Document `EnSa` (#2744)Jordan Longstaff
* Document `EnSa` * Rename INFTABLE entries * Animation set -> group * Remove trailing commas * Rename textState field * Remove trailing comma * Rename EVENTCHKINF flag * Correct frowning/closed swap of enum * Rename INFTABLE flag
2026-04-17Simplify or comment on the remaining complex render mode settings (#2713)Tharo
* Simplify or comment on the remaining complex render mode settings * Suggested changes * Format
2026-03-12Add `@bug` comment on an Actor_Spawn printf (#2717)Dragorn421
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-20Rename AT `effect` to `hitSpecialEffect` (#2637)Dragorn421
* Rename AT `effect` to `hitSpecialEffect` * bss
2025-06-15Macroify PlaySfxGeneral calls: introduce `SFX_PLAY_CENTERED` and ↵Dragorn421
`SFX_PLAY_AT_POS` (#2633) * Add `SFX_PLAY_CENTERED` * Add `SFX_PLAY_AT_POS`
2025-06-07Update docs/Documenting.md (#1265)Dragorn421
* Update docs/Documenting.md * fix
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-03T() macro loose ends 1 (#2563)Dragorn421
* more T() in debug_malloc.c graph.c z_actor.c malloc.c * more T() in Zl2, Zl3 * T() diving_game, fire_rock * T() girla * more T() in heishi[124] * T() in hs2, kakasi2, ru2 * format * keaton * Diving GO
2025-05-18New assets system (#2481)Dragorn421
* wip: New assets system tm Builds gc-eu-mq-dbg OK from clean after 1) make setup 2) python3 -m tools.assets.extract -j 3) replace 0x80A8E610 with sShadowTex in extracted/gc-eu-mq-dbg/assets/overlays/ovl_En_Jsjutan/sShadowMaterialDL.inc.c 4) make various symbols in extracted data like sTex static * use variables from config.yml for gMtxClear and sShadowTex addresses * Write source with static for overlays using `HACK_IS_STATIC_ON` hack * gc-eu-mq-dbg OK from clean with `make setup && make` * implement more skeleton-related types, cleanups, fixups * fix extracted data to no longer produce compilation warnings * implement more of RoomShapeImage types * yeet XmlPath from ExternalFile usage * Implement PlayerAnimationDataResource (link_animetion data) * fix csdis CS_TIME extra arg * dmadata file names no longer hardcoded for gc-eu-mq-dbg * ntsc-1.0 OK * xml fixes * slightly improve standard output * rm extract_assets.py * generate and use Limb enums (TODO: check Skin skels and implement for Curve skels) * handle dependencies between xmls * introduce RawPointers xml attribute to ignore specific pointers and keep them raw * add tools/extract_assets.sh * fixups * only extract if xmls changed or if -f (force) is used * fixups, gc-eu OK * all versions OK * check attributes of xml resources elements * Implement legacy skelanime resources * fix ASSET_FILES_BIN_EXTRACTED/COMMITTED: look for .u8.bin specifically instead of just .bin * implement JFIFResource * fix png/jpg wildcards: look specifically for .u64.png .u32.png .u64.jpg * Makefile: Add rules to build .png, .bin and .jpg in assets/ too * start writing actual docs * extract sTransCircleDL and sTransWipeDL * misc cleanup/fixes, pygfxd 1.0.3 * refactor CDataExt.set_write callback args to use a dataclass * Move {} to in-source * misc * more progress on spec * fix missing braces in n64dd_error_textures.c * finish xml spec doc * assets xmls fixes * some cleanup, use `gNameTex_WIDTH/HEIGHT` macros in dlists * handle hackmode_syotes_room, fix compile * C build_from_png * rm tools/assets/bin2c * rm ZAPD * format * remove rule to generate dmadata_table.py * CC0 license (and some import cleanup) * dont try to build zapd (rmd) * simplify palettes with single user (ci images with a non-shared palette) * add docs on how images are handled * bss * allow -j N * fix n64texconv python bindings memory management * move -j at the end of calling extraction script * with -j, update last_extracts.json as each job completes rather than only if all complete * make interrupting less jank by making child processes ignore sigint * use enum names in `SCENE_CMD_SKYBOX_SETTINGS` * `multiprocessing.get_context("fork")` * import rich, except ImportError s * fix optional rich usage * .bss * .bss * .bss * assets extraction: -j -> -j$(N_THREADS) * .bss * change LIMB_NONE/MAX defaults to be FILE_OFFSET instead of SKELNAME * 0XHEX -> 0xHEX * fix bss * Proper includes for assets mostly proper, some includes like dlists resources always causing a sys_matrix.h include (when not every dlist references gIdentityMtx) could be done better * rm z64.h * rm z64.h take two * bss * Make .u64 suffix for pngs optional * fixup: rm .u64 suffix from n64dd image paths * Remove elemtype suffixes from .bin and .jpg files * Update images.md * some build_from_png cleanup, more error handling, comments * Handle skybox textures Introduce "sub-format" suffix for pngs, with sub-formats split_lo and split_hi being used for skybox textures * fixup for older python * improve collision output some * fully use SURFACETYPE[01] macros in writing extracted surface types * use WATERBOX_PROPERTIES in extracted waterboxes * some SceneCommandsResource cleanup * format EnvLightSettingsList output
2025-04-27Delete macros.h; Delete global.h (#2516)fig02
2025-04-26create ACTOR_FLAGS_CHECK_ALL (#2515)fig02
2025-04-26add array_count.h (#2514)fig02
2025-04-24Use official macros for Physical Address conversion (#2511)fig02
2025-04-23macros.h 1/?: `PRINTF` and `T` (#2509)fig02
* create printf and translation headers * non-overlays complete * printf finished * move T macro * edit comment * fix error * fix bss * remove is_64 * fix bss
2025-04-19Remove Variables.h; Decouple z64.h from global.h (#2507)fig02
* progress * z64.h issues sorted * remove variables.h * format * n64 fix * another fix * did the wrong fix * fix libleo * fix bss * review * remove instead of comment
2025-02-26Reduce dependencies on global.h (10) (#2490)mzxrules
* reduce z64.h size * fix z_cheap_proc.inc.c * ,bss * remove temp delcaration
2025-02-24Reduce dependencies on global.h (9) (#2488)mzxrules
* split game states * split all GameState headers * match fig names * deduplicate headers from bad merge * split z64actor.h into z64actor_profile.h, z_actor_dlftbls.h * fix compile error * .bss
2025-02-22Clean out z64.h (#2484)fig02
* Clean out z64.h * fix version include * overlay.h * pr suggestion * try fixing main.c * add back forward declare * fix bss * header guard * prefix
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-02-13Reduce overlay dependencies on global.h (6) (#2468)mzxrules
* add some headers, split some of z64.h * MtxClear -> IdentityMtx * more misc cleanups * move D_80116280 to header, fix build issue * remove z64.h * Revert "MtxClear -> IdentityMtx" This reverts commit 8fc74c0672f72b91ae4068e73228fc46fe9465d4. * split z64path.h and z64skin.h functions * z64face_reaction.h * cleanup overlay global references * trim padding * bss
2025-02-11Name Actor_DrawAll (#2464)fig02
2025-02-08Rename gMtx(F)Clear to gIdentityMtx(F) (#2458)mzxrules
2025-02-04Finish matching ique-cn (#2451)Tharo
* git subrepo clone git@github.com:Thar0/com-plugin.git tools/com-plugin subrepo: subdir: "tools/com-plugin" merged: "e8543312d" upstream: origin: "git@github.com:Thar0/com-plugin.git" branch: "main" commit: "e8543312d" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb" * ique-cn OK * Review suggestions * Most suggestions * git subrepo pull tools/com-plugin subrepo: subdir: "tools/com-plugin" merged: "81595ed1c" upstream: origin: "git@github.com:Thar0/com-plugin.git" branch: "main" commit: "81595ed1c" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb" * Fix other versions
2025-01-20Write about IDO and EGCS in compilers.md (#2432)cadmic
* Write about IDO and EGCS in compilers.md * Fix typo * Fix another typo * Apply suggestions from code review Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> --------- Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2025-01-19[iQue] Match z_actor (#2431)cadmic
* [iQue] Match z_actor * Reword comment
2025-01-13[iQue] Define EGCS macro instead of relying on `__GNUC__` (#2423)cadmic
* [iQue] Define EGCS macro instead of relying on __GNUC__ * Revert longlong.h
2025-01-08[iQue] Create/update macros for printing debug strings (#2398)cadmic
2025-01-02[iQue] Build some C files with EGCS (#2396)cadmic
2024-12-17Document z_horse.c and related actors (#2278)mzxrules
* document z_horse.h * .bss * suggestions and more comments * bss * INGORACE -> INGO_RACE * format header macros * FIx incorrect type comparision * EnInMode -> EnInStartMode * R_EXITED_SCENE_RIDING_HORSE
2024-12-14document `func_8002F368` (#2358)Leonid Kapitonov
2024-12-13Document Culling (#2318)fig02
* document culling * format * depth -> distance * format * var name * new graph link * rephrase actor flags * tharo's comments + some more tweaks * is this causing the problem? * change wording * cant scope the temp * format * dragorn review * bad merge * player -> camera in descriptions * more its * cadmic review * goddamn it why do i have that habit * projected
2024-12-09Renamed EVENTCHKINF_33 (#2326)Jordan Longstaff
* Renamed EVENTCHKINF_33 * Rename: Gave letter to King Zora
2024-12-09Document Mido functions, fields, and animations (#2289)Leonid Kapitonov
* Document `func_80AAA250` new name: `EnMd_ReverseAnimation` * rename `enum EnMdAnimation` > `enum EnMdAnimIndex` * Document `struct EnMd` fields (and functions) the list: * `func_80AAAC78` -> `EnMd_TrackMessageState` * `func_80AAAA24` -> `EnMd_UpdateAnimState_WithTalking` * `func_80AAA92C` -> `EnMd_SetAnimState` * `func_80AAA93C` -> `EnMd_UpdateAnimState` * `func_80AAA274` -> `EnMd_UpdateAnimState1` * `func_80AAA308` -> `EnMd_UpdateAnimState2` * `func_80AAA39C` -> `EnMd_UpdateAnimState3` * `func_80AAA474` -> `EnMd_UpdateAnimState4` * `func_80AAA508` -> `EnMd_UpdateAnimState5` * `func_80AAA5A4` -> `EnMd_UpdateAnimState6` * `func_80AAA638` -> `EnMd_UpdateAnimState7` * `func_80AAA6D4` -> `EnMd_UpdateAnimState8` * `func_80AAA768` -> `EnMd_UpdateAnimState9` * `func_80AAA7FC` -> `EnMd_UpdateAnimState10` * `func_80AAA890` -> `EnMd_UpdateAnimState11` * Document `func_80AAB158` new name: `EnMd_UpdateTalking` * Document `func_80034DD4` @ `z_actor.c` new name: `Actor_SmoothStep_Attention` * Document `func_80AAB5A4` new name: `EnMd_SmoothStep_Attention` * Document Mido's action functions the list: * `func_80AAB874` -> `EnMd_Idle` * `func_80AAB8F8` -> `EnMd_Watch` * `func_80AAB948` -> `EnMd_BlockPath` * `func_80AABC10` -> `EnMd_ListenToOcarina` * `func_80AABD0C` -> `EnMd_Walk` * rename flag `temp2` -> `canUpdateTalking` * (re)document Mido's animations via blender and fast64 * marginally improve comments * marginally improve comments * actually, yes, let's name action functions as such * Document eye textures as an enum to clarify for `EnMd_UpdateEyes` * rename `eyeIdx` -> `eyeTexIndex` Mido has two eyes and different textures for them * Undocument eye textures as an enum i was wrong: `_Draw` function might not follow the eyes texture order it is its own thing, like `enum EnMdBlinking` or nothing at all, yeah * ugh, and fix a typo with blinking rushing is no good * drop the `Action` suffix https://github.com/zeldaret/oot/pull/2289#discussion_r1837272286 * rename animation states as sequences https://github.com/zeldaret/oot/pull/2289#discussion_r1837274923 * `func_80034DD4` -> `Actor_FadeInOut` https://github.com/zeldaret/oot/pull/2289#discussion_r1837267267 * rename animation states as sequences a continuation of b11a9e9942e1725824e54099f84085ff2165e854 * `func_80034DD4` -> `Actor_UpdateAlphaByDistance` https://github.com/zeldaret/oot/pull/2289#discussion_r1838398475 * clarify a comment * Document `actor.params` bits allocation * apply review suggestions * apply review suggestions * apply review suggestions * apply review suggestions * apply review suggestions
2024-12-08Document Player Params (#2307)fig02
* document player params * better bgcamindex comment * cant use -1 for condition * fix match * define for default bgcam * doesnt work * matches * better comment
2024-12-07Rename EVENTCHKINF_02 (#2322)Jordan Longstaff
* Rename EVENTCHKINF_02 * Rename to EVENTCHKINF_MIDO_DENIED_DEKU_TREE_ACCESS
2024-12-02Fix some more GCC warnings, mark some bugs based on GCC warnings (#2309)Tharo
* Fix some more GCC warnings, mark some bugs based on GCC warnings * Weird formatting * Suggested changes * More weird indentation I guess * UNREACHABLE() macro, add missing NORETURNs to fault_n64.c * AVOID_UB for PAL path in z_file_nameset.c * Remove comments about return types * Remove temp no longer needed
2024-11-27Document Actor "Fidget Tables" (#2287)Leonid Kapitonov
* Document `func_80034F54` and related data new name: `UpdateLimbOverrides` reason: - `0x814` and `0x940` constants - `*_OverrideLimbDraw` functions additionally: - move constants into `z64animation.h` - use these constant for existing formulas - properly name corresponding actors' fields - add occasional explicit limbs limit constants * port over the MM "fidget" naming * remove redundant comments * move and rename `FIDGET_*` constants * introduce a `FIDGET_SCALE` constant, as no other value is applied * remove generally unrelated changes * apply PR suggestion Co-authored-by: mzxrules <mzxrules@gmail.com> * fix (?) fidgetTable size following the https://github.com/zeldaret/oot/pull/2287#discussion_r1832371833 suggestion * remove an unused `struct EnMu` field @ `0x024A` a continuation to the 211263295cd8768d63c1426025cf913ba6bedc18 automatic padding commpensates its absence * remove MM mention as "it would get unruly fast" https://github.com/zeldaret/oot/pull/2287#discussion_r1833470468 * rename `overridePerLimb` -> `fidgetFrequency` https://github.com/zeldaret/oot/pull/2287#discussion_r1837211873 * give better names to the constants https://github.com/zeldaret/oot/pull/2287#discussion_r1837211873 * remove unnecesasry braces from a comment https://github.com/zeldaret/oot/pull/2287#discussion_r1842642196 * make the comment multiline "officially" * restore `limbIndex` naming for this PR https://github.com/zeldaret/oot/pull/2287/commits/43afb7b7cb54aa7b086d8cb7fca4cffaa7d145bf#r1842644602 * apply a PR suggestion https://github.com/zeldaret/oot/pull/2287#discussion_r1842787653 --------- Co-authored-by: mzxrules <mzxrules@gmail.com>
2024-11-21Document Hookshot Attachment (#2300)fig02
* document hookshot attachment * change comment * swap hookshot function comment * remove comments
2024-11-17Decouple Debug Features From gc-eu-mq-dbg (#2296)fig02
* rename OOT_DEBUG to DEBUG_FEATURES * makefile changes * add DEBUG_ASSETS * fix DEBUG_FEATURES usages * format * fix errors * review * fix problem and review2 * review * add DEBUG_FEATURES to DEBUG_ASSETS check * review * whoops * format
2024-11-12Completely match ntsc-1.0/1.1 bss and add to CI (#2294)cadmic
2024-10-20Document `ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT` (#2276)fig02
* name ACTOR_FLAG_HIT_PLAYER_THUMP_SFX * ACTOR_FLAG_HIT_PLAYER_THUMP_SFX -> ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT
2024-10-17Document `ACTOR_FLAG_UPDATE_DURING_OCARINA` and ↵fig02
`PLAYER_STATE2_USING_OCARINA` (#2277) * Document ACTOR_FLAG_UPDATE_DURING_OCARINA * document PLAYER_STATE2_USING_OCARINA * format * comment tweak * treat var as flag
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-10Name talking action related things (#2260)fig02
* name talking related things * Player_Action_TalkExchangeItem -> Player_Action_ExchangeItem * splitting action stuff to new PR * format
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-09-30[ntsc-1.0/1.1] Match "game engine" files (#2244)cadmic
* [ntsc-1.0/1.1] Match "game engine" files * Use R_START_BTN_X/R_START_BTN_Y * Comment obvious bugs * Move Magic_Fill comments * Move EVENTINF_HORSES_INDEX printf inside #if * Replace "this function"
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-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