* Setup player decomp
* Decompile z_player.c and z_player_lib.c
* Decompile remaining z_player.c functions
* Various player improvements
* Player progress (some non matchings and .data migrated)
* Player progress (reposition data and fix some non matchings)
* Cleanup, improve and document parts of z_player_lib.c/z_player.c
* Fix player renames in z_en_st.c
* Fix missing open/close disps in z_player.c
* Minor player fixes
* Address player comments
* Decompile PreRender.c
* use NON_EQUIVALENT and run format.sh
* Get rid of some magic values
* rename dList/dListp to dListHead/dList
* make func_800C213C NON_MATCHING
* replace more values with SCREEN_WIDTH/SCREEN_HEIGHT
* dList/dListHead with gfxp/gfx
* 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
* Match some and improve nonmatchings
* Remove pads in TransitionFade_Update, no effect towards matching
* Remove pragma comments, ran formatter
* Remove unused asm
* 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
* 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
* 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 &
* osPfsIsPlug.c and osContSetCh.c OK
* update
* __osPfsGetStatus.c OK
* removed unused asm
* Updated all libultra controller files to use new structs instead of the temporary structs. Added os_pfs.h
* controller updates
* fixed header guard
* Made suggested changes
* guLookAt.c OK
* commit
* __osPfsSelectBank.c OK
* osPfsDeleteFile.c OK
* pfsreadwritefile.c OK
* osPfsFreeBlocks.c OK
* cleaned up ospfsfreeblocks
* started pfsinitpak.c
* pfsallocatefile.c OK
* contpfs.c decompiled with 1 non matching
* osPfsFindFile.c OK
* pfsinitpak.c decompiled. one non-matching
* Actually fixed merge conflict
* sins.c OK
* cosf.c sinf.c and sins.c OK
* moved osAfterPreNMI to its own file. Renamed code_801031F0 to contquery.c
* pfschecker.c OK
* final update and rename
* Removed makefile testing thing that i accidentally added
* Made suggested changes
* Decompile jpegdecoder.c, padsetup.c and code_800C3C20.c
* change func_800C3C20's prototype and rename some fields in jpeg related structs
* Fix comment in Jpeg_GetU16 and change func_800C3C20
* use a switch in padsetup.c
* fix hard-coded pointers in code_800DACC0.data.s
* fix hard coded pointer in code_800E11F0.data.s
* fix hard coded pointers in code_800EC960.data.s
* remove fixed pointers in code_800F7260.data.s
* fix hard coded pointers in code_800F9280.data.s
* remove accidental comment
* fix hard coded jump table in Camera_Unique9.s
* 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
* Scene Header Command 0x0B is now OK
* Delete func_8009899C.s
* Updates assert check on func_8009899C
Per Roman's suggestion of placing the __assert outside of the if (1)
* Updates func_8009899C to have array access rather than pointer math
* Removes deprecated comment in func_8009899C
Known files left with pointers in .data after this (possibly the only ones since I checked roughly everything):
- flg_set.c
- z_camera.c
- db_camera.c
- code_800D7CD0.c (ucode_disas.c)
- audio (not sure which ones, see the structure sheet)
* Progress on z_player_lib, Named fields in Player struct
* More functions decompiled
* Matched another function
* A few more functions
* Ran formatter
* Rename some variables and add comments where appropriate, change types of unknowns
* Create PlayerActionFunc type
* Fix uncaught syntax error and issues from effects merge
* Rename invincible to invincibilityTimer, refactor long comments in Player struct
* Properly rename all occurences of invincibilityTimer
* 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
* Decompile speed_meter.c and add VIEWPORT_INIT macro
- speed_meter.c: OK
- Add VIEWPORT_INIT(viewport, by, rx, ty, lx) macro
* get rid of some magic numbers
* use early return instead of a big if block in SpeedMeter_DrawTimeEntries
* Decompile most of AudioMgr
* Decompile most of audioMgr
* Decompile audioMgr
* Remove commented out rodata from spec
* Small cleanup
* Last function OK, renamed functions and removed asm
* Remove sched.h and audiomgr.h and include contents in z64.h
* Un-comment prototypes in functions.h
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* Remove prototypes from audioMgr.c
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
* Fix naming and structs in z_en_item00.c and z_en_a_keep.c
* Decompile init vars in z_en_item00.c and z_en_a_keep.c
* Create missing .h files for the last few actors
* Fix some collider member names in actor structs
* Fix old actors not properly using "actionFunc" / "SetupAction"
* Remove some local temporary actor structs
* Fix some actor header includes to be absolute instead of relative
* Decompile fbdemo (transition) files
* run format.sh
* reformat vtx array, fill in a couple unk
* match TransitionTriforce_IsDone
* add VTX macro, add DW_ wrapping around triangle macros
* use new VTX macro, name graphic assets
* Naming updates
* pr updates
* naming updates
* remove symbols for COLOR_BUFFER, D_08000000, and D_09000000
* 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
* Match func_800AA000
* Match z_camera/func_800437F0
* Decompile code_800D2E30, use struct in 800A9F30
* Format
* Remove 'U' from literals
* Remove bss, cleanup z_camera
* Review changes, rename temp
* Move externs to variables.h
* osgetactivequeue ok
* osspdevicebusy ok
* osGetCurrFaultedThread ok
* osSpRawStartDma OK
* __osSpSetPc and osViGetCurrentFramebuffer OK
* sinf, sins, and sptask OK
* coss OK
* cosf OK
* ran format.sh
* Updated PR to use ultratypes
* osContStartQuery OK
* ran format.sh
* Updated PR to fix issues
* Made suggested changes
* 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
* Decompile jpegutils.c
jpegutils.c : OK
* Fix a typo
* Fixes in PR #75
- Fix a type in JpegWork
- Remove clang-format off/on in z_quake.c
- Move the jpegutils rule at the end of makefile
* 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>
* In process of moving changes over from old repo
* Merged in changes
* Finished import of padmgr changes from old repo
* Adjusted some volatile
* Improving padmgr volatile situation
* Almost matched osReadMempak
* Working on osMempakDataCRC
* Explanations and equivalents but no matches for osMempakAddrCRC and osMempakDataCRC
* OK after merge
* Matched osMempakAddrCRC and osMempakDataCRC
* Matched osReadMempak
* Updated PadMgr function names to be less like original code
* Changed variable names to make them further from original code
* Changed names and it stopped matching
* Undid clang-format steamrollering whitespace memes
* Cleaned up Input names
* More formatting changes
* Moved padmgr to z64.h, deleted padmgr.h
* 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
- Rename "sGraph_UpdateTime" to "sGraphUpdateTime"
- Rename "Graph_Ct"/"Graph_Dt" to "Graph_Init"/"Graph_Destroy"
- Change the LOG_STRING macro
- Rename "LOG_VALUE" to "LOG_NUM"
- Fix brace style
- Rename "UcodeInfo"/"UcodeDisas" to "UCodeInfo"/"UCodeDisas"
- Fix field names in "UCodeDisas"
- Fix typo in "GraphicsContext"
- Change the size of unknown fields in "GraphicsContext" to hex
- Rename "game_init_func" to "gameStateInitFunc"