1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-22 13:25:00 +00:00
Commit Graph

446 Commits

Author SHA1 Message Date
Tharo
0b38f6e678
gbi.h and ucode_disas.c cleanups (#1267)
* Merge GfxMod and Gfx, various ucode_disas improvements, gdSPDefMtx, gbi.h formatting improvements

* Suggested changes

* Further suggested changes

* Fix matrix

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Formatting changes

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Clarify Gnoop callback

* the thing

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Switch spaces, uintptr

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-10-15 17:14:35 -04:00
fig02
fd24ad6e67
Document elf_message scripting system (#1398)
* `cUpElfMsgs` -> `cUpMsgs`

Motivation:
ElfMessage is the name of the system that handles c-up messages from navi, but also messages from child/adult saria
so it would make sense to name this after the system name like "ElfMsg"
but "cUpElf" primarily reads like (to me) "c up navi" since the actor implementing navi is EnElf

I think it'd be better to clear that confusion between "navi" and "elfmsg system" by just not using "elf" in the name

* Standardize c-up navi messages ElfMessage data to be named after "CUp"

* -> "Navi"

* Make symbols in `elf_message_` segments static

* new docs

* change commands, format

* introduce navi file id

* use enum

* remove concat

* add clarifying comment for skip

* concat cmd type

* Hints -> QuestHint

* rename command header

* s -> g

* missed enum name

* singular

* missed one

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-10-15 13:24:13 -04:00
engineer124
a2d62eedb2
Cleanup VecSph: Better Distinguish Between "Spherical" vs. "Geographic" Coordinates (#1407)
* begin geo and sph docs

* cleanup

* cleanup

* cleanup struct

* PR suggestions

* spacing
2022-10-15 15:43:59 +02:00
engineer124
9675051377
Quake Documentation Pass (#1402)
* begin quake docs

* continue cleanup

* quake offset

* many more docs

* cleanup

* more cleanup

* cleanup headers

* move quake value to internal

* update, still need to test shake zoom/yaw

* more docs

* better docs

* add file descriptions

* fix comment

* explain random index

* cleanup comments

* better type 6 docs

* expand orientation comment

* fix old names, add comment

* remove comment, twas a mistake

* easy PR feedback

* duration in dec

* rm offset, clear up roll

* oops

* merge shakeInfo and QuakeCamData

* match order that always appears in code

* more PR suggestions

* adjust comment

* zeroVec

* rm extra space

* roman PR suggestions
2022-10-15 02:16:37 -04:00
Dragorn421
d1d946a197
GameInfo -> RegEditor (#1354)
* -> `RegsContext* gRegsContext`

* Name regs-related functions

* Revert naming `GameState_UpdateRegs`

* -> `gRegEditor`

* `Regs_InitContext` -> `Regs_Init`

* remove mistakenly added file
2022-10-15 01:40:00 -04:00
Dragorn421
40a4abefa5
Doc dynapoly move flags (#1372)
* Doc dynapoly move flags

* Use `DYNAPOLYMOVE_UPD_` more

* remove `DynaPolyActor.unk_15A` (padding)

* `DYNAPOLYMOVE_UPD_` -> `DYNA_MOVE_`

* Remove `DYNA_MOVE_POS_AND_ROT_Y`

* Actual docs

* Update function names

* transformFlags and Carried names

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* Fixup comment on `DynaPolyActor_UpdateCarriedActorPos`

* Format

* `DYNA_TRANSFORM_NONE` -> 0

* Touch up mentioning the `DYNA_TRANSFORM_` flags in docs

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
2022-10-12 00:47:33 +02:00
engineer124
3ee2190b8d
Document Malon's Singing (#1395)
* malon singing docs

* typo

* more cleanup

* more cleanup

* cleanup comments

* PR Suggestions

* add more comments for clarity

* grammar
2022-10-10 06:52:33 +02:00
engineer124
76803f1534
Document Scene Sequences and Remaining SeqFlags (#1308)
* Begin scene sequence docs

* Better docs

* cleanup

* Better Docs

* cleanup

* Move flag

* Off -> None

* Fix comment

* spacing

* address pr, spot -> resumePoint

* SEQ_IO_VAL_NONE

* missed one
2022-10-09 21:57:50 -04:00
Dragorn421
b6d9a8183b
PlayerActionParam -> PlayerItemAction (#1394)
* `PLAYER_AP_` -> `PLAYER_IA_`

* Change temps, args, comments, members to "item action"

* Format
2022-10-09 15:59:57 +02:00
engineer124
062f4d8e15
Document code_800F9280.c -> audio_seqcmd.c i.e. (Audio_QueueSeqCmd) (#1234)
* Document SoundSources

* PR Suggestions

* Duration timers to dec

* `PlaySfxByPosAndId` -> `PlaySoundByPosition`

* Begin importing docs from MM

* Finish cleanup using code from MM

* Start documenting commands

* First attempt at thorough AudioSeqCmd wrappers

* Improve names

* Merge branch 'master' into audio_seqCmd

fix name to minimize conflicts

* Combine macros, implement them through repo

* Improve docs

* More progress, begin sequence command docs

* seqcmd.h

* More documentation of seqcmd.h

* More docs

* cleanup

* More cleanup

* More docs

* VOL_SCALE_INDEX enum

* missed enums

* More Cleanup

* docs

* More docs

* Add comments about sfxChannelLayout

* More cleanup

* Even better docs

* Add a file description

* small touchups

* More cleanup of comments

* more

* More cleanup

* More cleanup

* Missing space

* typos

* Audio_SetVolumeScaleNow

* More cleanup

* Fill in enum

* one more cleanup

* Capitalize macros

* remove AUDIO_

* cleanup

* more cleanup

* Small Fix

* Add a lot of backticks for docs

* Restructuring docs

* More cleanup

* swap channel args, cleanup

* Typos

* Many suggestions, revert filename

* pr suggestions

* even more PR

* more pr suggestions

* pr suggestion
2022-10-07 13:29:33 +02:00
Roman971
78e528d6fb
Various minor fixes (#1383)
* Swap REGION_US and REGION_JP

* Fix a few missing EXCH_ITEM enum values

* Remove unnecessary casts on alloc functions

* Fix a double slash in the spec file

* Swap top and bottom args in StackCheck_Init

* Remove some unnecessary & in array references

* Run formatter

* Fix the comments for US and JP codes
2022-10-02 17:40:09 -04:00
Roman971
f5a7c5612b
Use intptr types in more code files (#1385)
* Use intptr types for segments and a few system files

* Use intptr types for more dma rom addresses

* Use intptr types in data referring to rom files

* Update and cleanup a few message casts

* Change sys_cfb functions and debugHeapStart to use pointers

* Update graph.c for the sys_cfb return type change
2022-10-02 11:38:09 -04:00
Tharo
4f65d08eb5
Rumble doc (#1375)
* Rumble doc

* Fixes, suggested changes

* Improve padmgr retrace callback related code

* Name some rumble-adjacent things, further suggested changes

* Further suggested changes

* Suggested changes
2022-09-27 12:40:26 -04:00
Tharo
6b77ddba5a
More documentation for padmgr.c (#1336)
* More documentation for padmgr.c

* Update comments

* Further suggested changes

* Suggested changes

* LOG_SEVERITY_INFO -> LOG_SEVERITY_CRITICAL

* Adjust PadMgr_RequestPadData comment

* Avoid array notation for args, adjust comment, rename the FaultMgr padInput field to inputs to better reflect it's an array
2022-09-03 02:52:13 +02:00
Dragorn421
c0cf83a814
Doc room drawing (#1283)
* (wip) some doc on room draw2

* doc room_draw2

* do what can be done for `func_80095AA0`

* wip

* more cleanup around Room_DrawBackground2D

* format"

* commit to naming things

* move forward declarations of draw handlers to draw handlers array

* two z_room regs

* `R_MESH2_` -> `R_ROOM_CULL_`

* offset -> quakeOffset

* kb -> kB

* Improve cull mesh type doc

* `Sphere16` MeshHeaderCullEntry.bounds

* Revert "`Sphere16` MeshHeaderCullEntry.bounds" (ZAPD...)

This reverts commit cbe55e8090.

* Mesh header type: "cull" -> "cullable"

* Reword some Cullable doc

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* `boundsSphere*` for now for the can't-be-`Sphere16 bounds`

* Improve the PrerenderMulti bgCamInfo usage situation

* Comment on `overrideBgCamIndex`

* "are left" -> "remain"

* enum and defines for room draw debug regs

* drawBg -> drawBackground

* "mesh header all" -> "mesh header normal" 🤷

* array_count back to define

* Name some temps a lot less specifically

* "mesh header" -> "room shape"

* "Room shape prerender" -> "Room shape image"

* `ROOM_SHAPE_IMAGE_FORMAT_` -> `ROOM_SHAPE_IMAGE_AMOUNT_`

* `RoomShapeImageMultiBackgroundEntry` -> `RoomShapeImageMultiBgEntry`

* Remove references to "header" (old "mesh header" name)

* Axe variable names

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
2022-08-31 19:28:51 -04:00
Dragorn421
2e18eb334b
Fix misc 16 (#1371)
* Replace tabs in exceptasm.s source

* Replace tabs with \t in strings

* Fix grammar in various comments

* Fix "initalize" typos in code

* (fix typo) `__osMallocIsInitalized` -> `__osMallocIsInitialized`

* Some Link -> Player

* Use `EXCH_ITEM_` more

* "bgm music" -> "background music"

* Fix typos in `place_title_cards.xml`

* `SkelAnime_Update` returns a boolean

* Run formatter
2022-08-30 17:35:00 -04:00
mzxrules
327a813b37
Fix RaycastFloor flags (#1328)
* fix raycast floor flags

* format.sh

* Name flags

* Rename RaycastFloor functions, clean up caller code, document z_bg_spot15_rrbox

* change comment to prevent format wrap

* change to "if BGCHECK_GROUND_CHECK_ON is set"

* roman suggestions
2022-08-30 17:49:51 +02:00
Dragorn421
7cfee3d8a9
Doc pass on bgcheck-waterbox properties (#1288)
* Doc pass on bgcheck-waterbox properties

* `WATERBOX_ROOM_INDEX...` -> `WATERBOX_ROOM...`

* Fix `WATERBOX_PROPERTIES` macro (was completely wrong)

* `((setFlag19) & 1) << WATERBOX_FLAG_19_SHIFT` instead of ternary

* Fix `WATERBOX_PROPERTIES` macro (hopefully for good)
2022-08-29 13:52:42 -04:00
Tharo
0d52a4aebd
More documentation for PreRender.c (#1340)
* More documentation for PreRender.c

* Comment fix

* Suggested changes

* More on coverage reading functions

* Further comment changes

* Further suggestions
2022-08-28 12:18:20 -04:00
engineer124
9e2aee3fa3
Minor Misc Cleanup (#1360)
* misc cleanup

* missed one

* EffectSsDust_UpdateFire

* revert change, needs more testing
2022-08-23 21:13:03 -04:00
fig02
fec5cd84af
Doc shrink_window, rename system to Letterbox (#1341)
* docs

* missed some hex

* document Gfx_SetupFrame

* review
2022-08-15 09:39:06 -04:00
Derek Hensley
9c6461751d
sceneNum -> sceneId (#1338)
* sceneNum -> sceneId

* forgot to save play

* scene -> sceneId where appropriate

* Missed 1 + format

* Update src/code/z_sram.c

Co-authored-by: mzxrules <mzxrules@gmail.com>

* Update src/code/z_sram.c

Co-authored-by: mzxrules <mzxrules@gmail.com>

* PR

* Fix

Co-authored-by: mzxrules <mzxrules@gmail.com>
2022-07-31 19:44:47 -04:00
Dragorn421
706d5596bf
Doc, macros, enums for SurfaceType.data (#1293)
* `SURFACETYPE`0/1 getter macros

* Cleanup/assess/revert existing names

* `SURFACETYPE0_30` -> "soft"

* `SURFACETYPE0_`13/26 -> floortype/floorproperty

* Introduce `SURFACETYPE_FLOORTYPE_` enum

* Introduce `SURFACETYPE_FLOORPROPERTY_` enum

* `SURFACETYPE0_21` -> "wall type", and maps to "wall flags"

* Introduce `SURFACETYPE_WALLTYPE_` enum

* Introduce `SURFACETYPE_WALLFLAG_` defines

* `SURFACETYPE1_0` -> "sfx type"

* `SurfaceType_GetSfx` -> `GetSfxId` and cleanup

* Introduce `SURFACETYPE_SFXTYPE_` enum

* Note oddity on `Player.unk_89E` (more docs needed)

* `SURFACETYPE1_4` -> "floor effect" (not 100% set on the name, just something different from type and property)

* Introduce `SURFACETYPE_FLOOREFFECT_` enum

* Introduce `SURFACETYPE_CONVEYORSPEED_` enum

* Add `SURFACETYPE_CONVEYORDIRECTION_TO_BINANG` macro

* `wallDamage` -> `hasFlag27`

* Be more underscore-happy

* Revert "`SURFACETYPE`0/1 getter macros"

This reverts commit e61cccf2e6.

* remove mention to removed define

* Remove surfacetype_ prefix, `SFX_TYPE_` -> `SURFACE_SFX_TYPE_`, `FLOOREFFECT_` -> `FLOOR_EFFECT_`

* Formatting

* 0-pad litteral to 8 nibbles
2022-07-31 20:57:18 +02:00
fig02
afbc312024
Rename "Scene Setup Index" to "Scene Layer" (#1300)
* setup -> layer

* IS_CUTSCENE_LAYER

* review

* backtick

* remove some more mentions of setup

* alt header block

* clarifying comment
2022-07-30 17:28:50 -04:00
engineer124
1d19f37b26
Rename "Sound" to "Sfx" (#1292)
* First attempt

* More

* rename

* more sound -> sfx / sound effect (#7)

* PR Suggestions

* PR Suggestions

* Small fix

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
2022-07-30 09:05:27 -04:00
Roman971
1652b7e5d7
Fix audio strings with -use_readwrite_const and -signed (#1324)
* Fix audio strings with -use_readwrite_const and -signed

* Add comments for audio flags in makefile
2022-07-29 20:35:09 -04:00
Dragorn421
9647f50451
Cleanup z_debug (reg editor) (#1290)
* Cleanup z_debug

* misc

* pad reg names column to """allow""" 40 characters because why not

* safety parentheses in regs.h

* More safety parentheses, in named regs defines

* sort named regs in order, except for message system regs (?)

* put all regs in order (message system ones too)
2022-07-14 19:02:07 -04:00
Roman971
7564502b0b
Use intptr types in a few specific boot files (#1301)
* Add stdint.h with intptr_t and uinptr_t

* Use intptr types in dmamgr and yaz0

* Use intptr types in stackcheck

* Use intptr types in idle

* Run formatter

* Use pointers for StackEntry (+ minor type fix)
2022-07-12 12:47:25 -04:00
engineer124
66946534a1
Audio Misc Cleanup 2 (#1303)
* Misc cleanup

* PR Suggestions
2022-07-04 12:19:39 -04:00
engineer124
f2d4c3b10b
Document code_800C3C20: Audio_StopAllSfx (#1309)
* Document code_800C3C20

* Associate it with AudioMgr to separate it from the audio library
2022-07-04 11:51:38 -04:00
Dragorn421
ed0ab877c9
Some names and docs on dynapoly (#1287)
* 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-25 09:53:26 -04:00
engineer124
fe7afb9b07
Document File-Select Audio Settings: Sound Modes (#1281)
* Round 1

* Cleanup

* Cleanup

* Space

* More spacing

* Apply -> Set (consistency)

* round 1 pr

* Revert some names
2022-06-24 19:27:54 -04:00
Dragorn421
e16779cc33
Rename game states (#1294)
* `TitleSetup` -> `Setup`

* `Title` -> `ConsoleLogo`

* `Opening` -> `TitleSetup`

* `FileChoose` -> `FileSelect`

* `Select` -> `MapSelect`

* prenmi/sample `Context` -> `State`

* Revert filename changes

* .

* setupstate cleanup

* Oops, `GameState` -> `SetupState`
2022-06-23 23:34:26 +02:00
engineer124
d88a23f4a0
Document Viewpoints and Scene Cam Types (#1285)
* 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-20 20:31:53 -04:00
Roman971
6d52684020
Format script improvements and use strict name checks (#1275)
* 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-20 16:31:53 -04:00
engineer124
38de9405e6
Restructuring SoundFont Structs (#1277)
* 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-19 16:31:08 +02:00
engineer124
849fdbf9ea
Document Camera BgCamData (#1232)
* 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-17 20:25:42 +02:00
Roman971
08c8126ba5
Enable int-conversion warnings and fix all current instances (#1280)
* Enable int-conversion warnings for gcc/clang

* Fix all current int-conversion warnings

* Run format.sh

* Apply review suggestions
2022-06-15 20:15:44 -04:00
Roman971
a33965c1d0
Minor cleanups in z_std_dma.c and yaz0.c (#1269)
* 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-11 03:42:05 -04:00
Roman971
04ade9a255
Update clang-tidy configuration in format.sh and apply fixes for a new check (#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-07 00:34:28 -04:00
Dragorn421
1a41694d58
Add enum for setup dls and name z_rcp.c functions (#1196)
* 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-03 18:25:48 -04:00
engineer124
e989cb7ace
Audio Misc Docs and Cleanup (#1221)
* 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-03 15:59:02 -04:00
Tharo
1738b19d63
More documentation for sched.c (#1219)
* 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-03 15:43:30 -04:00
Derek Hensley
b2752a6a2e
Doc Actor Rotation Functions (last 4 funcs in actor.c) (#1249)
* Cleanup functions

* Rename functions

* functions comments

* fix apostrophes

* Renames TurnTo -> Track, other review comments
2022-06-03 20:29:23 +02:00
Tharo
451b24f79b
Fix a number of warnings when compiling with GCC (#1239)
* Silence a number of GCC warnings

* Remove

* Suggested changes

* Format

* Fix comment in en_go2
2022-06-03 18:51:23 +02:00
engineer124
0a95d17aa8
Document Sequence Cutscene Effects (Sequence 109) (#1246)
* Seq 109 docs

* Fix

* Reorder function name
2022-06-02 03:49:10 -04:00
Dragorn421
fa1ea37d54
Fix misc 13 (#1244)
* 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-31 14:48:41 -04:00
Derek Hensley
bd6b51a869
Overlay Functions Cleanup (#1235)
* Cleanup load functions

* Some cleanup

* forgot .

* Split off Overlay_Load

* review

* OverlayRelocationType -> MIPSRelocationType

* Reloc type macro and mips relocations
2022-05-31 20:28:17 +02:00
engineer124
e68f321777
Document Magic (#1199)
* 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-23 18:52:01 +02:00
fig02
2e6279bc8e
PlayState Rename (#1231)
* global context -> play

* fix PlayState* PlayState
2022-05-21 14:23:43 -04:00
fig02
4f0018bf36
Environment documentation pass (#1115)
* 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-20 14:40:13 -04:00
EllipticEllipsis
0e51a51fb1
Document SkelCurve system (#1192)
* 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-20 02:27:54 -04:00
fig02
aadb5f9c47
Gameplay_ -> Play_ and this (#1229) 2022-05-18 00:41:50 +02:00
engineer124
bf56c94f0f
Document Sub-Cameras (#989)
* 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-12 20:35:31 +02:00
Roman971
c799176a30
Various minor cleanups (#1218)
* 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-10 15:51:38 -04:00
fig02
2efd00863a
Introduce DEFINE_ENTRANCE for entrance table and create entrance enum (#1213)
* 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-09 13:45:53 -04:00
engineer124
95b4317931
Audio Ocarina Documentation (#1026)
* 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-09 18:59:23 +02:00
engineer124
80186ec1ab
HealthMeter_ -> Health_ (#1202)
* HealthMeter_ -> Health_

* PR Suggestion
2022-05-07 10:18:42 -04:00
Dragorn421
ca77b26c90
Fix misc 11 (#1209)
* 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-04 21:25:26 +02:00
Tharo
765cfd63e9
Name rsp ucodes and surrounding cleanup (#1166)
* 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-04 00:43:09 +02:00
EllipticEllipsis
e84f5ab387
Memstuff (#1164)
* 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-02 00:06:35 +02:00
Tharo
7334ffa373
Improve the state of handwritten assembly files (#865)
* 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-05-01 01:03:22 +02:00
fig02
16790bc253
Document Transition System (#1131)
* 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
2022-04-27 16:00:25 -04:00
Tharo
7068ad3703
Message Queues, Threads, and surroundings cleanup (#1178)
* 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
2022-04-08 20:20:23 -04:00
Robin Allen
9984c267d9
Names for some view things (#1191)
* Names for some view things

* Review: ORTHOGRAPHIC → ORTHO

* Review: dirty → dirtyFlags

* Review: Doc comment style

* Review: Define constants in terms of each other

* Review: Rename the ApplyToOverlay functions

* Update include/z64.h

Co-authored-by: fig02 <fig02srl@gmail.com>

* Review: Better View_LookAtInternal doc

* arg1 → mask

* View_LookAtInternal → View_LookAtUnsafe

* Review: View_SanityCheckEyePosition → View_ErrorCheckEyePosition

* sViewNotInitialized → sLogOnNextViewInit

* Remove VIEW_FORCE_ALL

* near/far → zNear/zFar

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* lookAt → at

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* near/far → zNear/zFar

* View_ApplyPerspective/Ortho: Remove from header instead of commenting

* lookAt → at

* Add fwd decls

* Fix external view->at accesses

* Missed these somehow

* lookAt → at

* Omit "Apply" in comments

* dirtyFlags → flags

* View_ApplyScissor → View_ApplyShrinkWindow

* Update src/code/z_view.c

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-04-09 00:50:28 +02:00
engineer124
04fb0ac1b1
Document Pushing Player: Bg Conveyors and Climbing Slopes (#1103)
* Document pushing Player

* Cleaner and better names

* Tiny cleanup

* Add enum to func

* PR Feedback

* Change conveyor to `IsFloorConveyor`

* Small touchup

* Attempt at better comments

* Clarify comments

* Clarify comment further

* Fix formatting

* PR Feedback
2022-04-04 00:06:25 +02:00
louist103
791d9018c0
first pass (#1185) 2022-03-21 20:49:11 +01:00
Dragorn421
b2a3fb2f7f
Fix misc 8 (#1150)
* Use `s32` as type instead of `StackStatus` enum type

* `bossLimbDl` -> `bossLimbDL`

* Fixup comment refering to `Actor.velocity` by struct offset

* Fixup `feetFloorFlags` doc and -> `feetFloorFlag`

* Fixup `xyzDistToPlayerSq` comment

* Make `SkelAnime.mode` comment refer to `AnimationMode` (<- `AnimationModes`)

* Use enum names to refer to anim modes and break long lines in z64animation.h

* `EnDha_OverridePostDraw` -> `EnDha_PostLimbDraw`

* ichains cleanup

* Scene command ids usage cleanup

* Properly name unkXXX members as unk_XXX

* change `gSceneCmdHandlers` length in variables.h too

* Revert Unknown flags to unk0 & unk1

* Remove "current scene" mention from `Flags_*Unknown` as they aren't saved or loaded so not scene-specific

* `Struct_8011FAF0`: unk_00, unk_04

* Run formatter

* Do not break long lines in headers

* Revert "Fixup `feetFloorFlags` doc and -> `feetFloorFlag`"

This reverts commit c45b3611e7.
2022-03-16 22:14:56 +01:00
Tharo
93096a45b6
More documentation for IrqMgr (#1144)
* doc irqmgr

* Fix

* Format

* Review suggestions

* Fix

* Some more review

* Further changes
2022-03-13 19:22:14 -04:00
Dragorn421
054bac7583
Doc player drawing (#1098)
* Introduce and use more enums and defines for equips and data involved in player drawing

* `EQUIP_TYPE_`, `EQUIP_INV_`, `EQUIP_VALUE_`

* Improve doc on ItemEquips/Inventory's `equipment` field

* Run formatter

* Add `PLAYER_MODELGROUPENTRY_*` for second index of `gPlayerModelTypes`

* Name `PLAYER_MODELGROUPENTRY_*` from existing documentation

* Partial doc on `PLAYER_MODELTYPE_*`

* Some doc on `PLAYER_MODELGROUP_*`

* Run formatter

* Name and some doc/cleanup on the various player draw functions

* Name symbols used for player position in pause menu

* Name player override/post limb draw callbacks

* `BOOTS_NORMAL` -> `BOOTS_KOKIRI`

* `EQUIP_INV_SWORD_GIANTKNIFE` -> `EQUIP_INV_SWORD_BROKENGIANTKNIFE`

* `currentSword` -> `currentSwordItem` to avoid confusion with `PlayerSword` enum

* Make one constant more explicit

* Document severe bug (not an issue by luck)

* Some doc on `PLAYER_MODELTYPE_RH_FF`

* Actually name most of `PlayerModelType`

* Actually name most of `PlayerModelGroup` and improve comments

* Make equipment in debug save data use equip enums

* Name symbol for computing player's `bodyPartsPos` and fix struct access

* Name right/left `HandType` symbols

* Add `PlayerBodyPart` enum

* Run formatter

* Introduce defines for pause player render dimensions and cleanup viewport usage in pause drawing

* Document `playerSegment` related usage

* Run formatter

* Revert player bodypart changes

* Revert equips doc changes

* Revert player model and anim data changes

* Revert drawing-unrelated changes

* Move `sTunicColors` tunic comments to after data
2022-03-12 19:06:43 -05:00
Dragorn421
dfbc356cdf
Document vismono (#1107)
* Document and explain vismono

* Make it more clear "CFB" means Color Frame Buffer

* Rename: Update DList/TLUT -> Desaturate DList/TLUT
2022-02-27 16:21:26 -05:00
Dragorn421
145b14dbc4
sword -> meleeWeapon (#1147) 2022-02-20 18:45:12 -05:00
engineer124
85ce3d3ca4
Document Distortions from z_camera and z_view (#1102)
* 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-20 18:35:53 -05:00
Dragorn421
e51fd73704
Fix misc 7 (#1149)
* 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-20 08:31:31 -05:00
Dragorn421
a9526a3354
Fix misc 6 (#1148)
* 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-20 14:22:29 +01:00
Revo
c3533052ca
Add GCC compiler option. (#1056)
* 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 94af6977b3.

* Revert "fix warnings"

This reverts commit d729ddf457.

* 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 9df892b7ac.

* 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-19 16:50:56 -05:00
Tharo
c8f4d66b00
Documentation for fault.c and fault_drawer.c (#1106)
* 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-02 16:43:34 -05:00
hatal175
aecd883bbc
Document some z_actor.c functions (#1091) 2022-01-31 18:36:58 +09:00
louist103
d1ac7eb80d
Document the lens system (#1079)
* 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-25 00:42:36 +01:00
hatal175
1f300f4a79
lifemeter_z.c documentation (#1092)
* lifemeter documentation

* Review fixes

* Rename oscillator members

* Do no use true/false with direction

* Rerename oscillators
2022-01-23 18:17:15 -05:00
hatal175
f344fe648b
Document RCP functions (#1087)
* Document RCP functions

* Rename functions according to convention

* Rename file and functions to RcpUtils
2022-01-23 18:04:50 -05:00
engineer124
9450272503
Improve River_Sound Docs (#1100)
* 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-14 17:13:04 -05:00
Anghelo Carvajal
9fec455805
Small Skin system documentation pass (#1017)
* 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-12 18:00:28 -05:00
Dragorn421
11917bf640
Cleanup around some generic animation info structs (#1059)
* 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-11 21:10:43 -05:00
engineer124
59e212c197
Document code_8006BA00 (Audio Sound Sources) (#997)
* Document SoundSources

* PR Suggestions

* Duration timers to dec

* `PlaySfxByPosAndId` -> `PlaySoundByPosition`

* Improve names

* `PlaySfxAtStationaryPosition` -> `PlaySfxAtFixedWorldPos` and `originWorldPos` -> `worldPos`

* format
2022-01-10 20:31:53 -05:00
Dragorn421
b1d3844325
Document undocumented matrix functions (#955)
* 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
2022-01-11 00:28:01 +01:00
engineer124
b8b983dd7f
Nature Ambience Documentation (#1063)
* 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-27 12:35:05 -05:00
Dragorn421
05b2cbfc60
Doc dodongo's cavern stuff (#1019)
* 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-10 20:21:19 -05:00
louist103
037c1dcad6
Cleanup more u32 being used as pointers. (#1052)
* merge master

* more u32 -> void*

* remove jenkins file

* format

* z64.h

* fix

* re cleanup z64scene.h
2021-12-07 14:19:13 -05:00
engineer124
79220ba58a
Document Sequence Modes and Related Functions (#1046)
* 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-05 12:13:53 -05:00
engineer124
5e9d24fca4
Clean Up Sequence Structs in Scene/Save/z64 (#1051)
* 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-03 09:49:32 -05:00
Tharo
f1d183d6fe
libultra files and directories restructure (#1038)
* Restructure files, begin header restructure

* Format

* us2dex

* Fix parallel spelling

Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>

* Use OS_K0_TO_PHYSICAL in place of VIRTUAL_TO_PHYSICAL in osAiSetNextBuffer

* Uppercase hex, exception vector address defines

* Interrupt flags 1

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Interrupt flags 2

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-11-30 19:08:57 -05:00
Roman971
54d77c71f1
Improve gfxprint documentation and strings (#1028)
* Improve gfxprint documentation and strings

* Add GFXP_UNUSED_CHAR and rename bss variable
2021-11-28 08:48:17 -05:00
Tharo
982e7be1f7
Preliminary fixes for boot/libultra (#1032)
* Preliminary fixes

* Missed a NULL
2021-11-28 07:50:35 -05:00
Roman971
6efb590699
Various minor cleanups (#1029)
* Fix some disp usage in EffectSsGMagma2

* Fix some incorrect SAC flags

* Remove some instances where bool was used

* Fix a few line numbers to be decimal

* Remove MatrixInternal and use Mtx instead

* Fix gs flag names to be plural for consistency

* Fix some hex numbers to be uppercase

* Fix instances of 0X for hex numbers
2021-11-26 17:37:33 -05:00
Tharo
a497f33bda
z_message_PAL, message_data_static and surrounding doc (#996)
* Initial progress on z_message_PAL, very messy

* Fix merge

* Some more progress

* Fix merge

* More z_message_PAL

* Small progress

* More small progress

* message_data_static files OK

* Prepare z_message_tables

* Matched another function, small updates

* Attempt to use asm-processor static-symbols branch

* Refactor text id declarations

* Begin large text codes parser function

* Fix merge

* Refactor done

* Build OK, add color and highscore names

* Remove encoded text headers and automatically encode during build

* Fix kanfont

* Various cleanups

* DISP macros

* Another match aside data

* Further progress

* Small improvements

* Deduplicate magic values for text control codes, small improvements

* Tiny progress

* Minor cleanups

* Clean up z_message_PAL comment

* Progress on large functions

* Further progress on large functions

* Changes to mkldscript to link .data in the .rodata section

* data OK

* Few improvements

* Use gDPLoadTextureBlock macros where appropriate

* rm z_message_tables, progress on large functions

* 2 more matches

* Improvements

* Small progress

* More progress on big function

* progress

* match func_80107980

* match Message_Update

* match func_8010BED8

* done

* Progress on remaining large functions

* Small progress on largest function

* Another match, extract text and move to assets, improve text build system

* Small nonmatchings improvements

* docs wip

* Largest function maybe equivalent

* Fix merge

* Document do_action values, largest function is almost instruction-matching

* Rename NAVI do_action to NONE, as that appears to be how that value is used in practice

* Fix merge

* one match

* Last function is instruction-matching

* Fix

* Improvements thanks to engineer124

* Stack matched thanks to petrie911, now just a/v/low t regalloc issues, some cleanup

* More variables labeled, use text state enum everywhere

* More labels and names

* Fix

* Actor_IsTalking -> Actor_TalkRequested

* Match func_8010C39C and remove unused asm

* More docs

* Mostly ocarina related docs

* All msgModes named

* Fix assetclean

* Cleanup

* Extraction fixes and headers

* Suggestions

* Review suggestions

* Change text extraction again, only extract if the headers do not already exist

* Fix

* Use ast for charmap, fix assetclean for real this time

* Review suggestions

* BGM ids and ran formatter

* Review comments

* rename include_readonly to include_data_with_rodata

* Remove leading 0s in number directives

* Review suggestions for message_data_static

* textbox pos enum comments, rename several enum names from Message to TextBox

Co-authored-by: Thar0 <maximilianc64@gmail.com>
Co-authored-by: Zelllll <56516451+Zelllll@users.noreply.github.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Roman971 <romanlasnier@hotmail.com>
2021-11-22 20:20:30 -05:00
Dragorn421
03636166b3
Fix matrices documentation (#952)
* Update names and doc of `Matrix_RotateRPY` and `SkinMatrix_SetRotateRPY` to ZYX Tait-Bryan angles

* Update name and doc of `Matrix_JointPosition` to `Matrix_TranslateRotateZYX`

* `Euler ***` -> `Tait-Bryan *** angles`

* Update docs of `SkinMatrix_Vec3fMtxFMultXYZW` and `SkinMatrix_Vec3fMtxFMultXYZ`

* Fix doc of `SkinMatrix_MtxFMtxFMult`

* Update docs of `SkinMatrix_Invert`

* Change name and docs of `SkinMatrix_SetRotateYRP` to `SkinMatrix_SetRotateYXZ`

* Change name and docs of `SkinMatrix_SetScaleRotateRPYTranslate` to `SkinMatrix_SetScaleRotateZYXTranslate`

* Change name and docs of `SkinMatrix_SetScaleRotateYRPTranslate` to `SkinMatrix_SetScaleRotateYXZTranslate`

* Change name and docs of `SkinMatrix_SetRotateRPYTranslate` to `SkinMatrix_SetRotateZYXTranslate`

* Add renamed functions to `namefixer.py`

* Run formatter

* Consistent function names (`ABC()` if equivalent to `A() B() C()`)
2021-11-17 05:52:26 -05:00
fig02
a3b4dcf388
File Select (z_file_choose) OK (#1012)
* matching split

* migrate progress

* split done and rodata migrated

* all data migrated to c

* start init

* progress

* progress

* progress

* progress

* progress

* progress

* copy done

* progress

* erase and settings done

* progress

* progress

* progress

* start keyboard

* progress

* progress

* progress

* progress

* Minor progress

* fix z_magic_dark issue

* func_80806F34 decomp'd

* verified equivalence

* one fix

* format

* merge petries work

* reorganizing

* lots of reorganizing and wraning fixing

* rename file

* remove language enum

* unwanted changes

* some symbol replacement, organization, and some names

* all symbols replaced, some organization

* some more cleanup

* continue docs

* Match the remaining functions in file_choose

* merge master

* select mode documented, all functions in file_choose.c named

* nameset functions named, some other cleaning

* some more general cleanup

* stub comments for cm, name a few things

* fix data and sizeof

* copy/erase functions and modes named

* rename assets, format

* change some struct members

* fixes

* review1

* fix maching error

* extract VTX data

* re add werror to ZAPD

* review 2

* fix

* remove file boundary padding

* remove zeroes

* review3

* change skybox stuff

* changes to  vs  etc

Co-authored-by: KrimtonZ <krimtonz@gmail.com>
Co-authored-by: Thar0 <17233964+Thar0@users.noreply.github.com>
Co-authored-by: mzxrules <mzxrules@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Roman971 <romanlasnier@hotmail.com>
Co-authored-by: Louis <louist103@gmail.com>
2021-11-15 22:33:44 +01:00
louist103
0b18419489
Scene cleanups (#1002)
* remove fake match

* u32 segment -> void* and add symbols to sEntranceCutsceneTable

* rename some symbols

* remove if1

* add the last missing symbol

* add symbols for almost all extrence textures

* finish adding the symbols

* Remove comment

* spelling fix

* Fig's and Dragorn's fixes

* add symbols to unkknown array

* format

* romans fixes
2021-11-08 21:15:37 -05:00
zelda2774
5ad7cf9dbb
Document parts of audio (#1000)
* Minor labelling

* progress

* play percentage -> delay

* duration -> gatetime

* more

* more

* more

* seqIdx -> playerIdx

* more

* more

* more

* more

* format

* fix comment

* filters

* more

* media

* confusion

* Sync load is actually slow load

* AudioHeap prefix

* more

* more

* reformat

* more

* more

* AudioLoad

* more

* more

* seq banks

* more consistent

* more

* name last function in audio_load

* More audio_synthesis

* clean up audio tables

* minor

* slow/fast load ramAddr

* format

* remove unused

* Remove union

* remove padding

* audio bank -> sound font

* seqLayer -> layer

* stuff

* seqChannel -> channel

* ChannelLayer -> Layer

* remove define, add bug comment

* format

* more

* cache enum

* more

* AudioSeq function prefix

* naming

* bankIdx -> bankId

* more

* format

* review

* more

* fixes

* avoid hardcoded sfxid's

* SE -> Sfx

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-11-07 17:58:50 +01:00