Commit Graph

681 Commits

Author SHA1 Message Date
Dragorn421
fcc5cf828d
libu64 (#1705)
* libu64

* libu64 -O2

* Add libu64.md
2024-11-07 17:27:19 -08:00
Derek Hensley
f946162a89
Extract assets to extracted (#1708) 2024-10-15 22:41:48 +11:00
Derek Hensley
5c6310306f
Remove include_data_with_rodata spec hack by incremental link of z_game_over (#1691) 2024-09-19 18:22:39 -07:00
Tharo
d14e1ac1df
[Audio 8/?] Check-in handwritten sequences, build sequences, automate various sfx arrays (#1679)
* [Audio 8/?] Check-in handwritten sequences, build sequences, automate various sfx arrays

* Fix whitespace in aseq.h

* Suggested changes, adjust some MML syntax and add more instruction descriptions

* Special case progress script (#9)

* Hack progress script

* Small adjustment to text fileSectionFixer

* Add the dir of the input .seq file to the list of includes to sequence assembling so that assembler-level includes like .include or .incbin work intuitively

* Remove old comment that was missed before

* aseq.h tweaks

* Review suggestions, aseq.h adjustments

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-09-15 15:26:32 -07:00
Derek Hensley
e982c44721
Import data + bss (#1676)
* extract gfxprint font data as blobs

* Remove font from fault_drawer out name

* audio heap bss

* audio sequence bss

* audio session config bss

* Move code_801D1E80 down in the spec

* Gfxprint don't just include generated c file
2024-09-07 15:03:00 -07:00
Tharo
7210cfac2f
[Audio 6/?] Build Soundfonts and the Soundfont Table (#1675)
* [Audio 6/?] Build Soundfonts and the Soundfont Table

* Fix bss

* Maybe fix warnings

* Improve lots of error messages

* Suggested changes from OoT PR

* Suggested changes

* Make soundfont_table.h generation depend on the samplebank xmls since they are read, report from which soundfont the invalid pointer indirect warning originates from
2024-08-27 18:09:48 -07:00
Tharo
98d9571f51
[Audio 5/?] Build the Samplebank Table (#1674)
* [Audio 5/?] Build the Samplebank Table

* OoT suggested changes

* Fix format specifier

* Moved linker_scripts files used in final linker to linker_scripts/final

* Populate OTHER_DIRS with linker_scripts subdirs

* Unhide the partial link command
2024-08-17 17:02:57 -04:00
Tharo
7209abbec2
[Audio 4/?] Build Samplebanks, match Audiotable (#1672)
* [Audio 4/?] Build Samplebanks, match Audiotable

* Add missing scope in MARK chunk handling

* Add comment to generate asm file when buffer bug data is emitted, remove duplicate CC4 definition

* Adjust comment

* SBCFLAGS

* Remove unnecessary comments on notes_lut

* Split build directories creation command into several to avoid it becoming too long

* objcopy -j -> --only-section

* Try fix mkdir from clean

* Try fix 2
2024-08-14 17:55:45 -07:00
Derek Hensley
1e4a56fbdf
EnBsb (Captain Keeta) OK (#1667)
* Match EnBsb

* A couple nicer matches

* clean up

* PR review

* hitmark enum

* PR Review 2

---------

Co-authored-by: Synray <31429825+Synray@users.noreply.github.com>
2024-07-31 18:35:54 -07:00
engineer124
d0cf4fbcea
z_en_zl4 OK (#1663)
* match zl4

* cleanup
2024-07-28 12:48:10 -04:00
Tharo
1685597d9a
ovl_En_Knight OK (#1659)
* En_Knight matching

* Cleanup

* Fix

* Documentation Pass

* Suggested changes. Use IGOS_LIMB_* whenever it's guaranteed that the skeleton is gIgosSkel, still using KNIGHT_LIMB_* whenever it's ambiguous

* Remove related undefined syms

* More suggested changes

* BODYPART_NONE and bodypart enum

* Suggested changes

* Braces

Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>

* csCamId

Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>

* Various suggestions

* EnKnight_UpdateLimbCollider -> EnKnight_SetColliderSphere

* Yase/Debu -> Thin/Wide

* csCam -> subCam

* Format

* Fix

* animTranslation -> animMovement, dmgEffect -> drawDmgEff

* More brackets

Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>

---------

Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>
2024-07-24 17:05:51 -07:00
TrulyNaN
45a891b751
ovl_bg_dblue_elevator OK and documented (#1654)
* Creating branch for ovl_bg_dblue_elevator's PR.

* OK

* Screwing with my Debian install. Safety commit.

* Applied first pass of review comments to PR and added authors.

Co-authored-by: Derek-Hensley <hensley.derek58@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
Co-authored-by: Isghj5 <isghj5@gmail.com>
Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu>
Co-authored-by: AngheloAlf <angheloalf95@gmail.com>

* Found some review comments I missed and applied the suggestions.

* Added enum for water flow and renamed waterSurfaceYPos to waterSurfacePosY

* Forgot to add last contribution.

Co-authored-by: Tom-Overton <tom.overton@outlook.com>

---------

Co-authored-by: Derek-Hensley <hensley.derek58@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
Co-authored-by: Isghj5 <isghj5@gmail.com>
Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu>
Co-authored-by: AngheloAlf <angheloalf95@gmail.com>
Co-authored-by: Tom-Overton <tom.overton@outlook.com>
2024-07-04 14:23:28 -04:00
Tom Overton
bb221b4a0f
EnOkuta (Octorok and its projectiles) OK and documented (#1641)
* Match EnOkuta

* Match data

* Use the generated reloc

* Delete extern stuff and format

* Extract the DL

* Fix lots of stuff

* Copy a lot of names over from EnSyatekiOkuta

* SFX enums

* Lots more stuff

* Constants and other stuff

* Some more stuff I missed

* Name more functions using OoT/SyatekiOkuta as reference

* An easy function I missed

* Some floats

* Getter macros

* Types enum

* Name the cylinder inits a little clearer

* Create bodyparts enum and name all data

* Name all functions

* Name `timer` struct var and all temps

* Name the `jumpHeight` struct var

* Create damage effect enum

* Name the extracted DL

* Name `numConsecutiveProjectiles`

* Finish docs

* Document XML

* Clarify that this blue Octorok isn't the shooting gallery one

* Respond to reviews

* Stuff

---------

Co-authored-by: Synray <31429825+Synray@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-06-23 18:09:22 -07:00
Tharo
384115d2a0
ovl_En_Death and ovl_En_Minideath (#1645)
* En_Death new build system edition

* Fix merge

* Matched

* Fix merge

* Some names

* Suggested changes

* Further suggested changes

* Add value comments to MinideathAction
2024-06-20 18:36:11 -07:00
mzxrules
2c680efa91
z_map decompiled (#1032)
* First batch of functions

* more ok

* z_map_data OK

* More OKs, MinimapList ZAPD breaking change

* func_80103A58 improvements, more OK

* func_80106D5C and func_801091F0 decomped

* func_801031D0 decomped and some fixes

* house cleaning, more OKs more decomp

* Even more OKs

* func_80105C40 almost OK, more OKs

* func_80108AF8 OK and more

* All functions attempted

* func_8010534C OK

* Start documentation, rename DoorCtx

* More OKs, split map_data.data, more doc

* incremental clean-up, more function names

* more function names

* func_801068FC OK

* old uncommitted changes

* minor tweaks

* implement easy fixes

* more fixes

* z_map_disp OK, implement more suggestions

* delete utility program

* migrate data

* TransiActor ->TransitionActor

* Major documentation pass

* first pass of changes

* warning fix attempt, revert ZFile.cpp

* Fix FAKE match

* Easy fixes

* implement gDPLoadTextureBlock_Runtime

* z_demo bss patch

* Extract white square texture

* Implement more suggestions

* rework MapIndex/DungeonIndex

* revert dungeonSceneIndex -> mapIndex in some spots, implement suggestions

* more suggestions

* minor nits

* fix #include
2024-06-20 18:21:37 -07:00
engineer124
b55f8ffe6e
sys_math3d.c Decompiled and Mostly Documented (#1450)
* Use matched sys_math3d functions by Tharo

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* kinda match some unattempted functions

* move sys_math3d function declarations to z64math.h

* Rename some simple functions

* Take matched Math3D_LineVsLineClosestTwoPoints from OoT

* minor fixes to make stuff actually equivalent

* func_8017FB1C

* format

* minor cleanup

* Math3D_PointOnDirectedLine

* func_8017FB1C documentation

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* Remove actorfixer

* fix merge

* Apply renames

* more cleanup

* bss cleanup

* match Math3D_CylVsLineSeg

* WIP

* OK

* small cleanup

* Remove macros.h from sys_math3d

* Small cleanup

* Some more small clean up

* cleanup and docs

* cleanup

* PR Review

* cleanup

* fix merge

* fix merge

* merge main

* fix bss

* bss

* fix

* PR Review

* bss fix

* Merge main

* Fix bss

* Fix merge

* Add zero vecs to sys_math3d

* Format

* namefixer run

---------

Co-authored-by: angie <angheloalf95@gmail.com>
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-06-14 22:39:31 -07:00
Derek Hensley
0b375cadb0
Msgevent OK (#1637)
* Decompiled, some commands still unnamed

* Use full weekevent reg names

* Fix func_8094E69C

* Fix Player_GetMask

* Eventinf, mask worn, and item action argument formatting

* decimal rupees

* Times (day, hours, minutes) as decimal

* msgEventScriptPos

* Callbacks

* Name final commands

* Enum

* Arrays

* functions

* Small cleanups

* Clean up actors

* Remove event from some variable names to make them shorter

* Some more function renames

* newline

* Missed a few unks in commands

* Update functions.txt

* PlayerMask

* MSGMODE_PAUSED

* Script time macros

* EnSob1_GetWelcome default

* Whole bunch of renames

* Format

* Add CMD to commands

* Update code_functions

* structs for size

* z64scripts.h

* MsgEventCallback -> MsgScriptCallback

* format

* MsgEvent_RunScript stop

* Remove cmd handler comment

* cmd -> script in MsgEvent_RunScript

---------

Co-authored-by: Thar0 <17233964+Thar0@users.noreply.github.com>
2024-06-14 21:35:22 -07:00
Tharo
44057c087a
ovl_En_Wdhand (#1629)
* 2 non-matching

* Matching

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Cleanup + docs

* Suggested changes

* Format

* Update EnWdhand_GetInitVelocity

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-05-19 10:18:34 -07:00
Anghelo Carvajal
a04f1b8e05
Change tooling for better elf correctness (#1632)
* Add addresses for makerom and boot segments

* Mark entrypoint as the entry of the elf

* Add extra labels to macro.inc

* Use dlabel, jlabel and endlabel in disassembly

* Make jlabel global

* git subrepo pull tools/asm-processor

subrepo:
  subdir:   "tools/asm-processor"
  merged:   "92b9ec72f"
upstream:
  origin:   "git@github.com:simonlindholm/asm-processor.git"
  branch:   "main"
  commit:   "92b9ec72f"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Use `dlabel`s for non-functions in .text

* Add linker asserts

* Move framebuffer_lo to before the makerom segment to avoid `dot moved backwards` warnings

* fix

* Improve assert message

* fix

* Third fix

* Fix four

* Move undefined_syms to linker_script folder

* Make second linker script file to avoid abusing undefined_syms

* Update Makefile

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Rename to extra.ld

* Use entrypoint symbol on ROM header

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-05-17 06:41:23 -07:00
Synray
e6a69dfb2b
Danpei movebg (#1429)
* Bg_Danpei_Movebg OK

* Cleanup

* PR comments

* Couple small things

* Address the nit

* Flags

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-05-16 08:29:14 -04:00
Tom Overton
7c93d5e125
EnInvadepoh (Aliens, UFO, Invasion Handler, etc.) OK and documented (#1614)
* deimplementation complete

* newlines

* match

* data import

* back port cleanup changes

* stuff

* naming and such

* all funcs provisionally named

* more stuff

* merge

* Fix merge issues

* begin cleanup

* Use constants for all face animation data

* Use THIS like almost every actor does

* Change "Light Ball" to "UFO"

* Rename the alien types

* EnInvadePoh -> EnInvadepoh

* Rename the types

* Rename some Twinmold stuff

* ConfusedRomani -> SilentRomani

* Fix stack size issues with EnInvadepoh_Cremia_Init

* Move a struct out of the header to where it belongs

* Some header cleanup and struct names

* Name remaining struct vars

* Some more struct var renames

* Finish reviewing the struct var names

* Rename most of the interactInfo stuff

* Consistency

* Remove unused union

* Define EN_INVADEPOH_LIMB_MAX like EndingHero6 does

* Fix header

* Update functions.txt and variables.txt

* Create macros for accessing spawn time and kill count

* Some defines

* Some minor comments and cleanup

* Rename some functions

* Comments for those three functions

* Draw function cleanups

* Some damaged and dead cleanup

* Death scale stuff

* Good chunk of alien functions

* Invasion state naming

* Weekeventreg naming

* Happy with >20% of functions now

* A couple more functions

* More consistent names for BSS variables

* Some Init cleanup

* Happy with 30% of the functions now

* Finish the abductors

* Some random functions to get the functions I'm happy with >1/3rd

* Use `InitPath` for everything

* UFO functions done, >40% functions I'm happy with

* Do a lot of work on InvasionHandler action funcs

* Finish invasion handler code

* InitVars

* Rename the "closest alien" stuff to "closest alien threat"

* Finish most of the dog functions

* Lots of small stuff here and there

* Finish documenting the dog bug

* Document `EnInvadepoh_Dog_IsCloseToPath`

* `EnInvadepoh_Dog_MoveAlongPath` and other fixes

* Simple comment for `EnInvadepoh_Dog_Move`

* Various path functions, finish dog

* Consistently use "SetMatrixTranslation"

* Change all the angleToPlayer stuff to pitch/yaw

* Some RewardRomani functions

* Finish RewardRomani

* Finish Night1Romani and BarnRomani, >75% of functions done

* Some minor stuff

* Document bug

* Finish all of SilentRomani minus the Idle functions

* Finish EnInvadepoh_SilentRomani_Idle

* Finish Night3Cremia

* Finish Night3Romani

* Finish `EnInvadepoh_Ufo_SpawnSparkles`

* Finish some library functions

* Finish the alien pathing stuff

* Finish Romani path stuff

* Finish all non-InteractInfo stuff

* InteractInfo -> ModelInfo

* Create a `EnInvadepohFaceAnimBase` struct

* Name some of the animation data

* Switch to `Chained`/`ChainedDelay` and do some other cleanup

* Name all of the animation data

* Finish documenting and cleaning up the face animation functions

* Some comments at the top of the file

* Clean up forward declarations

* Clean some stuff up to the ModelInfo functions

* Fix build

* Move the animation data around so all the ModelInfo functions are adjacent

* Review

* Use `CLOCK_TIME_MINUTE` in `EnInvadepoh_Alien_PathComputeProgress`

* Respond to some of Anghelo's review

* Update comment on spawn time macros explaining what indices are usable

* Create a `DEATH_SCALE` define

* `WEEKEVENTREG_RECEIVED_MILK_BOTTLE` -> `WEEKEVENTREG_RECEIVED_ALIENS_BOTTLE`

* Forgot to do the bomber's notebook stuff too

* parallelogram -> rectangle

* Respond to engineer's review

* Slight spacing fix

---------

Co-authored-by: petrie911 <petrie911@users.noreply.github.com>
Co-authored-by: petrie911 <pmontag@Monday.localdomain>
Co-authored-by: angie <angheloalf95@gmail.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-04-29 08:19:55 -07:00
Derek Hensley
471d86f530
Build Sync (#1600)
* Rename outputs

* Makefile target renames

* Add run target

* yeet z64compress

* venv

* baserom_uncompressed -> baserom-decompressed

* input rom name to baserom.z64

* Add BUILD_DIR makefile variable

* Move built roms to build dir

* Move baserom to baseroms folder

* Add version to map file name

* Makefile cleanup

* Rename ldscript to include version

* Multiversion build

* n64-us version name

* Remove venv as dependency of setup

* Readme wording

* extract_baserom.py suggestion

* Readd checksums

* Make .venv work with windows

* missed an endif

* Cleaner windows venv implementation

* Remove duplciate process

* Build process steps

* Move make_options back

* Fix schedule build directory

* Fix schedule includes

* Makefile NON_MATCHING check -> != 0

* OOT 1704 changes

* Small cleanups

* Missed 1 thing

* UNSET -> SYMS

* Update extract_baserom.py

* dmadata.py

* Small cleanup

* dmadata_start

* Format

* dmadata files

* Fix makefile comment

* Jenkins report fix

* extracted dir

* Python dependencies order in readme
2024-04-06 11:07:58 -07:00
petrie911
45ae63ccc5
Obj_Mine matched (#1225)
* Obj_Mine

* Obj_Mine

* Fixups

* Nonmatchings + cleanup

* Small cleanup

* externs

* structs complete

* wew

* some docs. still baffling

* documented physics stuff

* docs. physics be wack

* forgot some things

* format

* more cleanup

* merge and such

* format

* more format and cleanup

* asm stuff

* Update src/overlays/actors/ovl_Obj_Mine/z_obj_mine.c

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>

* now with decomp.me

* removed some extraneous macros I didn't end up using

* fixes and formats

* merge

* my god, it matches

* format

* removed macros

* more fixes

* format

* format

---------

Co-authored-by: Maide <eeeedddccc@hotmail.co.uk>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: petrie911 <petrie911@users.noreply.github.com>
Co-authored-by: petrie911 <pmontag@Monday.localdomain>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
2024-04-06 10:40:41 -07:00
Derek Hensley
e3ce14c932
Misc Clean (#1602)
* thiefbird

* eff_ss_dead

* PreRender_AntiAliasFilterPixel tmp -> invCvg

* Skin_InitAnimatedLimb

* gfxalloc

* loadfragment

* loadfragment strings
2024-04-06 10:23:06 -07:00
Jeff Padgham
47d43f2fa1
Mayor Dotour (ovl_en_dt) OK and documented (#1607)
* EnDt deecomp first pass, two nonmatching

* Some cleanup, got the big boy matching

* Some light cleanup, documenting blinking behaviour

* Fixed last non-matching with some permuter silliness

* Decompilation complete

* Mayor documentation, first pass

* Updating some unknown vars in baisen

* Added an enum for mayor's cutscene state

* Formatting pass for mayor

* Cleaning up unk var in mayor meeting method

* Some cleanup and changes based on PR feedback

* Another cleanup and fix pass based on PR feedback

* Updated mayor event flags according to their usage

* All the parentheses

* Another round of PR feedback cleanup

* Having another crack at naming/cleanup based on PR feedback

* Renaming animation symbols

* Fixing broken references in other actors from anim rename

---------

Co-authored-by: GinNoOokami <noreply>
2024-04-06 10:05:04 -07:00
Derek Hensley
a7fa8cc241
Clean2 (#1605)
* AnimationContext_Update

* TransitionTile_InitGraphics

* disasm files

* gPlayerFormItemRestrictions -> code_8012EC80

* fix

* Extract gCircleTex

* Const fixes

* gPlayerFormItemRestrictions suggestions

* Setup_InitRegs

* z_inventory
2024-02-20 14:04:23 +11:00
Tharo
7e716e120f
ovl_En_Kitan (#1535)
* Decompiled

* Documented

* Suggested changes, mention that on debug there is an assert(false) in EnKitan_GetQuestionMessageId

* Format

* Update
2024-02-07 10:21:54 -03:00
Tom Overton
5684c79312
BossHakugin (Goht) OK and documented, EnHakurock documented, other assorted documentation (#1599)
* Fix struct

* 20/79 OK

* BossHakugin_Draw OK

* func_80B0D69C OK

* func_80B0D2B8 OK

* func_80B0D750 OK

* Shadow function docs

* Fix some non-matchings

* Apparently this matches now? It didn't before

* OverrideLimbDraw OK

* BossHakugin_PostLimbDraw

* Animation Cleanup: En_G* (#1395)

* wip

* more cleanup

* more cleanup

* one more thing

* one more default case

* missed brackets

* PR Review

* add more matches and fill stuct

* 3 more Draw functions

* func_80B0E5A4

* Finshed the Draw functions

* Small cleanup

* Most of the death-handling code done

* more matching

* functions

* Goht collab (#9)

* Animation Cleanup: En_G* (#1395)

* wip

* more cleanup

* more cleanup

* one more thing

* one more default case

* missed brackets

* PR Review

* z_message_nes (1 NON_MATCHING) (#1394)

* Bring over progress

* Some docs

* scratch urls + format

* Fixes

* Match Message_DrawTextNES

* String macros

* color structs

* Document object_mk (#1389)

* Updated object_mk animation, limb, and skeleton names

* Updated object_mk texture and DList names

* Added comment to object_mk.xml

* Remove "ing" from Anim names

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

* Update z_en_mk.c to not use "ing" in names

* Running formatter

---------

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

* Player Docs: Initial framework for "Action Change Lists" (#1397)

* copy fig docs

* adjust wording

* another fix

* fix bool

* PR Suggestion

* Animation Cleanup: En_H* (#1399)

* begin H

* more cleanup

* Animation Cleanup: En_I* (#1400)

* cleanup I

* oops

* Start Player Item Docs (#1396)

* Copy Fig Docs

* small cleanup

* ItemChangeType comment

* bool

* item change comments

* PR Review

* rm comments

* Animation Cleanup: En_K* (#1402)

* cleanup k

* one more name

* Animation Cleanup: En_J* (#1401)

* cleanup J

* small fix

* functions

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: Zach North <zrnorth@gmail.com>
Co-authored-by: petrie911 <pmontag@Monday.localdomain>

* hotfix

* all functions decomped

* all functions decomped

* Now with more data

* small fix

* another small fix

* ok last small fix I swear

* cleanup

* func_80B0A8C4 OK

* func_80B0D9CC OK

* Use generated reloc for Goht + remove Goht's undefined_syms

* Bodyparts + other clean up

* cleanup

* oops

* fix merge

* begin docs

* fix merge

* cutscene docs

* effects docs

* small docs

* Document colliders

* Odds and ends in the struct

* Name some functions

* Name two functions

* Some action functions and other odds and ends

* Name the lightning segments and electric ball functions correctly

* Names and other cleanup

* Start on hakurock + more cleanup

* Name all hakurock functions

* Name hakurock effects + create a GET_TYPE macro for it

* Finish documenting Hakurock

* Name one more function in BossHakugin

* Name a few more things

* Name a lot of struct vars

* Wall-related stuff

* Fix some fake matches

* Name a couple more struct vars

* Document some more of the struct

* Name the limb flag stuff

* Name the last unnamed struct vars

* Name the horn colliders correctly

* Some initial work on documenting data

* Some function documentation

* A couple of cleanups

* Finish documenting BossHakugin_UpdateBaseRot

* Name BossHakugin_SetLightningSegmentColliderVertices

* Document BossHakugin_AddLightningSegments

* Document BossHakugin_RunUpdateCommon and related functions

* Document BossHakugin_AddMalfunctionEffects

* Document BossHakugin_StepVectorToTarget

* Rename to BossHakugin_StepVector

* Finish documenting BossHakugin_AddMalfunctionEffects for now, might come back later though

* Document BossHakugin_UpdateSubCam

* Document BossHakugin_Thaw

* Document BossHakugin_ChargeUpAttack

* Some scattered docs

* Finish documenting the top "library" functions

* Document intro cutscene functions

* Document running and charging

* Document downed

* Document throwing

* Document remaining non-death action functions

* Document most of the death cutscene

* Get started on documenting crushing rocks

* Separate out the crushing rocks into their own struct

* Document the ExplosionLimbHideInfo

* Finish documenting BossHakugin_DeathCutsceneCrushedByRocks

* Almost done with rocks I think

* Port over Odolwa shadow documentation

* Finish documenting draw functions

* Finish documenting BossHakugin_Update

* Name variables in BossHakugin_UpdateElectricBalls

* Document BossHakugin_CheckForBodyColliderHit

* Finish documenting BossHakugin_UpdateDamage

* I've convinced myself these names are fine

* Almost finish documenting every update function

* Remove TODOs from the header

* Finish documenting the C file

* Delete duplicate define

* Finish variables.txt for Goht

* Undo change that desync'd z_eff_ss_fhg_flash.h from other effect headers

* Missed a THIS

* Some low-hanging review responses

* Add comment explaining something in BossHakugin_ShouldWait

* Match BossHakugin_SpawnLargeStalactiteWalls using a for-loop

* Create GOHT_ELECTRIC_BALL_COUNT_MAX constant

* vector -> norm and targetVector -> targetNorm

* Add TODO comments for dynamic shadow functions

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Parker B <20159000+jpburnett@users.noreply.github.com>
Co-authored-by: petrie911 <pmontag@Monday.localdomain>
Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
Co-authored-by: Zach North <zrnorth@gmail.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
2024-02-02 15:10:48 +11:00
Derek Hensley
6fb4a07325
General Cleanup 3 (#1543)
* voicestopread -> voicestopreaddata

* PadMgr_ThreadEntry

* PointLight_t

* OS_VI_UNK28

* print stuff

* Remove OS_PRIORITY_THREADTAIL

* sBoeDlists -> sBoeModelInfo

* Prerender_DrawBackground2D

* segments

* Revert "print stuff"

This reverts commit 1d833e2f0d.

* format

* Update src/overlays/actors/ovl_En_Mkk/z_en_mkk.c

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

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-01-29 10:51:59 -03:00
Derek Hensley
6a15ce9521
Extract Kanji + some adjacent docs (#1536)
* XML + docs

* PR

* newline

* newline pt2

* named textures in kanji.xml

* Kick Jenkins

---------

Co-authored-by: emilybrooks <emilybrooksemilybrooks@gmail.com>
2024-01-21 12:47:27 +11:00
Derek Hensley
665353f344
Irqmgr + scheduler Docs (#1527)
* irqmgr docs

* Sched_FlushTaskQueue

* scheduler docs
2024-01-20 20:47:00 -03:00
Derek Hensley
fe6494187e
Text Extraction + some Message Docs (#1530)
* Some Decoder WIPs

* Improvements

* POC

* Fix bss

* another newline

* Staff OK

* Cleanup + fix progress script

* script cleanup

* Some docs

* makefile

* Extract text from extract_assets.py

* More docs

* Even more docs

* Other message assets

* Small cleanups

* Clean up decoders/encoders

* Message_SetupLoadItemIcon -> Message_DecodeHeader

* Some more docs

* Remove mkdmadata

* Fade Skippable

* More cmd docs

* 1 left

* Last notes

* HS_TIMER -> HS_TIME

* More general docs

* Format

* Note the charmap conversion for buttons in message_data_fmt_nes.h

* Remove trailing whitespace

* Small fixes

* PR
2024-01-19 21:16:57 -03:00
Derek Hensley
6412ddad50
General Cleanup (#1529)
* Cleanup

* vi define cleanup

* kdebugserver

* osmotor

* Remove sqrtf.c

* Move osFlash out of libultra

* PadUtils_Destroy

* BOOT_ADDRESS_ULTRA

* Fault

* Format

* viconfig.h

* More small cleanups

* gfx cleanup

* Format

* Forgot to save

* variables.h

* dListTable -> dListSides

* Fix header includes
2024-01-15 10:03:13 +11:00
Derek Hensley
663834cbc0
Skybox Docs (#1534)
* xml

* Docs

* 0s
2024-01-14 15:56:19 -03:00
louist103
b2c3cc6a11
ObjMure2 OK and documented (#1525)
* data

* OK

* small docs

* docs

* Reloc

* Format

* this could have been a constexpr

* fix bss

* the rest of the fixes

* format

* revert makefile and clangformat

* comments
2024-01-14 15:36:22 -03:00
Derek Hensley
1611c22212
Dmadata Migration (#1526)
* Matching dmatable

* Generate NON_MATCHING dmadata

* Clean up dmamgr

* Format

* Ignore tools/buildtools/mkdmadata

* Warnings

* Use SYMS flag instead of segment name

* PR + more notes

* PR cleanups
2024-01-14 13:04:53 -03:00
Tom Overton
54f7aa23b5
Add original asset names to all object_p* and object_r* files (#1519)
* Add original asset names to all `object_p*` and `object_r*` files

* Respond to review
2023-11-28 08:19:22 -03:00
Anghelo Carvajal
7649cd309a
Organize libc and libm files (#1499)
* memmove

* strcpy

* strcmp

* memset

* fmodf

* fix some missing includes

* Remove libc header dependencies on libultra

* fix

* review
2023-11-28 13:01:14 +11:00
Anghelo Carvajal
6dd1600936
Organize libc64 files (#1492)
* Move qrand to libc64

* use an union to avoid type punning

* __osMalloc

* math64.c

* fixed_point.h

* sleep

* aprintf.h

* sprintf

* malloc

* use original names on aprintf.c and malloc.c

* qrand cleanup pass

* use original names of sleep.c

* og names for sprintf

* more cleanup

* format

* fixes

* whoops

* use ARRAY_COUNT again

* comment

* Use `fu`

* forgot this one

* review

* fix

* sneak a tiny cleanup
2023-11-27 12:01:42 +11:00
Anghelo Carvajal
34492a4386
Move the system heap and the framebuffers to their own segments (#1488)
* make segments for the systemheap and the framebuffers

* define in the makefile

* undefined syms

* Make segments for the pre boot buffers too

* Update spec

Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com>

* review

* Update spec

Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com>

* Update Makefile

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

* comments

* comment

* move comment about the hardcoded address to buffers.h

* rewrite SYSTEM_HEAP_END_ADDR in terms of other symbols

* Use `ALIGNED` on all the buffers

* Rename SYSTEM_HEAP_END_ADDR to FRAMEBUFFERS_START_ADDR

* Put ALIGNED at the right like the rest of the codebase

* merge

* gLoBuffer

* gHiBuffer

* Add a static assert to ensure the address of gHiBuffer haven't shifted without the user noticing

* smol include cleanup

---------

Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2023-11-26 09:47:21 -03:00
Tom Overton
3a952a655d
Boss05 (Bio Deku Baba) OK and documented (#1510)
* Init, Destroy, Update, easy actions

* Just the hard 3 + 1 left

* One left

* OK

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>

* Data/bss in, extract colheader

* Clean up externs

* Better match for func_809EECBC

* Sfx

* Lot of naming

* fix build

* Name skel stuff

* name limbdraws

* name colliders

* Document `object_boss05`

* Port some names from Odolwa

* Name bio baba types (and relatedly clean up EnPp)

* Better names for the LimbDraw functions + some related vars

* Name all functions

* Name a lot of struct vars

* Colliders and body parts

* Name all struct vars (might come back for a few of these though)

* Name most stack vars

* Fragment states, ice data

* Limb rot index

* Damage effects

* Enum for hit reactions

* Enums for movement state/attack state

* Finish up

* Missed this in EnPp

* Respond to reviews

* Fix comment

* Reverse order for postlimbdraw, etc. functions

* Remove blank line at the top

* Respond to review

* Make a "getter" macro for the force detach timer

* Respond to review

---------

Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
Co-authored-by: angie <angheloalf95@gmail.com>
2023-11-23 09:37:16 -03:00
engineer124
8ab62788b2
Audio Voice Decompiled (#1490)
* Add Tharo's documentation comments

* Voice progress

* Match osVoiceControlGain

* Match osVoiceStartReadData

* Cleanup

* Add docs from n64devkit

* WIP on osVoiceGetReadData

* Add comment

* Match voiceinit.c

* Remove CONT_ERR, already present in controller.h

* Really close to matching osVoiceStopReadData

* Progress on voicecheckword

* Match osVoiceSetWord

* Add error codes

* Matched __osVoiceContRead2... Somehow...

* Add small amount of docs

* __osVoiceContRead36 was basically identical from __osVoiceContRead2

* docs, but maybe a little carried away

* Match __osVoiceContWrite4, Write is very similar to Read

* Match __osVoiceContWrite20 from __osVoiceContWrite4, ez

* Some docs

* Improve osVoiceGetReadData

* Match osVoiceCheckWord

* currentSyllable -> currSyllable

* Match osVoiceMaskDictionary

* Match __osVoiceSetADConverter

* Meme matched osVoiceStopReadData

* small cleanup

* Missed macros

* osVoiceGetReadData Meme Match

* Small clean-up

* format

* Properly split voice files from code

* Use proper flags for voice files

* Add basic docs for func_801A5AF0

* Import Voice Data

* Update matching functions in code_801A51F0 from audio WIP

* Update matching functions in code_801A4EB0 from audio WIP

* Match func_801A5A1C

* Match func_801A5228

* Match func_801A54D0

* Doc padmgr functions used

* Match func_801A5680, it's near identical to func_801A54D0

* code_801A51F0 OK

* Match func_801A4EB8

* Match func_801A4FD8 (mips2c got it matching directly)

* code_801A4EB0 & all of voice, OK

* Import bss

* Better match for func_801A5A1C

* format

* Cleanup

* Clean up dictionary

* Introduce OSVoiceDictionary

* More voice docs

* Fix bss

* Import code_801A4EB0 data

* Introduce Word Id enum

* Dictionary: u8 -> u16

* Introduce bgms

* Fill in bgm enums

* Rename bgm to clearer names

* Fix spacing

* Fix "No_Music" define

* remove comment

* import rodata

* Improve bgm names, found another seqId function

* Another seqId function

* Another name change

* Woods of Mystery -> Sarias Song

* Fix match in osVoiceControlGain

* Fix bss reordering

* Fix bss file split

* add saria's song bgm to pierre

* Another bgm function found!

* Add bgm's to `gSaveContext.seqIndex`

* Fix BSS

* fix bss

* Fix bss

* cleanup

* more cleanup

* cow voice weekeventflag

* small cleanup

* some docs

* cleanup var

* global

* more docs

* PR Review

---------

Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2023-11-17 12:29:42 +11:00
Tom Overton
60ddc5891e
EnJso2 (Garo Master) OK and documented (#1485)
* EnJso2 (Garo Master) OK and documented

* Name all the override input things

* Respond to reviews
2023-11-13 09:41:51 -03:00
Tharo
a441a3cb2d
Decompile ovl_En_Po_Composer (#1391)
* Decompiled, mostly named

* Few more labels and document object

* Review changes

* Further review changes

* Improve EnPoComposer_UpdateEnvColor

* PO_COMPOSER -> POE_COMPOSER, tweak animation names

* More changes

* OCARINA_MODE_EVENT

* fix merge

---------

Co-authored-by: angie <angheloalf95@gmail.com>
2023-11-10 09:52:11 -03:00
Derek Hensley
e96f18d4e7
Small boot cleanup (#1475) 2023-11-10 10:08:21 +11:00
Anghelo Carvajal
70637abca9
ovl_En_An OK and somewhat documented (#1457)
* Init and Destroy

* EnAn_Update

* EnAn_Draw

* the overrides

* func_80B54124

* two more

* more funcs

* SCHEDULE_CALC_TIME_ALT

* moar

* mor

* mas

* scriiiipts

* mor funcs

* almost everythihng

* migrate data

* func_80B57B48 NON_EQUIVALENT

* object symbols

* face

* fix merge

* slots

* schedule result enum

* func_80B57B48

* format

* name some easy to name struct members

* stateFlags

* object stuff

* accessories

* text ids

* more function naming

* more naming

* name some anims

* trying to make sense out of the schedule

* convert schedule to ifs

* clean it up

* schedule algorithm

* many placeholder names

* name most of the important schedule values

* Add notes to every reamining schedule enum value

* dec

* HandleSchedule

* more naming

* name flags

* name some of the ProcessSchedule functions

* and more naming

* a bit of asset naming

* some typos

* asset naming

* more asset naming

* printing code

* WEEKEVENTREG_COUPLES_MASK_CUTSCENE_*

* name the mouths

* idk

* whoops

* format

* Name the remaining weekeventregs from anju

* name more flags

* whoops

* a

* Incorporate SCHEDULE_TIME

* format

* fix merge

* cleanup

* remove debug stuff

* clean

* WEEKEVENTREG_TALKED_ANJU_IN_LAUNDRY_POOL

* whoops

* remove some gotos

* whoops

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* review

* whoops

* review

* ENAN_GET_8000

* Update src/overlays/actors/ovl_En_An/z_en_an.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update src/overlays/actors/ovl_En_An/z_en_an.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update src/overlays/actors/ovl_En_An/z_en_an.c

Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com>

* review

* Update src/overlays/actors/ovl_En_An/z_en_an.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update src/overlays/actors/ovl_En_An/z_en_an.c

Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com>

* fix merge

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* Update src/overlays/actors/ovl_En_An/z_en_an.c

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

* review

* review

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com>
2023-11-10 09:52:32 +11:00
Alejandro Asenjo Nitti
28e2da2a18
Match func_809F24C8 NON_MATCHING (#1465)
* fix func_809F24C8

* reloc
2023-11-07 10:32:25 -03:00
engineer124
1d75f6aff5
Match FileSelect_SetWindowContentVtx (#1471) 2023-11-07 16:16:38 +11:00
mzxrules
ddb63dcec2
z_hono_trap OK (#1437)
* match first couple of funcs

* Attempt all functions

* add flags, func_80930190 OK

* z_en_honotrap OK

* clean things up

* implement most suggestions

* space out OPEN/CLOSE_DISP

* more improvements

* implement suggestions

* implement alf suggestions

* u substitution

* nitpicky

* format
2023-11-06 23:02:52 +11:00
Alejandro Asenjo Nitti
10a14feb2c
ovl_Dm_Tsg: OK (#1458)
* z_dm_tsg Matching

* play2 prototype

* * gSaveContext.save.entrance
* cueChannel constant
* THIS
* i++

* remove actionFunc

* bool

* PR review

* pr review

* DMTSG_UNK_SIZE

* i % 16U

* review
2023-11-03 08:45:35 -03:00