1
0
mirror of https://github.com/blawar/ooot.git synced 2024-07-04 18:13:37 +00:00
Commit Graph

548 Commits

Author SHA1 Message Date
DaMarkov
15aa150fa5
Forest Temple Door Fix (#173)
* Fixed the doors of the forest temple.

* Surrounded the change by N64_VERSION ifdef

Co-authored-by: DaMarkov <DaMarkovZED@gmail.com>
2022-02-20 12:16:58 -05:00
Blake Warner
ca419a7934 bf wrong framerate constant #171 #169 2022-02-20 08:08:19 -05:00
Blake Warner
12163e9663 fixed pause menu memory corruption #126 2022-02-20 08:00:06 -05:00
Blake Warner
2e837de83e stack overflow fix 2022-02-19 08:53:36 -05:00
Blake Warner
525d226ca6 stack overflow fix 2022-02-19 08:37:22 -05:00
Blake Warner
41bd8fe0d1 added gfx_ar call 2022-02-18 20:34:20 -05:00
Blake Warner
5d48166b07 fps tweaks 2022-02-18 20:24:29 -05:00
DaMarkov
7c20a4bf14
Changed Color_RGBA8_u32 struct (#163)
* Changed `Color_RGBA8_u32` struct.

* Removed one color class and a replaced it with the correct one.

* Fixed the color issue in GfxPrint

Co-authored-by: DaMarkov <DaMarkovZED@gmail.com>
2022-02-18 11:02:08 -05:00
Zelllll
14d5c2c0fa zel's pal 1.0 retail support 2022-02-17 23:47:57 -05:00
Blake Warner
db1c218db6 refactored build system to support multiple roms 2022-02-17 22:03:25 -05:00
DaMarkov
25b04b02ca This commit contains all changes made in the rumble branch. 2022-02-17 14:40:45 +01:00
DaMarkov
36c6c419b2 Renamed a few variables. Got rid of one unused variable and an unused function. 2022-02-17 01:24:09 +01:00
Blake Warner
1ab390a646 slight refactor 2022-02-16 17:54:09 -05:00
Blake Warner
2215778c69 added actor reset callback #131 #122 #124 #134 #135 2022-02-16 00:59:13 -05:00
Blake Warner
6d4faff5a8 refactored z_player.h 2022-02-16 00:59:10 -05:00
Blake Warner
50e237f5be small tweak 2022-02-16 00:58:27 -05:00
Blake Warner
688e2fa2c2 changed global frame to counter 2022-02-14 10:56:17 -05:00
Blake Warner
b855643760 higher frame framework 2022-02-14 10:56:17 -05:00
Blake Warner
4ce1221e81 fixed audio crash 2022-02-14 10:56:17 -05:00
Blake Warner
ba10617dbe bf 2022-02-14 10:56:17 -05:00
Blake Warner
b9c0619828 cpp conversion 2022-02-14 10:56:16 -05:00
Blake Warner
aaeb80f0cb sound timings working #108 #103 #82 #74 #43 #19 2022-02-11 00:59:26 -05:00
Blake Warner
3ad159855d moved segment marking into ZAPD 2022-02-11 00:00:50 -05:00
DaMarkov
ef8e89ba9b Rewrote func_800D2CEC to little endian 2022-02-10 15:35:42 +01:00
DaMarkov
4b2ad84a88
Fixed the cursor in the pause menu. (#100)
And got rid of one THGA_Alloc

Co-authored-by: DaMarkov <DaMarkovZED@gmail,com>
2022-02-09 19:40:11 -05:00
DaMarkov
a4134c4412
Reduced the size of the arrays. (#99)
Thanks to mrneo240!
Also fixed another `gItemIcons` -> `gItemIconsCurrent` replacement.

Co-authored-by: DaMarkov <DaMarkovZED@gmail,com>
2022-02-09 15:44:55 -05:00
DaMarkov
bc9ef339a8
Rewrote the GrayOutTexture functions. (#98)
Added the array gItemIconsGray that holds all grayed out icons.
Added the array gItemIconsCurrent that points to either the original or grayed out icons.
Gray icons are generate at game start.

Co-authored-by: DaMarkov <DaMarkovZED@gmail,com>
2022-02-09 14:48:19 -05:00
DaMarkov
ac2b25f6a5
Framebuffer emulation (#92)
* Changed solution file so that GLidenN64 is also included as a project.
Set GLidenN64 as dependency of OOT.

* Added preliminary support for frame buffer emulation (FBE).
Added a text box and code the switch FBE on/off during gameplay.

* Added back a few vi* files from libultra.
Part of the implementation has already moved to ultra_reimplementation.cpp.

* Disabled the post-processing step in PreRender_Calc() to restore the pause menu.

* Moved the enable frame buffer emulation to pc_main, so that it can be deactivated without recompiling GLidenN64.
This will also make the updated GLidenN64 (with FBE) compatible with the old OOT (FBE disabled).

* Renamed func_80095248().

* Moved code from io/vi*.c into ultra_reimplementation.cpp.
And other code cleanup.

* Further cleanup. (idle.c, viconfig.c)

* Removed viconfig.c.
Changed the vi*.c files in libulta/io to the state they are in OOT master.

* Removed function from ultra_reimplementation.cpp that are not necessary.

* Reverted idle.c back to the state it's in master.
Further cleanup.

Co-authored-by: DaMarkov <DaMarkovZED@gmail.com>
Co-authored-by: DaMarkov <damarkov@gmail.com>
2022-02-08 21:09:53 -05:00
Hayden Kowalchuk
59c1b2e2c9 fix: use length for ucode related
Signed-off-by: Blake Warner <blake@null3d.com>
2022-02-08 20:18:36 -05:00
DaMarkov
32891b7424
Fixed all bank IDs (#69)
* Fixed cucco lady. `objectOsAnimeIndex` is at least 16 bits large.

* Changed `objectOsAnimeIndex` to `s32` since its a bank id.

* Went through all instances of `Object_GetIndex` to find other bank IDs that are only of size `s8`.
Changed them all to `s32`. This has changed the sizes of a few structs.
Thanks to vertigo!

Co-authored-by: DaMarkov <damarkov@gmail.com>
2022-02-06 16:01:27 -05:00
Blake Warner
ae29814efc fixed message lookup (again), added F9 language toggle hotkey 2022-02-06 10:34:55 -05:00
Blake Warner
0da1b3227e fixed black texture on movable block in deku tree #34 2022-02-04 17:39:50 -05:00
Blake Warner
5769930217 fixed early unloading of objects in widescreen #18 2022-02-04 15:28:32 -05:00
Blake Warner
fb33eacb27 added missing prototypes for previous PR 2022-02-03 21:26:36 -05:00
DaMarkov
b05ab528d4 Renamed two functions in z_actor which are responsible for culling.
Also renamed ACTOR_FLAG_5 to ACTOR_FLAG_UNCULLED.
Introduced the compiler flag NO_CULLING to disable culling.
This should ensure that all actors get rendered independent of the distance
to the camera.
2022-02-03 20:28:55 +01:00
john doe
1b4feced6a port merge 1 2022-01-31 19:05:17 -05:00
louist103
a862411f00
Objects4 (#1057)
* remove fake match

* merge master

* animations

* dog limbs

* textures

* KZ limbs and DL

* a few KZ textures and make a file for link_boy

* the rest of KZ

* Far Limb DLs

* near DLs and limbs

* small fix to child

* boots and some sword and more child clean ups

* a bunch of DLs

* fix boy

* fix link child for real this time

* adult should be good now

* progress

* all undefined symbols done

* progress

* done (for now)

* restore makefile

* child -> adult

* child -> adult

* dog fixes

* KZ fixes

* more player fixes

* remove unneeded enum in dog

* rename hookshot stuff

* Update z_player_lib.c

* revert model group stuff

* move comment

* fix mirror shield upper

* remove useless 2

* OOT -> Oot

* gauntlet plate 2 fix

* fix

Co-authored-by: Louis <louist103@pop-os.localdomain>
2021-12-27 08:08:26 -05:00
Dragorn421
05b2cbfc60
Doc dodongo's cavern stuff (#1019)
* Document `func_80033480` more

* More doc in `BgDdanKd`

* WIP Document BgDodoago

The dodongo skull light-eyes-with-bomb puzzle
Some TODOs, jank/legacy code which I'm unsure if it achieves something significant

* Finish documenting BgDodoago

* `BgDodoago_WaitExplosives_` -> `BgDodoago_WaitExplosives`

* Run formatter

* `dlistBuffer` -> `displayListHead`
2021-12-10 20:21:19 -05:00
louist103
037c1dcad6
Cleanup more u32 being used as pointers. (#1052)
* merge master

* more u32 -> void*

* remove jenkins file

* format

* z64.h

* fix

* re cleanup z64scene.h
2021-12-07 14:19:13 -05:00
Dragorn421
70b858b724
Name one is-controller-valid symbol (#1060)
* Document `D_8012DBC0` as `isCtrlr2Valid`

* `isCtrlr2Valid` missing `g` prefix

* Run formatter
2021-12-07 09:17:48 -05:00
Dragorn421
5f89b8543f
Cleanup variables.h (#1061)
* Cleanup `variables.h`

* `gSpeedMeterTimeEntryPtr` -> `sSpeedMeterTimeEntryPtr`
2021-12-06 14:03:42 -05:00
Dragorn421
a9284494f2
Use defines for actor flags (#873)
* Add ACTOR_FLAG_ defines

* Add ACTOR_FLAGS_ALL macro and use ACTOR_FLAG_* constants everywhere

* Remove unused ACTOR_FLAG_* constants

* actor flags in bigokuta & ko

* actor flags in obj_mure

* actor flags in stalfos, twinrova & ganon2

* actor flags in morpha & barinade

* name some previously missed actor flags

* found some comments using hex for actor flags

* Actor flags in ovl_En_Ganon_Mant

* Actor flags in EnWf

* Flags in en_zf

* Actor flags in BossGanon (FeelsOKMan)

* Remove `ACTOR_FLAG_NONE`

* Wrap expansion of `FLAGS` in parentheses

* `ACTOR_FLAGS_ALL` -> `CHECK_FLAG_ALL`

* Move `CHECK_FLAG_ALL` to `macros.h`

* Run formatter
2021-12-05 19:11:38 -05:00
engineer124
79220ba58a
Document Sequence Modes and Related Functions (#1046)
* Document Audio_SetSequenceMode

* Cleanup surrounding docs

* format

* Clean-up

* fix capital `I` in `playeridx`

* Dist -> DistSq

* `SetCamModeAndSeqMode` -> `UpdateCamAndSeqModes`

* Get rid of extra padding

* PR Feedback
2021-12-05 12:13:53 -05:00
engineer124
5e9d24fca4
Clean Up Sequence Structs in Scene/Save/z64 (#1051)
* Clean up sound scene struct

* Follow-up cleaning

* cleanup

* Document forcedSeqId

* Update include/z64save.h

Co-authored-by: fig02 <fig02srl@gmail.com>

* Update include/z64.h

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

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-12-03 09:49:32 -05:00
fig02
4390dd74b6
boss_ganon (Ganondorf) OK (#1037)
* data migrated and OK

* some functions ported

* everything ported and updated

* merge message

* plenty of functions matched

* remove unwanted file

* 5 more, progress on update

* update matched

* fix proto

* fix

* func_808E06FC

* asm

* 2 left

* 1 more

* last function inital decomp

* Dbg MQ OK

* docs progress

* revert limb stuff

* some more docs

* docs progress

* more docs

* done with docs for now i think

* revert unwanted change

* some symbols

* anime2

* format

* small changes

* some more changes

* merge master and fix matrices

* reviews 1 and 2

* remove continue

* review 3 and 4

* un-name bodyPartsPos for now
2021-12-02 17:31:39 -05:00
engineer124
1ac6e42b56
Cutscene Camera Commands: POS -> EYE, FOCUS -> LOOK_AT (#993)
* Cutscene Camera Commands: `POS` -> `EYE`, `FOCUS` -> `LOOK_AT`

* PR Suggestion: Update names with REL_TO

* Use newer name in macros, address PR comment
2021-12-02 22:04:55 +01:00
Dragorn421
b3d5f549e7
Document Actor_DrawDoorLock (#1045) 2021-12-01 19:32:23 -05:00
Tharo
f1d183d6fe
libultra files and directories restructure (#1038)
* Restructure files, begin header restructure

* Format

* us2dex

* Fix parallel spelling

Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>

* Use OS_K0_TO_PHYSICAL in place of VIRTUAL_TO_PHYSICAL in osAiSetNextBuffer

* Uppercase hex, exception vector address defines

* Interrupt flags 1

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

* Interrupt flags 2

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

Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-11-30 19:08:57 -05:00
engineer124
eabc918817
Name the coordinate transformation matrices (#1042) 2021-11-30 18:52:16 -05:00
Dragorn421
669732abbe
Misc Cleanup 2 (#1007)
* Cleanup `UNK_TYPE`, `UNK_PTR` usage

* Add some missing empty lines after declarations

* Remove some legacy comments from non-matching times

* Fix some grammar (mostly "it's"/"its")

* Use proper names for two symbols after ZAPD bugfix

* Cleanup `place_title_cards.xml`

* Use `NULL` to check against `D_8012D260` pointer

* Parentheses around some macro arguments

* wip proofread headers up to z64animation.h
2021-11-30 18:40:42 -05:00
Tharo
04a9d51e90
Rework handling of dmadata (#1036)
* Generate dmadata

* Remove tab indentations in mkdmadata.c and mkldscript.c

* Fix

* Review suggestions

* Hopefully fix

* Fix index

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

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-12-01 00:29:09 +01:00
engineer124
783ef3a117
Audio Sequence Player Ids Enum (#1040)
* bgm.h -> sequence.h

* First round of filling in enum

* More

* seqCmd

* format
2021-11-30 13:47:09 -05:00
Tharo
d9c1dffe09
Remove link_animetion related undefined sym (#1039) 2021-11-29 18:39:52 -05:00
Roman971
54d77c71f1
Improve gfxprint documentation and strings (#1028)
* Improve gfxprint documentation and strings

* Add GFXP_UNUSED_CHAR and rename bss variable
2021-11-28 08:48:17 -05:00
Tharo
982e7be1f7
Preliminary fixes for boot/libultra (#1032)
* Preliminary fixes

* Missed a NULL
2021-11-28 07:50:35 -05:00
Roman971
6efb590699
Various minor cleanups (#1029)
* Fix some disp usage in EffectSsGMagma2

* Fix some incorrect SAC flags

* Remove some instances where bool was used

* Fix a few line numbers to be decimal

* Remove MatrixInternal and use Mtx instead

* Fix gs flag names to be plural for consistency

* Fix some hex numbers to be uppercase

* Fix instances of 0X for hex numbers
2021-11-26 17:37:33 -05:00
Anghelo Carvajal
c36decaf50
Texture alignment macro and a bit of cleaning (#927)
* Add ALIGNED8

* Add designated initializers for cutscene macros

* Fix typo in ovl_Boss_Sst XML

* Fix extraction of ovlMagicDark

* names suggestions

* Remove braces

* fix
2021-11-24 21:41:23 -05:00
Roman971
0f58b15b27
Minor data/ cleanups (#1025)
* Moved code_800D2E30's data to C
* Moved some audio data from asm to C
* Made separate data files for unknown pointer arrays
* Fixed a few missing balign directives
2021-11-23 21:07:48 -05:00
Tharo
a497f33bda
z_message_PAL, message_data_static and surrounding doc (#996)
* Initial progress on z_message_PAL, very messy

* Fix merge

* Some more progress

* Fix merge

* More z_message_PAL

* Small progress

* More small progress

* message_data_static files OK

* Prepare z_message_tables

* Matched another function, small updates

* Attempt to use asm-processor static-symbols branch

* Refactor text id declarations

* Begin large text codes parser function

* Fix merge

* Refactor done

* Build OK, add color and highscore names

* Remove encoded text headers and automatically encode during build

* Fix kanfont

* Various cleanups

* DISP macros

* Another match aside data

* Further progress

* Small improvements

* Deduplicate magic values for text control codes, small improvements

* Tiny progress

* Minor cleanups

* Clean up z_message_PAL comment

* Progress on large functions

* Further progress on large functions

* Changes to mkldscript to link .data in the .rodata section

* data OK

* Few improvements

* Use gDPLoadTextureBlock macros where appropriate

* rm z_message_tables, progress on large functions

* 2 more matches

* Improvements

* Small progress

* More progress on big function

* progress

* match func_80107980

* match Message_Update

* match func_8010BED8

* done

* Progress on remaining large functions

* Small progress on largest function

* Another match, extract text and move to assets, improve text build system

* Small nonmatchings improvements

* docs wip

* Largest function maybe equivalent

* Fix merge

* Document do_action values, largest function is almost instruction-matching

* Rename NAVI do_action to NONE, as that appears to be how that value is used in practice

* Fix merge

* one match

* Last function is instruction-matching

* Fix

* Improvements thanks to engineer124

* Stack matched thanks to petrie911, now just a/v/low t regalloc issues, some cleanup

* More variables labeled, use text state enum everywhere

* More labels and names

* Fix

* Actor_IsTalking -> Actor_TalkRequested

* Match func_8010C39C and remove unused asm

* More docs

* Mostly ocarina related docs

* All msgModes named

* Fix assetclean

* Cleanup

* Extraction fixes and headers

* Suggestions

* Review suggestions

* Change text extraction again, only extract if the headers do not already exist

* Fix

* Use ast for charmap, fix assetclean for real this time

* Review suggestions

* BGM ids and ran formatter

* Review comments

* rename include_readonly to include_data_with_rodata

* Remove leading 0s in number directives

* Review suggestions for message_data_static

* textbox pos enum comments, rename several enum names from Message to TextBox

Co-authored-by: Thar0 <maximilianc64@gmail.com>
Co-authored-by: Zelllll <56516451+Zelllll@users.noreply.github.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Roman971 <romanlasnier@hotmail.com>
2021-11-22 20:20:30 -05:00
Dragorn421
03636166b3
Fix matrices documentation (#952)
* Update names and doc of `Matrix_RotateRPY` and `SkinMatrix_SetRotateRPY` to ZYX Tait-Bryan angles

* Update name and doc of `Matrix_JointPosition` to `Matrix_TranslateRotateZYX`

* `Euler ***` -> `Tait-Bryan *** angles`

* Update docs of `SkinMatrix_Vec3fMtxFMultXYZW` and `SkinMatrix_Vec3fMtxFMultXYZ`

* Fix doc of `SkinMatrix_MtxFMtxFMult`

* Update docs of `SkinMatrix_Invert`

* Change name and docs of `SkinMatrix_SetRotateYRP` to `SkinMatrix_SetRotateYXZ`

* Change name and docs of `SkinMatrix_SetScaleRotateRPYTranslate` to `SkinMatrix_SetScaleRotateZYXTranslate`

* Change name and docs of `SkinMatrix_SetScaleRotateYRPTranslate` to `SkinMatrix_SetScaleRotateYXZTranslate`

* Change name and docs of `SkinMatrix_SetRotateRPYTranslate` to `SkinMatrix_SetRotateZYXTranslate`

* Add renamed functions to `namefixer.py`

* Run formatter

* Consistent function names (`ABC()` if equivalent to `A() B() C()`)
2021-11-17 05:52:26 -05:00
Tharo
9ca6bfdac3
Create macros for and decompile elf_message scripts (#999)
* elf_message

* Review suggestions
2021-11-16 18:04:31 -05:00
fig02
a3b4dcf388
File Select (z_file_choose) OK (#1012)
* matching split

* migrate progress

* split done and rodata migrated

* all data migrated to c

* start init

* progress

* progress

* progress

* progress

* progress

* progress

* copy done

* progress

* erase and settings done

* progress

* progress

* progress

* start keyboard

* progress

* progress

* progress

* progress

* Minor progress

* fix z_magic_dark issue

* func_80806F34 decomp'd

* verified equivalence

* one fix

* format

* merge petries work

* reorganizing

* lots of reorganizing and wraning fixing

* rename file

* remove language enum

* unwanted changes

* some symbol replacement, organization, and some names

* all symbols replaced, some organization

* some more cleanup

* continue docs

* Match the remaining functions in file_choose

* merge master

* select mode documented, all functions in file_choose.c named

* nameset functions named, some other cleaning

* some more general cleanup

* stub comments for cm, name a few things

* fix data and sizeof

* copy/erase functions and modes named

* rename assets, format

* change some struct members

* fixes

* review1

* fix maching error

* extract VTX data

* re add werror to ZAPD

* review 2

* fix

* remove file boundary padding

* remove zeroes

* review3

* change skybox stuff

* changes to  vs  etc

Co-authored-by: KrimtonZ <krimtonz@gmail.com>
Co-authored-by: Thar0 <17233964+Thar0@users.noreply.github.com>
Co-authored-by: mzxrules <mzxrules@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Roman971 <romanlasnier@hotmail.com>
Co-authored-by: Louis <louist103@gmail.com>
2021-11-15 22:33:44 +01:00
engineer124
80edcc3801
Import Audio Synthesis Data (#1010)
* Import audio synth data, OK

* Cleanup data

* Merge data into 1 file

* naming

* format

* Fix data

* Separate audio_data into it's own file

* CleanUp, more PR suggestions

* Fix audio_effects.data.s

* Format audio_data

* rm asm, always gets me
2021-11-12 10:52:17 -05:00
louist103
0b18419489
Scene cleanups (#1002)
* remove fake match

* u32 segment -> void* and add symbols to sEntranceCutsceneTable

* rename some symbols

* remove if1

* add the last missing symbol

* add symbols for almost all extrence textures

* finish adding the symbols

* Remove comment

* spelling fix

* Fig's and Dragorn's fixes

* add symbols to unkknown array

* format

* romans fixes
2021-11-08 21:15:37 -05:00
louist103
781d497264
Extract the assets from most of the overlays (#985)
* remove fake match

* Fire and Ice arrows

* Light arrows

* Ganon otyuka and end title

* Oceff_Spot

* Add missing Vtx to arrows

* Update assets/xml/overlays/ovl_Arrow_Ice.xml

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

* Update assets/xml/overlays/ovl_Arrow_Light.xml

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

* Fix fire arrows

* Update assets/xml/overlays/ovl_Arrow_Fire.xml

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

* Update ovl_Bg_Ganon_Otyuka.xml

* Update src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c

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

* Change a comment and rename a DList

* rename DList

* Jya cobra

* shd and elf_msg

* elf msg 2

* En Bili

* Remove extern form ice piece

* remove some externs

* en holl

* kanban

* make

* sda

* ssh and some cleanup

* replace undefined sym in en_kusa

* st

* oceff wipe 3

* oceff wipe

* oceff spot

* oceff spot

* oceff wipe 4

* Update VTXDIS

* update VTXDIS again

* fix sun song

* magic dark

* magic wind and oceff wipe 2

* magic fire and oceff storm

* Update src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c

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

* Update assets/xml/overlays/ovl_En_Sth.xml.ignore

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

* Update assets/xml/overlays/ovl_Elf_Msg.xml

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

* Update assets/xml/overlays/ovl_Magic_Wind.xml

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

* fix emptyDL, run formatter on en_ssh

* run formatter

* Update format.sh

* update to VTXDIS

* small change

* textureDL -> materialDL, vtxDL -> modelDL

* upper CASE

* setupDL -> materialDL

* GeometryDL->ModelDL and VisualDL->MaterialDL

* revert rcp.c

* revert holl.c

* another revert in rcp.c

* some u32 DL -> Gfx* DL

* the rest of dragorns comments

* 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"

* start updating overlays with static

* en sth OK

* 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"

* fix names of the overlays

* remove segment 128, add gameplay keep to global config file

* Fix end title and remove hex mode from VTXdis.c

* add code assets

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-11-08 20:51:45 -05:00
zelda2774
5ad7cf9dbb
Document parts of audio (#1000)
* Minor labelling

* progress

* play percentage -> delay

* duration -> gatetime

* more

* more

* more

* seqIdx -> playerIdx

* more

* more

* more

* more

* format

* fix comment

* filters

* more

* media

* confusion

* Sync load is actually slow load

* AudioHeap prefix

* more

* more

* reformat

* more

* more

* AudioLoad

* more

* more

* seq banks

* more consistent

* more

* name last function in audio_load

* More audio_synthesis

* clean up audio tables

* minor

* slow/fast load ramAddr

* format

* remove unused

* Remove union

* remove padding

* audio bank -> sound font

* seqLayer -> layer

* stuff

* seqChannel -> channel

* ChannelLayer -> Layer

* remove define, add bug comment

* format

* more

* cache enum

* more

* AudioSeq function prefix

* naming

* bankIdx -> bankId

* more

* format

* review

* more

* fixes

* avoid hardcoded sfxid's

* SE -> Sfx

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-11-07 17:58:50 +01:00
engineer124
970513253b
Introducing Macros for BGM (Background Music) (#979)
* Import bgm Ids

* Small correction

* Fix kaleido

* Add defines for 0, 1, 0xFFFF. Fill in missing macros

* Improve names, move to bgm.h, add in macros to kankyo.c

* format

* Swap order of bgm macros and flags
2021-11-01 13:54:19 -04:00
Dragorn421
fa7007d73b
Document z_moji.c (#926)
* Document `z_moji.c`

* Run formatter

* Use `CHAR_HEIGHT` instead of `CHAR_WIDTH` for y pos

* `> X - 1` -> `>= X`

* `const char*` for string argument

* Type palettes and textures with `u64`

* Remove unused variable

* Use `CHAR_WIDTH` and `CHAR_HEIGHT` more

* Explicit documentation on `gMojiFontTex`
2021-11-01 12:23:49 -04:00
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
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
d539c259af
z_en_a_keep documentation and cleanup (#900) 2021-10-22 21:54:30 +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
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 c801337dde9fe5e8b7a7ecf85ad3629bf5b87aaf.

* 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 d80bdb32da449edc74e02b8ab3f5a2c532e74bdb.

* 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
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
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
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
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
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
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
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 dfdfac47f2bb972056eb70b4f1ffb4df907166a0.

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-07 14:14:09 -04:00
zelda2774
d63ed0c17a
code_800F9280 OK (#945)
* Match func_800F9280

* Match func_800FA3DC

* Audio_ProcessSeqCmd

* macro cleanup

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-07 13:50:50 -04:00
zelda2774
c577ed1e84
Fix compiler warnings in z_camera/db_camera (#947)
* Fix compiler warnings in z_camera/db_camera

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-07 18:13:52 +02:00
Roman971
3d57eaf019
Add do whiles to all remaining gbi macros (#946)
* Add do whiles to all remaining gbi macros

* Cleanup and remove unnecessary do whiles
2021-09-05 14:41:02 -04:00
Roman971
2862aa6d03
Various minor cleanups (#940)
* Fix includes using braces instead of quotes

* Remove some unused printf arguments

* Fix a condition in Door_Shutter

* Run the formatter

* Cleanup incorrect uses of DynaPolyMoveFlag as function arguments

* Cleanup combined Math_StepToF checks
2021-09-05 21:00:24 +09:00
zelda2774
9b840ad842
code_800EC960 OK + data migrated (#937)
* Match AudioDebug_ProcessInput_SEFlagSwap

* Data migration

* Migrate in-function statics for func_800EE824

* More data migration

* Migrate in-function static for func_800F510C

* Last bit of migration

* formatting

* naming fix

* Prune variables.h

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-09-01 18:33:37 -04:00
Dragorn421
89634377c6
Cleanup symbols from undefined_syms.txt (2nd round) (#934) 2021-08-31 19:00:55 -04:00
zelda2774
4444c5ea35
audio_synthesis OK + partially documented (#920)
* 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

* Undo changes to permuter_settings.toml

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-08-31 18:53:35 -04:00
Dragorn421
430a172183
Rename MtxF members to use the common convention (#923)
* Rename MtxF members like xy -> now_21

* Revert comments I didn't mean to commit

* Rename c*/r* temps in `SkinMatrix_MtxFMtxFMult`

* Rename MtxF members like now_21 -> yx
2021-08-31 14:19:41 -04:00
zelda2774
6ef1f3ea3e
Match Audio_ProcessSoundRequest (#935)
Co-authored-by: zelda2774 <zelda2774@invalid>
2021-08-31 09:22:56 -04:00
engineer124
1117783731
Macros: PLAYER -> GET_PLAYER(globalCtx), ACTIVE_CAM -> GET_ACTIVE_CAM(globalCtx) (#921)
* PLAYER -> GET_PLAYER(globalCtx)

* ACTIVE_CAM -> GET_ACTIVE_CAM(globalCtx)

* PR Suggestions

* formatter

* Add brackets

* remove from actorfixer.py

* Bring back actorfixer.py change
2021-08-31 12:22:03 +02:00
Roman971
f3c930917b
Implement define tables for objects, actors and effect soft sprites (#906)
* Implement a single Object Table for the enum and the segments

* Implement a single Actor Table for the enum and the overlays

* Implement a single Effect SS Table for the enum and the overlays

* Remove initvars.h and move its content to relevant files

* Update object 0 to use OBJECT_NONE and document it in the table

* Rename OBJECT_NONE to OBJECT_INVALID to avoid confusion
2021-08-29 21:24:32 -04:00
zelda2774
37871e555f
Match func_800E4590 (#922)
Co-authored-by: zelda2774 <zelda2774@invalid>
2021-08-29 20:51:57 -04:00
zelda2774
a75c70358c
Match func_800EEA50 + some surrounding doc (#916)
* Match func_800EEA50

* Document some audio debug stuff

* more doc

* more doc

* formatting

* Fix enums, and some more bits of doc

* review

* LIM -> MAX

* missed review suggestion...

* more review

* ganon comments

* more review

* 🐍☠️

* more review

* Update functions.h

* quotes

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
2021-08-29 20:08:41 -04:00
Dragorn421
743f42f651
Document EnGoroiwa and BgJyaGoroiwa (#860)
* Document EnGoroiwa and BgJyaGoroiwa

* Run format.sh

* Add renamed functions to actorfixer script

* no more calling out "the devs" for bad code

* `EnGoroiwa#flags` -> `stateFlags`

* `Matrix_MtxFToRotS` -> `Matrix_MtxFToYXZRotS` (and not ZXY oops), `func_800D2264` -> `Matrix_MtxFToZYXRotS`
2021-08-22 11:25:17 -04:00
louist103
556cdad7eb
Big cleanup (#775)
* Adult and child2 macros OK

* ICHAIN cleanup

* almost all overlay data

* format.sh

* func_8002FBAC NON_EQUIVALENT

* PR fixes (MZXrules)

* fix

* change //@ bug to //! @bug

* merge master and missed a //@bug

* fix ruto

* some more cleanup (#2)

* more `! @bug` formatting cleanup

* parenthesis cleanup

* hex naviEnemyId

* run formatter

* replace `IS_NOT_` macros with `!IS_`

* run formatter

* run formatter

* PR fixes (fig)

* Missed something

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-08-22 01:12:57 +02:00
louist103
0042acb539
cleanup warnings (#907)
* cleanup warnings

* remove camera header from some places

* Remove extra new line
2021-08-19 18:10:51 -04:00