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

26 Commits

Author SHA1 Message Date
fig02
afbc312024
Rename "Scene Setup Index" to "Scene Layer" (#1300)
* setup -> layer

* IS_CUTSCENE_LAYER

* review

* backtick

* remove some more mentions of setup

* alt header block

* clarifying comment
2022-07-30 17:28:50 -04:00
Dragorn421
984871eb38
Document SaveContext.gameMode (#1295)
* Document `SaveContext.gameMode`

* end credits

* Remove no longer needed comment
2022-06-23 21:32:48 -04:00
Dragorn421
d39ce02458
Documentation pass centered on z_player_lib (#1230) 2022-05-29 07:52:15 -04:00
engineer124
e68f321777
Document Magic (#1199)
* Magic docs WIP

* More docs, first round finished

* Better docs

* More renaming

* Simpler name

* Another small adjustment

* rm if(1)

* Better names again after in-game testing

* Change comments

* change comment

* Big rename based on all the suggestions

* Small touch-up

* More PR Suggestions

* RESTORE_IDLE -> RESET

* More docs

* Capitalization

* PR suggestions

* Make declaration consistent

* Health_ChangeBy (amount)

* PR Suggestions

* Missed one

* More PR Suggestions

* Change comment

* Add another clarity comment

* Discord discussions on `magicFillTarget`

* Comments

* grammar

* More comment clarity

* Another bad comment

* PR suggestions, improved comments

* One more comment

* one more thing

* bar -> meter
2022-05-23 18:52:01 +02:00
fig02
4f0018bf36
Environment documentation pass (#1115)
* some docs, start introducing time macro

* most usages of CLOCK_TIME

* finish up clock time defines, format

* saving incase i need to revert

* more docs

* more docs progress

* some more docs

* format with 11

* change sos to storm

* update functions.h

* some depth stuff

* review 1 and 2

* whoops

* update zbuf stuff

* most of review 3

* enum name

* storm state enum

* review 4

* fix enum

* add comment to skyboxischanging

* review

* things dont match, committing so i can change branches

* revert struct changes

* define for override_full_control

* new clock_time macro

* fill alpha -> glare strength

* update comment

* remove indoor/outdoor, new name for underwater light variable

* remove copy pasted comment

* fix comments

* remove whitespave

* review
2022-05-20 14:40:13 -04:00
Dragorn421
d7bbe43ba7
Document eventChkInf usage of freed carpenters flags (#1210)
* Document `eventChkInf` usage of freed carpenters flags

* +`()`
2022-05-20 19:54:47 +02:00
Dragorn421
f6c472ae5e
Doc misc 5 (#1223)
* Annotate global equip and upgrade masks data

* Trivial respawn doc stuff

Move the respawn mode enum up to use the _MAX enum value in the save context struct

* Comment on the `sceneFlags[127]` debug-strings-suggested out-of-bounds access

* Reword `room_inf[127]` comments (attempt)
2022-05-17 00:14:08 +02:00
engineer124
95b4317931
Audio Ocarina Documentation (#1026)
* Begin ocarina documentation

* Many ocarina-related docs

* More ocarina docs

* Introduce Ocarina Fonts Enum

* Fix ocarina font enum

* Fix incorrect documentation, more documentation

* Ocarina recording documentation

* cleanup

* Small touch-ups

* Fix font -> instrument

* format

* Better docs on playback, memory game

* more cleanup

* Add z64ocarina.h

* Clean up names

* final cleanup

* typo

* Fix description

* better docs

* Fix channel -> channelIdx

* Fix old "font" name to correct "instrument" name, add io port docs

* Add comments to clarify certain lines/functions

* format

* Rename noteIdx to pitch

* Missed a name

* Add comment on pitch

* `reset` -> `SetInstrument` and `displayed` -> `playback`

* Clarify audio_update and windmill comment

* Minor PR fixes

* Revert Audio_Update because there are 2 different Audio_Update functions

* PR Feedback

* Ocarina Idx -> Index

* Introduce OCARINA_BTN_C_RIGHT_OR_C_LEFT

* PR Suggestions

* Next PR Suggestions

* Next PR Feedback

* consistency

* Better docs (PR)

* Better comment
2022-05-09 18:59:23 +02:00
Dragorn421
6cd8029cd5
Fixup weird horse flags usage (#1214)
* wip: refactor flag defines for `eventInf[0]`

* Cleanup attempt

* run formatter

* remove spacing in enum indices comments

* Add line breaks

* Macros +`()` -`;`
2022-05-08 18:17:10 -04:00
Dragorn421
2dfccbb919
Document eventChkInf usage of frogs played songs flags (#1211)
* Document `eventChkInf` usage of frogs played songs flags

* Prettify frogs flags defines

* Friendlier macro names
2022-05-08 17:52:35 -04:00
Dragorn421
b9fded7b4e
Doc equips usage (inventory, current and player-specific constants) (#1142)
* Doc equips usage (inventory, current and player-specific constants)

* Improve some comments

* `currentSword`(`Item`) -> `currentSwordItemId`

* Comments on the right in `D_801261F8`

* Improve `sDebugSaveInventory.equipment` formatting with extra parentheses

* Use constants for `sNewSaveInventory.equipment`

* Run formatter

* Make comments in z64save.h header a single line even if very long

* `CHECK_OWNED_EQUIP_ALT`

* One more use of `CHECK_OWNED_EQUIP`

* `OWNED_EQUIP_FLAG`

* `OWNED_EQUIP_FLAG_ALT`

* Improve (?) giving sword by item id

* "half-byte" -> "nibble"

* Improve equips for setting kokiri sword

* Improve (?) checking boots by item id

* Improve (?) checking equips by item id

* Fixup one spot assuming `EQUIP_TYPE_SWORD == 0`

* Comments on the right in `sBootDListGroups`
2022-04-30 18:18:56 +02:00
Dragorn421
6336df5fcd
Defines for SaveContext flags (eventChkInf, itemGetInf, infTable, eventInf) (#1094)
* script-assisted `itemGetInf` flags

* comment near non-trivial `itemGetInf` usage

* Run formatter

* Try something with the itemgetinf flags that can't use the packed value

* Add defines for `eventChkInf` (direct access)

* Add defines for `eventChkInf` (access through `Flags_GetEventChkInf`)

* Add defines for `eventChkInf` (access through `Flags_SetEventChkInf`)

* Add defines for `infTable` (direct access)

* Add defines for `infTable` (used by `Flags_GetInfTable`)

* Add defines for `infTable` (used by `Flags_SetInfTable`)

* Add defines for `eventInf`

* parenthesis cleanup near `GET_EVENTCHKINF` usage

* parenthesis cleanup near `GET_ITEMGETINF` usage

* parenthesis cleanup near `GET_INFTABLE` usage

* fixup one `eventInf` usage

* parenthesis cleanup near `GET_EVENTINF` usage

* parenthesis cleanup near `Flags_GetEventChkInf` usage

* slight `z64save.h` formatting improvement

* Improve itemGetInf flags in z_bg_dy_yoseizo

* Questionable improvement in z_en_ge2

* Questionable improvement in z_en_daiku

* Questionable improvement in z_en_mu

* Run formatter

* Parentheses around `gSaveContext` macros arguments

* Move individual flags define to the end of z64save.h, and improve comments separating the groups
2022-04-29 14:19:48 -04:00
fig02
16790bc253
Document Transition System (#1131)
* transition type enum

* mode enum, start documenting some types

* some more

* use enums for entrance table

* entrance table filled out

* sceneLoadFlag -> transitionTrigger

* sandstorm state/mode/type

* done i think

* fixes

* clean up circle weirdness

* circle use enum + fix texture names

* fix

* how did that even happen lol

* jesus

* review2

* some more review

* most review, still some more to do

* new transition trigger names

* some of review

* next type default
2022-04-27 16:00:25 -04:00
playerskel
a160fb96c8
Naming1 (#1113)
* typo

* rename 800636C0 to gameinfo_init

* fix incorrect casing in cup button

* some constants

* add item00_none enum value

* rename 80009460 to gdmaverbose

* fix typos

* Revert "some constants"

This reverts commit 27a07204d7.

* rename gdmaverbose to gdmamgrverbose

* Revert "rename 800636C0 to gameinfo_init"

This reverts commit c74e255929.

* Revert "fix incorrect casing in cup button"

This reverts commit ac313b3965.

* a couple of typos

* minor changes based on clang-format
2022-03-10 21:21:46 +01:00
playerskel
82cedcc3ef
proposal for link age macros (#1119)
* proposal for link age macros

* apply @Dragorn421 suggestions

* also annotate the slinkage variable
2022-01-24 19:08:37 -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
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
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
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
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
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
Tharo
2a13d71848
Highscores array (#600)
* Highscores

* Review suggestions

Co-authored-by: Thar0 <maximilianc64@gmail.com>
2021-01-05 14:57:18 -05:00
louist103
736ebc7cca
Decompile DemoEc 1 non matching (#479)
* Fixed upstream

* Migrate data and Decomp Init

* Decomp a few more functions

* Small change before starting

* Back to this file

* Match action func chains, func_8096DE94, func_8096DF9C, func_8096E0A4

* Match all except 1 function in first back of actionFuncs

* matched a bunch in bank D_8097053C

* Match the first few draw functions

* match a few more draws and start one

* All matched but one.  All equivalent

* Name setup funcs

* finish naming functions

* Fix Gfx stuff

* Remove 'expectedc'

* General clean up

* fix

* progress

* cleanup

* remove reloc

* review 2

* fix awful function pointer thing

Co-authored-by: fig <fig02srl@gmail.com>
2020-12-05 21:02:55 -05:00
Tharo
f85a2d10ee
Poe Actor Decomps (#463)
* Poe actors progress

* Some more progress, En_Poh almost matching

* Further progress

* Fix merge

* Decompile data

* Actor struct cleanups

* More functions OK

* Progress

* Last function decompiled, some nonmatchings left

* Few more OK, skelanime_init definition changes

* Progress

* Style improvements, OPEN/CLOSE_DISPS, few more OK

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

* Remove unused asm, begin documentation

* Use generated reloc

* Cleanup, format

* Remove a few no longer needed comments

* PR suggestions

* DISP macros

* Missed some FrameUpdateMatrix != 0 replacements

* EnPoField_InteractWithSoul -> EnPoField_SoulInteract, eyeImageIdx -> eyeTextureIdx

* Fix merge, reformat

* Review Suggestions

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

* Further review suggestions

* Ran formatter

* Less DECR usage

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-12-04 19:34:27 -05:00
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