* Add byte swap for v64 files
Signed-off-by: angie <angheloalf95@gmail.com>
* Reduce `len` function calls
Signed-off-by: angie <angheloalf95@gmail.com>
* Optimze a bit the byte-swapped v64 format
Signed-off-by: angie <angheloalf95@gmail.com>
* Strip the overdump before doing the byte-swap
The previous way wasted time by byte-swapping data that would be discarded anyway.
Signed-off-by: angie <angheloalf95@gmail.com>
* Swap twice the bytes per cycle to improve performance
Signed-off-by: angie <angheloalf95@gmail.com>
* Read and write 16 bytes at a time and specify explicit endianness
Reading more bytes per cycle allow to speed up the swapping proccess
Signed-off-by: angie <angheloalf95@gmail.com>
* Add v64 compatibility in the Readme
Signed-off-by: angie <angheloalf95@gmail.com>
* Read whole file as little endian and write it as big endian without the loop
Signed-off-by: angie <angheloalf95@gmail.com>
* Migrate data to C
* Partially decompile Init
* func_80B959D0 OK
* ObjKibako2_Destroy OK
* ObjKibako2_Update OK
* ObjKibako2_Draw OK
* func_80B95CA4 OK
* ObjKibako2_Init OK
* func_80B95DFC
* func_80B95ED4 OK
* func_80B95A28 OK
* Name functions
* Delete unused asm and update spec
* Fixup math post rebase
* Name statics
* Clean up variable names
* Run formatter
* xzDistFromLink -> xzDistToLink
* Respond to feedback in ObjKibako2_Break
* Type sp2C as a CollisionHeader* and initalize it when declaring it
* Respond to remaining review feedback
* Respond to review feedback from Roman
* z_lifemeter OK
There were a few versions that matched, so the duplicate `ddfactor`
might be fake. The `if (interfaceCtx)` at the start seems to be required.
I think `sHeartsPrimFactors[0]` vs `sHeartsDDPrimFactors[ddtype]` is
real, because the asm loads `sHeartsDDPrimFactors` for each access,
while it only loads `sHeartsPrimFactors` once. It could have something
to do with `reduceixa` in uopt.
* Make vars function-static
* Fix names
* Gameplay_Init ok
* add (void)0 to prevent warnings in gameplay_init
* update nigthflag
* .
* remove tools/ZAP2 from origin master
* made suggested change
* made sgugested changes
* z_lifemeter cleanup finished, one non-matching
* made Health_UpdateData a bit better, nowhere near matching still
* lifemeter done for now
* fixed define issue
* improve z_lifemeter, still doesn't match
* z_lifemeter done
* Rename functions
* Add files via upload
* Update Health_Update.s
* fix missing symbols in asm file
* Update Health_Update.s
* Update Health_Update.s
* fixed stuff
* Add files via upload
* Delete Health_Update.s
* Rename things according to Roman's suggestions
* lifemeter done hopefully
* fix unused asm that for some reason didn't merge
* fix feedback
* compiles right now
Co-authored-by: Zelllll <elijah@DESKTOP-NMP1I89.localdomain>
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
* EnTite_Update matching
* Fixes to update
* made good progress, func_80B1A2A0 is in a good place to be matching soon
* Merge stuff
* func_80B19E94 done, func_80B18CC4 done
* EnTite_Destroy and EnTite_Init done
* Commenting out sDamageTable and EnTite_Init until all the data matches
* Some more small functions done
* more progress
* func_80B19918 done
* func_80B18E7C done
* func_80B19524 done
* more progress
* EnTite_Draw equiv but nonmatching, file otherwise done
* Found some unstaged changed on old laptop
* Draw matching: File fully matching!
* Documentation
* finished documentation
* deleted data files
* update spec
* fixed waterY -> yDistToWater rename after merge
* ran format.sh
* fixing accidental renames in camera
* Fixed some obvious number/comment formatting issues
* Removed unecessary prototypes
* merge
* running format.sh
* suggestions
* more pr comment changes
* format to push
* one more change
* more renames (see pr comments)
* merge
* renames
* format.sh
* fix renames
* function comment formatting
* merge + format
* endless merge fixes
* merge fixes until die
* yet again a merge fix
* pr suggestions
* objmure2 about halfway
* all decompiled, one non-matching
* some documentation
* mure2 done, one nonmatching
* Update spec
* Update z_obj_mure2.c
* Update z_obj_mure2.c
* Add files via upload
* fix formatting
* Fix fake match
* Changed data formatting
* More formatting changes
* fixed name of var
Co-authored-by: Zelllll <elijah@DESKTOP-NMP1I89.localdomain>
* Darkmeiro decompilation
Bg_Gnd_Darkmeiro decompiled, matched, and documented.
* give this a shot
* fix conflict
* one more try
* could be useful
* whoops
* ZAP2 stuff
* ZAP why
* ZAP again
* match
* sfx fix
* should be good to go
* comments and such
* Matrix macros escape me
* format
* fix bubble
* remove comments
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: fig <fig02srl@gmail.com>
* Darkmeiro decompilation
Bg_Gnd_Darkmeiro decompiled, matched, and documented.
* give this a shot
* fix conflict
* one more try
* could be useful
* whoops
* ZAP2 stuff
* ZAP why
* ZAP again
* more names
* so many names
* we got subsystems now
* slight cleanup
* merge part 2
* new naming scheme
* slight adjustment
* no limit
* syms maybe
* step one
* OK, it's fixed
* table
* some names and such
* comments**
* update zap
* gitkeep to please jenkins
* ZAP
* fixer
* fixer2
* fixer3
* zap
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: fig <fig02srl@gmail.com>
* Darkmeiro decompilation
Bg_Gnd_Darkmeiro decompiled, matched, and documented.
* give this a shot
* fix conflict
* one more try
* could be useful
* whoops
* ZAP2 stuff
* ZAP why
* ZAP again
* bwall
* cleanup
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
* Darkmeiro decompilation
Bg_Gnd_Darkmeiro decompiled, matched, and documented.
* give this a shot
* fix conflict
* one more try
* could be useful
* whoops
* ZAP2 stuff
* ZAP why
* ZAP again
* slug-o-cola
* sfx macros
* Matched
* this will have to do
* well maybe a little more
* good enough
* Darkmeiro decompilation
Bg_Gnd_Darkmeiro decompiled, matched, and documented.
* give this a shot
* fix conflict
* one more try
* could be useful
* whoops
* ZAP2 stuff
* ZAP why
* ZAP again
* a good start
* done
* Log
* formatting
* thisx
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
* OK
* documented (with one odd float value)
* delete asm and alter spec
* uniformise spawn data to sIsSpawned,
fix compile warnings in Bg_Jya_Lift and Bg_Mori_Elevator
* translate last printf
* re-delete modified asm
* addressed review comments
* remove outdated comment
* addressed comments, made defines
* untrack scenes dir
* remove scenes dir
* Darkmeiro decompilation
Bg_Gnd_Darkmeiro decompiled, matched, and documented.
* give this a shot
* fix conflict
* one more try
* Oh boy more giant functions
* now functional, but not equivalent
* Now only non-matching
* cleaned up illusion room
* much closer. static variables still suck though
* much closer. static variables still suck though
* some docs and cleanup. matching is horrible.
* static varaibles are a troublesome lot
* ifdef
* merge ZAP
* merge again
* small cleanup
* small fixes
* swordstate
* resolve conflict
* comments and such
Co-authored-by: fig <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
* Auto stash before rebase of "upstream/master"
* A large number of scenes have been decompiled.
* Fixed makefile
* Decompiled around 40 scenes.
* Removed old file
* Finished matching remaining scenes.
* Removed old commented out spec lines
* Decompiled a few object files.
* Reorganized xmls a bit. Updated pu_box overlay to use proper symbol.
* Updated texture and object file decomp
* Fixed newline issue with ZAPD
* Moved scenes/ into the assets/ folder
* Fixed a few compile errors
* Auto stash before rebase of "upstream/master"
* A large number of scenes have been decompiled.
* Fixed makefile
* Decompiled around 40 scenes.
* Removed old file
* Finished matching remaining scenes.
* Removed old commented out spec lines
* Decompiled a few object files.
* Reorganized xmls a bit. Updated pu_box overlay to use proper symbol.
* Updated texture and object file decomp
* Moved scenes/ into the assets/ folder
* Fixed a few compile errors
* Fixed merge issues.
* Fixed makefile merge error
* Fixed additional merge error
* Fixed several more merge issues
* Commented out gameplay_keep and sk2 extraction, since currently unused.
* Reenabled gameplay_keep extraction since it's used in the spec
* Fixed build error
* Removed test struct
* Fixed makefile error that would happen on fresh builds
* Fixed merge issue
* Removed relative paths
* Multithreading on extraction, spec uses numbers, few changes to XMLs
* Removed redundant code from the extract_assets script
* object_sk2 and object_spot09_obj OK
* object_spot11_obj OK
* object_spot17_obj OK
* Test: One of the gameplay_keep dlists given a proper symbol
* Updated asset symbol names based on new naming scheme
* XMLs use "Offset" instead of "Address" now
* Fixed merge issues, updated ovl_Magic_Dark xml and gfx file
* Updated to use latest build of ZAPD
* Updated ZAPD again
* Updated ZAP to remove assimp dependency
* Jenkins Test: Added .gitkeep file
* Updated ZAP once more
* Updated png file name to comply with new naming scheme.
* Fixed bad include
Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>