1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00
Commit graph

434 commits

Author SHA1 Message Date
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
Random
dcb8357f72
UCodeDisas_Disassemble (#981)
* ucode_disas_disassemble

* run formatter script

* fix types

* fix matrix print

* get rid of Gdma2

* add padding in Gline3DFix
2021-10-31 16:39:29 -04:00
Dragorn421
ed487b4bb8
Fix a few warnings (#998)
* Fix some warnings

* Revert warning fixes in audio code
2021-10-11 16:16:43 -04:00
EllipticEllipsis
16471bb68d
EnWf OK and documented (#967)
* a ton of progress, 14 functions remain

* cleanup

* a few more functions done, 11 remain

* finally all updated

* another function matched

* another action finished

* damage table

* death action done

* started very large action func

* more progress on long action funcs

* large action func matched

* 5 functions remain

* another large action finished

* start another action, doesn't match yet

* a few new functions, neither match

* done working on this for now

* Correct one nonmatching, fix compiler warnings

* Two functions left

* one left

* remove remaining gotos

* OK

* Delete outdated comment

* namefixer

* Flag macros

* audio, dmgeff, some colour

* Import symbols from object, reloc, name a few things

* Rest of object done

* Named a few more things, add action enum

* Name body parts and another couple of actions

* Last few names

* Delete asm

* Format

* undefined_syms, mods where possible

* Correct parent to EnEncount1

* Review

* Last newline

* louis and Dragorn's reviews

* Format

* More review

* Put back to isInvisible and or, as in EnGeldB

* Remove if (0)s in func_8009728C and change pointer arithmetic cast

* More review

* Unname headRot, make "fallthrough" case clearer, other review

* Format

* Even more review

* Rephrase

Co-authored-by: Zelllll <56516451+Zelllll@users.noreply.github.com>
2021-09-24 18:35:42 -04:00
petrie911
e51f50f0ff
Decompile z_kankyo (#956)
* working

* start color switch

* progress

* progress

* progress on bgm func

* progress

* game over matched (except the rodata meme)

* start update

* progress

* lightning docs done

* progress

* progress

* progress

* progress

* progress

* can compile at least

* suns state, progress on kankyo_update

* some new names

* progress

* progress

* progress

* new functions

* cleanup

* more matches

* another match

* now functional

* format

* better match

* hugely improved update

* cleanup/review

* remove old changes

* review2

* review3

* missed one

* review4

* change asm filenames

* update doorwarp1

* review5

* Kankyo_ -> Environment_

* format

* merge master and format functions.h

Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-09-20 12:51:35 -04:00
louist103
e3f1ccd902
Fix all headers to comply with C standard (#957)
* Fix all headers to comply with C standard

* fix a file in libultra

* Update include/stdbool.h

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

* Update stdbool.h

* Update z64animation.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-09-15 19:24:19 -04:00
petrie911
30939ccd28
code_800BB040 matched (#959)
* getting closer

* match!

* functions unnamed

* Update include/functions.h

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* small changes

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-09-13 15:29:11 -04:00
louist103
e31e35658d
Fix return UB (#958)
* Ydan_SP

* func_8002D7EC

* Gameplay_ChangeCameraStatus

* Graph_InitTHGA

* CollisioCheck_LineOC

* Fix more in camera and jpeg

* revert comment in player
2021-09-12 13:02:45 +02:00
zelda2774
9c7d3688ac
audio_load OK (#948)
* Match func_800DDB64

* Match func_800DC910

* remove stack comments

* Move nop padding to ucode_disas

* Partially label audio_synthesis

To some extent copied from sm64.

* cleanup

* Reverb and ReverbBits have nothing to do with reverbs

* review

* naming

* Revert "reduce diff"

This reverts commit cd4ac24d8809f3f8e5b0f91788bffd72b47d15af.

* Match func_800E283C

* Audio_DmaSampleData

* Warning fixes

* func_800E4198

* func_800E4918

* Fix compiler warnings in z_camera/db_camera

* cleanup

* terminology

* tiny bit of doc

* undo permuter_settings change

* Revert "Fix compiler warnings in z_camera/db_camera"

This reverts commit dfdfac47f2.

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-07 14:14:09 -04:00
zelda2774
d63ed0c17a
code_800F9280 OK (#945)
* Match func_800F9280

* Match func_800FA3DC

* Audio_ProcessSeqCmd

* macro cleanup

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-07 13:50:50 -04:00
zelda2774
c577ed1e84
Fix compiler warnings in z_camera/db_camera (#947)
* Fix compiler warnings in z_camera/db_camera

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-07 18:13:52 +02:00
Roman971
2862aa6d03
Various minor cleanups (#940)
* Fix includes using braces instead of quotes

* Remove some unused printf arguments

* Fix a condition in Door_Shutter

* Run the formatter

* Cleanup incorrect uses of DynaPolyMoveFlag as function arguments

* Cleanup combined Math_StepToF checks
2021-09-05 21:00:24 +09:00
zelda2774
4444c5ea35
audio_synthesis OK + partially documented (#920)
* Match func_800DDB64

* Match func_800DC910

* remove stack comments

* Move nop padding to ucode_disas

* Partially label audio_synthesis

To some extent copied from sm64.

* cleanup

* Reverb and ReverbBits have nothing to do with reverbs

* review

* naming

* Undo changes to permuter_settings.toml

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-08-31 18:53:35 -04:00