summaryrefslogtreecommitdiff
path: root/src/code
AgeCommit message (Collapse)Author
2022-07-13Better AudioMgr_StopAllSfx match (#1316)Derek Hensley
* Better AudioMgr_StopAllSfx match * Use same temp name * remove volatile
2022-07-12Remove `BINANG_SUB` (#1297)Dragorn421
2022-07-11Introduce Sfx Tables (#1296)engineer124
* sfx tables * return audio sound params * Add docs for tables * REF -> BASE * Fix description * Small fix * Reorder phrase * Return sfx.h * Better docs * Roman PR Suggestions
2022-07-04Audio Misc Cleanup 2 (#1303)engineer124
* Misc cleanup * PR Suggestions
2022-07-04Introduce Mutebehavior Flags (#1304)engineer124
* Add muteBehavior flags * touchup * Adjust comment
2022-07-04Document code_800C3C20: Audio_StopAllSfx (#1309)engineer124
* Document code_800C3C20 * Associate it with AudioMgr to separate it from the audio library
2022-06-25Some names and docs on dynapoly (#1287)Dragorn421
* Add `BG_DYNA_ACTOR_FLAG_` for `DynaCollisionContext.bgActorFlags` * Document 3/4 bgActor flags * `func_8003EE6C` -> `DynaPoly_InvalidateLookup` * `DynaPoly_ExpandSRT` -> `DynaPoly_AddBgActorToLookup` * Add `DYNAPOLYACTOR_UNK160_` for `DynaPolyActor.unk_160` * More dynapoly docs * One comment * Some `DynaPoly_` -> `DynaPolyActor_` * run formatter * . * `BG_DYNA_ACTOR_FLAG_IS_USED` -> `BG_DYNA_ACTOR_FLAG_IN_USE` * `BG_DYNA_ACTOR_FLAG_` -> `BGACTOR_` * `DYNAPOLYACTOR_INTERACT_FLAG_` -> `DYNA_INTERACT_` * `ResetInteractFlags` -> `ClearInteractFlags` * Remove Has/Is prefix on dyna interact flags getters * format * remove now useless comments * Remove `!= 0` on interact flags getter usage * ceilings collision -> ceiling collision * `ClearInteractFlags` -> `UnsetInteractFlags` (pepega) * `UnsetInteractFlags` -> `UnsetAllInteractFlags` (pepega x2) * Add back `Is` prefix (no `Has` this time) to dyna interact flags getters
2022-06-24Fix misc 15 (#1298)Dragorn421
* Use `SCENE_` enum more * Decimal for pos in `D_8011F9B8` * `__osEventStateTab`: length `OS_NUM_EVENTS + 1` -> `OS_NUM_EVENTS` * thone -> throne * `s` on local data * minor sfxId cleanup * Run formatter * Fixup 0x19 + 1 = 0x1A, not 0x20 lol * Tlut -> TLUT * DemoKankyo params usage cleanup * Some proofreading (up to z_actor.c) * Revert 0 -> sfxId, add todo comment (sfxId=0 is weird apparently) * `sZdWaterBox` -> `sZorasDomainWaterBox` * `msgMode == MSGMODE_`, not `GAMEMODE_` (my bad Sadge)
2022-06-24Document File-Select Audio Settings: Sound Modes (#1281)engineer124
* Round 1 * Cleanup * Cleanup * Space * More spacing * Apply -> Set (consistency) * round 1 pr * Revert some names
2022-06-23Document `SaveContext.gameMode` (#1295)Dragorn421
* Document `SaveContext.gameMode` * end credits * Remove no longer needed comment
2022-06-23Rename game states (#1294)Dragorn421
* `TitleSetup` -> `Setup` * `Title` -> `ConsoleLogo` * `Opening` -> `TitleSetup` * `FileChoose` -> `FileSelect` * `Select` -> `MapSelect` * prenmi/sample `Context` -> `State` * Revert filename changes * . * setupstate cleanup * Oops, `GameState` -> `SetupState`
2022-06-22Remove `BINANG_ROT180` (#1241)Dragorn421
2022-06-21Introduce PLAY_LOG() (#1284)fig02
* play log * review, try to compromise on comment * another compromise attempt * new comment * remove comma * fix
2022-06-21audio_seqplayer.c cleanup (#1274)engineer124
* Audio Seqplayer Cleanup * More * Edit description * PR Suggestions * while true * Cleanup function declarations * Extra space, oops * Small fix * PR Suggestions * tatums per beat * Edit comment
2022-06-20Synthetic Waves Documentation (#1256)engineer124
* Synthetic wave documentation * Better docs * harmonicIndex * More * typo * Complete the abi buffer docs * Small change * Revert change * PR suggestions * Missed one * PR Feedback * Better documents * Well that was a silly copy-pasta mistake * Typo * Another comment * Plural * Make it more block-like * Capitalization * Add comments for gWaveSamples[8] * Adjust comment * More PR Suggestions * PR Suggestions * missed a phrasing * PR Suggestions * Update include/z64audio.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-20Document Viewpoints and Scene Cam Types (#1285)engineer124
* Document bgCamData * More changes and cleanup * More docs * Clarify comments * PR Feedback, rename bgcheck functions * remove fallthrough cleanup (other pr that deals with that) * PR Suggestions * bug report * bgCamDataIndexBeforeUnderwater * PR/Discord Discussions * Missed some * sync function header args * Another suggestion * cleanup * Comments * Indoor BgCamData * Change bgCamData to s16 for now * PR suggestions * the * use "info" * Missed a suggestion * Update and sync docs * More docs * Even more docs * Revert macro * Add comment * Better comments * More cleanup * Better Cam Scene Docs * Small change * Market -> Pivot * "only" * swap * Better comment * Another comment * to * Implement suggestions from discord * Discord Discussion * Revert bgCamFuncData to Vec3s * cleanup * Remaining cleanup * docs cleanup * format * More docs * Improve notes * Cleanup * Change enum * PR Suggestions * Improve comment * Rephrase * Implement discussion from discord * Discord discussion * fixed to locked * Update comments * Few more comments * Update include/z64.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Update include/z64camera.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Better comments * PR Suggestions * rm numbers * Update src/code/z_play.c Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-20Format script improvements and use strict name checks (#1275)Roman971
* Prioritize using clang-tidy 6 and improve format.sh * Use clang-tidy-6.0 when available since it's better at applying 'readability-inconsistent-declaration-parameter-name' * Add -m32 and -Wno-everything to compiler options to avoid unwanted errors and warnings * Remove -fsyntax-only since it serves no purpose in the context of clang-tidy * Apply clang-tidy fixes for argument names * Run format.sh again * Use 'Strict' option instead of relying on clang-tidy 6 * Run format script * Add --fix-notes to clang-tidy options for version 13+
2022-06-20Some doc on actor overlays alloc types (#1266)Dragorn421
* Some doc on actor overlays alloc types * Line breaks between defines at the top of actor.h * plain english * `ACTOR_ALLOC_` -> `ACTOROVL_ALLOC_` * More line breaks * `ACTOR_OVERLAY_ABSOLUTE_SPACE_SIZE` -> `ACTOROVL_ABSOLUTE_SPACE_SIZE` * Document bug about Scarecrow's Song not setting the flag to restore Nayru's Love * Try to document the check for needing to actor_kill to leave the absolute space being too broad * "which overlay uses" (bad english) -> simplify to "which uses" * Run formatter
2022-06-20Introduce Sfx Flags (#1278)engineer124
* Sfx Flags * Discord Discussion * Move macro to sound_params * Oops * PR Suggestions * Clarify comment * Missed switch * More suggestions * Update src/code/audio_sound_params.c Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * sfxs * PR Suggestions * revert back to flag Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-19Restructuring SoundFont Structs (#1277)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 * Organize structs, tuned samples * New sound effects struct * fix func name * wave samples * consistency * Fix * More suggestions * 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 * soundFont info * Revert waveSamples * cleanup * Plural * PR suggestions * A few name changes and suggestions * small changes * Drop Info on SoundFont * Missed some * One more function change Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-06-17Document Camera BgCamData (#1232)engineer124
* Document bgCamData * More changes and cleanup * More docs * Clarify comments * PR Feedback, rename bgcheck functions * remove fallthrough cleanup (other pr that deals with that) * PR Suggestions * bug report * bgCamDataIndexBeforeUnderwater * PR/Discord Discussions * Missed some * sync function header args * Another suggestion * cleanup * Comments * Change bgCamData to s16 for now * PR suggestions * the * use "info" * Missed a suggestion * Discord Discussion * Revert bgCamFuncData to Vec3s * format
2022-06-15Enable int-conversion warnings and fix all current instances (#1280)Roman971
* Enable int-conversion warnings for gcc/clang * Fix all current int-conversion warnings * Run format.sh * Apply review suggestions
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-13Fix misc 14 (#1279)Dragorn421
* Remove fake temp in `BossDodongo_DrawEffects` * `OS_WRITE` for `__osSpRawStartDma` `direction` * remove outdated comment * fixup osRecvMesg * make sShopkeeperStores static * `PHYSICAL_TO_VIRTUAL(gSegments[0])` -> `SEGMENTED_TO_VIRTUAL(NULL)` (mimics `CollisionHeader_SegmentedToVirtual`) * Run formatter * Remove assets from include path in suggested vscode properties * Fix `osCreateMesgQueue` getting `OS_MESG_BLOCK` as `count` instead of `1`
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-11Fix clang compilation error due to a fallthrough (#1271)Roman971
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-07Introduce Sequence flags (#1261)engineer124
* Sequence Flags * Document some seqFlags * PR Suggestion
2022-06-07Cleanup undefined syms and mark bug in z_en_a_keep.c (#1262)Roman971
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-03Rename and move handwritten asm files (#1254)Tharo
* Rename handwritten asm files and move them to src * Fix progress.py * Remove handling for asm dir from Makefile
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-31Document Table For Sequence Instruction Arguments (#1242)engineer124
* Document Table For Sequence Instruction Arguments * Add small bit of docs * More cleanup * Shorten Macros * Add another comment * rm cast * Cleanup * More consistency * instruction * Better ret name * PR suggestions * Small fix
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