* decompile and match En_St
* document ovl_En_St
* Implement OPEN_DISPS, and remove useless comments
* styling updates, inline some declarations
* PR suggestions as well as changing the BlureInit colors to u8 arrays over RGBA types
* remove pointer from EnSt_SetupAction
* Fixed upstream
* Migrate data, fix header, and begin Init function
* Lots of progress
* Almost done
* One non matching left
* Decomp EnHeishi4 All OK
* PR fixes
* PR fixes
* rename some structs
* changes
* rename stuff and start a func
* progress
* progress
* progress
* remove unwanted file
* progress
* match last few funcs
* done, i think
* small changes
* match Lights_Draw (thanks krim)
* comments
* cleanup
* most pr suggestions
* name changes
* rename
* Almost done with en_dy_extra
* All matching other than draw function, which just has some stack issues + possibly a localGfxCtx issue.
* OK, one non-matching.
* z_en_dy_extra OK and matching
* Deleted asm and updated spec
* Changed colors to decimal and got rid of padding in the u8 array
* Ran format script again to clean up after last commit
* All requested fixes
* Made further requested changes
* merge from upstream
* one non-matching in bg_jya_megami
* deleted asm files
* renamed unk_1D0
* some suggested changes
* megami OK, zero non-matchings
* deleted old reloc.s
* using a define rather than ARRAY_COUNT
* suggested changes
* some requested changes
* Setup -> Init
* Initial commit for en_js
* More work on decomping en_js
* More en_js work
* z_en_js OK
* Made requested changes/improvements
* Renamed arg in func_80A88F64
* Fixed undefined_symbols.txt
* Fixed undefined_symbols.txt
* Fixed undefined_symbols.txt
* Initial commit of weather_tag actor decomp
* Formatted source files and updated spec.
* Fixed references to the environment context variable that I changed.
* Deleted the last of the asm (forgot the stuff in the data folder)
* Made all requested changes to z_en_weather_tag
* Forgot to change basereg
* Removed unnecessary field in weather tag struct
* Update src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* That field in the header was totally necessary, not sure what I was thinking, sorry for all the commits
* Renamed what I thought was struct padding to more accurately represent the fact that that field is an unused variable.
* Update src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.h
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* matched func_809AD700, ElfMsg2_Init
* func_809AD968 done
* func_809AD978 and func_809AD9F4 done
* func_809ADA28 done
* ElfMsg2_Update Done, ElfMsg2_Draw Started
* whole file decomped
* Matching and all symbols defined
* Formatting changes, not currently building
* run format.sh
* fixed typos in comments
* Changes to reflect comments
* C file matching, polish needed
* making parenthesis usage consistent
* Documenting draw function, Vtx and Gfx arrays
* Added japanese translation comments
* line spacing fix
* renaming stuff
* Early return in Draw
* naming updates
* Cleaning up names, comments and formatting after the merge
* comment cleanup
* more cleanup
* More cleanup
* Adding commas at end of arrays so they look nicer :)
* more cleanup
* removing unnecessary parentheses
* comment and code changes
* Name changes
* Renamings
* Removing documentation at top
* Decomped Yukabyun (flying floor tiles)
* z_en_yukabyun
* Ran the formatting script, plus fixed negative number stuff in the Update function
* Changed unk_152 to unsigned to get rid of cast
* Made all the suggested changes.
* Update undefined_syms.txt
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* Fix Repo
* Update z_en_niw.h
* PR fixes
* Update z_en_niw_girl.c
Add all masks to switch at 142
* Added currentMask enum
* Small fixes
* Cleaned up a lot of little things
* PR fixes
* match MagicDark_Init
* update struct fields and add THIS comment thanks to Ethan
* match MagicDark_Destroy
* start on func_80B874E4
* move func_80B874E4 to a comment for now
* match MagicDark_Update (again thanks to Ethan)
* comment out func_80B8772C and use macro for ACTIVE_CAM
* various changes
* implement permuter suggestion
* reorder nayru temps to fix stack
* use LINK_IS_CHILD
* match func_80B874E4 a bit more
* initially store msgMode in temp_t2
* add msgMode temp
* comment out func_80B874E4 because regalloc >:(
* comment out func_80B874E4 again
* add unk_90C to Player
* change unk_14F to an array for more explicit padding
* remove partially completed functions
* remove matched functions from asm
* clang format
* subtract SFX_FLAG
* combine unk_14F and unk_150
* func_800A7BE4 and func_800A7C20 done
- func_800A7BE4 copy of "Math_Vec3f_ToVec3s" in z_lib.c
- func_800A7C20 copy of "Math_Vec3s_ToVec3f" in z_lib.c
* done func_800A7A24
* func_800A76A4 done
* func_800A6E10 done
* func_800A6EF4 done
* func_800A6FA0 done
* func_800A72FC done
* Deleted z_skin_matrix.data.s and updated spec
* func_800A730C done
* func_800A735C done
* func_800A7E70 done, func_800A7C60 matching but I'm not happy with it (weird types in function params)
* Corrections. func_800A7C60 in skin_matrix done, Matrix_MtxFToMtx in sys_matrix done.
* func_800A7EC0 nonmatching
* func_800A8030 nonmatching but VERY close (two registers swapped)
* func_800A8030 done
* updating comments
* func_800A7704 done
* func_800A7894 done
* halfway through deciphering mips_to_c for func_800A73E0
* func_800A73E0 functional but non-matching (saved register differences and probably regalloc)
* Renaming some arguments and rewriting comments
* Renamed files across whole project and deleted asm nonmatchings
* ran format.sh
* fixed function name
* fixing multiplcation order in SkinMatrix_MtxFMtxFMult
* Corrections in SkinMatrix_MtxFMtxFMult
* Formatting changes after review
* Changes as per code review
* fixing rename error
* fixing rename error
* rename fixes
* fixing function rename error
* ran ./format.sh
* last couple of changes as per code review
* renamed SetScaling -> SetScale
* Skin_Matrix_Invert -> SkinMatrix_Invert
* Renaming and fixing debug message print
* Renamed argument "mf" to more specific "clear" in SkinMatrix_GetClear
* renamed again to "mfp"
* snake case to camel case changes
* bg_mori_hineri OK
* added description and removed reloc
* made suggested changes from fig
* made suggested changes
* Named a few functions in ovl_Bg_Mori_Hineri
* Bg_Haka_Tubo OK
* Ran formatter
* Review suggestions
* Fix commented field offsets in header
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* Fix other field offset
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* Named data and made static
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* Split files
* Format rodata
* Some more code rodata migrated
* Some more actor rodata migrated
* Migrate rodata for ovl_Boss_Ganon
* Migrate rodata for code_800EC960
* Remove unused rodata
* x1b occurences all lowercase b
* Start decompiling bugs
* Decomp func_80A7BFA0
* Match 4 functions
* Match a few functions, really close on another
* Consolidate if statements
* Progress on func_80A7C86C
* Decompile a few small functions
* func_80A7CEC0 still needs stack and regalloc work
* Finish up func_80A7CEC0, do a couple functions
* Start on func_80A7D460
* func_80A7D460 is mostly down to regalloc
* Match update and draw, more work on func_80A7D460
* func_80A7D460 is really close to matching
* func_80A7D460 matches
* Cleanup
* Run formatter
* Missed reversing a couple flout comparisons
* Apply suggestions from code review
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* PR Comments
* PR Comments #2
* Missed one
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* match ShotSun_Init
* match ShotSun_Destroy
* match func_80BADDCC
* break up unk_19C to add spawnTimer
* ShotSun_Update
* func_80BADE74
* work on func_80BAE05C
* make func_80BAE05C closer
* use proper macros for osSyncPrintf
* format if statement better and add temp player pointer func_80BAE05C
* Reorder spawnPos to match stack args later
* match func_80BAE05C
* almost match func_80BADF0C
* Remove temporary and add parenthesis
* change part of comment and move last unk_1A4 assignment to be similar to decompiler
* Change do while(false) to if (1)
* func_80BADF0C
* change comment
* update spec
* fix vt macro
* cleanup and name
* remove asm
* remove data
* remove extern
Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>
* remove & for function pointers
* rename and retype D_02007020
* format
* remove tiny whitespace
* reorder if statement
* finish renaming
* replace cast with bitwise operation
* move globally used functions to functions.h
* reorder description
* move headers for EnItem00 and EnAObj to z64actor.h
* retype Item_DropCollectible and Item_DropCollectible2 to return EnItem00*
* rename ShotSun_StartFairyCountdown to ShotSun_TriggerFairy
* rename ShotSun_FairyCountdown to ShotSun_SpawnFairy
* add unk_E3EC field to MessageContext
* rename to ShotSun_UpdateHyliaSun for now
* remove != 0 on flag check
* remove unsigned suffix and use enum constant for Item_DropCollectible call
* add unk_95C field to Player
* add ub comment
* retype unk_1A4 and remove explicit struct padding
* Update src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* progress
* init ok and merge master
* enheishi1 and srchball OK
* cleanup
* cleanup
* cleanup
* more cleanup
* done
* more comments
* add file headers
* some review comments
* move vectors
* more review comments
* angle in decimal
* add prototype
* semicolon would be good
* fix
* make unset actor ids 0
* reword comment
* no &
* Re upload
* Decomp BgJyaLift
* Fixed issues
Fixed issues from review
* Edits after review
* Review Fixes
Made some fixes and also changed an unknown variable name
* Fixes to file
Fixed some styling things and renamed the last function
* Added fixes
Added roman's fixes
* Delete filemap.pyc
* Fixes
Removed ctx.c and replaced tabs with spaces spec.
* Decompile z_bg_haka_trap.c
* Update spec
delete old .reloc.s file
Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>
* Deleted reloc.s and made style changes to function pointers and local vars
* Renamed timer field, added more useful temp names
* Implemented Roman's suggestions, including moving enum to header file, moving some static variables inside functions, removing unnecessary casts, removing unnecessary temps, and fixing a few style issues
* Commented dual purpose of unk_16A and formatted file again
Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>
* cleanup
* name camera action functions
* decompile a few small functions, name a few Camera struct members
* decompile camera data, decompile a few camera functions
* Split ASM for code_800BB0A0
* removing code_800BB0A0.s
* PR Requests, Camera WIP
* remove #define NON_MATCHING from db_camera
* Some progress
* progs
* More
* 1 more
* Init
* Slightly better score on one function
* 1 down!
* some progress
* Prep for PR
* PR suggestions
* OK!
* Formatting
* formatting again
* PR comments
* updating ZAP2
* One non matching left in ovl_End_Title
* ovl_End_Title OK
* formatting
* removed unused asm files
* changed 0xFF to 255
* updated dlist
* made suggested changes
* Start work on ovl_En_Guest
* Match func_80A5046C and func_80A50518
* Everything but func_80A509D4 matches
* Match last function, cleanup, rename stuff
* Run formatter
* Temp didn't need to be used
* I should have ran the formatter again
* Use tcrf translation for debug string
* Apply suggestions from code review
Co-authored-by: krimtonz <33664508+krimtonz@users.noreply.github.com>
* Rename references to function and fix semicolon
* Apply suggestions from code review
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
* PR Suggestions
* More comments
Co-authored-by: krimtonz <33664508+krimtonz@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
* decompile z_fcurve_skelanime and code_8006C510
* format
* Decomp Magic_Wind
* PR Updates
* add space between ActorFunc and MagicWindFunc
* missing pr updates
- `z_effect`: Matched and essentially all documented.
- `z_eff_spark.c`: Decompiled (1 non matching left) and mostly documented.
- `z_eff_shield_particle.c`: Matched and mostly documented.
- `z_eff_blure.c`: Decompiled (5 non matchings left) and partially documented.
- `z_effect_soft_sprite.c`: Matched and mostly documented.
- `z_eff_ss_dead.c`: Matched but not documented.
- `z_effect_soft_sprite_dlftbls.c`: "Matched" (only data, contains the effect ss overlay table).
- `z_effect_soft_sprite_old_init.c`: Not decompiled, but functions are categorized by effect ss overlay. And they should be decompiled at the same time as their corresponding effect ss in the future.
Other changes:
- Added a lot of types/enums to `z64effect.h`and moved+renamed some structs from `z64.h` to this header
- Added effect ss overlay segments to `segment_symbols.h` and effect ss init vars to `initvars.h`
- Added a macro called `VTX_T` to generate a `Vtx_t` in the same style as `VTX`
- Fixed `flg_set.c` .bss to be in the right file
- Removed `tools/overlayhelpers/batchdisasm` since it's no longer relevant
- Removed unused leftover asm from recent PRs
* 1 function left
* 1 function left
* en_fu OK, still need to document
* en_fu OK
* spec comment
* remove asm files
* clang and final fixes
* fix floormas formatting things
* pr suggestions
* pr suggestions 2
* started
* did more work
* did some more
* Update
* Merged master
* EnHeishi2_Update OK
* func_80A549E8 OK
* func_80A54954 OK
* EnHeishi2_Draw OK
* Removed unused asm
* func_80A543A0 OK
* func_80A53638 OK. Fixed type of func_8008F08C
* done for rn, will work on it later
* func_80A53850 OK
* func_80A53F30 OK
* func_80A53D0C OK
* Made cylinderInit in En_Ma3 static
* Made suggested changes. Removed return from functions by adding else
* Made suggested changes. Removed a.out file that accidentally got added
* Made suggested changes
* moved #include <vt.h> from header to c file
* fixed formatting
* added line break
* Made suggested changes
* ran format
* Fixed unk_2F2
* almost done with heishi3
* heishi3 ok
* Added function names to heishi3
* EnHeishi3 OK
* Made some suggested changes. Still have questions about others
* Made suggsted changes
* fixed formatting
* fixed formatting
* Decompile z_oceff_wipe
- z_oceff_wipe: OK
- z_oceff_wipe2: OK
- z_oceff_wipe3: OK
- z_oceff_wipe4: OK
- Add patched libmalloc to ido 7 to prevent segfaults
- Add CUR_CAM macro
* Rename CUR_CAM to ACTIVE_CAM
* Fixes in PR #122
* Work on horse ganon
* Match destroy, init matches but need mv data -> .c
* Match EnHorseGanon_Draw and func_80A68E14
* Move some data to .c
* Decomp func_80A68870
* EnHorseGanon_Update nearly matches
* func_80A68FA8 and func_80A686A8 match
* Fix EnHorseGanon_Init, start on func_80A68B20
* match func_80A68B20
* Migrate data but something doesn't match
* Matches with migrated data, fix most warnings
* Rename some variables, some clean up
* A little more cleanup before PR
* Move commented out code to NON_MATCHING blocks
* Run formatter and delete unused line, char -> u8
* Update function was matched
Also imports another type from z_skin.Seeing as they are somewhat
tentative I decided not to put them in any global file.
* Update src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c
Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>
* PR Changes
* Apply suggestions from code review
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* PR Changes round 2
Co-authored-by: Random <28494085+Random06457@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* rename Matrix_TranslateThenRotateZYX to Matrix_RotateRPYf
* rename Matrix_RotateRPYf to Matrix_JointPosition
* rename Matrix_RotateZYX to Matrix_RotateRPY
* func_8005B280 ok
* func_8005B65C OK
* split out func_8005BD50
* func_8005B7C0 OK
* func_8005B7F4 OK
* func_8005B824 OK
* func_8005B860 ok
* improve sanity
* func_8005B6B0 ok, ColliderInit_Actor structs added
* func_8005B884 ok
* func_8005BBF8 ok, split out func_8005BF50
* split more stuff out of func_8005C050.s
* func_8005C050 OK
* func_8005BA30 fakish OK, func_8005BAD8 real OK
* func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues
* func_8005BB10 Ok
* func_8005BF50 OK
* func_8005BE50 OK
* func_8005BD50 OK
* func_8005BCC8 Ok
* func_8005BC28
* func_8005BB8C func_8005BBB0 func_8005BBD4 Ok
* save my work commit
* func_8005C2BC fake OK
* func_8005C5B0 ok
* func_8005C608 ok
* func_8005C6C0 ok
* func_8005C6F8 ok
* func_8005C730 ok
* func_8005C774 func_8005C798 func_8005C7BC OK
* func_8005C7E0 ok, func_8005C810 split
* func_8005C810 OK
* func_8005C8C8 ok
* func_8005C964 OK
* func_8005CA88 ok
* func_8005CBAC ok
* func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK
* func_8005CD34 func_8005CDD0 Ok
* func_8005CE6C ok
* func_8005CEC4 ok
* func_8005CEDC ok
* func_8005CF90 Ok
* standardize type names/vars more
* func_8005D3BC ok
* func_8005D40C OK, z64.h CollisionCheckContext
* func_8005D4B4 func_8005D4C8 ok
* partial data section migration
* improve function documentation, OT->OC
* Actor_CollisionCheck_SetOC ok
* Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok
* func_8005BA84 ok
* func_800611A0 ok
* func_80061274 ok
* clean up func_80061274
* func_8006139C ok
* func_8005E9C0 and dependencies OK
* minor cleanup to func_8005E9C0
* func_8005EC6C OK!
* func_8005E81C ok
* func_8005E604 ok
* func_8005E2EC func_8005E4F8 OK
* func_8005DE9C OK func_8005D8AC disassembled
* func_8006146C func_8006268C ok
* func_8005EEE0 ok
* func_8005F17C
* func_8005F39C ok
* func_8005F5B0 decompiled, not matching
* func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK
* func_8005FA30 ok, split more functions
* func_8005FC04 ok
* func_8005FDCC k
* func_8005FF90 OK OK OK
* func_80060204 dead
* func_800604B0 ok
* func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish
* func_800635D0 ok, func_80062ECC not so much
* OcLine oks
* D_8011DF28 functions disassembled
* D_8011DF5C functions OK
* setAT_SAC. setAC_SAC, setOC_SAC OK
* func_80061C98 decompiled, func_80061BF4, func_80061C18 OK
* func_800617D4 ok, func_800614A4 disassembled
* CollisionCheck_OC D_8011DFAC functions OK
* func_80062530 ok
* CollisionCheck_generalLineOcCheck subfunctions OK
* func_800622E4 ok
* after a long fought battle, func_80061F64 has fallen.
* func_800628A4 disassembled
* func_800627A0 func_8006285C OK
* ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok
* func_80062CD4 decompiled, import EffShield/EffSpark types from MM
* various SubActor98 struct functions OK
* func_8005D4DC func_8005D62C ok
* .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs
* func_80060C2C ok
* minor code tweaks
* func_80061C98 ok somehow
* Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types
* Apply changes
* formatting
* tweak a couple function names
* krim changes, func naming
* missed some things
* function renames
* Implement GenColliderInit.py utility
* Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching
* func_800614A4 ok
* Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE
* collisionCheckCtx -> colChkCtx, fix small things
* Fix ROM pointers in overlays
ROM pointers are fewer but much harder to find so hopefully this is all of them.
* Fix function pointers in overlay data
* Decompile z_play.c and Match/Document some of z_view.c
Also fix the last non matching in z_sample.c and update some game state functions.
* Suggestions from PR #74
* Fix undefined reference to Gameplay_DrawOverlay
* Suggestion from PR #74 (2)
* Fix a fake argument in func_800BC450
* Started doing cleanup
* did more work
* did more migration
* migrated more rodata and worked on some structs
* did more work
* Removal of ROOM field from initvars, some rodata migration, some string decompilation
* General update
* Decompiled vt strings
* Tool work
* Tool improvements
* 270 overlay rodata files remaining
* better float handling
* floats
* Many more floats
* migrated boss_mo
* assorted fixes
* Migrated 10
* tool improvements
* migrated 10
* 10 more
* 1 more
* did a few more
* fixes
* 10 more
* more floats
* Did some more, updated migrate-rodata.py to 'modify' the C file after processing in order to make to compiler process it as if it was changed.
* removed changes made to script by accident
* migrated largest rodata - ovl_fishing
* Did some more
* 114 remaining
* 99 left !
* almost done migrating rodata
* did some more, done for tonight
* almost done, tried add support to the script for z_player
* All possible rodata migrated in actor overlays
* update
* removed static from all overlays, ran format.sh
* Removed unknown actor structs
* converted a few floats
* Added new lines to header files that were missing them. Removed unused asm files
* Removed unused asm files
* Formatting newlines
Further formatting
spacing
.float spacing
More space formatting
More spacing formatting
Removing .balign 4 after floats
Co-authored-by: Ethan Roseman <ethteck@gmail.com>
* Decompile z_jpeg.c
- Decompile z_jpeg.c
- Move .bss variables from fault.c and fault_drawer.c into .s files to avoid bss reordering
* Rename JPEGWork to JpegWork and minor fix in Jpeg_GetU16
`z_demo_go.c` is now functionally equivalent and almost fully matched.
Note that I added a Vec3i struct in `z64actor.h` now used in `CsCmdActorAction`.
Also fixed some missing VT codes in various actor strings.