summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-06-15Macros for `Entranceinfo.field` (#1270)Dragorn421
* Macros for `Entranceinfo.field` * `ENTRANCE_INFO_FIELD_` -> `ENTRANCE_INFO_` * Remove mentioning the transition types being "default" * comment on macros what they are for * Shorten "transition" -> "trans" for `EntranceInfo.field` usage
2022-06-12Audio_Init_Params.c Cleanup (#1273)engineer124
* Document Audio Heap Init Sizes * Swap order * Another small change * Another * Plural * swap order * Reverb Settings * Return comment * more cleanup * Fix data names
2022-06-12Document SoundFont Relocation (#1237)engineer124
* Document fontData relocation * Fix * More cleanup * typo * sample -> sampleHeader * Revert name * Just a little more * Another comment change * Fix Drum * fix * K0BASE * Update relocs * consistency * clearer phrasing * Fix * PR/Discord Suggestions * typo * Revert Sound Font Sample Struct for another PR * Missed a function * PR Suggestions * sample bank reloc * Revert header description * better text * SoundFount Relocation: some cleanup (#6) * `fontDataStartAddr` for relocation, `fontData` for reading data (`AudioLoad_RelocateFont`) * Comment "cleanup" in `AudioLoad_RelocateFont` * Comment "cleanup" in `AudioLoad_RelocateSample` * Cleanup cast and compares to 0 (offsets) / NULL (pointers) * Cleanup * Edit comments * phrasing Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-12Enable more IDO warnings and apply fixes (#1264)Roman971
* Update asm-processor and fix includes with EARLY * Enable more IDO warnings and disable unwanted warning 516 * Fix most new and remaining warnings * Improve skelanime comment * Improve asmproc pragma comment Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Add suggested comment for a wrong prototype * Update asm-processor with the latest fix Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2022-06-12Small doc for Item00 actor (#1268)Kenton M
* EnItem00.unk_15A rename to despawnTimer * func_8001E5C8 rename to EnItem00_BounceAfterCollected * shorten to Item00_Collected
2022-06-12Document flag for swinging bottle (#1272)EllipticEllipsis
* Document flag for swinging bottle * Add bug, minor documentation to func_8084ECA4 * Update comments * Add newline to z64cutscene_commands.h * Review
2022-06-11Minor cleanups in z_std_dma.c and yaz0.c (#1269)Roman971
* Cleanup dma and yaz0 functions using pointers for ram Also includes a minor cleanup of yaz0 names to better fit their purpose * Run formatter * Additional cleanups on dma and yaz0 functions
2022-06-09Doc pass on scene & room headers (#1240)Dragorn421
* Doc pass on scene & room headers * Remove comments on room draw handlers * `struct ActorEntry` -> `ActorEntry`
2022-06-07Update clang-tidy configuration in format.sh and apply fixes for a new check ↵Roman971
(#1257) * Update format.sh compiler options and add a check for clang-tidy * Enable clang-tidy option to find inconsistent argument names * Remove -Iassets from clang-tidy compiler options
2022-06-06Changes to support renaming segments in the spec (#1259)Roman971
* Allow dmadata to have names different from the original table Added an argument to the dma define which is used to match debug strings in z_std_dma.c * Update kaleido manager to support different overlay names * Update the actor table to support different actor names Added an argument to the define which is used to match debug strings in z_actor_dlftbls.c * PR suggestions for argument descriptions
2022-06-06Fix asset file includes to always start with assets/ (#1260)Roman971
* Fix asset includes to consistently start with assets/ * Fix header paths in asset xmls to start with assets/ * Remove -Iassets from compiler options
2022-06-05More minor isolated fixes (#1258)Roman971
* Fix reversed array access in z_boss_dodongo.c * Remove useless return in z_en_encount2.c * Remove some redundant externs or declarations * Move some undefs to be performed as early as possible * AudioOcarina_ResetStaffs -> AudioOcarina_ResetStaves The plural appears to be staves for the music term * Remove some uses of UNK_PTR * Use NULL for pointers set to 0 in z_game_dlftbls.c * Remove useless !! in z_en_tk.c * Revert "AudioOcarina_ResetStaffs -> AudioOcarina_ResetStaves" This reverts commit 1b7fe624083558a89328740abab607771cefdd72. * Remove more redundant externs from PR suggestion
2022-06-04Cleanup NotePlaybackState (#1255)engineer124
* Audio Cleanup * more * missed one * Audio docs imported from MM * Suggestions from Discord * Small fix * Fix sizes in z64audio.h * numSamples * Cleanup comments * Revert overlap with soundFont PR * revert Audio_AdsrUpdate cleanup (move to different PR) * PR Suggestion * Mainly typos * PR suggestion, vol -> volume * Better description * Name sampling frequency * A good number of PR suggestions * Missed a suggestion * More PR Suggestions * Cleanup NotePlaybackState * one more * Add comments for new variable names * Reverb samplePosInt * Missed one * Remove `Always set to 0`
2022-06-03Add enum for setup dls and name `z_rcp.c` functions (#1196)Dragorn421
* Introduce `SetupDL` enum * wip * wip * Remove comments on each setupdl index * Name setup dl functions by setupdl index * `Gfx_SetupDl` -> `Gfx_SetupDL` * Run formatter * globalctx -> play * fix regressions * `Gfx_SetupDL` -> `Gfx_SetupDL_` (add separating underscore) * `CallSetupDL` -> `SetupDL`
2022-06-03Audio Misc Docs and Cleanup (#1221)engineer124
* Audio Cleanup * more * missed one * Audio docs imported from MM * Suggestions from Discord * Small fix * Fix sizes in z64audio.h * numSamples * Cleanup comments * Revert overlap with soundFont PR * revert Audio_AdsrUpdate cleanup (move to different PR) * PR Suggestion * Mainly typos * PR suggestion, vol -> volume * Better description * Name sampling frequency * A good number of PR suggestions * Missed a suggestion * More PR Suggestions Co-authored-by: fig02 <fig02srl@gmail.com>
2022-06-03More documentation for sched.c (#1219)Tharo
* More documentation for sched.c * VI retrace -> vertical retrace, attempt to clarify comment in viconfig * Further review changes, fix inconsistent capitalization of PreNMI (PRENMI -> PreNMI) * Fix typo Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Change TaskSwapBuffer, change comment on OS_SC_DRAM_DLIST to unimplemented * Rename SchedContext/gSchedContext to Scheduler/gScheduler * Comments fixes Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Format Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-03Use `DMG_` defines in code (#1245)Dragorn421
* Use `DMG_` defines for `dmgFlags` when single bits are used * Pass on several (in code, no colliders) * Conditional cleanup * Remove wip comment, just use the flags 4head
2022-06-03Doc Actor Rotation Functions (last 4 funcs in actor.c) (#1249)Derek Hensley
* Cleanup functions * Rename functions * functions comments * fix apostrophes * Renames TurnTo -> Track, other review comments
2022-06-03Fix a number of warnings when compiling with GCC (#1239)Tharo
* Silence a number of GCC warnings * Remove * Suggested changes * Format * Fix comment in en_go2
2022-06-02Document Sequence Cutscene Effects (Sequence 109) (#1246)engineer124
* Seq 109 docs * Fix * Reorder function name
2022-05-31Fix misc 13 (#1244)Dragorn421
* Squared variables fixup * `sAnimSoundFrames` fixup * `ocElemFlags` fixup * `toucherFlags` fixup * `bumperFlags` fixup * `atFlags` fixup * `acFlags` fixup * `ocFlags1` fixup * `ocFlags2` fixup * `&=` * `TOUCH_SFX_NONE` -> `_MASK` in `CollisionCheck_HitSolid`
2022-05-31Overlay Functions Cleanup (#1235)Derek Hensley
* Cleanup load functions * Some cleanup * forgot . * Split off Overlay_Load * review * OverlayRelocationType -> MIPSRelocationType * Reloc type macro and mips relocations
2022-05-31Doc pass on scene draw configs: names (#1233)Dragorn421
* Name most scene draw configs * 0 -> None, 36 -> GanonCastleExterior * 48 -> GraveExitLightShining * 47 -> CalmWater * (0) none -> default * `SCENE_DRAW_CONFIG_` -> `SDC_`
2022-05-29Audio Docs: Adsr Decay Rate (#1238)engineer124
* Init adsr decay docs * cleanup * cleanup * Revert some docs * Cleaner docs * count hex to dec * scaled updates per frame * Consistency * Oops, fix meaning * Avoid `decayRate` conflict with reverb `decayRate` * PR suggestion
2022-05-29Documentation pass centered on z_player_lib (#1230)Dragorn421
2022-05-23Document Magic (#1199)engineer124
* Magic docs WIP * More docs, first round finished * Better docs * More renaming * Simpler name * Another small adjustment * rm if(1) * Better names again after in-game testing * Change comments * change comment * Big rename based on all the suggestions * Small touch-up * More PR Suggestions * RESTORE_IDLE -> RESET * More docs * Capitalization * PR suggestions * Make declaration consistent * Health_ChangeBy (amount) * PR Suggestions * Missed one * More PR Suggestions * Change comment * Add another clarity comment * Discord discussions on `magicFillTarget` * Comments * grammar * More comment clarity * Another bad comment * PR suggestions, improved comments * One more comment * one more thing * bar -> meter
2022-05-21PlayState Rename (#1231)fig02
* global context -> play * fix PlayState* PlayState
2022-05-21Documentation pass on scene/room commands (#1226)Dragorn421
* Rename handler functions * Rename cmd_id enum names for consistency * `char` -> `s8` for explicit padding in cmd structs * `Room.unk03/03` -> `behaviorType2/1` * `UNK_PTR` -> `void*` * `showInvisActors` -> `lensActorsMode` + enum * Add `ROOM_BEHAVIOR_TYPE1/2_` enums * "mesh" -> "mesh header" * `Polygon polygon` -> `PolygonBase base` (for now...) * Misc cleanup * "lens actors mode" -> "lens actor mode" * Revert "`char` -> `s8` for explicit padding in cmd structs" This reverts commit 59b9295828d0fa341b0f05fbe9d660adb04476aa. * `LENS_ACTOR_MODE_` -> `LENS_MODE_HIDE/SHOW_ACTORS`
2022-05-20Environment documentation pass (#1115)fig02
* some docs, start introducing time macro * most usages of CLOCK_TIME * finish up clock time defines, format * saving incase i need to revert * more docs * more docs progress * some more docs * format with 11 * change sos to storm * update functions.h * some depth stuff * review 1 and 2 * whoops * update zbuf stuff * most of review 3 * enum name * storm state enum * review 4 * fix enum * add comment to skyboxischanging * review * things dont match, committing so i can change branches * revert struct changes * define for override_full_control * new clock_time macro * fill alpha -> glare strength * update comment * remove indoor/outdoor, new name for underwater light variable * remove copy pasted comment * fix comments * remove whitespave * review
2022-05-20Document `eventChkInf` usage of freed carpenters flags (#1210)Dragorn421
* Document `eventChkInf` usage of freed carpenters flags * +`()`
2022-05-20Document SkelCurve system (#1192)EllipticEllipsis
* Rename and document SkelCurve * AVOID_UB in DemoTreLgt_OverrideLimbDraw * Rename code_8006C510 * Objdump flags in the makefile * Move CC_CHECK above compilation * Review 1 * Review 2 * Review 3 * Review Add doxygen comments to file head use angle macro, improve bug comment, make arguments of SkelCurve_Draw more consistent, Change this temp to pad in MagicWind
2022-05-18Gameplay_ -> Play_ and this (#1229)fig02
2022-05-17Doc misc 5 (#1223)Dragorn421
* Annotate global equip and upgrade masks data * Trivial respawn doc stuff Move the respawn mode enum up to use the _MAX enum value in the save context struct * Comment on the `sceneFlags[127]` debug-strings-suggested out-of-bounds access * Reword `room_inf[127]` comments (attempt)
2022-05-15Document entrances 0x7FF9-0x7FFF as "Return Entrances" (#1217)Dragorn421
* Document entrances 0x7FF9-0x7FFF as "Exit Entrances" * `ENTR_EXIT_` -> `ENTR_RETURN_` * "exit entrance" -> "return entrance" * Less plural
2022-05-15Fix misc 12 (#1222)Dragorn421
* (light) `src` to `src/code/code_8006C510.c` * `setup + entrance` -> `entrance + setup` * Decimal for `gdSPDefLights1` args (colors, unit vector) * Run formatter * `firstDone` bool -> `materialFlag` * `ENTR_MAX`: 0x613 -> 0x614 * revert `materialFlag` to bool++ for now
2022-05-12Document Sub-Cameras (#989)engineer124
* Copying SubCam Changes from PR 908, made it to the end of bosses * Finish copying over PR * format * More cleanup * clean-up * PR Suggestions, Clean-Up, Improvement in CS * Remove substructs from fd/fd2 * format * Improve fishing * minor fix * Make CutsceneCameraDir more general * `sActiveCamMove` -> `sCamMove` * Fix conflict with object kankyo * Add CAM_ID_MAIN to object_kankyo * Improve cam cutscenes further * Revert cutscene cmd names (better for a separate PR) * At -> LookAt in the context of Cutscenes * Missed naming in diving game * Format * Fill in Ganon2 Names (now that it's matching) * format * `sActiveCamId` -> `sReturnToCamId` * activeCamId -> returnToCamId * Discord Discussions * FIRST * Move macro to bottom, comments * More suggestions * PR suggestion, cleanup comment * Oops * add comments * Adjust comment * Change edge-case * whoops Co-authored-by: fig02 <fig02srl@gmail.com>
2022-05-10Various minor cleanups (#1218)Roman971
* Fix assert in z_en_horse.c * Fix UB sceneFlags access in z_en_elf.c * Add Object_Spawn to public object functions This function is used externally in MM and works as a standalone, so it most likely belongs to the public interface * Fix float literals to always use lowercase e for the exponent * Remove "mininap" in one of the map data variables sDgnMinimapTexIndexBase is also used for the pause menu map so naming it for the minimap turned out to be inaccurate
2022-05-09Introduce DEFINE_ENTRANCE for entrance table and create entrance enum (#1213)fig02
* entrance table OK * entrance enum fixed * most entrances using enum, still need to do conditionals * more entrances * entrance_table.h cleanups * some review * remove _0 from first entrance in a group of setups * change table description * typo * wens spellcheck in vscode * remove extra line
2022-05-09Audio Ocarina Documentation (#1026)engineer124
* Begin ocarina documentation * Many ocarina-related docs * More ocarina docs * Introduce Ocarina Fonts Enum * Fix ocarina font enum * Fix incorrect documentation, more documentation * Ocarina recording documentation * cleanup * Small touch-ups * Fix font -> instrument * format * Better docs on playback, memory game * more cleanup * Add z64ocarina.h * Clean up names * final cleanup * typo * Fix description * better docs * Fix channel -> channelIdx * Fix old "font" name to correct "instrument" name, add io port docs * Add comments to clarify certain lines/functions * format * Rename noteIdx to pitch * Missed a name * Add comment on pitch * `reset` -> `SetInstrument` and `displayed` -> `playback` * Clarify audio_update and windmill comment * Minor PR fixes * Revert Audio_Update because there are 2 different Audio_Update functions * PR Feedback * Ocarina Idx -> Index * Introduce OCARINA_BTN_C_RIGHT_OR_C_LEFT * PR Suggestions * Next PR Suggestions * Next PR Feedback * consistency * Better docs (PR) * Better comment
2022-05-08Fixup weird horse flags usage (#1214)Dragorn421
* wip: refactor flag defines for `eventInf[0]` * Cleanup attempt * run formatter * remove spacing in enum indices comments * Add line breaks * Macros +`()` -`;`
2022-05-08Document `eventChkInf` usage of frogs played songs flags (#1211)Dragorn421
* Document `eventChkInf` usage of frogs played songs flags * Prettify frogs flags defines * Friendlier macro names
2022-05-08Restructuring Camera Structs and Related Macros (#1108)engineer124
* Proof-of-concept * small cleanup * static to fixed * Update to new names * Use full names for structs * Update comments * PR 1 * More macro changes * More PR Suggestions * Use a union for funcData * Apply change to all cam structs * typedef union outside of cam struct * Add size * typedef union, not struct * funcData -> paramData * Better manage doorParams
2022-05-07HealthMeter_ -> Health_ (#1202)engineer124
* HealthMeter_ -> Health_ * PR Suggestion
2022-05-04Fix misc 11 (#1209)Dragorn421
* Pass boolean for `freezeFlag` to `Actor_SetDropFlag` * Use `else if`s in `func_80835F44` * Cleanup `transitionCtx` usage of instance data * `TransitionContext.setEnvColor` -> `TransitionContext.setUnkColor` * Fixup one comment * linebreaks (#1) * Run formatter Co-authored-by: fig02 <fig02srl@gmail.com>
2022-05-04Name rsp ucodes and surrounding cleanup (#1166)Tharo
* Name rsp ucodes and surrounding cleanup * Fix comments alignment and remove unnecessary & in sys_ucode * Change capitalization of sys_ucode variables * Remove unnecessary externs for aspMain * Improvements to Jpeg_ScheduleDecoderTask * Split unknown rsp code into a separate file, spacing
2022-05-02Memstuff (#1164)EllipticEllipsis
* Un-fake a couple of matches in memory manip functions * Document fmodf * Un-fake a couple of matches in memory manip functions * Document fmodf * Rename functions and files * Document memmove, memsets, memcpys * Format * Sort out some missing sizeofs * Name fmodf * Rename local variables * size_t * Use COBRA_SHADOW_TEX_SIZE * Review * Tweak the Doxyfile to remove @brief requirement * Roman's review * Fix a bug comment * Change fmodf
2022-05-01Improve the state of handwritten assembly files (#865)Tharo
* Format all handwritten asm and document some * Use c preprocessor for constants * Fix * Fix PI_STATUS_ERROR, some label improvements * Avoid hi/lo for constants * Some more comments * Properly mark functions as functions and their sizes * Fix merge * Improvements * Review suggestions, rework procedure start/end macros to be more like libreultra * Move IPL3 symbol definitions into ipl3.s * Fix undefined_syms, add include and language guards to asm.h and fix the comment in gbi.h * Consistent hex capitalization, add some MIPS builtin defines to CC_CHECK to behave properly * Add -no-pad-sections assembler option and clean up alignment in gu files and bzero * Further suggestions and improvements * Matrix conversion function clarifications * Fix passing AVOID_UB to gcc * Suggestions * Suggestions, global interrupt mask improvements * Further suggestions, interrupt mask comments * Comments fixes, rdb.h * Switch from # comments to // comments, remove unnecesary .set gp=64 directives * Further review suggestions * Missed one
2022-04-30Doc equips usage (inventory, current and player-specific constants) (#1142)Dragorn421
* Doc equips usage (inventory, current and player-specific constants) * Improve some comments * `currentSword`(`Item`) -> `currentSwordItemId` * Comments on the right in `D_801261F8` * Improve `sDebugSaveInventory.equipment` formatting with extra parentheses * Use constants for `sNewSaveInventory.equipment` * Run formatter * Make comments in z64save.h header a single line even if very long * `CHECK_OWNED_EQUIP_ALT` * One more use of `CHECK_OWNED_EQUIP` * `OWNED_EQUIP_FLAG` * `OWNED_EQUIP_FLAG_ALT` * Improve (?) giving sword by item id * "half-byte" -> "nibble" * Improve equips for setting kokiri sword * Improve (?) checking boots by item id * Improve (?) checking equips by item id * Fixup one spot assuming `EQUIP_TYPE_SWORD == 0` * Comments on the right in `sBootDListGroups`
2022-04-30Fix misc 10 (#1208)Dragorn421
* Cleanup around `Item_DropCollectible` * Cleanup around `Math3D_Vec3fDistSq`, `Math3D_Dist2DSq` * Material/Model naming for one dlist pair * Minor comments fixup * Explicit `!= NULL` check * Signed decimal for an array of coordinates * Fixup comments some more
2022-04-29Fixup `feetFloorFlags` doc and -> `feetFloorFlag` (#1180)Dragorn421