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

51 Commits

Author SHA1 Message Date
Franklyn Tackitt
b22cd0a6ed Fix linux build errors 2022-04-03 18:26:42 -04:00
Blake Warner
139c8950e9 bf 2022-04-03 18:25:32 -04:00
Blake Warner
ed431ca968 more linux fixes 2022-04-03 18:25:32 -04:00
Blake Warner
b333a47586 initial linux commit (does not compile) 2022-04-03 18:25:31 -04:00
Blake Warner
63c4a9e304 added xinput support 2022-04-02 18:07:41 -04:00
Blake Warner
7d713577a1 added key rebind options gui 2022-03-31 20:09:01 -04:00
Blake Warner
5d48166b07 fps tweaks 2022-02-18 20:24:29 -05:00
Blake Warner
b9c0619828 cpp conversion 2022-02-14 10:56:16 -05:00
john doe
1b4feced6a port merge 1 2022-01-31 19:05:17 -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
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
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
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
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
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
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
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
Random
d223e246c7
db_camera (#842)
* Decompile shrink_window.c

* progress

* progress

* makefile

* progress

* match 8 functions

* 1 more match

* match 2 functions

* decompile func_800B9638

* fix flow

* migrate .bss

* doc

* name some stuff

* fixes

* comment fix

* remove scene .c files

* old z_camera .s files

* revert z_camera change

* revert unwanted z_camera change

* fixes

* remove unused files, run clang-format and fix non-matching

* fix clang-format causing non-matching

* remove newline + old comment in func_800B3BD4

* make db_camera global variables static

* add s prefix to startic variables

* change magic constants

* rename "unk_50"

* Match func_800B3BD4 and Match DbCamera_UpdateDemoControl (-bss)

* Lots of progress on update

* Mainly cleanup

* run format.sh + remove unused asm

* replace chevrons with add quotes

* remove useless cast + use correct empty argument function declaration

Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
2021-07-26 00:34:25 +02: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
Anghelo Carvajal
98aef8988a
assert macro OK (#755)
* create assert macro and replace a bunch of __assert

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

* Another bunch of assert

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

* more assert

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

* assert(false)

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

* last assert used in matching code

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

* the non-matchings

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

* typo

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

* format

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

* change macro to uppercase

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

* Apply suggestions from code review

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

* Change ASSERT(false) to ASSERT(0)

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-04-29 14:39:46 -04:00
petrie911
8f0549cd9a
PreRender decomped and equivalent (one small non-matching) (#723)
* now equivalent

* stuff

* remove struct

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-03-20 15:10:10 -04:00
Synray
79c8accfab
z_play.c OK (#701)
* z_play.c OK

* Change ~0x13 -> -20

* Back to hex
2021-02-15 18:29:06 +01: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
petrie911
7c6b953f38
Change DECR to use -- (#649)
* DECR fix

* cleanup on some literals

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-19 14:27:57 -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
Tharo
2a13d71848
Highscores array (#600)
* Highscores

* Review suggestions

Co-authored-by: Thar0 <maximilianc64@gmail.com>
2021-01-05 14:57:18 -05:00
petrie911
695bc37be4
Bg_Gnd_Iceblock and Bg_Ice_Objects (sliding ice blocks) (#534)
* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* ZAP2 stuff

* ZAP why

* ZAP again

* a good start

* done

* Log

* formatting

* thisx

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2020-12-29 13:11:11 -05:00
Tharo
26c38834ec
ovl_Door_Shutter OK (#413)
* Initial progress

* Some more progress

* Fix merge

* OK

* Small improvements

* Further improvements

* Some documentation, ran formatter

* Small fix

* Several review suggestions

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

* Further review changes

* Space out declarations, better boolean comparisons

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

* Some ands to modulos

* Swap condition

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

* Fix merge, PR suggestions

* review

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
2020-12-03 16:55:01 -05:00
fig02
3c5fe66dcd
Use macros for oGfxCtx accesses (#465)
* fix colliderinit typo

* fix initchain

* reloc

* add defines

* add defines

* missed some on merge

* rename gfxCtx and add comment

* remove space
2020-10-29 17:31:09 -04:00
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
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
Roman971
b8da64ee01
Improve PHYSICAL/VIRTUAL macros and match Interface_LoadActionLabel (#371) 2020-08-31 21:06:44 -04:00
Roman971
b4ac94a8fd
Match/Improve more non matching functions (#366)
* Match/Improve more non matchings

* Remove SET_NEXT_GAMESTATE from preserved macros
2020-08-30 12:51:46 -04:00
Roman971
2a2fdf7f3e
Introduce OPEN_DISPS/CLOSE_DISPS macros (#360) 2020-08-29 19:00:17 -04:00
Lucas Shaw
7e195a3562
Matched most remaining libultra files (#221)
* osPfsIsPlug.c and osContSetCh.c OK

* update

* __osPfsGetStatus.c OK

* removed unused asm

* Updated all libultra controller files to use new structs instead of the temporary structs. Added os_pfs.h

* controller updates

* fixed header guard

* Made suggested changes

* guLookAt.c OK

* commit

* __osPfsSelectBank.c OK

* osPfsDeleteFile.c OK

* pfsreadwritefile.c OK

* osPfsFreeBlocks.c OK

* cleaned up ospfsfreeblocks

* started pfsinitpak.c

* pfsallocatefile.c OK

* contpfs.c decompiled with 1 non matching

* osPfsFindFile.c OK

* pfsinitpak.c decompiled. one non-matching

* Actually fixed merge conflict

* sins.c OK

* cosf.c sinf.c and sins.c OK

* moved osAfterPreNMI to its own file. Renamed code_801031F0 to contquery.c

* pfschecker.c OK

* final update and rename

* Removed makefile testing thing that i accidentally added

* Made suggested changes
2020-07-06 20:15:01 -04:00
Roman971
06fc61c83d
Fix various non matching issues and introduce #ifdef NON_EQUIVALENT instead of #if 0 (#207) 2020-06-13 23:29:59 -04:00
fig02
031d946db7
z_select decompiled, 1 non matching left (#202)
* First pass z_select

* lots of progress. 2 non matchings and data stuff needed

* match Select_LoadGame

* z_select almost ok, 1 func left

* remove comments

* remove comments and add description

* remove unused flg_set asm

* set_next_gamestate macro

* pr suggestions 1

* pr suggestions 2

* map -> scene

* pr suggestions 3

Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
2020-06-13 22:59:58 -04:00
fig02
ac97807762
En_Kz OK (#176)
* start kz

* remove irrelevant file

* kz progress

* en_kz progress

* match kz switch

* progress

* kz OK

* kz OK

* sync

* kz done

* delete asm files

* pr suggestions 1
2020-05-29 17:20:00 -04:00
Random
89b0977e39
Decompile code_8008E6A0.c / Add CHECK_PAD macro (#156)
* Decompile code_8008E6A0.c

* Delete "counter" file
2020-05-22 08:33:10 -04:00
Roman971
e29b77919b
Decompile most effect files in "code" (#144)
- `z_effect`: Matched and essentially all documented.
- `z_eff_spark.c`: Decompiled (1 non matching left) and mostly documented.
- `z_eff_shield_particle.c`: Matched and mostly documented.
- `z_eff_blure.c`: Decompiled (5 non matchings left) and partially documented.
- `z_effect_soft_sprite.c`: Matched and mostly documented.
- `z_eff_ss_dead.c`: Matched but not documented.
- `z_effect_soft_sprite_dlftbls.c`: "Matched" (only data, contains the effect ss overlay table).
- `z_effect_soft_sprite_old_init.c`: Not decompiled, but functions are categorized by effect ss overlay. And they should be decompiled at the same time as their corresponding effect ss in the future.

Other changes:
- Added a lot of types/enums to `z64effect.h`and moved+renamed some structs from `z64.h` to this header
- Added effect ss overlay segments to `segment_symbols.h` and effect ss init vars to `initvars.h`
- Added a macro called `VTX_T` to generate a `Vtx_t` in the same style as `VTX`
- Fixed `flg_set.c` .bss to be in the right file
- Removed `tools/overlayhelpers/batchdisasm` since it's no longer relevant
- Removed unused leftover asm from recent PRs
2020-05-18 14:24:00 -04:00
Random
08d9fee6e4
Decompile speed_meter.c and add VIEWPORT_INIT macro (#127)
* Decompile speed_meter.c and add VIEWPORT_INIT macro

- speed_meter.c: OK
- Add VIEWPORT_INIT(viewport, by, rx, ty, lx) macro

* get rid of some magic numbers

* use early return instead of a big if block in SpeedMeter_DrawTimeEntries
2020-05-12 23:05:55 -04:00
Random
40836f5d82
Decompile z_oceff_wipe (#122)
* Decompile z_oceff_wipe

- z_oceff_wipe: OK
- z_oceff_wipe2: OK
- z_oceff_wipe3: OK
- z_oceff_wipe4: OK
- Add patched libmalloc to ido 7 to prevent segfaults
- Add CUR_CAM macro

* Rename CUR_CAM to ACTIVE_CAM

* Fixes in PR #122
2020-05-09 16:58:02 -04:00
krimtonz
5525365f7f
Decompiles most FBDemo and transition functions (#92)
* Decompile fbdemo (transition) files

* run format.sh

* reformat vtx array, fill in a couple unk

* match TransitionTriforce_IsDone

* add VTX macro, add DW_ wrapping around triangle macros

* use new VTX macro, name graphic assets

* Naming updates

* pr updates

* naming updates

* remove symbols for COLOR_BUFFER, D_08000000, and D_09000000
2020-04-30 14:41:09 -04:00
Roman971
262f6c507c
Decompile z_play.c and Match/Document some of z_view.c (#74)
* Decompile z_play.c and Match/Document some of z_view.c

Also fix the last non matching in z_sample.c and update some game state functions.

* Suggestions from PR #74

* Fix undefined reference to Gameplay_DrawOverlay

* Suggestion from PR #74 (2)

* Fix a fake argument in func_800BC450
2020-04-16 17:36:12 -04:00
Random
02eaaa2039 Fixes in PR #50
- Rename "sGraph_UpdateTime" to "sGraphUpdateTime"
- Rename "Graph_Ct"/"Graph_Dt" to "Graph_Init"/"Graph_Destroy"
- Change the LOG_STRING macro
- Rename "LOG_VALUE" to "LOG_NUM"
- Fix brace style
- Rename "UcodeInfo"/"UcodeDisas" to "UCodeInfo"/"UCodeDisas"
- Fix field names in "UCodeDisas"
- Fix typo in "GraphicsContext"
- Change the size of unknown fields in "GraphicsContext" to hex
- Rename "game_init_func" to "gameStateInitFunc"
2020-04-05 12:32:08 +02:00
Random
168d90b6b0 Add log macros
- Add log macros required to match `Graph_GetNextGameState`
2020-04-04 19:28:53 +02:00
Roman971
251aea64ab Add comments and macros to prevent match issues with formatting 2020-03-22 21:09:54 +01:00
glank
86c4472662 ovl_En_Tk OK 2020-03-19 13:01:17 +01:00