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

136 Commits

Author SHA1 Message Date
Vijfhoek
36fead60a0
Improve z_jpeg documentation (#825)
* Improve z_jpeg documentation

* JpegWork::data is probably better than address

* Rename Jpeg_SendTask to Jpeg_ScheduleDecoderTask

* Rename njpegUCode to gJpegUCode

* Rename GetU16 to GetUnalignedU16 and improve docs
2021-05-26 20:46:07 +02:00
Zach Banks
7c77253eca
ViMode progress (#802)
* ViMode OK

* Fix variable name in regconvert tool

* ViMode: fix formatting

* Add nonmatching impl for ViMode_Configure, respond to PR

- Fixed struct field naming (unkXX -> unk_XX)
- ViMode_Configure args are not flags for top/left etc; seem to be for
    video mode
- Used @Random06457's implementation of `ViMode_LogPrint`

* Use plain LOG_ADDRESS in ViMode_LogPrint

* Incorporate PR feedback from Roman971
2021-05-03 21:49:09 -04:00
Roman971
a53e084cd2
Decompile the pause menu aka. ovl_kaleido_scope (+ minor changes) (#803)
* Decompile ovl_kaleido_scope + minor cleanups

* Add a common header for ovl_kaleido_scope

* Start cleaning up and documenting kaleido_scope (+ some interface docs)

* Improve and fix some kaleido_scope non matchings

* Match KaleidoSetup_Init

* Extract icon_item_fra/ger_static files

* Add more documentation and matches to kaleido_scope

* Improve the z_kaleido_collect.c non matching

* Rename z_kaleido_8081EFF0.c to z_kaleido_prompt.c

* Update most kaleido variables to be static

* Improve GS flag macros

* Improve z_lmap_mark.c and extract z_lmap_mark_data.c with a script

* Various minor fixes and improvements

* Minor fixes and review changes

* Review changes part 2

* Rename gSetTileCustom to gDPSetTileCustom

* Review changes part 3
2021-05-02 19:15:16 -04:00
petrie911
7b2b88d552
Volvagia (ovl_Boss_Fd) and related actors (#352)
* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* Lots of functions matched. Some big ones are close.

* Five left unmatched, one close.

* Merged data and decompiled the giant function into something readable. Its branch structure has yet to be matched.

* Three unmatched, one essentially matched, the rest matched.

* More fixes.

* Documented more of the structure and cleaned up a bit.

* BossFd2, BgVbSima, and EnVbBall matched and documented

* Also removed unneeded .s files

* And need to name EnVbBall's functions

* give this a shot

* fix conflict

* one more try

* removing darkmeiro changes

* and again

* now OK from make clean

* minor cleanup

* One more matching function for BossFd

* which means it doesn't need its .s

* splitting

* splitting

* splitting

* forgot some .s

* fancy new names

* fancy new names

* trying again

* sneaky .s files

* sound effects and some hex to decimal conversions

* Sound effects and static variable cleanup

* format.sh and clean up static variables

* sfx and formatting

* ZAP and cleanup

* small cleanup

* cleanup and ZAP

* ZAP

* looking at the giant function again

* looking at the giant function again

* Only the big function left.

* Those .s files aren't mine, officer

* float literals might be fixed. regalloc still a nightmare

* almost done with the big function

* should make now

* not much of a change

* all functions match. rodata somehow doesn't.

* forgot some things

* lots of cleanup

* and a little more

* small error

* large cleanup. Also BossFd has function names and inlined variable declarations

* still more cleanup

* the quest for 0.1f continues

* forgot to put NON_MATCHING back in

* Data structures fully documented. Still more cleanup.

* DECR now works with BossFd2

* should match now

* cleanup

* small cleanup

* cleanup and names

* tiny thing

* particles and headers and stuff

* now with more enums

* merge

* test

* end test

* update

* cleanup

* object 2

* object 1

* doc object_fd2

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "6f874af4a"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "6f874af4a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* formatting

* .s

* merge actor

* vertex arrays

* a little more

* formatting

* merge opd

* fixed damage check

* cleanup

* fixes

* effect struct

* review

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: fig02 <fig02srl@gmail.com>
2021-04-17 19:12:46 +02:00
Synray
7f94088a3b
En_Horse OK (#554)
* En_Horse OK

* Remove reloc

* WIP

* Use EnIn

* Documentation

* Documentation

* Remove debug prints

* Warnings

* Cleanup

* Unused asm

* Review comment

* Review comments and reformat

* More review comments

* Rename flags

* Review changes

Co-authored-by: Fig02 <fig02srl@gmail.com>
2021-04-11 21:23:40 -04:00
gamestabled
03b81c71c2
named members of TitleCardContext (#749)
* named members of TitleCardContext

* changed screenX/Y to just x/y

* added clarifying comments and renamed timer -> duration because i think its better

* changed names to delayTimer and durationTimer

* made texture a void*

Co-authored-by: gamestabled <chandler2016@yahoo.com>
2021-04-05 13:37:46 -04:00
Dragorn421
288320317c
Gohma (ovl_Boss_Goma) (#397)
* ovl_Boss_Goma OK, except func_80917D98

* ovl_Boss_Goma OK and documented

* Minor cleanup: shorten enums, use named constants...

* Floats with .0f, less useless static usage, details on oversight about spawning child gohmas, cleanup...

* More documentation, hopefully less weird about documenting setups and actions

* fix fhg_fire

* remove warnings

* formatting things

* newlines

* review

Co-authored-by: Fig02 <fig02srl@gmail.com>
2021-04-03 16:58:33 -04:00
petrie911
9b4482314a
OnePointDemo OK (#719)
* matches

* more matches

* progress?

* it's time

* so close

* organize declarations

* docs

* more fixes

* more fixes

* fix stage 1

* more fixes

* first try

* demo ids in decimal

* final cleanup

* one more thing

* fixes

* more cleanup

* onepointcs

* OnePointCutscene

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-03-31 12:18:31 -04:00
mzxrules
86f16cf662
"decompile" ovl_map_mark_data, make minor tweaks to z_map_mark.c (#704)
* "decompile" ovl_map_mark_data, make minor tweaks to z_map_mark.c

* implement some suggestions

* eliminate wrapping braces
2021-03-29 19:24:08 +02:00
Kenix3
f4499a8de2
En_Clear_Tag OK and documented (#689)
* Decompile and document En_Clear_Tag

* Adds a define for setting the total count of ClearTag particles.

* Fixes swap in particle effect struct member names.

Additionally, implements the DECR macro where available.
Additionally, implements the CLAMP_MIN macro.
Additionally, adds more comments inside of functions explaining how the Arwing works.

* Reformats z_en_clear_tag.c after recent fixes.

* Removes not OK DECR and CLAMP_MIN macros.

I don't know why they built locally OK for me. May have had a stale build.

* Added static to data declarations.

Additionally added white spacing between data definitions.

* Various syling fixes in EnClearTag

Fixes inconsistent usage of particle/effect. They're Effect is the better name, so I went with that.

Fixed a naming issue in CalculateFloorTangent.

Adds s prefix to all the static variables.

Renames clearTagParticlesBuffer to sClearTagEffects

Consistent capitalization in comments.

Adds more descriptive comments to function level comments that didn't say a lot already.

Renamed gameplay.particleEffects to gameplay.specialEffects.

Renames cameraNumber to cameraId.

Fixed capitalization in display list variable names.

* Always capitalize the A in arwing.

* Fixes issue with overzealous replacement of arwing -> Arwing

* Renames arwing display lists to include the g prefix.

* Renames effect seed -> random

* Removes unnecessary decrement timer comments.

* Updates Arwing comments to detail why it's important that the roll is updated to zero.

* Updates stack variable names in EnClearTag_Update to be more consistent with each other.

* Updates Arwing crashing documentation.

* Further update documentation on arwing crashing.

* Even further updates to Arwing crashing docs.

* Fixes issue of missing newline in En_Clear_Tag.xml

* targetDirection reset now has a chained assignment

* Rotation angle to hex

* Fixes rotation hex and identifies float.

* Updates arwing fire check.

* Arwing cutscene timer is multiplied by 128 rather than shifting 7

* Updates scaledCrashingTimer assignment to be more consistent.

* Updates max scale to multiply by 2

* Gives name to the work buffer indices.

Additionally, makes enum names more consistent.

* Removes unnecessary globalCtx2 in EnClearTag_CreateFlashEffect

* Runs format.sh after recent changes.

* Updated path of ClearTag assets.

* Clear tag now uses Arwing in the display list name for all effects.

* Updates work buffer to expand and contract as new enums are added.

* Uses c99 defines in my c89

* Updates the unknown 8 bytes in en_clear_tag

* review

Co-authored-by: fig02 <fig02srl@gmail.com>
2021-03-29 19:14:08 +02:00
fig02
1639417327
code_80110450 (game over) OK* (#739)
* OK (sort of)

* remove hack

* clean up comments
2021-03-28 19:50:46 -04:00
fig02
187d2d1500
document code_8008E6A0 (frame advance) (#737)
* OK

* fixes

* format

* remove gotos, thanks petrie
2021-03-28 19:35:16 -04:00
AdamKiddle
ca5a9aa7d1
EnEncount2 and EnFireRock OK (#659)
* first two funcs done

* fixing struct var name due to external use

* func_80A07CA4 done

* started EnEncount2_Update

* EnEncount2_Update done

* Encount2 done!

* EnFireRock_Init done (but will only match once initvars are uncommented

* progress

* 4 funcs left

* Fully matching

* minor formatting

* renames

* change structs back to normal

* formatting

* removing unused comments

* even more formatting stuff

* removed unused asm

* pr stuff

* pr stuff

* added newline at end of file

* some merge suggestions

* more pr stuff

* review

Co-authored-by: fig02 <fig02srl@gmail.com>
2021-03-14 10:39:41 -04:00
Tharo
f9d96d9f73
Fix most compiler warnings in the boot and code segments (#674)
* Less warnings in boot & code segments

* few more warnings gone

* Ran formatter

* z_view warning gone

* -> 1

* f31 -> 31

* Remove function casts

* Few more small improvements

* Separate declaration and assignment in func_80091738 and Item_Give

Co-authored-by: Thar0 <maximilianc64@gmail.com>
2021-02-13 19:49:40 -05:00
Anghelo Carvajal
6d01247f34
ovl_Eff_Dust OK (#655)
* void func_8099D8D0(void *arg0, s32 arg1)

Signed-off-by: angie <angheloalf95@gmail.com>

* void func_8099D8D8(void *arg0, s32 arg1)

Signed-off-by: angie <angheloalf95@gmail.com>

* void EffDust_Destroy(Actor *thisx, GlobalContext *globalCtx)

Signed-off-by: angie <angheloalf95@gmail.com>

* Fix some pointers in the struct

Signed-off-by: angie <angheloalf95@gmail.com>

* Fix functions declarations

Signed-off-by: angie <angheloalf95@gmail.com>

* void EffDust_Init(Actor *thisx, GlobalContext *globalCtx)

Signed-off-by: angie <angheloalf95@gmail.com>

* EffDust_Update, EffDust_Draw, renaming and cleanup

Signed-off-by: angie <angheloalf95@gmail.com>

* void func_8099D8E0(EffDust *this)

Signed-off-by: angie <angheloalf95@gmail.com>

* void func_8099DB28(EffDust *this, GlobalContext *globalCtx)

Signed-off-by: angie <angheloalf95@gmail.com>

* void EffDust_UpdateFunc_8099DD74(EffDust *this, GlobalContext *globalCtx)

Signed-off-by: angie <angheloalf95@gmail.com>

* Members renaming

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* NON_MATCHING void func_8099E4F4(EffDust *this, GlobalContext *globalCtx)

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* void func_8099DFC0(EffDust *this, GlobalContext *globalCtx)

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* NON_MATCHING void func_8099E784(EffDust *this, GlobalContext *globalCtx)

Signed-off-by: angie <angheloalf95@gmail.com>

* NON_MATCHING func_8099E784 - score 100

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* func_8099E784 still not matching

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* almost there (func_8099E784)

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* func_8099E784 matching. needs cleanup

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* void func_8099E784(EffDust *this, GlobalContext *globalCtx)

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* Rename most members of the struct

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* void func_8099E4F4(EffDust *this, GlobalContext *globalCtx) matching

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* Rename a few variables and functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* Add an enum for the possibles values for actor.param

Signed-off-by: angie <angheloalf95@gmail.com>

* format files

Signed-off-by: angie <angheloalf95@gmail.com>

* fix merge problems

Signed-off-by: angie <angheloalf95@gmail.com>

* delete reloc

Signed-off-by: angie <angheloalf95@gmail.com>

* remove defined symbols from undefined_syms

Signed-off-by: angie <angheloalf95@gmail.com>

* a bunch of functions

Signed-off-by: angie <angheloalf95@gmail.com>

* another bunch of functions

Signed-off-by: angie <angheloalf95@gmail.com>

* add dummies to func_8097911C to match it

Signed-off-by: angie <angheloalf95@gmail.com>

* fix some functions declarations

Signed-off-by: angie <angheloalf95@gmail.com>

* Add functions of the array used by the update function

Signed-off-by: angie <angheloalf95@gmail.com>

* add functions used by draw

Signed-off-by: angie <angheloalf95@gmail.com>

* draw and update functions

Signed-off-by: angie <angheloalf95@gmail.com>

* DemoGj_Init

Signed-off-by: angie <angheloalf95@gmail.com>

* fix some functions declarations

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* 9 small functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* Some unmatched functions and 12 small matched functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* another 7 small functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* add data

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* small types fixes

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* six more functions

Signed-off-by: angie <angheloalf95@gmail.com>

* func_80978C20

Signed-off-by: angie <angheloalf95@gmail.com>

* func_8097BA48

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* five repeated functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* Array of cylinders and two other functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* seven equals and problematic functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* func_80978F60 and func_80979860

Signed-off-by: angie <angheloalf95@gmail.com>

* func_8097923C doesn't want to match :c

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* three not matching functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* func_80978AFC

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* three more

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* DemoGj_FindGanon

Signed-off-by: angie <angheloalf95@gmail.com>

* func_809797E4

Signed-off-by: angie <angheloalf95@gmail.com>

* func_80978B90

Signed-off-by: angie <angheloalf95@gmail.com>

* last non matching function

Signed-off-by: angie <angheloalf95@gmail.com>

* erase reloc

Signed-off-by: angie <angheloalf95@gmail.com>

* a bit of renaming

Signed-off-by: angie <angheloalf95@gmail.com>

* another chunk of renaming

Signed-off-by: angie <angheloalf95@gmail.com>

* fix reg macros and a few comments

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* vt, arrayfuncs renaming and another bit of renaming

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* More renaming

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* i'm hating this actor

Signed-off-by: angie <angheloalf95@gmail.com>

* format

Signed-off-by: angie <angheloalf95@gmail.com>

* Changes asked by @shawlucas

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* changes asked by @louist103

Signed-off-by: angie <angheloalf95@gmail.com>

* Revert "Merge branch 'ovl_Demo_Gj' of github.com:AngheloAlf/oot into ovl_Eff_Dust"

This reverts commit 12e0e5d2a6, reversing
changes made to b251f1d234.

* fix merge problems

Signed-off-by: Anghelo <angheloalf95@gmail.com>

* Rename the param's enum and move it to header

Signed-off-by: angie <angheloalf95@gmail.com>

* add file description

Signed-off-by: angie <angheloalf95@gmail.com>

* Some changes requested by @Roman971

Signed-off-by: angie <angheloalf95@gmail.com>

* more changes

Signed-off-by: angie <angheloalf95@gmail.com>

* Change the particles amount from hex to decimal

Signed-off-by: angie <angheloalf95@gmail.com>

* `format.sh` should also format headers :s

Signed-off-by: angie <angheloalf95@gmail.com>
2021-02-12 19:04:22 -05:00
petrie911
5f552a369c
z_skin OK and z_skin_awb decomped (one barely nonmatching) (#632)
* skin_awb some functions done

* more matches

* stuff

* matching skins

* closer?

* less skin

* skin

* format

* one thing

* merge actor

Co-authored-by: gns <adamkiddle23@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-02-12 20:41:34 +01:00
engineer124
cce6880bc0
En_Fr Frogs 47 of 48 func decomped (#576)
* En_Fr 47 of 48 func decomped

* EnFr more cleanup

* uncommented out EnFr_Update

* more cleanup

* added format document

* Update src/overlays/actors/ovl_En_Fr/z_en_fr.c

Null Pointers

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

* Update src/overlays/actors/ovl_En_Fr/z_en_fr.c

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

* Update src/overlays/actors/ovl_En_Fr/z_en_fr.c

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

* Update src/overlays/actors/ovl_En_Fr/z_en_fr.c

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

* Update src/overlays/actors/ovl_En_Fr/z_en_fr.c

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

* Update src/overlays/actors/ovl_En_Fr/z_en_fr.c

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

* Update src/overlays/actors/ovl_En_Fr/z_en_fr.c

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

* Update src/overlays/actors/ovl_En_Fr/z_en_fr.c

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

* feedback from pr

* more cleanup

* more pr feedback

* more cleaning and updates

* remove data.s

* review 2

* review

* missed one

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
2021-02-02 15:17:51 -05:00
Zelllll
da993894d3
En_Daiku_Kakariko OK (Kakariko Village Carpenters) (#635)
* mostly done, one function left

* daiku_kakariko OK

* should be ready for pr

* removed unused asm

* should build OK now

* builds OK now

* all of fig's suggestions resolved
2021-01-31 18:14:47 -05:00
Tharo
3e322f5d35
ovl_En_Sa (#625)
* Decompiled

* Add missing sfx id name

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

Co-authored-by: Thar0 <maximilianc64@gmail.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: Fig02 <fig02srl@gmail.com>
2021-01-31 14:35:58 -05:00
fig02
00a5edea71
Actor Struct Changes (and a few related things) (#617)
* reformat header

* type -> category

* done for now i think

* some more stuff

* first -> head

* focus

* flag comment

* ground -> floor

* remove asm, name wrapper funcs

* name func, format

* review

* targetPriority, format

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "0305ec2c2"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "0305ec2c2"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* comment

* review

* feet flags

* horse shadow
2021-01-18 16:04:04 -05:00
petrie911
02994f5339
Document Collision_Check (#468)
* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* some decomp

* still playing around with this

* rename functions

* ZAP again

* ZAP again

* the renaming begins

* more renaming. hopefully didn't break anything

* change all the things

* this and then merge

* and done

* one little thing

* small docs, small rename

* changed mind on cylinder and quad elements

* something

* more stuff

* more docs

* more adjustments

* Fixed some types

* more fixes

* all sorts of cleanup

* now with flags

* match!

* names and such

* update tools

* damage tables

* ColChkInfo

* one more thing

* formatting

* more formatting

* anime merge

* some stuff

* damage table

* again

* changes

* .s

* changes

* oc2 type

* a couple things

* format

* un-name magic arrows, not enough proof yet

* fix damage table script and remove old one

* EnAObj

* changes

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Fig02 <fig02srl@gmail.com>
2021-01-17 21:13:36 -05:00
AdamKiddle
9be264da9d
TwoHeadArena Cleanup (#633)
* TwoHeadArena cleanup

* remove params

* remove params

* prettying up the struct a little

* remove unecessary cast
2021-01-15 17:18:15 -05:00
Zelllll
a0e2ce7211
Cleanup z_lifemeter (#552)
* 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>
2021-01-10 16:33:58 -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
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
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
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
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
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
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
Tharo
fff616d2be
Decompile z_kanfont (#443)
* Decompile z_kanfont.c

* Cleanups

* off -> offset

* Kanfont -> Font , Keep so-far unused Font fields as padding, Remove MessageData sub-struct
2020-10-12 17:42:17 -04:00
Random
b010db7c19
Decompile z_sram.c (#431)
* Decompile z_sram.c

* rename Sram_CalcChecksum to Sram_WriteSaveSlot

* progress

* done i think

* add original name comments

* temp substructs

* minor fixes

* review

* review 2

* fix

Co-authored-by: fig <fig02srl@gmail.com>
2020-10-11 13:45:08 -04:00
Random
174af7384d
libultra cleanup (#215)
* cleanup libultra

* fixes

- use quotes instead of <> for includes
- add macros for zelda specific thread priorities
- fix Makefile
- properly format the remaining pfs structs

* fix button macros + add CHECK_BTN_ANY/CHECK_BTN_ALL

* remove ULTRA_ABS

* fix includes

* update z_player.c/z_lib.c + run format.sh

* merge upstream/master

* fix include in En_Goroiwa

* fix includes
2020-10-03 11:22:44 -04:00
fig02
82968a7381
All Effect Overlays and z_effect_soft_sprite_old_init.c OK (#396)
* fix colliderinit typo

* dead sound done

* deadsound documentation

* blast done

* progress

* spk init

* progress

* spark done

* ss bomb ok

* bomb done

* cleanup

* progress

* progress

* almost done with bomb2

* clean up gossip stone

* more

* cleanup and format

* remove unused asm file

* nonmatching reloc

* done i think

* mistakes

* fix headers

* idk how that got in here

* EffectSsStick OK

* progress

* fix conflicting name

* progress

* splash OK

* uname fields

* progress

* lightning OK

* remove unwanted files

* kirakira ok

* kirakira done

* magma OK

* remove files

* ss_g_fire OK

* name funcs

* progress

* progress

* magma2 and kakera OK

* eff_ss_dead_dd OK

* fcircle OK

* stone1 OK

* sibuki2 OK

* dt_bubble OK

* deaddb OK

* sibuki OK

* dead_ds OK

* ice_smoke OK

* hitmark OK

* hahen OK

* k_fire OK

* en_fire OK

* starting colors

* color changes 1

* color switch done

* init file data migrated

* data cleanup

* ice_piece OK

* en_ice OK

* progress

* progress

* docs progress

* fix blast color names

* documentation pass 1

* progress

* cleanup pass 2

* touchups

* added to functions.h

* small changes

* fix functions.h

* renaming progress

* name progress

* color enum

* more cleanups

* enice changes

* final cleanups

* remove unwanted file

* lightning -> shock

* pr suggestions

* fix comment

* remove unwanted comments
2020-09-29 20:18:46 -04:00
Roman971
14191307e9
Decompile Player (#387)
* 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
2020-09-18 21:45:39 -04:00
Random
bfef7f8d9d
Decompile PreRender.c (#319)
* 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
2020-09-15 15:10:19 -04:00
fig02
bb1aacbd0b
z_lights.c OK (#343)
* 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
2020-09-05 09:45:10 -04:00
Roman971
2a2fdf7f3e
Introduce OPEN_DISPS/CLOSE_DISPS macros (#360) 2020-08-29 19:00:17 -04:00
Roman971
49609dd78b
Match/Improve a bunch of non matchings (#342) 2020-08-23 17:50:30 -04:00
fullgrowngaming
b406e041b3
z_en_weather_tag decomp (#329)
* 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>
2020-08-20 21:28:41 -04:00
Tharo
e6cee80a7b
Decompile ovl_Bg_Haka_Tubo (#280)
* 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>
2020-07-20 19:57:02 -04:00
Lucas Shaw
3dd521eef5
ovl_En_Okarina_Tag OK (#273)
* started okarinatag

* did more

* z_en_okarina_tag OK

* finished okarinatag

* Made suggested changes
2020-07-19 17:41:59 -04:00
Kelebek1
83d08078c3
Gossip Stone, 1 nonmatching (#251)
* Gossip Stone, 1 nonmatching

* Appease the Fig

* spec

* Fix last function ordering

* Ethan Review 1

* a

* Hidden PR notes QQ

* a

* Fixed now??

* a
2020-07-18 20:35:12 -04:00
Nathan Faltermeier
a982d40480
Decompile ovl_En_Insect (#244)
* 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>
2020-07-18 17:40:27 -04:00
Léo Peltier
bc14f6d93e
Decompile ovl_En_Fhg_Fire (#248)
* Decomp EnFhgFire_Init and EnFhgFire_SetActorFunc

* Decomp EnFhgFire_Destroy

* Decomp func_80A0F6F8

* Run format

* Decomp func_80A0FA90

* Decomp func_80A0FC48

* Decomp func_80A0FD8C

* Decomp EffectSsFhgFlash_Spawn

ex func_80029CF0

* Decomp EffectSsFhgFlash_Spawn2

ex func_80029D5C

* Decomp EnFhgFire_Update

* Decomp EnFhgFire_Draw, not matching

* Decomp func_80A10F18

* Move InitVars

* PR fixes

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

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-07-16 06:02:27 -04:00
Sirius902
8c72e1dea6
Decompiled ovl_Shot_Sun (#236)
* 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>
2020-07-12 19:03:38 -04:00
Random
b4a7ac9d71
Decompile shrink_window.c (#232) 2020-07-08 21:54:39 -04:00
Ethan Roseman
f3edd3ee77
Decompiled ovl_En_Si (#239)
* Decompiled ovl_En_Si

* Description

* Update src/overlays/actors/ovl_En_Si/z_en_si.c

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

* Update src/overlays/actors/ovl_En_Si/z_en_si.c

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

* Update src/overlays/actors/ovl_En_Si/z_en_si.c

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

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-07-07 06:39:06 -04:00