Commit Graph

936 Commits

Author SHA1 Message Date
Derek Hensley 784c1724ff
Sync Colliders Final (#1718)
* ElementDamageInfoAT

* ElementDamageInfoAC

* colMaterial

* elemMaterial
2024-10-18 23:54:54 +11:00
engineer124 001c6f0bff
action handler (#1717) 2024-10-17 21:13:16 -07:00
engineer124 6a0bb0345d
Target -> Attention (System Rename) (#1716)
* attention

* revert flags, too large of a diff

* more revert
2024-10-17 20:56:58 -07:00
engineer124 5dd4310285
Animation Cleanup: En_V* and En_W* (#1713)
* begin anim v and w

* structs

* bgId

* cleanup

* space

* more cleanup

* spacing

* Unsigned
2024-10-16 06:13:25 -07:00
engineer124 4a3f9b0f6b
Player Docs: Body Shock and Body Burn (#1712)
* oot docs

* spacing
2024-10-15 18:42:20 -07:00
engineer124 5587769b14
Player Docs: Action Interrupt (#1707)
* action interrupt function

* PR Review
2024-10-15 18:27:55 -07:00
engineer124 86d8dc6a9f
Player Docs: FocusActor and Lock-On Cleanup (#1711)
* focus actor docs

* small cleanup

* brackets

* remaining lock-on docs

* more cleanup/docs

* more reticle docs

* oops
2024-10-15 17:52:45 -07:00
engineer124 917d214951
Player Docs: Misc Rotation (#1710)
* rot docs

* comment

* diff

* spacing
2024-10-15 17:30:34 -07:00
Derek Hensley f946162a89
Extract assets to extracted (#1708) 2024-10-15 22:41:48 +11:00
engineer124 278717bb04
Player "Hostile" Docs (#1706)
* actor flag hostile

* player hostile
2024-10-14 18:11:20 -07:00
Derek Hensley 0514d963d9
Port over OoT's new text pipeline (#1685)
* Port OoT's new msgdis and msgenc

* format

* Remove item_ids try block

* Update assets/text/charmap.txt

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

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-10-12 21:03:44 -03:00
Anghelo Carvajal 7bb0e9287d
Add missing std headers to audio tools (#1704) 2024-10-05 17:33:20 -07:00
Derek Hensley d0cb5d9be4
InitVars -> Profile (#1697)
* ActorProfile

* EffectSsProfile

* TransitionProfile

* variables.txt
2024-09-27 22:12:20 -07:00
Derek Hensley b4d6c3921f
Colliders Sync ColliderElement (#1698) 2024-09-27 22:00:54 -07:00
engineer124 c83b4cf107
Player: Document "WaitForPutAway" (#1694)
* import OoT docs

* cleanup

* carry actor

* more cleanup

* PLAYER_STATE1_CARRYING_ACTOR
2024-09-22 18:22:14 -07:00
engineer124 af22b72e2b
Revamp "AnimationContext" Docs, now called "AnimTaskQueue" (#1692)
* Import Oot Docs

* cleanup

* more cleanup

* cleanup

* small thing

* singular
2024-09-19 19:38:06 -07: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 b9ea1c19ab
Remove assets from automatic includes (#1683) 2024-09-10 15:16:56 -03:00
Derek Hensley 6eaf196927
Misc Clean (#1680)
* vramu32 in Overlay_Relocate

* Actor_SetColorFilter args

* Effect Hitmark enum

* Actor_WorldToActorCoords

* Some fault clean up

* contoller.h

* macros.h no longer needs stdint.h
2024-09-07 20:55:59 -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
Dragorn421 3add37c3a0
Fixup actor audio flags docs (#1682)
* Fixup actor audio flags docs

* format
2024-09-07 09:48:30 -04:00
Derek Hensley d925976c82
Small Misc Tooling (#1668)
* Move .extracted_assets.json to extracted folder

* .options.mk

* Move extract assets to tools folder

* .make_options.mk

* gitignore as well

* Remove duplicate import
2024-09-06 13:01:55 -04:00
mzxrules 629584b1bc
Update Room Documentation (#1678)
* Implement Room Documentation

* nit

* Resolve Dragorn fixes (OoT)

* Resolve Fig suggestions, fix comment wording (OoT)

* hensldm nit
2024-09-06 12:45:30 -04:00
Dragorn421 e111552e73
Cleanup: Pass all paths to tools rather than tools constructing them (#1669)
* Pass all paths to tools rather than tools constructing them

* review

* fix
2024-09-04 18:07:41 -07:00
Tharo f33aba87cc
[Audio 7/?] Extract sequences to assembly (#1677)
* [Audio 7/?] Extract sequences to assembly

Co-authored-by: MNGoldenEagle <17274702+MNGoldenEagle@users.noreply.github.com>
Co-authored-by: zelda2774 <69368340+zelda2774@users.noreply.github.com>

* Changes from OoT PR reviews

* Remove unused multiprocessing import and regen assets/xml/audio/sequences

---------

Co-authored-by: MNGoldenEagle <17274702+MNGoldenEagle@users.noreply.github.com>
Co-authored-by: zelda2774 <69368340+zelda2774@users.noreply.github.com>
2024-09-04 13:51:51 -04: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
TrulyNaN c7d2a81b2b
z_en_dinofos documented (#1661)
* Something not yet identified makes it current zeldaret's main and my documentation don't fit. Re-importing my code in steps. Now: imported function renaming from doc_ovl_en_dinofos.

* Ported missing function names from doc_ovl_en_dinofos branch and renamed a static variable. Everything external to the C file and its header should be accounted for right now.

* Branch now using same documented code as doc_ovl_en_dinofos and PR test works.

* Ready to PR EnDinofos' Documentation

* Applied first batch of review edits.

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

To make sure it'll actually get applied.

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* RecoilFromBlockedSlash is now Recoil. Small this-> missing before a suggestion inserted online was added.

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Updated last unnamed static variables and vertices names

* Renaming vertices in _PostLimbDraw and last unnamed static variables.

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

* Applied changes from hidden suggestions.

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Update src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c

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

* Renamed sBaseFireVelocity to sFireVelocityOffset.

* Inserted some enums for collider limbs. Continuing to address PR comments.

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

---------

Co-authored-by: Derek-Hensley <hensley.derek58@gmail.com>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>
Co-authored-by: Tom-Overton <tom.overton@outlook.com>
2024-08-12 17:41:58 -07:00
Tharo fb7f6f1743
[Audio 2/?] Extract audio samples to wav (#1670)
* [Audio 2/?] Extract audio samples to wav

Co-authored-by: zelda2774 <69368340+zelda2774@users.noreply.github.com>

* How

* Hopefully fix warning I don't get locally

* [OoT Review] Pad default sample filenames, comment on the vadpcm frame encoder functions, other suggested changes

* Small tweaks to above

* Remove some obsolete code

---------

Co-authored-by: zelda2774 <69368340+zelda2774@users.noreply.github.com>
2024-08-08 19:39:12 -07:00
Tharo 6c4896d947
[Audio 1/?] Extract Samplebanks and Soundfonts to XML (#1666)
* [Audio 1/?] Extract Samplebanks and Soundfonts to XML

* Remove config.py in view of using config yamls for addresses in the future, implement suggested changes from OoT review

* Remove some commented out dead code, adjust setup-audio in makefile

* Move audio extraction from setup to assets in makefile
2024-08-08 14:11:38 +10: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
Anghelo Carvajal cd087d8511
Introduce a bunch of small new headers (#1649)
* regs.h

* gfxalloc.h

* z64inventory.h

* gfx.h

* graph.h

* z64olib.h

* z64elf_message.h

* fix missing include

* Include z64inventory.h on z64save.h

* fix bss

* Move PosRot to z64math.h

* So dumb

* Update src/overlays/actors/ovl_En_Kusa/z_en_kusa.c

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

* review

* Remove graph.h

* bss

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-07-28 13:53:28 -07:00
Derek Hensley 43cac34566
Misc Cleanup (#1665)
* prefix in-function static data in z_scene_proc with s

prefix in-function static data in z_eff_blure with s

prefix in-function static data in Graph_TaskSet00 with s

prefix in-function static data in Fault_SetOptions with s

* Use uintptr_t in main

* hardware_regs.ld

* Remove some unessary blob comments

* object_link_child_TLUT_00DA80

* object_kz texture and tlut

* initialize typos
2024-07-28 13:04:09 -04:00
engineer124 d0cf4fbcea
z_en_zl4 OK (#1663)
* match zl4

* cleanup
2024-07-28 12:48:10 -04:00
Derek Hensley bd776e6bf5
Extract Keyframe Assets data (#1664)
* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "c31c5e9fe"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "c31c5e9fe"
git-subrepo:
  version:  "0.4.6"
  origin:   "git@github.com:ingydotnet/git-subrepo.git"
  commit:   "110b9eb"

* extract keyframe data

* initialize typo
2024-07-28 12:31:28 -04:00
Derek Hensley 6f5352e6c2
Fix MSCRIPT_CMD_UNSET_EVENT_INF command (#1660) 2024-07-27 14:40:28 -07: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
Derek Hensley 803ff1fb15
Another General Cleanup (#1651)
* add z64player.h include to z_player.c

* NULL check in func_80AEE374

* Couple formating things

* parameter R_PICTO_PHOTO_STATE

* Remove COLPOLY_NORMAL_FRAC

* DynaPolyActor_Init transformFlags

* Float in ObjDriftice_Init

* aspMainStack

* Add gbi defines to m2ctx

* Add GBI_DEFINES to COMMON_DEFINES in makefile instead of duplicating it

* Add version to build include for m2ctx

* Invadepoh includes

* Sort calc_bss includes like makefile
2024-07-13 14:15:12 -04:00
Derek Hensley 1a003f9460
More General Cleanup (#1658)
* gDs2nEyeTexAnim

* sEnMm2EmptyDL

* object_um_Matanimheader_007D10

* object_mnk_Matanimheader_019A20

* gTurtleEmpty2TexAnim

* object_iknv_obj_Matanimheader_0113E0

* object_botihasira_Matanimheader_001A48

* gTwinmoldEmptyTexAnim

* gBeaverYoungerBrotherEmptyTexAnim

* gNwcEyeTexAnim

* gTwinmoldEmptyTex1Anim gTwinmoldEmpty2TexAnim

* gGyorgEmpty1TexAnim gGyorgEmpty2TexAnim

* gBurlyGuyEmpty1TexAnim gBurlyGuyEmpty2TexAnim

* gKotakeEyeTexAnim

* gDmZl4EmptyTexAnim

* object_cs_Matanimheader_00F6D4

* gAnju1UnusedTexAnim

* Empty blobs

* EnKusa_IsUnderwater

* IsUnderwater functions

* s on static variable names in col check

* scene_texture_01_Tex_002D40

* object_ds2_Tex_0030D8 object_ds2_Tex_0034D8 object_ds2_Tex_0038D8

* object_gk

* undefined_syms

* object_fall2_Matanimheader_005CF0

* gTwinmoldEmpty1TexAnim typo
2024-07-11 15:41:28 -04: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
Tharo 6629597f82
`z_parameter.c`: remaining functions, do action documentation, gfx cleanup (#1652)
* Parameter last functions

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

* Documentation for do actions and various gfx

* Suggested changes

* f prefix for texture scale numbers

* Player_SetBButtonAmmo

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-07-02 14:47:37 -07:00
engineer124 0bb57352a5
Animation Cleanup: En_T* (#1522)
* anim T cleanup

* more cleanup

* brackets and floats

* small thing

* more floats

* fix name

* fix

* format

---------

Co-authored-by: angie <angheloalf95@gmail.com>
2024-06-24 17:54:14 -07: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 3682a13ec5
Format gbi.h, move ucode defines to makefile (#1650)
* Format gbi.h, move ucode defines to makefile, correct usage of gDPSetDither

* UCODE_DEFS -> GBI_DEFINES, add GBI_DOWHILE toggle

* Define GBI_DOWHILE for bss calculations

* Makefile thing
2024-06-23 12:51:44 -04: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 3705eaedac
Small general cleanup (#1644)
* m2ctx.py

* check warnings

* vimode includes

* bgcheck includes

* padmgr includes

* sprintf

* z_std_dma

* sys_ucode

* z64voice

* z64lib

* z64effect_ss

* segment_symbols.h

* padutils

* main

* stdarg.h

* fault

* bzero

* undefined_syms

* z64rumble
2024-06-14 21:47:24 -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
Derek Hensley 312b65d5e3
Even more general cleanup (#1640)
* floats

* obj_lightblock externs

* Couple more floats

* slime floats

* undefined_syms

* Move some tools to the tools folder

* format

* Update src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c

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

---------

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
2024-06-01 11:01:19 -04:00
Derek Hensley 659e2b5088
Use `gcc -E` for `cpp` (#1639)
* Fix cpp for macs?

* Add comment

* Move cppflags with cpp
2024-05-26 20:01:31 -07:00
Derek Hensley b7e5468ca1
General cleanup (#1636)
* totalLoadedActors comparision

* OBJMINE_PARAMS

* Sort z64.h header includes

* MapSelect_LoadConsoleLogo

* Combine notebook tables into 1

* TGSw clean up
2024-05-19 11:02:20 -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
Derek Hensley fd3431fa48
warnings_count fix (#1634)
* warnings_count fix

* Split off rom and compress in check_new_warnings.sh
2024-05-17 07:35:12 -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
Derek Hensley de69d62800
New Romheader format (#1628) 2024-05-17 09:00:45 -04:00
Tharo c609d3dcae
c_keyframe.c decompiled and documented (#1630)
* 2 non-matching

* 1 function left

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

* Fully matching

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

* Documented, has bss reordering issues

* Fixes

* Apply suggestions

* Format

* Re-add cast oops

* Remove != 0 for override and transform limb draws, format

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-05-17 08:29:19 -04:00
Anghelo Carvajal f4e8ec14e9
Bss script update (#1601)
* port back AF's version

* Update to use mapfile_parser 2

* Allow to specify other sections

* hardcode map path

* eprint

* -r

* review

* review

* Use fixed version

* Update docs/tutorial/vscode.md

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

* review

* Update tools/check_reordering.py

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

* update build path

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-05-15 13:49:31 -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
Anghelo Carvajal 666cb6ad4a
More header cleanup (#1604)
* low hanging fruits on variables.h

* z_actor functions

* Move RomFile to z64object.h

* Revert "z_actor functions"

This reverts commit aa99967d16.

* yeet

* z64actor_dlftbls.h

* Move object segment declarations to object_table.c

* Move Camera functions

* z64nmi_buff.h

* fix merge

* su_mtx.h, sys_cmpdma.h and sys_initial_check.h

* sys_ucode.h

* sys_flashrom.h

* Remove unnecessary includes

* z64kanfont.h

* flg_set.h

* z64DLF.h

* z64lifemeter.h

* z64path.h

* format

* ObjectOverlay

* bss

* Yeet ObjectOverlay

* review

* review

* format

* bss

* z64font.h
2024-04-25 18:16:47 -07:00
Tom Overton 654fc4fd74
More weekeventregs naming for things related to receiving items (#1617)
* More weekeventregs naming for things related to receiving items

* `WEEKEVENTREG_OBTAINED_GREAT_SPIN_ATTACK` -> `WEEKEVENTREG_RECEIVED_GREAT_SPIN_ATTACK`
2024-04-24 21:10:48 -07:00
Anghelo Carvajal 76fadbd0e9
`ovl_En_Door` docs pass (#1603)
* DoorScheduleResult

* actionVar

* DOOR_DL_

* enums

* ENDOOR_TYPE_SCHEDULE and related stuff

* Name some functions and start figuring out stuff

* defines

* start documenting schedules

* Name Inn doors

* More door schedule naming

* ajar

* Name remaining schedule types

* parameters diagram and some cleanups

* Name renaiming types

* format

* rename some schedules

* Use more static_assert

* name anims

* yeet unrelated stuff

* requestOpen

* Yeet DoorScheduleResult

* whoops

* stuff i missed

* Update src/overlays/actors/ovl_En_Door/scheduleScripts.schl

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

* Update src/overlays/actors/ovl_En_Door/z_en_door.h

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

* Update src/overlays/actors/ovl_En_Door/z_en_door.h

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

* review

* Update src/overlays/actors/ovl_En_Pm/z_en_pm.c

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

* Update src/code/z_sub_s.c

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

* review

* FindScheduleDoor

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-04-22 18:34:02 -07:00
Isghj 5143cc4d0d
update lifemeter functions.txt (#1616) 2024-04-22 18:17:14 -07:00
Tom Overton c88ed51f17
Name a lot of the weekeventregs for when the player receives a Heart Piece (#1615) 2024-04-22 08:59:34 -04:00
Derek Hensley 68c7e46a6a
Hotfix progress script due to extracted change (#1611) 2024-04-06 19:18:29 -03: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
Archez 9c56b0e57a
increase audio seq cmd list size (#1610) 2024-04-06 09:24:22 -07:00
Derek Hensley 250be53cde
Add Shift-JIS support for some voice and message files (#1500)
* z_message iconv

* voicecheckword iconv

* format

* TODO

* voice_external iconv

* Missed a few in message

* Use shiftjis_conv instead

* space comment in message_nes

* Use chars for cases

* Add ending single quote check as well

* table comments

* No look up table

* align makefile tools
2024-03-31 20:24:06 -07:00
engineer124 5bef89a6ff
Misc Cleanup 2 (#1521)
* begin cleanup

* more cleanup

* more cleanup

* more cleanup

* more cleanup

* more cleanup

* fake matches

* more cleanup

* more cleanup

* small thing

* PR Review

* PR Review
2024-03-23 08:04:07 -03: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
Anghelo Carvajal 3b8db093f6
Fix disasm.py (#1606)
* Fix disasm.py from doing the wrong thing

* Update requirements.txt
2024-02-20 09:41:36 +11:00
engineer124 eb577e29e4
Introduce More Audio Headers (#1515)
* 4 audio headers

* local first

* PR Review, more cleanup

* more cleanup

* fix bss

* PR Review

* PR Suggestions
2024-02-08 14:36:11 -03: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
Anghelo Carvajal 5db52cfd39
A higher level language for schedule scripts (#1462)
* schedule script

* start something

* tokenize

* make a tree

* start to emit macros

* start to handle args

* handle branch targets

* cleanup a bit

* script to convert the current schedule scripts to the new language

* Add schedule compilation to Makefile

* Fix bug on compiler if the script doesn't have an extra empty line

* Allow to have `else`s without braces

* convert a lot of schedules

* door

* en_tk

* fix some checks being the wrong way around

* borkens

* door borken schedules

* kafei schedule

* postman schedule

* Implement `if_since_time_*` command

* Allow `if`s to not have an `else`

* Implement some debugging options

* fix another one from door

* D_808675D0

* door D_8086775C

* don't print else if there isn't one

* start supporting labels

* rewrite comment handling

* add branch support

* emit debugging information

* postman and one door

* the remaining scripts

* add tokens for the non _s/_l versions

* meh

* Add built schedules

* Remove _s/_l suffixes from almost every command

* TokenProperties

* Move macros and length into TokenProperties

* move short and long to TokenType

* rename member

* some cleanups

* fatalError

* Write various notes on the compiler

* more errors and comments

* debug flags

* Move the built schedules to the build folder

* manually cleanup control flow of many schedule scripts

* cleanup postman schedule

* start write up

* write more stuff

* write a little more

* Start writing about the commands

* 2 more commands

* more

* almost everything, except returns

* hopefully finish documenting the commands

* cleanup

* formal grammar

* Table of contents

* typo

* Rename schc.py

* remove todo

* Warn if a if_before_time/if_since_time is negated

* Add colors to warnings and errors

* delete rebuild schedules script

* version

* Apply suggestions from code review

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

* suggestions on md file

* compiler review

* invented is invented

* ScheduleScript typedef

* fix

* Convert Anju's schedule to the new format

* simplify anju's schedule

* forgot to remove `_s`/`_l`

* bss

* Rework schc to allow multiple scripts per file

* Migrate all the schedules to the new format

* update language specification

* Update docs/schedule_scripting_language.md

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

* Update docs/schedule_scripting_language.md

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

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-02-01 09:50:32 -03:00
Anghelo Carvajal 2c600ddd3d
Build tools rework (#1542)
* yeet libyaz0

* replace elf2rom

* makeyar.py

* some cleanup

* Yeet unused tools

* format scripts

* Review

* review

* Rework checksummer.py to modify input file instead
2024-01-31 14:52:07 +11: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 9c10ee1d28
Framebuffer filter docs (#1528)
* Framebuffer filter docs

* PR

* Format

* Leading 0s
2024-01-20 21:04:28 -03:00
Derek Hensley 665353f344
Irqmgr + scheduler Docs (#1527)
* irqmgr docs

* Sched_FlushTaskQueue

* scheduler docs
2024-01-20 20:47:00 -03:00
engineer124 732455fdef
Animation Cleanup: En_S* (#1517)
* cleanup

* more cleanup

* anim S cleanup

* fix another function

* missed one

* missed another small thing

* oops
2024-01-20 20:15:46 -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
Anghelo Carvajal 1b9aa96b3a
Add venv to Jenkins (#1539)
* Add venv to Jenkinsfile

* z64compress warning
2024-01-19 09:26:40 -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
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
louist103 a5400fbde5
Update ZAPD (#1533)
* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "2b6f459b9"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "2b6f459b9"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"

* Update ZAPD

Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com>

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "572b13236"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "572b13236"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "9601f2699"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "9601f2699"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"

* fixes for new ZAPD

* readd typedefs

* remov enums

* Reading is hard

---------

Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com>
2024-01-14 12:34:50 -03:00
engineer124 a44f19225b
Animation Cleanup: En_R* (#1516)
* begin R

* finish anim R

* cleanup

* small adj

* cleanup

* CS_STATE_IDLE

* CS_ID_NONE

* more cleanup

* sBssPad

* angles

* sneak in small fix

* small fix
2023-11-28 08:43:36 -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 2fdcdd91b3
Split effect headers and a bit of cleanup (#1482)
* split

* bss

* z64eff_ss_dead.h

* clean eff_blure

* eff_shield_particle cleanup

* tire?mark

* and more cleanup

* format

* forgot to remove this

* review

* EffectBlureDrawMode enum

* review

* review

* bss
2023-11-27 12:24:46 -03:00
engineer124 55badb7162
Misc Cleanup (#1509)
* begin anim R

* sTexturesDesegmented

* more misc docs

* more misc cleanup

* small adjustments

* oh sneaky

* PR Review

* adj comment, reads better

* missed an enum

* this one actor reverses true/false

* bool

* CARNIVOROUS_LILY
2023-11-27 11:54:11 -03:00
engineer124 5284302c8f
`z_en_test7.c` Documentation Pass (#1497)
* copy over docs

* more docs

* some docs

* more docs

* small cleanup

* more small cleanup

* more small cleanup

* lerp time

* small reordering

* feather type

* general owl warp docs

* more cleanup

* rm redundant info

* PR Review

* PR Review
2023-11-27 21:21:52 +11:00
engineer124 702f3cf44e
Document Actor Category Change (#1518)
* Actor Category Change

* cleanup

* comments

* adj comment

* revert small cleanup for libc64 PR

* adjust comments
2023-11-27 21:02:28 +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