* 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
* 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
* Document Kanji offset function
* Bit more documentation
* Format table to shift-jis-shaped
* Rename argument
* Review, name file and function according to n64dd research
* spec
* Fix build
* Reformat table, improve some of the comments
* Add missing header
* Review
* More review
* Rewritet the C function more idiomatically, document lack of protection
* Other comparison
* Rename table
* 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)
* 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>
* 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
* 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
* wip: refactor flag defines for `eventInf[0]`
* Cleanup attempt
* run formatter
* remove spacing in enum indices comments
* Add line breaks
* Macros +`()` -`;`
* Initial commit
* Go through the rest of the code
* Fix length of EnAnubice.flameCircles
The length used to be 4, but in a for loop 5 elements were used. There
was unused unknown space right after the array and that is now part of
flameCircles.
* Fix offset comment in EnAnubice header
* Fix length of BossGanon2.unk_234
The length used to be 16, but only 15 elements seem to be used. The for
loops only went to 14, and the indicse gotten from a lookup table are
also never higher than 14.
* Revert some ARRAY_COUNTs back to literals
In these cases, using ARRAY_COUNT can make the code more confusing to
read, since the lengths of these arrays are already assumed in other
places in the code or the index is used in multiple arrays.
* Initial commit
* Rename stateTimer to actionTimer
This name is more consistent with actionFunc.
* Name (Setup)Crawl and (Setup)CrawlToSpawn functions
* Rename (Setup)Sink to (Setup)Dig and add (Setup)Sink and (Setup)Drown
* Add IS_DROPPED macro
This is way shorter than checking type == ... || type = ... every time.
* Rename INSECT_FLAG_6 to INSECT_FLAG_LANDED
* Name INSECT_FLAG_0 and the two remaining functions
* Rename INSECT_FLAG_1 to INSECT_FLAG_ON_GROUND
* Replace 'bug' with 'insect' in comment
* Revert changes made in array-count branch
* Update INSECT_DROPPED name in z_player.c
Seems I forgot to rebuild before committing.
* Use bug instead of insect in comments
* Apply suggested changes
* Fix faulty merge
* Run formatter
* Improve `sInitInsectFlags` formatting
* Revert `INSECT_FLAG_ON_GROUND` to `INSECT_FLAG_1`, purpose unclear (to me at least)
* Revert `INSECT_FLAG_TEMP_AND_ALIVE` to `INSECT_FLAG_0`, purpose unclear (to me at least)
* `INSECT_FLAG_TEMP` -> `INSECT_FLAG_IS_SHORT_LIVED`
* `Sink` -> `WalkOnWater`
* `INSECT_FLAG_LANDED` -> `INSECT_FLAG_DROPPED_HAS_LANDED`
* `EnInsect_FoundNearbySoil` -> `EnInsect_TryFindNearbySoil` and cleanup the function
* Run formatter
* Cleanup `actionTimer`
* Some cleanup
* Add `_TYPE_` in `EnInsectType` enum names
* `crawlSoundTimer` -> `crawlSoundDelay`
* Remove `IS_DROPPED` macro
Co-authored-by: Milo van der Tier <milo@vdtier.nl>
* 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
* Port a ton of stuff from MM
* Damage effect enum
* Enum for type
* Enum for action
* Limb enum
* Match MM styling as much as possible
* Divide object into sections
* Document values in EnRdDamageEffect
* Respond to Dragorn's review
* Apply Dragorn's suggestion for the union
* Respond to Dragorn's second review
* Move all actions away from -ing
* Fix typos
* Respond to Fig and Roman's reviews
* Fix build error, whoops
* Bring back // fallthrough
* 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>
* 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
* 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
* 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
* 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`
* 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
* Run formatter
* Remove useless `// clang-format off`
* Improve manual formatting inside `clang-format off` blocks
* Remove `// clang-format off` where used only for code style formatting
* Remove some `// clang-format off` with a for loop "trick"
* Reduce the size of `clang-format off` blocks
* Remove one `clang-format off` by moving assignment to inside line
* Revert "Remove some `// clang-format off` with a for loop "trick""
This reverts commit 30c344b800.
* Put some `// clang-format on` back on the same level as `off`
* script-assisted `itemGetInf` flags
* comment near non-trivial `itemGetInf` usage
* Run formatter
* Try something with the itemgetinf flags that can't use the packed value
* Add defines for `eventChkInf` (direct access)
* Add defines for `eventChkInf` (access through `Flags_GetEventChkInf`)
* Add defines for `eventChkInf` (access through `Flags_SetEventChkInf`)
* Add defines for `infTable` (direct access)
* Add defines for `infTable` (used by `Flags_GetInfTable`)
* Add defines for `infTable` (used by `Flags_SetInfTable`)
* Add defines for `eventInf`
* parenthesis cleanup near `GET_EVENTCHKINF` usage
* parenthesis cleanup near `GET_ITEMGETINF` usage
* parenthesis cleanup near `GET_INFTABLE` usage
* fixup one `eventInf` usage
* parenthesis cleanup near `GET_EVENTINF` usage
* parenthesis cleanup near `Flags_GetEventChkInf` usage
* slight `z64save.h` formatting improvement
* Improve itemGetInf flags in z_bg_dy_yoseizo
* Questionable improvement in z_en_ge2
* Questionable improvement in z_en_daiku
* Questionable improvement in z_en_mu
* Run formatter
* Parentheses around `gSaveContext` macros arguments
* Move individual flags define to the end of z64save.h, and improve comments separating the groups
* transition type enum
* mode enum, start documenting some types
* some more
* use enums for entrance table
* entrance table filled out
* sceneLoadFlag -> transitionTrigger
* sandstorm state/mode/type
* done i think
* fixes
* clean up circle weirdness
* circle use enum + fix texture names
* fix
* how did that even happen lol
* jesus
* review2
* some more review
* most review, still some more to do
* new transition trigger names
* some of review
* next type default
* Move binang utility macros out of angle conversion macros block
* `BINANG_TO_DEGF` -> `BINANG_TO_DEG_ALT` (it may even be warranted to name it _approx instead of _alt, unsure)
* Add `BINANG_TO_DEG` (unused by oot) (for completeness)
* `DEGF_TO_BINANG` -> `DEG_TO_BINANG_ALT` (again may even be _approx, or maybe _cam)
* Add `DEG_TO_BINANG` (unused by oot) (for completeness)
* `RADF_TO_BINANG` -> `RAD_TO_BINANG`
* `RADF_TO_DEGF` -> `RAD_TO_DEG`
* Cleanup argument names in angle conversion macros
* Format for angle macros changes
* Run formatter
* Move `DEG_TO_BINANG_ALT`, `BINANG_TO_DEG_ALT` to z64camera.h
* Remove `DEG_TO_BINANG`, `BINANG_TO_DEG`
* Remove `_ALT` from `DEG_TO_BINANG`, `BINANG_TO_DEG`
* Add comment about inaccuracy near `DEG_TO_BINANG`, `BINANG_TO_DEG`
* run formatter
* `CAM_` prefix on `DEG_TO_BINANG`, `BINANG_TO_DEG` macros
* Revert "Remove `DEG_TO_BINANG`, `BINANG_TO_DEG`"
This reverts commit 5321647e5b.
* Rename variables and function
* Improve comment
* PR Suggestion
* PR Suggestions
* Revert back to `Audio_PlaySoundGeneral`, make a separate PR `Sound` -> `Sfx`
* Oops, fixed that
* Name in-actor effect functions / improve naming consistency
"particle" -> "effect"
Fixup: consistent effect functions names, missed a bunch
* Use `materialFlag` as int for the "is material already set" "boolean"
Fixup `materialFlag` (actually a boolean one), and `objectFlag`
More actually boolean `materialFlag`s
* Consistently use `_EFFECTS_COUNT` defines (except partial buffer usage, for now)
`BOSSFD_EFFECT_COUNT` -> `BOSSFD_EFFECTS_COUNT`
`EFFECT_COUNT` -> `FISHING_EFFECTS_COUNT`
Place `_EFFECTS_COUNT` defines before effect struct definition
* Name `countLimit` the "max new effect index" argument
* Rename all effect buffers to `effects`/`sEffects`
* Fixup some array/pointer usage
* `EnNiw` also has this pseudo-effects system
* `EnSyatekiNiw` also has this pseudo-effects system
* `EnFz` also has this pseudo-effects system
* `_EFFECTS_COUNT` -> `_EFFECT_COUNT`
* `effects` -> `effect` where used as iterator (hopefully covers everything)
* Run formatter
* message queues, threads, and surroundings cleanup
* Format, make the formatter prefer clang-format-11 if found
* Fix __osThreadTail type
* Q -> Queue, thread defines renamed
* Reformat, add missing NULL
* Suggested changes and further casting cleanup
* Reformat
* padmgr name fixes
* Fix typo `tranform` -> `transform`
* (may be controversial) `indexes` (noun) -> `indices`, both are correct but `indices` prevails in the repo currently, and seems prefered in technical contexts
* Fixup one `@bug`
* Fix typo `relfect` -> `reflect`
* Rename and `@bug` `DemoTreLgt_OverrideLimbDraw`
* Fixup `PLAYER_AP_` to `ARROW_` type conversion
* `posModel` -> `modelPos`
* `effSpawnPosModel` -> `effSpawnModelPos`
* Gohma decay bug: Verified that timers do not prevent UB access
* Reorder summation in a more meaningful way
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
* Add `BINANG_TO_RAD_ALT2`
* Few hex constants in place of decimal cardinal angles
* Use `BINANG_TO_DEGF` more
* Use `DEG_TO_RAD(int)` for angle literals
* `BINANG_TO_RAD_ALT(literal)` -> use `BINANG_TO_RAD`
* Somewhat arbitrary literal angles cleanup
* Run formatter
* Touch up angle macros (parentheses and hex constants)
* Remove `DEGF_TO_RADF`, use `DEG_TO_RAD` instead
* Remove `DEGTORAD`, use `DEG_TO_RAD` instead
* Use `DEG_TO_RAD` more