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

1198 Commits

Author SHA1 Message Date
engineer124
7e09accf0e
Document Camera Settings (#994)
* Document Settings

* Clean Up z64Camera.h

* Add comment
2021-11-01 16:10:03 +01:00
Random
dcb8357f72
UCodeDisas_Disassemble (#981)
* ucode_disas_disassemble

* run formatter script

* fix types

* fix matrix print

* get rid of Gdma2

* add padding in Gline3DFix
2021-10-31 16:39:29 -04:00
louist103
916efa0f7d
Use clang when possible for tools (#990)
* Use clang when possible for tools

* Add LLD ?= 0
2021-10-31 20:00:24 +01:00
Roman971
bf0f26db9b
Match the remaining functions in Boss_Ganon2 (#1015)
* Match the remaining functions in Boss_Ganon2

* Add empty lines after declarations
2021-10-28 15:17:42 -04:00
Synray
188690c602
Match vr_box functions (#1014) 2021-10-27 23:12:16 +02:00
Dragorn421
bfc36c57bf
Document en_viewer (cutscene npcs) (#898)
* document en_viewer

* `EnViewerAnimFunc` -> `EnViewerInitDrawFunc`

* Document `EnGanonMant`-related code

* Run formatter

* Cleanup undefined_syms.txt

* Ganon -> Ganondorf

* InitDraw -> InitAnim

* `EnViewer#draw` -> `isVisible`

* Remove `#define TYPE`, use params directly

* Run formatter

* Clarify comment about `Actor_MoveForward` having no effect

* Remove clang-format cheat

* Change `sInitData` index comments from decimal to enum names

* Move data to get rid of forward declarations

* Remove not really useful comment

* `sShadowFuncs` -> `sShadowDrawFuncs`
2021-10-24 11:43:20 -04:00
Anghelo Carvajal
9b89ec5fac
Document ovl_select (#966)
* Some renames

* Some renames

* Some more renames

* pageDown

* Last name update

* Translate scene entries

* formatter

* Review

* A bunch of suggestions

* Run formatter

* Roman's suggestions
2021-10-23 20:44:45 -04:00
Dragorn421
4b10b22baa
Document object_pu_box and related actors (#918)
* object_pu_box-related doc

* Cleanup undefined_syms.txt
2021-10-22 21:28:16 -04:00
Dragorn421
5d89d85aba
Document en_bom_chu (bombchus) (#905)
* document bombchu actor

* document the `-world.rot.x` hack

* Use `DOTXYZ` for dot product

* Make multiline comment use single line comments syntax

* Turn comment into doc comment

* `SCALE` -> `BOMBCHU_SCALE`
2021-10-22 21:08:58 -04:00
Dragorn421
bc1db8474f
Document en_kusa (bushes) (#901)
* en_kusa doc

* run formatter

* `fullyGrown` -> `isFullyGrown`

* Symbol cleanup

* Minor changes

* Use a switch in `EnKusa_SetupCut`

* Remove `#define`s for params

* Hex instead of `|` for a bitmask
2021-10-22 16:44:15 -04:00
Dragorn421
d539c259af
z_en_a_keep documentation and cleanup (#900) 2021-10-22 21:54:30 +02:00
louist103
42b8cec3d0
Zapd hotfix (#1009)
* remove fake match

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "4f7b8393e"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "4f7b8393e"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
2021-10-22 20:02:34 +02:00
Roman971
ceb571423d
Match BgMizuMovebg_Init (#1003)
* Match BgMizuMovebg_Init

* Re-add missing break
2021-10-19 15:37:02 -04:00
louist103
750c0cab35
Update ZAPD (#1001)
* remove fake match

* git subrepo pull --force tools/ZAPD

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

* new extraction script and a hack to make clear tag work

* fix clear tag again

* remove static from clear tag DLists

* git subrepo pull --force tools/ZAPD

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

* git subrepo pull --force tools/ZAPD

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

* git subrepo pull --force tools/ZAPD

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

* Update ovl_En_Clear_Tag.xml
2021-10-17 13:32:09 +02:00
Dragorn421
ed487b4bb8
Fix a few warnings (#998)
* Fix some warnings

* Revert warning fixes in audio code
2021-10-11 16:16:43 -04:00
louist103
a6554b4f84
Use void* instead of u32 for segmented addresses in debug display (#995)
* remove fake match

* change u32 to void*

* formatter

* Update src/code/z_debug_display.c

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

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-10-11 13:41:44 -04:00
Dragorn421
f1d27bf653
Fix/cleanup/rephrase miscellaneous stuff (#983)
* Add parens around params usage in VEC_SET macro

* Remove unnecessary space character in a xml

* Use defines instead of magic values in head/tail magic comments

* Use `OS_USEC_TO_CYCLES` to make a time look better in `Graph_TaskSet00`

* `0x25800` -> `sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])`

* `0x803DA800` -> `0x80400000 - frame buffer size`

* Use `OS_VI_` defines instead of hex

* Add empty line after some variable declarations

* Remove unused `extern CutsceneData` in `z_bg_dy_yoseizo.c`

* `Matrix_MtxFToYXZRotS` does not use `MTXMODE_`

* Use `MTXMODE_` more

* Remove `ASCII_TO_U32`, use `'IS64'`

* Add explicit `!= NULL` in some ternaries

* Use `INV_CONTENT`, `AMMO` macros more

* Use `PLAYER_AP_` enum more to compare to `Player#heldItemActionParam`

* Get rid of lowercase hex (outside libultra)

* `gWindMill*` -> `gWindmill*`

* Format and small fix enums in `z_boss_mo.h`

* Use `CHECK_BTN_ANY` more

* Fix xz/xy mistake in comment in tektite

* Rephrase comments mentioning "the devs" in a more neutral way

* Clean-up some objectively useless parens

* Fix some negative values written as u16 instead of s16 in ichains

* `SKJ_ACTON_` -> `SKJ_ACTION_`

* Run formatter

* Fix unk_ offset of `TransformUpdateIndex#unk_10` -> `unk_0E`

* Remove comments using in-game text

* Remove `U` suffix from integer literals

* Revert "Remove `ASCII_TO_U32`, use `'IS64'`"

This reverts commit c801337dde.

* Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)`

* Add empty line after decl x2

* Revert "Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)`"

This reverts commit d80bdb32da.

* Make `CUR_UPG_VALUE(UPG_STRENGTH)` compare to integers (eventually needs its own enum)

* Only use `PLAYER_SHIELD_` enum with `Player#currentShield`

* Only use `PLAYER_TUNIC_` enum with `Player#currentTunic`
2021-10-02 23:17:09 -04:00
Roman971
5c95f70d59
Match the remaining functions in db_camera.c (#991) 2021-10-01 22:48:40 -04:00
Dragorn421
c57c0f13fc
Format all translation comments like // "..." (hopefully all of them) (#986)
* Format all translation comments like `// "..."` (hopefully all of them)

* Move translation comments to before on long lines

Located them with `grep -r src -e '^[^(]*);[ ]*//'`
Regex `osSyncPrintf\([^;]*\n.*//` didn't find more

* Format two more
2021-09-28 19:53:56 -04:00
Dragorn421
063b4aed0c
Cleanup symbols from undefined_syms.txt (3rd round) (#938)
* Cleanup symbols from undefined_syms.txt (3rd round)

* Add comments in xmls near symbols that cause ZAPD issues

* Group `D_01000000` symbol definitions
2021-09-28 17:17:04 -04:00
Synray
52f93d135f
Decompile Object Kankyo (#960)
* Decompile Object Kankyo

* Remove asm, format

* Start documenting object kankyo

* Document object kankyo

* Remove reloc

* Review changes

and formatted again :(

* WIP

* Review changes
2021-09-26 15:35:01 +02:00
EllipticEllipsis
16471bb68d
EnWf OK and documented (#967)
* a ton of progress, 14 functions remain

* cleanup

* a few more functions done, 11 remain

* finally all updated

* another function matched

* another action finished

* damage table

* death action done

* started very large action func

* more progress on long action funcs

* large action func matched

* 5 functions remain

* another large action finished

* start another action, doesn't match yet

* a few new functions, neither match

* done working on this for now

* Correct one nonmatching, fix compiler warnings

* Two functions left

* one left

* remove remaining gotos

* OK

* Delete outdated comment

* namefixer

* Flag macros

* audio, dmgeff, some colour

* Import symbols from object, reloc, name a few things

* Rest of object done

* Named a few more things, add action enum

* Name body parts and another couple of actions

* Last few names

* Delete asm

* Format

* undefined_syms, mods where possible

* Correct parent to EnEncount1

* Review

* Last newline

* louis and Dragorn's reviews

* Format

* More review

* Put back to isInvisible and or, as in EnGeldB

* Remove if (0)s in func_8009728C and change pointer arithmetic cast

* More review

* Unname headRot, make "fallthrough" case clearer, other review

* Format

* Even more review

* Rephrase

Co-authored-by: Zelllll <56516451+Zelllll@users.noreply.github.com>
2021-09-24 18:35:42 -04:00
petrie911
8e318d257e
Decomp BgHidanSekizou (#970)
* mostly matching

* OK!

* relocs

* I fix

* fix some floats

* fixes

* array counts

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-09-24 18:26:19 -04:00
Roman971
f8015f4cd5
Match the last function in z_kankyo.c (#984) 2021-09-21 16:19:04 -04:00
Synray
3b7ed8d943
Match Environment_Update and EnMThunder_Draw (#982)
* Match Environment_Update

* Match EnMThunder_Draw

* Format

* Capitalize hex
2021-09-21 18:29:43 +02:00
petrie911
b18227e6ad
Decomp the remaining functions in vr_box and import its data (#917)
* stuff

* not quite there

* data imported

* fixed some things and adjusted sSetupDLs

* remove setup dls

* remove alloc casts

* format

* palette swap

* Update src/code/z_vr_box_draw.c

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

* improved loop matches

* fixed some comments

* format and adjustments

* palettes

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-09-21 04:48:43 -04:00
Roman971
a9604e267f
Match Skybox_Setup and 2 functions in z_kankyo.c (#980) 2021-09-20 19:33:44 -04:00
Synray
1fcb163451
Match remaining z_room functions (#978)
* Match func_80095D04

* Match func_80096FE8

Most of the work was done by the co-authors, putting in this PR for convenience.

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

* Format

* Remove asm

* Caps

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

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-09-20 15:37:47 -04:00
engineer124
9318ba1804
Match func_800E5000 (#977) 2021-09-20 15:24:24 -04:00
Synray
1c0503cd3b
Match func_80B42F74 in Yabusame Mark (#976) 2021-09-20 14:38:25 -04:00
engineer124
bf53f2c95e
Match EnTorch2_Update (#975)
* score = 965

* score = 305

* Clean-Up

* More clean-up

* Down to `sp30` <--> `sp34` swap, and extra `.data + 0x18` at the top?

* clean-up

* EnTorch2 OK, but does not reloc properly

* final cleanup

* Remove comments about non-matching

* Fix reloc non-matching

* Delete reloc

* Better solution

* PR Suggestions
2021-09-20 14:15:21 -04:00
Synray
ac8dd91626
Match remaining function in Bg_Jya_Cobra (#969)
* Match remaining function in Bg_Jya_Cobra

* Format
2021-09-20 14:12:05 -04:00
Synray
4ecd175bd1
Match KaleidoScope_DrawQuestStatus (#974)
* Match KaleidoScope_DrawQuestStatus

* Add back the parens
2021-09-20 13:49:20 -04:00
petrie911
e51f50f0ff
Decompile z_kankyo (#956)
* working

* start color switch

* progress

* progress

* progress on bgm func

* progress

* game over matched (except the rodata meme)

* start update

* progress

* lightning docs done

* progress

* progress

* progress

* progress

* progress

* can compile at least

* suns state, progress on kankyo_update

* some new names

* progress

* progress

* progress

* new functions

* cleanup

* more matches

* another match

* now functional

* format

* better match

* hugely improved update

* cleanup/review

* remove old changes

* review2

* review3

* missed one

* review4

* change asm filenames

* update doorwarp1

* review5

* Kankyo_ -> Environment_

* format

* merge master and format functions.h

Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-09-20 12:51:35 -04:00
Zelllll
50095d427c
Match z_actor (#973)
* matched first function, currently unclear why the other match doesn't appear to work anymore

* matched other function, issue was bss

* remove asm
2021-09-18 22:45:41 -04:00
louist103
8ac359fda5
Only use the ASM processor where it is needed (#919)
* remove fake match

* Remove asm processor from files that don't need it

* Update Makefile
2021-09-18 13:13:53 -04:00
Anghelo Carvajal
7f19430dc2
Make a XML for ganon_mant (#961)
* Make a XML for ganon_mant

* cleanup

* Apply suggestions from code review

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* sForceAlignment

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2021-09-18 12:54:45 -04:00
louist103
b3814ddc1b
Fix ganon organ reloc data and extract its assets (#965)
* fix ganon organ reloc data and extract its assets

* Named all textures

* RangeEnd

* static

* Remove D_ comments from XML

* Rename pad to sForceAlignment

Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
2021-09-18 11:40:40 -04:00
Anghelo Carvajal
672cc6e90d
Add -I. (#971)
* Add `-I.`

* Remove unused rule
2021-09-18 14:07:51 +02:00
louist103
e3f1ccd902
Fix all headers to comply with C standard (#957)
* Fix all headers to comply with C standard

* fix a file in libultra

* Update include/stdbool.h

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

* Update stdbool.h

* Update z64animation.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-09-15 19:24:19 -04:00
EllipticEllipsis
fbc4071cc8
Match last function in EnTp (#968)
* Data imported, 8 easy functions matched

* Init only remaining nonmatching, data in

* some renaming & fiddling with Init, still nonmatching

* fix colours

* Init still not matching

* Decompile object_tp

* renames

* Rename func_80B20DE0

* Horrible new idea

* Known equivalent, docs next

* Another attempt

* Finished naming in object_tp

* Named functions, more enums

* DrawBridge -> Drawbridge

* skulltulla -> Skulltula

* Name almost all struct variables

* Named most of the temps

* delete asm

* spec

* Missed data file, whoops

* Review

* More review changes

* Match EnTp_Init

* spec

* Delete asm
2021-09-15 19:03:47 -04:00
petrie911
b9ad6aac52
Make sSetupDLs a Gfx[][6] (#951)
* setup[][6]

* formatting

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-09-14 09:43:16 -04:00
petrie911
30939ccd28
code_800BB040 matched (#959)
* getting closer

* match!

* functions unnamed

* Update include/functions.h

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

* small changes

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-09-13 15:29:11 -04:00
zelda2774
baceca73b8
Update diff.py (#964)
Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-13 13:20:07 -04:00
Tharo
eccfd2efbf
Decompile ovl_Door_Warp1 (#949)
* Initial progress on Door_Warp1

* Fix merge

* More work on Door_Warp1

* Decompile most of Door_Warp1

* 2 more functions OK

* All decompiled, 3 nonmatching

* Tiny improvements, fix several warnings

* Remove commented GLOBAL_ASM lines

* Fix

* Fix merge

* Two more matches

* Some docs

* More docs

* Use generated reloc under NON_MATCHING

* Fix accesses in ru1

* Add break and add limbs and dlists for the skeleton to the object xml

* Comment values for enums

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>

* boolean returns for flag checking functions

Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>

* Named more loop variables i and named DoorWarp1_FloatPlayer

* Last function matched thanks to Roman

* Some further suggestions

* Fix

Co-authored-by: Thar0 <maximilianc64@gmail.com>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2021-09-12 11:10:10 -04:00
louist103
e31e35658d
Fix return UB (#958)
* Ydan_SP

* func_8002D7EC

* Gameplay_ChangeCameraStatus

* Graph_InitTHGA

* CollisioCheck_LineOC

* Fix more in camera and jpeg

* revert comment in player
2021-09-12 13:02:45 +02:00
louist103
90c841c435
Mark a bug in En_Tana (#954)
* bug

* Re word the bug to be clearer

* Small edits

* Use Another wording
2021-09-08 14:26:30 -04:00
engineer124
e6edb4b312
Improve non-matchings in DbCamera (#953)
* DbCamera_Update equivalent

* Very small progress

* cleanup

* More cleanup

* format

* even more cleanup

* typo
2021-09-08 20:18:50 +02:00
Dragorn421
b12dd3d980
Improve actorfixer.py (2nd round) and rename to namefixer.py (#942)
* Merge animfixer and mathfixer into actorfixer

* Allow "custom behavior" for `wordReplace` entries

* Rename `actorfixer.py` to `namefixer.py`
2021-09-07 15:29:40 -04:00
zelda2774
9c7d3688ac
audio_load OK (#948)
* Match func_800DDB64

* Match func_800DC910

* remove stack comments

* Move nop padding to ucode_disas

* Partially label audio_synthesis

To some extent copied from sm64.

* cleanup

* Reverb and ReverbBits have nothing to do with reverbs

* review

* naming

* Revert "reduce diff"

This reverts commit cd4ac24d8809f3f8e5b0f91788bffd72b47d15af.

* Match func_800E283C

* Audio_DmaSampleData

* Warning fixes

* func_800E4198

* func_800E4918

* Fix compiler warnings in z_camera/db_camera

* cleanup

* terminology

* tiny bit of doc

* undo permuter_settings change

* Revert "Fix compiler warnings in z_camera/db_camera"

This reverts commit dfdfac47f2.

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-07 14:14:09 -04:00