1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 21:04:43 +00:00
Commit Graph

311 Commits

Author SHA1 Message Date
petrie911
115c152b03
Some cleanup and docs for z_skelanime (#601)
* docs and enums

* bgcheck merge

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-09 17:07:17 -05:00
fig02
1ff2f0f849
ZAPD update (#612)
* remove roompoly

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "fd4d53a26"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "fd4d53a26"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
2021-01-08 19:38:28 -05:00
mzxrules
3cef03f5ff
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* 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>
2021-01-08 06:12:58 -05:00
Tharo
2a13d71848
Highscores array (#600)
* Highscores

* Review suggestions

Co-authored-by: Thar0 <maximilianc64@gmail.com>
2021-01-05 14:57:18 -05:00
Tharo
510b3c4bd5
ovl_En_In OK (#545)
* Initial progress

* Further progress

* One nonmatching left

* Fix merge

* OK

* Cleanup

* Remove unused asm

* Use generated reloc

* nightFlag changes and requiredObject -> objectIdx

* Some suggestions

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Revert nightflag changes, early return after Actor_Kill, objectIdx -> ingoObjBankIndex

* Fix accidental nightFlag change in z_sram

Co-authored-by: Thar0 <maximilianc64@gmail.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-01-04 14:52:36 -05:00
petrie911
7daadc5ea1
En_Ex_Item (#567)
* first go

* match

* vt

* docs

* one last thing

* formatted

* bowling, why not

* header

* Update src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* press FFFF

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-12-31 19:56:02 -05:00
AdamKiddle
600bad1f20
En_Tite OK (#555)
* 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
2020-12-31 15:00:30 -05:00
petrie911
2dfa188706
Docs for the Anime part of SkelAnime (#517)
* 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>
2020-12-29 17:46:46 -05:00
petrie911
9fcf8a4430
En_Bw (Torch Slug) (#537)
* 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
2020-12-29 13:32:32 -05:00
petrie911
695bc37be4
Bg_Gnd_Iceblock and Bg_Ice_Objects (sliding ice blocks) (#534)
* 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>
2020-12-29 13:11:11 -05:00
EllipticEllipsis
21e367a7cb
Bigmirror OK and documented (#530)
* 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
2020-12-29 03:50:56 -05:00
Tharo
b50e079e1b
Decompile z_skin.c (#548)
* z_skin progress

* Some more progress

* Some real progress

* Decompiled, 1 nonmatching

* Remove unused asm

* pad -> D_80160FC0

Co-authored-by: Thar0 <maximilianc64@gmail.com>
2020-12-29 00:30:23 -05:00
Synray
fef0697063
Match 4 functions in z_player.c (#560)
* Match 4 functions z_player.c

Only Player_Init left

* Cleanup

* Review changes

* Unnecessary changes

* Remove asm again
2020-12-27 20:45:03 -05:00
petrie911
3727cc38b8
matched Math3D_CylVsLineSeg and fixed a Math_ error (#564)
* matched cylvsline

* slight name adjustment

* format

* and asm

* comment cleanup

* fixed misspelling and added mathfixer tool

* formatting

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2020-12-27 11:13:38 -05:00
Nicholas Estelami
b95643b397
Updated Texture Asset Handling (#478)
* 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>
2020-12-26 06:39:52 -05:00
petrie911
8fa6cb6ff9
Consistent naming for Math_ functions (#542)
* 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

* maths

* Factoriali -> Factorial

* soon, soon

* renames

* rand

* docs

* merged

* formatting

* little more cleanup

* asm crept back in

* changes to MathF

* smooth criminal

* functions.h
2020-12-26 05:44:53 -05:00
Lucas Shaw
81c269b417
z_demo_tre_lgt OK (#521)
* z_demo_tre_lgt ok

* ok

* made suggested changes

* fixed
2020-12-25 19:24:16 -05:00
petrie911
a8ae9f48b7
z_scene_table, z_view, and z_fbdemo_fade OK (#561)
* fbdemo

* the view is clear

* more matchings

* scene table doesn't want to be nice

* small thing in view

* can do

* accidentally a value
2020-12-25 16:19:52 -05:00
Roman971
09ddf4f71e
Match 5 more functions in z_player.c and improve the others (#559) 2020-12-22 23:37:42 -05:00
petrie911
e4b84365ff
z_collision_check OK (#558)
* another match

* fix variables

* comment

* functions.h

* last match
2020-12-22 15:59:56 -05:00
EllipticEllipsis
df704a9f80
MirRay OK and documented (#528)
* init, destroy, update, couple of others decomped

* 2 functions remain

* data migrated

* 1 function left

* OK
thanks mostly to Petrie and the permuter,
and no thanks to my find/replace skills

* documented and deleted asm

* updated spec

* delete data

* address review comments

* Apply review suggestions
2020-12-21 12:28:57 -05:00
Zelllll
3369d0657d
Bg_Relay_Objects OK (#536)
* bg_relay_objects OK

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update z_bg_relay_objects.c

Co-authored-by: Zelllll <elijah@DESKTOP-NMP1I89.localdomain>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-12-18 23:46:52 -05:00
petrie911
2373c779d1
additional matching functions in z_room, z_camera, and En_Zl3 (#541)
* 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

* small improvement

* also minor

* merge

* matches

* the room?

* woo matches

* spelling fix
2020-12-18 22:09:38 -05:00
petrie911
f05a584dea
G_Switch, Syateki_Itm, and Syateki_Man (Shooting gallery and related actors) (#523)
* 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

* rupees and, for some reason, pots

* and now an even larger man

* now for the gallery

* more progress

* naming continues

* even more docs

* another match

* match, fix, a new enum

* Update src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c

* fixes except globalctx

* well one more

* and now globalCtx
2020-12-11 17:38:23 -05:00
petrie911
d4e16bbacf
En_GeldB (#516)
* 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

* woo watch out

* data and such

* stuff

* more decomp

* another match

* match and docs

* more docs

* little more cleanup

* SFX macros

* little more

* more attempts to match

* naming things

* I give up on the match

* also spec

* changes

* hex

* Update src/overlays/actors/ovl_En_GeldB/z_en_geldb.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_GeldB/z_en_geldb.h

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_GeldB/z_en_geldb.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-12-10 15:00:17 -05:00
Ethan Roseman
96512ee3ab
Decompiled ovl_En_Ta (#518)
* First steps

* more

* done

* format

* PR comments

* PR comments
2020-12-08 16:39:41 -05:00
Kenix3
353684c638
ovl_demo_effect 100% OK (#466)
* Fully decompiles demo_effect actor.

* Formats z_demo_effect.c

* GET_ACTOR_TYPE is renamed to GET_EFFECT_TYPE

* Implements OPEN_DISPS macros for all draw functions.

* Fixes ugly float values

* Removes unnecessary union structs in the DemoEffect actor struct

* Renames DemoEffect SkelAnimeCurve member to skelCurve

* Names initObjectBankIndex DemoEffect struct member

* Renames jewel display list holders

* Renames initialization function pointers to initUpdateFunc and initDrawFunc

* Renames primitive and environment color DemoEffect struct members.

* Fixes a couple missed floats.

* Renames most draw and update functions.

* Finishes naming all update functions.

* Adds additional SFX defines.

* Renames the rest of the functions

* Renames all external object display lists and vertex references

* Renames DemoEffect global data variables

* Renames DemoEffect Medal function to GetItem because it's used by LightArrows too

* Fixes DemoEffect Timewarp_Timeblock documentation.

* DemoEffect_TimewarpTimeblock updates shrink functions to use decimal

* Converts DemoEffect hex to decimal where appopriate

* Names the rest of DemoEffect struct members.

* Names DemoEffect triforceSpot crystalLightOpacity

* Adds DemoEffect enums for light effect color and god lgt types.

* Renames DemoEffect_UpdateBlueOrb to DemoEffect_UpdateBlueOrbGrow

* Fixes compiler warning in DemoEffect_JewelSparkle

* Renames DemoEffect_MedalSparkle argument

* Reformatting DemoEffect struct offset comments.

* Formats z_demo_effect

* Updates DemoEffect oGfxCtx to use the new macros.

* Adds comments detailing what each function in the DemoEffect system does.

* Removes z_demo_effect.data.s

* Renames DemoEffect global variables and sets them to static

* Removes pointer from DemoEffect function references

* Removes unncecessary default: break; statements in DemoEffect

* Converts rotation values to hex in DemoEffect

* DemoEffect effectFlags now uses ~1 rather than 65534

* DemoEffect_DrawGodLgt now uses a cleaner conditional statement

* eventChkInf in DemoEffect now uses 1 << 9 and 1 << 11

* DemoEffect now uses VT macros.

* Converts DemoEffect colors to hex.

* Changes M_PI / 32768.0f to M_PI / 0x8000

* Updates demo_effect enums to be all caps

* ovl_demo_effect reloc info is now included via build process rather than included from original asm

* Adds param packing macro

* DemoEffect struct unions are now typedef'd outside of the main struct

* Reformats DemoEffect sJewelSparkleColors

* Removes an if(globalCtx){} in DemoEffect_Init

* Removes ActorFunc cast in DemoEffect_Wait

* Removes unncessary comment in DemoEffect_MedalSparkle

* Timer check in DemoEffect_UpdateLightRingShrinking now uses <= 255 rather than < 256

* Removes unnecessary comment in DemoEffect_SetJewelColor

* Removes unncessary comment in DemoEffect_MoveJewelActivateDoorOfTime

* Converts an angle to hex in DemoEffect_MoveJewelActivateDoorOfTime

* Converts a while to for loop in DemoEffect_JewelSparkle

* Moves stack variables in DemoEffect_UpdateDust to a new line for each one

* Removes globalCtx2 assignment to the beginning of the function in DemoEffect_DrawJewel

* Removes unnecessary comment in DemoEffect_DrawCrystalLight

* No longer wrapping rotation reset in if(1){} in DemoEffect_DrawGodLgt

* Converts DemoEffect if statements to use != 0 and == 0 when non-boolean ints are checked.

* DemoEffect initDrawFunc now uses type ActorFunc rather than DemoEffectFunc

* review 2

Co-authored-by: fig <fig02srl@gmail.com>
2020-12-07 12:48:29 -05:00
krimtonz
321388673b
decompile z_camera (#398)
* 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

* rename code_8007BF90.c to z_olib.c, rename functions in z_olib.c

* camera wip

* rename some struct memebers, some decomp wip

* pr updates

* camera wip

* name some fields in Camera Struct, being making sense of Camera_Update

* Camera WIP

* wip

* wip

* add z64camera.h header, begin creating CameraSetting macros

* wip

* wip

* wip

* wip

* migrate camera bss to c

* match a couple functions in db_camera

* match some small db_camera functions

* wip

* migrate db_camera rodata, match a few functions

* remote db_camera.rodata.s

* match some of db_camera

* identify types of some unknown data pieces

* some small wip

* Match Camera_Init, some function changes, some struct name changes.  Change unk_C0 and unk_CC to floats from Vec3fs

* add naming for a few more Camera struct members

* wip

* match func_80043F94

* Match Camera_Jump1

* document some of Camera_Jump1

* wip

* match Camera_Jump3

* Match Camera_Update, FeelsAmazing

* wip

* wip

* match Camera_SetParam

* minor cleanup

* wip

* wip

* match Camera_KeepOn0

* some documentation, modify some matching functions to match style of others.

* match Camera_Demo1

* match camera_demo9

* document Camera_Demo1 and Camera_Demo9

* wip

* Match camera_battle4

* match camera_unique2

* Match Camera_Unique3

* match camera_special6

* match Camera_Special5

* wip

* document camera_special6

* naming updates

* match camera_Unique1

* match Camera_Unique0

* wip

* Match Camera_CalcUpFromPitchYawRoll

* match func_80045508

* document Camera_Battle4

* document several camera functions, move camera data to separate file

* rename phi/theta to pitch/yaw

* wip

* uniq9 wip

* Camera_Unqiue9 OK

* document Camera_Unique9

* name unk_160 in camera struct

* wip

* wip

* minor updates

* fix conflicts

* wip

* wip

* Olib updates

* wip

* wip

* rename most Math3D functions, few matches, documentation

* wip

* document most of math3d

* wip

* wip

* wip

* pr updates

* Match Camera_Fixed4

* match func_80058E8C

* pr updates

* add missing comment block finalizer

* Merge math3dupdates

* match Camera_ChangeSetting

* Match Camera_ChangeMode

* match func_80058148

* Match Camera_Special9

* decompile the rest of camera data

* match Camera_Demo5

* name a few camera functions in z_play

* match func_80046CB4, some work on other fucntions

* wip

* impove some non matchings

* fix function rename

* match func_800588B4

* match Camera_Subj4

* wip

* Camera_Demo3 matching, Camera_Battle1 big progress

* Camera_Normal2 OK

* wip

* match Camera_Parallel1

* normalize some things across functions

* match Camera_Normal1

* Match Camera_Normal3

* some cleanup

* more cleanup

* more cleanup , match Camera_CalcDefaultPitch

* data formatting

* Match Camera_Jump2

* document Camera_Jump2

* Match Camera_KeepOn3

* document some of Camera_KeepOn3

* improve some non_matchings

* match func_80045C74 and func_800460A8

* code cleanup, documentation

* match Camera_KeepOn1

* Match Camera_Subj3

* Match Camera_Battle1

* remove non_matching from func_80044adc and func_80046e20

* name several members of Battle1

* more documentation on Battle1

* cleanup

* renaming Camera_Vec3fScaleXYZFactor to Camera_Vec3fTranslateByUnitVector

* reorganize update structs, remove final references to params, remove CameraParams union

* implement camera enums into player

* Renaming Camera_GetDir to Camera_GetInputDir, Camera_GetRealDir to Camera_GetCamDir, etc, implement camera enum's into player

* remove non-global camera variables from variables.h

* clean up some variable declarations

* finish pr comment updates

* fix some warnings

* data formatting

* finish commenting on data

* delete unused asm

* remove asm

Co-authored-by: fig <fig02srl@gmail.com>
2020-12-06 17:39:47 -05:00
petrie911
756f6dc393
Matched EnPoRelay, DemoGt, one more in EnPoSisters, and cleanup BgBdanSwitch (#513)
* 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 matchings, some cleanup

* small cleanup
2020-12-06 12:06:56 -05:00
louist103
736ebc7cca
Decompile DemoEc 1 non matching (#479)
* Fixed upstream

* Migrate data and Decomp Init

* Decomp a few more functions

* Small change before starting

* Back to this file

* Match action func chains, func_8096DE94, func_8096DF9C, func_8096E0A4

* Match all except 1 function in first back of actionFuncs

* matched a bunch in bank D_8097053C

* Match the first few draw functions

* match a few more draws and start one

* All matched but one.  All equivalent

* Name setup funcs

* finish naming functions

* Fix Gfx stuff

* Remove 'expectedc'

* General clean up

* fix

* progress

* cleanup

* remove reloc

* review 2

* fix awful function pointer thing

Co-authored-by: fig <fig02srl@gmail.com>
2020-12-05 21:02:55 -05:00
i82orbom
2ca9c78838
z_demo_gt.c, 2/112 non matching (#480)
* Z_demo_gt.c

* More progress

* More progress

* Some more progress

* Mooore progress

* Removes unused asm

* Additional progress

* More progress

* 36 remaining

* More progress??

* 19 remaining

* some progress?

* First draw function decompiled

* func_80981694

* func_8097F508

* func_8097FF9C

* WIP

* func_80981E84

* func_80982244

* func_80981AA0 cannot believe it matched

* func_8097D7D8

* Rand functions matched

* Changes after rebase of GFX macros

* func_8097F280

* func_8097FDDC

* func_8097E824 some more progress, 2 left

* Removes unused ASM

* Cleanup / Function renaming

* More cleanup / Renaming

* review

* review

* format

Co-authored-by: i82orbom <i82orbom i82orbom@github>
Co-authored-by: fig <fig02srl@gmail.com>
2020-12-05 16:19:48 -05:00
Tharo
f85a2d10ee
Poe Actor Decomps (#463)
* Poe actors progress

* Some more progress, En_Poh almost matching

* Further progress

* Fix merge

* Decompile data

* Actor struct cleanups

* More functions OK

* Progress

* Last function decompiled, some nonmatchings left

* Few more OK, skelanime_init definition changes

* Progress

* Style improvements, OPEN/CLOSE_DISPS, few more OK

* Few more style improvements, function prototype additions/changes, another function OK

* Remove unused asm, begin documentation

* Use generated reloc

* Cleanup, format

* Remove a few no longer needed comments

* PR suggestions

* DISP macros

* Missed some FrameUpdateMatrix != 0 replacements

* EnPoField_InteractWithSoul -> EnPoField_SoulInteract, eyeImageIdx -> eyeTextureIdx

* Fix merge, reformat

* Review Suggestions

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Further review suggestions

* Ran formatter

* Less DECR usage

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-12-04 19:34:27 -05:00
Tharo
26c38834ec
ovl_Door_Shutter OK (#413)
* Initial progress

* Some more progress

* Fix merge

* OK

* Small improvements

* Further improvements

* Some documentation, ran formatter

* Small fix

* Several review suggestions

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

* Further review changes

* Space out declarations, better boolean comparisons

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

* Some ands to modulos

* Swap condition

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

* Fix merge, PR suggestions

* review

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
2020-12-03 16:55:01 -05:00
Tharo
579b87dceb
ovl_En_Door (#402)
* Decompiled, two non-matchings remaining

* Fix merge

* Cleanups

* Some documentation, remove unused asm

* Remove unused data.s, review suggestions

* Ran formatter, further review suggestions

* Make some data static

* Match EnDoor_Init

* Remove asm for EnDoor_Init

* Changes from review

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>

* More variables static, remove unnecessary s8 cast

* PR Suggestions

* review

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
2020-12-03 16:51:22 -05:00
petrie911
a7b6323228
En_Rr (#472)
* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* Many likes alike

* matched

* merge ZAP

* now with names

* merge and small cleanup

* removed commends

* got formatter to behave

* move static array

* fixed variable names

* fixes

* pedantic comments
2020-12-02 14:59:45 -05:00
petrie911
bf9a1aadd9
En_Dh (#474)
* 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

* Is this where I make a Mr Hands joke?

* Manos: the Hands of Fate

* cleanup

* and format
2020-12-02 14:58:57 -05:00
petrie911
4876610c75
SkelAnime "Skeleton" Documentation Pass (#497)
* 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

* spooky scary skeletons

* there's a skeleton inside of you

* formatting

* types

* a matched function even

* undo change

* lol anime

* ok how did I forget the .s

* array fix

* would you like to ride the bone train?

* stuff

* more renames

* renames and cleanup

* names suck

* idea

* using void** for now

* stuff

* look more type fixes

Co-authored-by: fig <fig02srl@gmail.com>
2020-12-01 22:19:56 -05:00
Sirius902
09fe32e198
ovl_Magic_Dark (#495)
* merge upstream

* Merge upstream

* Small formatting

* Data section

* MagicDark_Draw

* Gross match of func_80B874E4

* Add func_8005A9CC to functions.h

* Work on func_80B87A18

* func_80B8772C

* Remove comment

* Work on func_80B87A18

* Correct fp constant

* Add regalloc comment ;(

* Move negatives to numbers

* Stupid casts >:(

* Use this->actor when possible

* It's so close

* Use cast + 0xFF

* func_80B87A18

* Delete asm and replace globalCtx2

* Update spec

* static everything

* Name scale

* Use decimal for alpha

* Name some stuff

* Delete reloc

* Name orbOffset

* Name some functions

* Make unused data colors (because it probably is)

* Change >= to >

* Use clamps

* Name MagicDark_DimLighting

* Name gfx

* Rename prototype params

* Cleanup

* Funny cast

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2020-12-01 21:36:39 -05:00
Ethan Roseman
932174b6ee
Decompiled ovl_En_Zl3 (2 non-matchings) (#491)
* Progress

* deleting more function files

* more

* more

* More

* more

* more

* more

* more

* 2 more

* more

* more

* more

* more

* more

* more

* more

* more

* more

* master update

* 4 more

* Merged

* 3 more

* One more done!

* ug

* Ido Recomp test

* try 2

* Recomp by default

* Fix Jenkinsfile

* Fix 2

* Fixing struct

* CFE errors

* CFE fix -O2

* Cleanup

* More progress, almost done...

* Almost..

* Update and some progress

* formatting

* Cleanup

* Major cleanup

* done for now

* PR comments

* PR comments

* merge master and format

* a few things

Co-authored-by: fig <fig02srl@gmail.com>
2020-12-01 20:48:54 -05:00
petrie911
3aa76152c5
En_Attack_Niw, En_Insect, z_skin_matrix, and z_skelanime matched (#493)
* 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

* marginal improvement

* matched functions. Also fixed a serious lack of static

* format

* more static

* fixing a function prototype

* skelanime OK

* forgot .s

* skin matrix matched

* format
2020-11-23 21:34:32 -05:00
Sirius902
89f89ac5ea
ovl_En_Okuta (#470)
* merge upstream

* Merge upstream

* Migrate data

* Progress

* Progress

* Progress

* Cleanup data

* Match EnOkuta_Update

* EnOkuta_Draw

* func_80AC25D8

* Work on func_80AC2350

* Name EnOkuta_OverrideLimbDraw

* More progress

* More progress

* Progress

* Progress

* func_80AC2350

* func_80AC1938

* Use LINK_IS_ADULT

* func_80AC1B80

* Name some stuff

* Update spec and remove asm

* Name EnOkuta_SpawnSplash

* Name more stuff

* Name EnOkuta_Appear

* Name ColliderInits

* Reorder comparison to make more sense

* Name some Octorock related functions

* Name some projectile stuff

* Reorder comparison

* Convert remaining uses of unk_194 to decimal

* Name some more stuff

* Rename some wait functions to have 'to'

* Consolidate timers

* Name some more stuff

* Change EnOkuta_SetupWaitToAppear to take this

* Name jumpHeight

* Name this->scale

* Name shots

* Name _SetupWaitToShoot and _SetupShoot

* Name more stuff (might change)

* Name EnOkuta_ColliderCheck for now

* Replace some floating point constants

* Change name to make a bit more sense

* Rename mouth to snout

* Just rename parameter to scale

* Fun magic number I guess

* Remove several returns

* Cleanup

* Update src/overlays/actors/ovl_En_Okuta/z_en_okuta.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Okuta/z_en_okuta.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Clang format

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-11-23 19:50:13 -05:00
Sirius902
385c419aa2
ovl_En_Ik (#461)
* merge upstream

* Merge upstream

* Progress

* Progress

* Fixes

* Migrate bss for now ig

* func_80A772EC

* Use rom reloc

* Cleanup

* Correct prototype

* Rename to _PlayBGM

* Eh revert to _StartMusic

* Match func_80A74398 more

* Fixes

* Work on func_80A74398

* Work on func_80A74398

* Match func_80A74398

* Use thisx

* Name, static, and move some stuff

* Match some graphics functions

* Rename asm for named functions

* Forgot one

* More graphics stuff

* Progress

* More progress

* Fix jump table

* Figure out types for a lot of data

* Fix data

* Type remaining data

* Work on func_80A7492C

* Ugly match for func_80A7492C

* Fix func_80A7492C

* Match some interesting stuff

* Move and remove forward declarations

* Sort declarations

* Progress

* Use quotes for vt import

* Slightly better diff

* Better diff again

* Fix stack on func_80A74BA4

* match func_80A74BA4

* func_80A74674

* Progress

* Progress

* Progress

* Progress

* Eh early return probably makes more sense here

* Progress

* Progress

* Progress

* Autocomplete sucks

* Name stuff in func_80A76E2C

* Work a bit on func_80A75C38

* Ugly match func_80A75FA0

* Name it prevInvincibilityTimer

* EnIk_PostLimbDraw3

* Use hex for line numbers in EnIk_PostLimbDraw3

* EnIk_PostLimbDraw2

* EnIk_PostLimbDraw1

* Use hex for line numbers in EnIk_PostLimbDraw1

* Use ACTORTYPE_ENEMY

* Progress

* Possible fake match of func_80A75C38

* Update spec and remove asm

* Cleanup forward declarations

* Move data to fun places

* Move data into func_80A76E2C

* Move data into func_80A75A38

* Make D_80A7847C an array

* Remove struct padding

* Revert "Remove struct padding"

This reverts commit 87b0bd73da.

* Name colliders

* Use else

* Name shieldColliderItems

* Use new graphics macros

* Cleanup
2020-11-23 08:53:21 -05:00
petrie911
cf24a76fe4
Three new matching functions (#492)
* 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

* new matches

* format

* need to kill the asm, too

* whoops dlists

* one more match

* no more temp

* let's fix Gameplay_ChangeCameraStatus while we're at it

* formatted
2020-11-19 16:49:08 -05:00
Tharo
93389da2dc
Fix prototype for Audio_PlaySoundGeneral and fix related types in structs (#481) 2020-11-16 03:31:08 -05:00
fig02
3c5fe66dcd
Use macros for oGfxCtx accesses (#465)
* fix colliderinit typo

* fix initchain

* reloc

* add defines

* add defines

* missed some on merge

* rename gfxCtx and add comment

* remove space
2020-10-29 17:31:09 -04:00
Tharo
92bb1fb210
Decompile the last of libultra_code_O2 (#464)
* Decompile osPfsFileState, move guMtxL2F to asm/

* Remove asm

* Add some prototypes to functions.h
2020-10-28 15:59:18 -04:00
fig02
6e000fcc54
En_Elf Decompiled (#432)
* init matched

* everything but navi OK

* progress

* 4 left

* remove asm

* progress

* progress

* asm and spec

* remove comment

* suggestion

* review1

* use type enum

* name func

* overridelimbdraw

* review 2

* forgot one

* merge master

* format
2020-10-28 13:02:35 -04:00
Roman971
daf624fe48
Revert accidental rename of Matrix_MtxFToNewMtx (#460) 2020-10-26 20:47:43 -04:00
petrie911
93fc51e9b6
Oshihiki (#441)
* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* matching

* format

* document and format

* .s files

* cleanup and macros in block-related actors

* fixed a few more things, also an error I cso an error I caught in another file.
2020-10-26 09:33:58 -04:00
Tharo
695552f0b8
code_800F7260 (#433)
* Split code_800F7260

* More function splits, migrate rodata

* Initial progress

* Small progress

* More substantial progress, finally figured out structs

* 2 functions left

* Move prototypes to functions.h

* Remove unused asm, move most externs to variables.h

* Fix merge

* Ran formatter

* Brackets to avoid && &

Co-authored-by: krimtonz <33664508+krimtonz@users.noreply.github.com>

* More variables to variables.h

* Braces around early return

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

* ARRAY_COUNT in sBankSizes and remove unnecessary temp vars

Co-authored-by: krimtonz <33664508+krimtonz@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2020-10-26 07:58:56 -04:00