summaryrefslogtreecommitdiff
path: root/src/code
AgeCommit message (Collapse)Author
2022-03-10Naming1 (#1113)playerskel
* typo * rename 800636C0 to gameinfo_init * fix incorrect casing in cup button * some constants * add item00_none enum value * rename 80009460 to gdmaverbose * fix typos * Revert "some constants" This reverts commit 27a07204d79c91c508e896ccdc766afb31119059. * rename gdmaverbose to gdmamgrverbose * Revert "rename 800636C0 to gameinfo_init" This reverts commit c74e255929fb9d46be146ee66d37ddb7585b9c9d. * Revert "fix incorrect casing in cup button" This reverts commit ac313b3965591302936d9f5ae0ba0a8f69569f73. * a couple of typos * minor changes based on clang-format
2022-03-09`PlayerMeleeWeaponAnimation` enum (#1154)Dragorn421
* Move `PlayerSwordAnimation` from `z_en_torch2.c` to `z64player.h` * `PlayerSwordAnimation` -> `PlayerMeleeWeaponAnimation` * Add `PWMA_` prefix to `PlayerMeleeWeaponAnimation` values * Use `PlayerMeleeWeaponAnimation` enum more * Add `PWMA_MAX` * Update comments in z_en_kanban.c * Some cleanup around conditionals with `meleeWeaponAnimation` * Comment `PWMA_` index value in `D_80854190` * `PMWA_` -> `PLAYER_MWA_` * Minor fixup * Missed one spot * Run formatter
2022-03-08Document/fix `Player.bodyPartsPos` usage (#1141)Dragorn421
* Document/fix `Player#bodyPartsPos` usage * `distFromLinksHead` -> `distFromPlayerHat` * Comment on `bodyPartsPos[-1]` * Run formatter * Use `PLAYER_BODYPART_MAX` more * Use hex for `PlayerBodyPart` enum comments
2022-03-08Name variables holding poly normals and variables used in ↵Dragorn421
`COLPOLY_GET_NORMAL` (#1168)
2022-03-01Name fmodf (#1162)Tharo
2022-02-27Doc misc 1 (#1160)Dragorn421
* Misc documentation 1 * Add parentheses Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Move the parentheses to the right place * `curByte`(2) -> `curChar`(2) Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Revert `isMaterialSet` boolean usage * Fix misplaced line (how did that happen) * Fixup Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2022-02-27Document vismono (#1107)Dragorn421
* Document and explain vismono * Make it more clear "CFB" means Color Frame Buffer * Rename: Update DList/TLUT -> Desaturate DList/TLUT
2022-02-21Fix oob access in Matrix_SetTranslateScaleMtx2 (#1152)Anghelo Carvajal
2022-02-20sword -> meleeWeapon (#1147)Dragorn421
2022-02-20Defines for flags passed to `Actor_UpdateBgCheckInfo` (#1127)Dragorn421
* Tool-assisted flags for `Actor_UpdateBgCheckInfo` * Manual flags separation * Run formatter * Light doc on the flags * `UPDBGCHECKINFOFLAG_` -> `UPDBGCHECKINFO_FLAG_` (what an improvement!) * Run formatter * Run formatter
2022-02-20Document Distortions from z_camera and z_view (#1102)engineer124
* Document Distortions * cleanup * cleanup hot-room comment * small swap * PR Review 1 * Missed a small thing * Add fishing case * PR Feedback * dirRot -> orientation * `UpdateWater` and `UpdateHotRoom`
2022-02-20Fix misc 7 (#1149)Dragorn421
* Fixup `Math3D_LineClosestToPoint` * `gDodongosCavernBossLavaFloorTex` is 32x64 * Name empty-dlist-making functions `_EmptyDList` * Fix typos * transitionRate -> morphFrames * Compare `xyzDistToPlayerSq` to squared values * Fix hookshot target/post collision header names being swapped * Fix description of `z_bg_mizu_movebg.c` * Add scene command comment to `func_80098508` to match other scene command handlers * Some fixup in `Camera_Demo5` * `1` -> `ALLOCTYPE_ABSOLUTE` in comment on `ActorContext.absoluteSpace`
2022-02-20Fix misc 6 (#1148)Dragorn421
* Fix typo `vertexs` -> `vertices` * Fix typo `limbMatricies` -> `limbMatrices` * Fix some `gSPTextureRectangle` usage of fixed point constants * Run formatter * `ALIGN8` macro * `object_skj` cleanup * sholder -> shoulder * cleanup `stdbool.h` * Some function prototypes cleanup * Use macros in `osVirtualToPhysical`
2022-02-19Add GCC compiler option. (#1056)Revo
* GCC support. * Add note about gcc-mips-linux-gnu requirement to README.md. * changes * changes based on Tharo's suggestion * Cant reproduce file_choose.h error. Removing unnecessary -I * changes * wording based on Fig's suggestion * add AVOID_UB for eyes/mouth reordering issue. * remove unneeded flags and deprecate ZAPDFLAGS. * some changes, waiting on prs for the rest * fixes * discard header sections * change section handling in mkldscript * avoid_ub in DmaMgr_GetFileNameImpl * move asm to inline asm (consolidate gcc functions) * change prefix back * remove space * fix warnings * Revert "remove space" This reverts commit 94af6977b3eb4856b0d8e9eeac602c61f8010576. * Revert "fix warnings" This reverts commit d729ddf45743d6f039526469a15a15874926e9d0. * finish up missing_gcc_functions * revert unwanted mkldscript change * temporary workaround. TODO: Stop the asm processor from choking * fix ido build * Revert "temporary workaround. TODO: Stop the asm processor from choking" This reverts commit 9df892b7acb85b058ae33a1bb5970e9b52c36145. * review * remove unused line in mkldscript * remove tabs * clarify zf comment * review2 * review * remove duplicate cc_check * vanilla code always come first * std_dma avoid ub * add compiler_gcc to cflags * only use two blocks when necessary * clarify zf comment Co-authored-by: fig02 <fig02srl@gmail.com>
2022-02-18Defines for `Actor#bgCheckFlags` (#1126)Dragorn421
* First pass, tool assisted bgCheckFlags * Few manual bgCheckFlags * Run formatter * Remove fake bgCheckFlags 10-15 * Move existing documentation to the defines * Comment on `bgCheckFlags` and rephrase some doc * Name obvious flags, and some cleanup * Comment on flag 9 being wall-interaction-related (thanks engineer and fig) * Run formatter * `BGCHECKFLAG_7` -> `BGCHECKFLAG_GROUND_STRICT` * Touch up water-related bgcheckflags doc * `BGCHECKFLAG_9` -> `BGCHECKFLAG_PLAYER_WALL_INTERACT`
2022-02-13Use `__builtin_offsetof` for non IDO builds (#1140)Anghelo Carvajal
* Add offsetof macro * Change old uses of OFFSETOF with offsetof
2022-02-13Run formatter (#1139)Dragorn421
2022-02-11Force required alignment on DMA related stuff (#1135)Anghelo Carvajal
* Force dword alignment on OSPifRam * force_structure_alignment on each Font buffer * Add ALIGNED8 macro to gSaveContext to ensure alignment * create alignment.h header and use ALIGN8 in PLAYER_LIMB_BUF_COUNT * add comment in common_data * Roman's suggestion * player_limb_buf_count Co-authored-by: fig02 <fig02srl@gmail.com>
2022-02-06Correctly align program stacks (#1133)Tharo
* Properly align program stacks * Enforce size being a multiple of 8 bytes * Correct alignment calculation * Use an ALIGN8 macro in the stack declaration macro
2022-02-05fix Math_GetAtan2Tbl (#1132)fig02
2022-02-02Documentation for fault.c and fault_drawer.c (#1106)Tharo
* Mostly document fault and fault_drawer * FaultDrawer printf functions return s32 * Review Suggestions for comments Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Some further review suggestions * Further changes from suggestions * Fix Fault_AddClient doc comment * Bug comment for memdump overrun, add more to Fault_PadCallback bug comment * mb -> MB, comment about bss above externs * Fix color codes Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
2022-02-01Implement the scene table with defines (#1128)Roman971
* Implement scene table with a single define * Format z_scene_table.c * Apply review suggestions * Reorder arguments in DEFINE_SCENE * Use ROM_INFO for the scene table * Change "Debug only" to "Debug-only" * Apply more review suggestions * Use NULL for 'none' rom addresses * Remove scene declarations from segment_symbols.h
2022-01-31Document some z_actor.c functions (#1091)hatal175
2022-01-24proposal for link age macros (#1119)playerskel
* proposal for link age macros * apply @Dragorn421 suggestions * also annotate the slinkage variable
2022-01-25Document the lens system (#1079)louist103
* merge master * A little bit * start docs on lens * Delete Jenkinsfile * Make sense of the numbers in `Actor_DrawLensOfTruthMask` f3dzex commands * More comments on `Actor_DrawLens` f3dzex usage * remove padding * renames * Simplify gfx comments * Add some line breaks * Remove undef Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Louis <louist103@pop-os.localdomain>
2022-01-23lifemeter_z.c documentation (#1092)hatal175
* lifemeter documentation * Review fixes * Rename oscillator members * Do no use true/false with direction * Rerename oscillators
2022-01-23Whitespace (#1112)playerskel
* remove trailing whitespaces * minor docs tweaks * some more trailing whitespaces * few more tweaks
2022-01-23Document RCP functions (#1087)hatal175
* Document RCP functions * Rename functions according to convention * Rename file and functions to RcpUtils
2022-01-17Defines for player state flags (#1081)Dragorn421
* script-assisted player state flags * Run formatter * manually convert state flags in `D_80116068` * `PLAYER_STATE_FLAG_` -> `PLAYER_STATE` * Run formatter
2022-01-17Misc. doc/cleanup 4 (#1093)Dragorn421
* Cleanup parameters passed to `Actor_SpawnFloorDustRing` * `10` -> `ARROW_NUT` for spawning EnArrow * Missing empty line after declaration * Introduce `ACTORCAT_MAX` * Minor cleanup * Run formatter * `sgiDrawIds` -> `giDrawIds` * `sDmaMgrDataExistError` -> `sDmaMgrIsRomCompressed` bool * Add Makefile dependencies to rebuild some files when editing actor, object and effect tables in `include/tables/` * Run formatter * Revert "Add Makefile dependencies to rebuild some files when editing actor, object and effect tables in `include/tables/`" This reverts commit c6b9a92139056f52aea908411d0264e41f116a4a.
2022-01-14Improve River_Sound Docs (#1100)engineer124
* river_sound docs * Small touch-up * PR Suggestions * Improve comments on river line calculations * More PR Feedback * after analyzing the filter data for MM, lowPassFilter is reverse to what I thought it was
2022-01-12Small Skin system documentation pass (#1017)Anghelo Carvajal
* some docs * rename a bunch of callbacks * more cleanup * format * last cleanup * some updates * more docs * done i think * name flag and format * name unused variable * comments * revert unwanted change * z64skin.h * format * Address review * Rename PostLimbDraw callbacks to PostDraw and some PR addressing * add true/false for setTranslation * ahhhh * remove "you" Co-authored-by: fig02 <fig02srl@gmail.com>
2022-01-12Misc. doc/cleanup 5 (#1096)Dragorn421
* `0` -> `CHEST_ANIM_SHORT` in `GET_ITEM` z_player macro * fix typos in z_en_skj Co-authored-by: Yanis42 <yalink88@gmail.com> * `unkSkjStruct` -> `EnSkjUnkStruct` * Use `EFFECT_SS_` enum in all `EffectSs_Spawn` calls * Decimal for all `EffectSs_Spawn` priorities * Use `OBJECT_INVALID` more * `Object_IsLoaded` returns a boolean * Add `@bug` in `DmaMgr_SendRequestImpl` about passing partially uninitialized struct * Fix typo `forc_structure_alignment` -> "force" * Move `CMD_F` to `z64cutscene_commands.h` since it is specifically for cutscene data * Use `ALIGN16` macro more * Use `ALIGN256` macro more * Add `@bug` on two messed up 8-bytes-aligns * Set `gSaveContext.nightFlag` to 0/1 instead of false/true * Use `IS_DAY` macro more * Run formatter Co-authored-by: Yanis42 <yalink88@gmail.com>
2022-01-11Cleanup around some generic animation info structs (#1059)Dragorn421
* Name generic anim info structs and cleanup usage * Make `EnDaiku` use generic struct * Add `/* decimalid */` comments to all added enums * small fixes * Two more generic animinfo structs * Cleanup usage of newly generic structs * Cleanup x2 usage of newly generic structs * `transitionRate` -> `morphFrames` * Properly name generic anim structs (attempt to at least) * `anim` -> `animation` * fixes * run formatter * Use consistent prototypes for each actor's ChangeAnim helper * run formatter * minor cleanup * Run formatter * `Animation_ChangeInfo` -> `Animation_ChangeByInfo`
2022-01-11Migrate Remaining Audio Data & Cleanup some Audio Data externs (#1097)engineer124
* Import code_800F7260.bss.s * Import code_800F9280.data.s * format * cleanup externs * Move bss to next file * Move struct_8016E320 (BgmRequests) back to file * Move data to init_params, remove data pad (can't remove bss pad), ReverbSettings * remove extra spacing * Remove data/bss comments
2022-01-10Document Parts of Camera Data (#1054)engineer124
* Add Data enum and fill ARRAY_COUNT * Clean-Up * Document camera settings * Document scenes further * Minor edit * Cleanup * More cleanup * Oof, that was tedious * Align function look-up tables * Remove comments * format * Cleanup * formatter gone wrong, hid comments from me * format * Dragorn PR Review 1 * Change approach to camera data using macros * Clean up function and data map * Cleanup Comments
2022-01-10Document code_8006BA00 (Audio Sound Sources) (#997)engineer124
* Document SoundSources * PR Suggestions * Duration timers to dec * `PlaySfxByPosAndId` -> `PlaySoundByPosition` * Improve names * `PlaySfxAtStationaryPosition` -> `PlaySfxAtFixedWorldPos` and `originWorldPos` -> `worldPos` * format
2022-01-11Document undocumented matrix functions (#955)Dragorn421
* Document `func_800D1694` as `Matrix_TranslateRotateYXZ` * Document `func_800D1FD4` as `Matrix_ReplaceRotation` * Cleanup `Matrix_RotateAxis` * Document `func_800A7EC0` as `SkinMatrix_SetRotateAxis` * Document `func_800D2A34` and `func_800D2A98` as `Matrix_SetTranslateScaleMtx`(`F`) * Document mostly unused functions at the end of `sys_matrix.c` * Add in-use renamed functions to `namefixer.py` * Add `Matrix_SetTranslateScaleMtx2` to `namefixer.py` * Run formatter * Fix namefixer.py mistake from #952 * Format clang-11.1 * Fix `Matrix_TranslateRotateYXZ` wrongly documented, it actually is `Matrix_SetTranslateRotateYXZ` * VS Code is stellar at refactoring (no) * Run formatter * Come on VS Code * Improve `Matrix_ReplaceRotation` docs * Fix typo * Fix namefixer.py
2021-12-27Nature Ambience Documentation (#1063)engineer124
* Document nature ambience io data * Document nature ambience functions * Function headers * Doc storing main bgm for nature/miniboss bgm * Give temporary names to functions * small cleanup * add docs to clarify * Break up nature ambience channel io data for easier reading * Add info to where each nature ambience Id is used * Name environmental sequence functions * Use channel macros globally * Add nature enum, revert env name * Revert tough-to-name functions, use nature channel enum instead * Fill in remaining enums from sequence 1 * PR Suggestions * Improve macros * remove clang-format off * MINI_GAME_2 -> TIMED_MINI_GAME * Revert to generic name * Fix Spacing
2021-12-27Objects4 (#1057)louist103
* remove fake match * merge master * animations * dog limbs * textures * KZ limbs and DL * a few KZ textures and make a file for link_boy * the rest of KZ * Far Limb DLs * near DLs and limbs * small fix to child * boots and some sword and more child clean ups * a bunch of DLs * fix boy * fix link child for real this time * adult should be good now * progress * all undefined symbols done * progress * done (for now) * restore makefile * child -> adult * child -> adult * dog fixes * KZ fixes * more player fixes * remove unneeded enum in dog * rename hookshot stuff * Update z_player_lib.c * revert model group stuff * move comment * fix mirror shield upper * remove useless 2 * OOT -> Oot * gauntlet plate 2 fix * fix Co-authored-by: Louis <louist103@pop-os.localdomain>
2021-12-10Doc dodongo's cavern stuff (#1019)Dragorn421
* Document `func_80033480` more * More doc in `BgDdanKd` * WIP Document BgDodoago The dodongo skull light-eyes-with-bomb puzzle Some TODOs, jank/legacy code which I'm unsure if it achieves something significant * Finish documenting BgDodoago * `BgDodoago_WaitExplosives_` -> `BgDodoago_WaitExplosives` * Run formatter * `dlistBuffer` -> `displayListHead`
2021-12-07Cleanup more u32 being used as pointers. (#1052)louist103
* merge master * more u32 -> void* * remove jenkins file * format * z64.h * fix * re cleanup z64scene.h
2021-12-07Name one is-controller-valid symbol (#1060)Dragorn421
* Document `D_8012DBC0` as `isCtrlr2Valid` * `isCtrlr2Valid` missing `g` prefix * Run formatter
2021-12-06Cleanup `variables.h` (#1061)Dragorn421
* Cleanup `variables.h` * `gSpeedMeterTimeEntryPtr` -> `sSpeedMeterTimeEntryPtr`
2021-12-05Use defines for actor flags (#873)Dragorn421
* Add ACTOR_FLAG_ defines * Add ACTOR_FLAGS_ALL macro and use ACTOR_FLAG_* constants everywhere * Remove unused ACTOR_FLAG_* constants * actor flags in bigokuta & ko * actor flags in obj_mure * actor flags in stalfos, twinrova & ganon2 * actor flags in morpha & barinade * name some previously missed actor flags * found some comments using hex for actor flags * Actor flags in ovl_En_Ganon_Mant * Actor flags in EnWf * Flags in en_zf * Actor flags in BossGanon (FeelsOKMan) * Remove `ACTOR_FLAG_NONE` * Wrap expansion of `FLAGS` in parentheses * `ACTOR_FLAGS_ALL` -> `CHECK_FLAG_ALL` * Move `CHECK_FLAG_ALL` to `macros.h` * Run formatter
2021-12-05Document Sequence Modes and Related Functions (#1046)engineer124
* Document Audio_SetSequenceMode * Cleanup surrounding docs * format * Clean-up * fix capital `I` in `playeridx` * Dist -> DistSq * `SetCamModeAndSeqMode` -> `UpdateCamAndSeqModes` * Get rid of extra padding * PR Feedback
2021-12-04Remove THIS macro (#1047)fig02
* remove THIS * fix * forgot dorf
2021-12-03Clean Up Sequence Structs in Scene/Save/z64 (#1051)engineer124
* Clean up sound scene struct * Follow-up cleaning * cleanup * Document forcedSeqId * Update include/z64save.h Co-authored-by: fig02 <fig02srl@gmail.com> * Update include/z64.h Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-12-02boss_ganon (Ganondorf) OK (#1037)fig02
* data migrated and OK * some functions ported * everything ported and updated * merge message * plenty of functions matched * remove unwanted file * 5 more, progress on update * update matched * fix proto * fix * func_808E06FC * asm * 2 left * 1 more * last function inital decomp * Dbg MQ OK * docs progress * revert limb stuff * some more docs * docs progress * more docs * done with docs for now i think * revert unwanted change * some symbols * anime2 * format * small changes * some more changes * merge master and fix matrices * reviews 1 and 2 * remove continue * review 3 and 4 * un-name bodyPartsPos for now
2021-12-02Cutscene Camera Commands: `POS` -> `EYE`, `FOCUS` -> `LOOK_AT` (#993)engineer124
* Cutscene Camera Commands: `POS` -> `EYE`, `FOCUS` -> `LOOK_AT` * PR Suggestion: Update names with REL_TO * Use newer name in macros, address PR comment