* Moved code_800D2E30's data to C
* Moved some audio data from asm to C
* Made separate data files for unknown pointer arrays
* Fixed a few missing balign directives
* Add pad_text to mkldscript and update progress.py
Implements `pad_text` from MM and uses it instead of asm nops for the padding in ucode_disas.
Also updates `progress.py` to account for the change (RIP 1000000 code size), and to have a green badge for 100%.
* Remove 1.00mb comment in progress.py
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
* Initial progress on z_message_PAL, very messy
* Fix merge
* Some more progress
* Fix merge
* More z_message_PAL
* Small progress
* More small progress
* message_data_static files OK
* Prepare z_message_tables
* Matched another function, small updates
* Attempt to use asm-processor static-symbols branch
* Refactor text id declarations
* Begin large text codes parser function
* Fix merge
* Refactor done
* Build OK, add color and highscore names
* Remove encoded text headers and automatically encode during build
* Fix kanfont
* Various cleanups
* DISP macros
* Another match aside data
* Further progress
* Small improvements
* Deduplicate magic values for text control codes, small improvements
* Tiny progress
* Minor cleanups
* Clean up z_message_PAL comment
* Progress on large functions
* Further progress on large functions
* Changes to mkldscript to link .data in the .rodata section
* data OK
* Few improvements
* Use gDPLoadTextureBlock macros where appropriate
* rm z_message_tables, progress on large functions
* 2 more matches
* Improvements
* Small progress
* More progress on big function
* progress
* match func_80107980
* match Message_Update
* match func_8010BED8
* done
* Progress on remaining large functions
* Small progress on largest function
* Another match, extract text and move to assets, improve text build system
* Small nonmatchings improvements
* docs wip
* Largest function maybe equivalent
* Fix merge
* Document do_action values, largest function is almost instruction-matching
* Rename NAVI do_action to NONE, as that appears to be how that value is used in practice
* Fix merge
* one match
* Last function is instruction-matching
* Fix
* Improvements thanks to engineer124
* Stack matched thanks to petrie911, now just a/v/low t regalloc issues, some cleanup
* More variables labeled, use text state enum everywhere
* More labels and names
* Fix
* Actor_IsTalking -> Actor_TalkRequested
* Match func_8010C39C and remove unused asm
* More docs
* Mostly ocarina related docs
* All msgModes named
* Fix assetclean
* Cleanup
* Extraction fixes and headers
* Suggestions
* Review suggestions
* Change text extraction again, only extract if the headers do not already exist
* Fix
* Use ast for charmap, fix assetclean for real this time
* Review suggestions
* BGM ids and ran formatter
* Review comments
* rename include_readonly to include_data_with_rodata
* Remove leading 0s in number directives
* Review suggestions for message_data_static
* textbox pos enum comments, rename several enum names from Message to TextBox
Co-authored-by: Thar0 <maximilianc64@gmail.com>
Co-authored-by: Zelllll <56516451+Zelllll@users.noreply.github.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Roman971 <romanlasnier@hotmail.com>
* Update names and doc of `Matrix_RotateRPY` and `SkinMatrix_SetRotateRPY` to ZYX Tait-Bryan angles
* Update name and doc of `Matrix_JointPosition` to `Matrix_TranslateRotateZYX`
* `Euler ***` -> `Tait-Bryan *** angles`
* Update docs of `SkinMatrix_Vec3fMtxFMultXYZW` and `SkinMatrix_Vec3fMtxFMultXYZ`
* Fix doc of `SkinMatrix_MtxFMtxFMult`
* Update docs of `SkinMatrix_Invert`
* Change name and docs of `SkinMatrix_SetRotateYRP` to `SkinMatrix_SetRotateYXZ`
* Change name and docs of `SkinMatrix_SetScaleRotateRPYTranslate` to `SkinMatrix_SetScaleRotateZYXTranslate`
* Change name and docs of `SkinMatrix_SetScaleRotateYRPTranslate` to `SkinMatrix_SetScaleRotateYXZTranslate`
* Change name and docs of `SkinMatrix_SetRotateRPYTranslate` to `SkinMatrix_SetRotateZYXTranslate`
* Add renamed functions to `namefixer.py`
* Run formatter
* Consistent function names (`ABC()` if equivalent to `A() B() C()`)
* matching split
* migrate progress
* split done and rodata migrated
* all data migrated to c
* start init
* progress
* progress
* progress
* progress
* progress
* progress
* copy done
* progress
* erase and settings done
* progress
* progress
* progress
* start keyboard
* progress
* progress
* progress
* progress
* Minor progress
* fix z_magic_dark issue
* func_80806F34 decomp'd
* verified equivalence
* one fix
* format
* merge petries work
* reorganizing
* lots of reorganizing and wraning fixing
* rename file
* remove language enum
* unwanted changes
* some symbol replacement, organization, and some names
* all symbols replaced, some organization
* some more cleanup
* continue docs
* Match the remaining functions in file_choose
* merge master
* select mode documented, all functions in file_choose.c named
* nameset functions named, some other cleaning
* some more general cleanup
* stub comments for cm, name a few things
* fix data and sizeof
* copy/erase functions and modes named
* rename assets, format
* change some struct members
* fixes
* review1
* fix maching error
* extract VTX data
* re add werror to ZAPD
* review 2
* fix
* remove file boundary padding
* remove zeroes
* review3
* change skybox stuff
* changes to vs etc
Co-authored-by: KrimtonZ <krimtonz@gmail.com>
Co-authored-by: Thar0 <17233964+Thar0@users.noreply.github.com>
Co-authored-by: mzxrules <mzxrules@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Roman971 <romanlasnier@hotmail.com>
Co-authored-by: Louis <louist103@gmail.com>
* Import audio synth data, OK
* Cleanup data
* Merge data into 1 file
* naming
* format
* Fix data
* Separate audio_data into it's own file
* CleanUp, more PR suggestions
* Fix audio_effects.data.s
* Format audio_data
* rm asm, always gets me
* remove fake match
* u32 segment -> void* and add symbols to sEntranceCutsceneTable
* rename some symbols
* remove if1
* add the last missing symbol
* add symbols for almost all extrence textures
* finish adding the symbols
* Remove comment
* spelling fix
* Fig's and Dragorn's fixes
* add symbols to unkknown array
* format
* romans fixes
* Automatic XML for link_animetion
* Make sure tutorial images are not gitignored
* OK
* Correct ovl_Boss_Sst RangeEnd
* ExternalFiles
* Remove Segment="128"
* Remove segments from place_title_cards
* format, newlines, remove previous xml
* Minor labelling
* progress
* play percentage -> delay
* duration -> gatetime
* more
* more
* more
* seqIdx -> playerIdx
* more
* more
* more
* more
* format
* fix comment
* filters
* more
* media
* confusion
* Sync load is actually slow load
* AudioHeap prefix
* more
* more
* reformat
* more
* more
* AudioLoad
* more
* more
* seq banks
* more consistent
* more
* name last function in audio_load
* More audio_synthesis
* clean up audio tables
* minor
* slow/fast load ramAddr
* format
* remove unused
* Remove union
* remove padding
* audio bank -> sound font
* seqLayer -> layer
* stuff
* seqChannel -> channel
* ChannelLayer -> Layer
* remove define, add bug comment
* format
* more
* cache enum
* more
* AudioSeq function prefix
* naming
* bankIdx -> bankId
* more
* format
* review
* more
* fixes
* avoid hardcoded sfxid's
* SE -> Sfx
Co-authored-by: zelda2774 <zelda2774@invalid>
* Match Destroy
* Matched Init
* 3 more matched
* 15 functions matched, data imported
* 16 matched
* 17 matched
* 18 matched
* formatting
* 19 matched
* Fix unk_404
* Draw matched, 20 in total
* 21 matched
* 22 matched
* 23 matched
* 24 matched
* 25 matched
* 26 matched
* 27 matched
* 28 matched
* 29 matched
* 30 matched
* 31 matched
* 33 matched
* 34 matched
* 35 matched
* 36 matched
* 17 left
* 16 left
* 15 left
* 14 left
* 13 left
* 12 left
* 11 left
* 10 left
* spec
* bss
* 9 left
* 8 left
* 7 left
* 6 left
* 5 left
* 4 left
* 1 up to regalloc, 3 left
* 2 left (+ 1 regalloc)
* More naming
* 1 + regalloc left
* Some naming
* matches but for 2 words of stack in func_80B45748
* Delete some padding in header
* Merge remote-tracking branch 'upstream/master' into Zf
* func_8003426C rename
* more failed matching attempts
* Update to new function names
* OK at last
* Actually OK this time, removed pragmas, spec
* Begin documentation
* Few more names
* Some more naming, added description to z_en_geldb.c
* Confirm platform categories
* (Badly) named floor check functions
* Make fighter actors playSpeed animation frame checks consistent (up to names)
* Action enum, lot of work on the skeleton stuff in the object
* Lot of function and animation naming
* More naming, last of the hardcoded symbols
* Some name cleanup
* Remove asm
* Format
* Bit more cleanup
* Dragorn review I
* undefined syms
* Correct limb names
* Non-control flow review suggestions
* Easy review stuff
* Some more review
* Document some of EnHy, mostly its data
* Run formatter
* Improve `sModelInfos` formatting (or at least, try to)
* Use decimal in `CollisionCheckInfoInit2`
* Remove `#define`s for params
* Run formatter
* infos -> info
* Use enums in array indices comments
* Fix `objBankIndexSkel*` doc
* Forgot one `skelInfoIndex` -> `skelInfoIndex1`
* Use `ENHY_ANIM_` enum in `func_80034EC0`
* floats are fun
* more cleanup
* one more bit
* format
* merge kankyo
* Update src/overlays/actors/ovl_En_Horse/z_en_horse.c
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
* Update src/overlays/actors/ovl_En_Mm/z_en_mm.c
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
* Import bgm Ids
* Small correction
* Fix kaleido
* Add defines for 0, 1, 0xFFFF. Fill in missing macros
* Improve names, move to bgm.h, add in macros to kankyo.c
* format
* Swap order of bgm macros and flags
* Document `z_moji.c`
* Run formatter
* Use `CHAR_HEIGHT` instead of `CHAR_WIDTH` for y pos
* `> X - 1` -> `>= X`
* `const char*` for string argument
* Type palettes and textures with `u64`
* Remove unused variable
* Use `CHAR_WIDTH` and `CHAR_HEIGHT` more
* Explicit documentation on `gMojiFontTex`
* Some renames
* Some renames
* Some more renames
* pageDown
* Last name update
* Translate scene entries
* formatter
* Review
* A bunch of suggestions
* Run formatter
* Roman's suggestions
* document bombchu actor
* document the `-world.rot.x` hack
* Use `DOTXYZ` for dot product
* Make multiline comment use single line comments syntax
* Turn comment into doc comment
* `SCALE` -> `BOMBCHU_SCALE`
* en_kusa doc
* run formatter
* `fullyGrown` -> `isFullyGrown`
* Symbol cleanup
* Minor changes
* Use a switch in `EnKusa_SetupCut`
* Remove `#define`s for params
* Hex instead of `|` for a bitmask
* Add parens around params usage in VEC_SET macro
* Remove unnecessary space character in a xml
* Use defines instead of magic values in head/tail magic comments
* Use `OS_USEC_TO_CYCLES` to make a time look better in `Graph_TaskSet00`
* `0x25800` -> `sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])`
* `0x803DA800` -> `0x80400000 - frame buffer size`
* Use `OS_VI_` defines instead of hex
* Add empty line after some variable declarations
* Remove unused `extern CutsceneData` in `z_bg_dy_yoseizo.c`
* `Matrix_MtxFToYXZRotS` does not use `MTXMODE_`
* Use `MTXMODE_` more
* Remove `ASCII_TO_U32`, use `'IS64'`
* Add explicit `!= NULL` in some ternaries
* Use `INV_CONTENT`, `AMMO` macros more
* Use `PLAYER_AP_` enum more to compare to `Player#heldItemActionParam`
* Get rid of lowercase hex (outside libultra)
* `gWindMill*` -> `gWindmill*`
* Format and small fix enums in `z_boss_mo.h`
* Use `CHECK_BTN_ANY` more
* Fix xz/xy mistake in comment in tektite
* Rephrase comments mentioning "the devs" in a more neutral way
* Clean-up some objectively useless parens
* Fix some negative values written as u16 instead of s16 in ichains
* `SKJ_ACTON_` -> `SKJ_ACTION_`
* Run formatter
* Fix unk_ offset of `TransformUpdateIndex#unk_10` -> `unk_0E`
* Remove comments using in-game text
* Remove `U` suffix from integer literals
* Revert "Remove `ASCII_TO_U32`, use `'IS64'`"
This reverts commit c801337dde.
* Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)`
* Add empty line after decl x2
* Revert "Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)`"
This reverts commit d80bdb32da.
* Make `CUR_UPG_VALUE(UPG_STRENGTH)` compare to integers (eventually needs its own enum)
* Only use `PLAYER_SHIELD_` enum with `Player#currentShield`
* Only use `PLAYER_TUNIC_` enum with `Player#currentTunic`
* Format all translation comments like `// "..."` (hopefully all of them)
* Move translation comments to before on long lines
Located them with `grep -r src -e '^[^(]*);[ ]*//'`
Regex `osSyncPrintf\([^;]*\n.*//` didn't find more
* Format two more
* Cleanup symbols from undefined_syms.txt (3rd round)
* Add comments in xmls near symbols that cause ZAPD issues
* Group `D_01000000` symbol definitions
* a ton of progress, 14 functions remain
* cleanup
* a few more functions done, 11 remain
* finally all updated
* another function matched
* another action finished
* damage table
* death action done
* started very large action func
* more progress on long action funcs
* large action func matched
* 5 functions remain
* another large action finished
* start another action, doesn't match yet
* a few new functions, neither match
* done working on this for now
* Correct one nonmatching, fix compiler warnings
* Two functions left
* one left
* remove remaining gotos
* OK
* Delete outdated comment
* namefixer
* Flag macros
* audio, dmgeff, some colour
* Import symbols from object, reloc, name a few things
* Rest of object done
* Named a few more things, add action enum
* Name body parts and another couple of actions
* Last few names
* Delete asm
* Format
* undefined_syms, mods where possible
* Correct parent to EnEncount1
* Review
* Last newline
* louis and Dragorn's reviews
* Format
* More review
* Put back to isInvisible and or, as in EnGeldB
* Remove if (0)s in func_8009728C and change pointer arithmetic cast
* More review
* Unname headRot, make "fallthrough" case clearer, other review
* Format
* Even more review
* Rephrase
Co-authored-by: Zelllll <56516451+Zelllll@users.noreply.github.com>
* Match func_80095D04
* Match func_80096FE8
Most of the work was done by the co-authors, putting in this PR for convenience.
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
* Format
* Remove asm
* Caps
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>