Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge zeldaret/oot's main #147

Merged
merged 304 commits into from
Oct 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
304 commits
Select commit Hold shift + click to select a range
7fb9fbb
Match ntsc-1.2 z_skelanime.c, z_view.c, z_viszbuf.c (#2041)
cadmic Aug 15, 2024
b734a15
Update links in readme (#2043)
Dragorn421 Aug 15, 2024
b82f54b
Decompile N64 anti-piracy checks in overlays (#2042)
cadmic Aug 16, 2024
56ca236
Fixup printf args fake matches (#2049)
Dragorn421 Aug 17, 2024
ba5574b
[Audio 5/?] Build the Samplebank Table (#2044)
Thar0 Aug 17, 2024
aed15fa
Use BSS section start from map file in fix_bss.py instead of guessing…
cadmic Aug 18, 2024
74ab917
Add DEG_TO_BINANG2/RAD_TO_BINANG2 to match ntsc-1.2 z_en_gs.c, z_en_m…
cadmic Aug 19, 2024
006a004
Miscellaneous N64 actor changes (#2048)
cadmic Aug 19, 2024
46a5fa9
Match ntsc-1.2 z_scene_table.c (#2050)
cadmic Aug 19, 2024
650046a
Merge remote-tracking branch 'decomp/main' into decomp_merge_4
Yanis002 Aug 19, 2024
f5fd8da
Use incremental link for z_message/z_game_over data shenanigans (#2051)
cadmic Aug 19, 2024
6bc6ced
[ntsc-1.2] Match boot_main.c, logutils.c, z_locale.c (text) (#2053)
Dragorn421 Aug 19, 2024
d191e87
Allow building the Debug ROM without debug features (#2052)
cadmic Aug 19, 2024
ebbc820
Add "disasm sym_info.py" script (#2054)
Dragorn421 Aug 19, 2024
aba1bb8
Fix missing DEG_TO_BINANG2 (#2059)
cadmic Aug 19, 2024
ec70295
Move non-libultra libc functions to src/libc/ (#2055)
cadmic Aug 20, 2024
3e516f4
Match more ntsc-1.2 overlay draw functions (#2061)
cadmic Aug 20, 2024
ac2224f
Add versions.h (#2060)
Dragorn421 Aug 20, 2024
942df45
Match n64dd text in code (#2058)
Dragorn421 Aug 20, 2024
5a08f14
Fix memmove file splits (#2063)
cadmic Aug 21, 2024
ec19402
Document `z_player` AnimSfxType and related functions (#2057)
Pepe20129 Aug 21, 2024
253fac4
Grab bag of fix_bss.py fixes (#2066)
cadmic Aug 22, 2024
bdfa56e
Pause docs: page backgrounds vertices and quads (#2065)
Dragorn421 Aug 22, 2024
98ba7ad
Add T macro for translated debug strings (#2064)
Dragorn421 Aug 22, 2024
c38adc1
Add NO_SQRTF_INTRINSIC for z_rumble.c and audio/general.c (#2067)
cadmic Aug 23, 2024
1f2e82c
Convert z_std_dma.c translations to full string rather than inserted …
mzxrules Aug 23, 2024
37f0774
T() macro 2 (#2073)
Dragorn421 Aug 23, 2024
614c411
match z_title.c (#2075)
Dragorn421 Aug 23, 2024
9b409f5
Match z_select.c (#2076)
Dragorn421 Aug 24, 2024
b40e51d
[ntsc-1.2] Match kaleido_collect.c, kaleido_scope.c (#2070)
Dragorn421 Aug 24, 2024
ea40688
[ntsc-1.2] Match z_kaleido_debug.c, z_lmap_mark.c (#2077)
Dragorn421 Aug 24, 2024
b1b8b8c
T() macro 3 (#2083)
Dragorn421 Aug 24, 2024
3fe7d04
Pause: doc generating page vtx/quads (part 1) (#2071)
Dragorn421 Aug 24, 2024
20b93a6
Fix build ntsc-1.2: define n64dd_SetDiskVersion (#2087)
Dragorn421 Aug 24, 2024
271eff9
T() macro 4 (#2084)
Dragorn421 Aug 25, 2024
b6d8aae
[ntsc-1.2] Match z_std_dma.c (#2082)
cadmic Aug 25, 2024
11926f2
gitignore clangd files (#2086)
Dragorn421 Aug 25, 2024
22a00b4
Have fix_bss.py deal with symbols referenced in .data or .rodata (#2072)
cadmic Aug 25, 2024
7056423
[ntsc-1.2] Decompile cic6105.c, main.c (#2068)
Dragorn421 Aug 25, 2024
7c2e038
In fix_bss.py, really always use BSS section start from map file (#2085)
cadmic Aug 25, 2024
1d275fa
[ntsc-1.2] Partially match z_en_mag (#2079)
Dragorn421 Aug 25, 2024
c6d2969
[ntsc-1.2] Match z_en_ge3 (#2078)
Dragorn421 Aug 26, 2024
3795574
Add all N64 version defines (#2095)
cadmic Aug 26, 2024
af7bbf9
[ntsc-1.2] Match z_vismono.c (#2091)
Dragorn421 Aug 26, 2024
160d8f4
[ntsc-1.2] Match system_malloc.c (#2080)
cadmic Aug 27, 2024
c00991d
match PreRender_CopyImageRegionImpl (#2093)
Dragorn421 Aug 27, 2024
d2aca22
[ntsc-1.2] Match a bunch of small stuff (#2094)
cadmic Aug 27, 2024
fd14ddc
T() macro 5 (#2089)
Dragorn421 Aug 27, 2024
6b58a15
T() macro 6 (#2090)
Dragorn421 Aug 27, 2024
17debe8
Match functions using gDPSetTileCustom (#2100)
cadmic Aug 27, 2024
aa97586
[Audio 6/?] Build Soundfonts and the Soundfont Table (#2056)
Thar0 Aug 28, 2024
6881804
[ntsc-1.2] Decompile fault.c (#2046)
Dragorn421 Aug 28, 2024
e7db8d0
Merge remote-tracking branch 'upstream/develop/2.1.0' into decomp_mer…
Yanis002 Aug 28, 2024
30fa2a6
Merge remote-tracking branch 'decomp/main' into decomp_merge_4
Yanis002 Aug 28, 2024
447ecb5
post-merge build fixes
Yanis002 Aug 28, 2024
7592bf1
Check disasm metadata for missed renames (#2069)
Dragorn421 Aug 28, 2024
16ec9b1
T() macro 7 (#2102)
Dragorn421 Aug 28, 2024
6e8b820
[ntsc-1.2] Match z_game_over.c, PAL 1.1 fixes (#2099)
cadmic Aug 29, 2024
7079005
[ntsc-1.2] Match N64 libultra (#2081)
cadmic Aug 29, 2024
5e9704b
[ntsc-1.2] Fix some data / disassembly / undefined_syms (#2103)
cadmic Aug 29, 2024
a63f0a6
Move driverominit and sprintf to src/boot/ (#2105)
cadmic Aug 29, 2024
dc96493
[ntsc-1.2] Match z_demo.c, z_eff_blure.c, z_eff_spark.c (#2096)
Dragorn421 Aug 29, 2024
1eeb03e
[ntsc-1.2] Match rand.c (#2097)
Dragorn421 Aug 30, 2024
ac1287a
Use FaultDrawer_ names in cic6105.c (#2108)
cadmic Aug 31, 2024
a21a59c
Target Docs [1/?] (#2110)
fig02 Aug 31, 2024
2b25c31
Document Target_Draw [Target Docs 2/?] (#2115)
fig02 Sep 1, 2024
6f396e7
Target System Docs: Actor Searching [3/?] (#2120)
fig02 Sep 3, 2024
2152d1d
[ntsc-1.2] Import libleo from Decompollaborate/n64dd (#2104)
cadmic Sep 3, 2024
3e20076
[ntsc-1.2] LoadFragment2 OK (#2118)
hensldm Sep 3, 2024
e44c7c6
[ntsc-1.2] Match audio (#2122)
cadmic Sep 4, 2024
45158f5
Document Target_Update [Target Docs 4/?] (#2123)
fig02 Sep 4, 2024
d54c573
Match stackcheck.c (#2107)
cadmic Sep 4, 2024
808fe81
[ntsc-1.2] Match padmgr.c, sys_cfb.c, rcp_utils.c (#2111)
cadmic Sep 4, 2024
7a9209c
[ntsc-1.2] Match z_camera.c (#2112)
cadmic Sep 4, 2024
c8cafdc
Rename FaultDrawer_ functions to Fault_ (#2113)
cadmic Sep 4, 2024
6e5ea8c
[ntsc-1.2] Update spec for boot and code (#2114)
cadmic Sep 4, 2024
87914c6
Match fp_math.c (#2116)
cadmic Sep 4, 2024
e7cf2fc
[ntsc-1.2] Match game.c, z_play.c, z_room.c (#2117)
cadmic Sep 4, 2024
27ba989
Match KaleidoScope_DrawEquipment and KaleidoScope_DrawItemSelect (#2125)
cadmic Sep 4, 2024
7937be8
Reorganize z_std_dma.c unused strings (#2121)
cadmic Sep 4, 2024
eab37fe
Run CC_CHECK in CI (#2109)
cadmic Sep 4, 2024
af24970
Pause: Name temps in `KaleidoScope_SetVertices` (#2088)
Dragorn421 Sep 4, 2024
c6d7cc7
[ntsc-1.2] Match __osMalloc.c and code_800FC620.c (new/delete) (#2106)
cadmic Sep 4, 2024
2da158d
Merge remote-tracking branch 'decomp/main' into decomp_merge_4
Yanis002 Sep 4, 2024
10c1db8
fixed build issues
Yanis002 Sep 4, 2024
fab309a
[ntsc-1.2] Partially match gfxprint.c (#2101)
Dragorn421 Sep 4, 2024
f1911cd
[Audio 7/?] Extract sequences to assembly (#2119)
Thar0 Sep 4, 2024
78e6b80
Jenkinsfile: `make -j` -> `make -j$(nproc)` (#2128)
Dragorn421 Sep 4, 2024
907e440
unk_664 -> focusActor [Target Docs 5/?] (#2126)
fig02 Sep 4, 2024
e833011
Cleanup: Pass all paths to tools rather than tools constructing them …
Dragorn421 Sep 4, 2024
aa1c7f3
Pause doc: drawing the world map image (#2129)
Dragorn421 Sep 4, 2024
8153c95
[ntsc-1.2] Organize n64dd declarations and convert to 1.0 addresses (…
cadmic Sep 4, 2024
376f985
[ntsc-1.2] Match z_message.c (#2098)
Dragorn421 Sep 4, 2024
c7b55f9
Fix merge issue between z_message.c match and n64dd renames (#2131)
Dragorn421 Sep 4, 2024
dc46946
Pause docs: `WorldMapArea` enum and related data (#2130)
Dragorn421 Sep 4, 2024
6051251
istargeted -> islockedon (#2132)
fig02 Sep 4, 2024
620d7b4
Merge remote-tracking branch 'decomp/main' into decomp_merge_4
Yanis002 Sep 5, 2024
dbb059c
Target Mode Enum [Target Docs 7/?] (#2133)
fig02 Sep 5, 2024
acb5c7f
Update Room Documentation (#2015)
mzxrules Sep 5, 2024
0b01103
Naming a function (#2124)
Ozero4 Sep 5, 2024
bb6177e
Document `Target_ShouldReleaseLockOn` [Target Docs 8/8] (#2135)
fig02 Sep 5, 2024
3faa1c6
Move button macros to include/controller.h (#2138)
cadmic Sep 6, 2024
53b2110
Clean up uses of !PLATFORM_N64 vs PLATFORM_GC (#2134)
cadmic Sep 6, 2024
2ce648a
Miscellaneous libultra header fixes (#2139)
cadmic Sep 6, 2024
d374e71
Fix size of leoDiskStack (#2143)
cadmic Sep 6, 2024
a815189
[ntsc-1.2] Match z_actor_dlftbls.c (#2144)
cadmic Sep 6, 2024
02816c4
T() macro 8 (#2142)
Dragorn421 Sep 7, 2024
ed870e0
[ntsc-1.2] Match more draw functions (#2145)
cadmic Sep 7, 2024
8a3ba35
[ntsc-1.2] Match z_file_choose.c and z_boss_tw.c (#2146)
cadmic Sep 7, 2024
e7b0daa
[headers 7] Add sys_matrix.h (#2150)
Dragorn421 Sep 7, 2024
87c304a
[headers 6] collision_check functions and structs (#2148)
Dragorn421 Sep 7, 2024
3a9ebfb
Pause doc: World map points (#2141)
Dragorn421 Sep 7, 2024
35cfc07
[ntsc-1.2] Match z_map_exp.c, z_map_mark.c (#2140)
cadmic Sep 7, 2024
c54c1f2
Move audio/general.c debug bss with the rest of bss (#2152)
Dragorn421 Sep 7, 2024
62b30e2
Move `Graph_Alloc` and open/close Disps to `gfx.h` (#1976)
Dragorn421 Sep 7, 2024
e19ec02
Freeze SFX IDs in msgdis.py (#2154)
cadmic Sep 7, 2024
a30f130
Fix some boot and code data (#2155)
cadmic Sep 7, 2024
88c4475
Target -> Attention (System Rename) (#2149)
fig02 Sep 7, 2024
96914a2
Match more GC button colors (#2156)
cadmic Sep 7, 2024
c27b83a
N64 ROM header (#2157)
cadmic Sep 7, 2024
e52d135
[ntsc-1.2] Import n64dd code from Decompollaborate/n64dd (#2136)
cadmic Sep 7, 2024
fa39da2
Pause doc: Trade quest marker (#2158)
Dragorn421 Sep 7, 2024
27533a1
rename gBuildTeam to gBuildCreator (#2160)
fig02 Sep 7, 2024
277ce1c
[headers 8] Add `main.h`, `segmented_address.h`, and changes for `mai…
Dragorn421 Sep 7, 2024
a039aef
[headers 5] Misc small headers untangling (#2147)
Dragorn421 Sep 7, 2024
2056ae5
Document Attention/Lock-on Related Actor Flags (#2161)
fig02 Sep 7, 2024
40372d7
Move some function declarations to `z64{interface,light,message}.h` (…
Dragorn421 Sep 8, 2024
1332356
Pause doc: Cursor drawing (#2159)
Dragorn421 Sep 8, 2024
0168b09
Player Docs - Parallel (#2167)
fig02 Sep 8, 2024
2d96f00
Reorder spec segments for N64 versions (#2163)
cadmic Sep 8, 2024
c39323a
fix_bss.py: Subtract addend for relocations against global symbols (#…
cadmic Sep 8, 2024
de1a08c
[headers 11] stackcheck.h, jpeg functions (#2171)
Dragorn421 Sep 8, 2024
a903f8b
Document `ACTOR_FLAG_SFX_` flags and functions (#2162)
Dragorn421 Sep 8, 2024
c7ec814
[headers 9] Add src/libc64/ and new "z64" rand.h (#2164)
Dragorn421 Sep 8, 2024
900c2f0
Name `PLAYER_STATE1_ACTOR_CARRY` (#2173)
fig02 Sep 8, 2024
fb37d7c
[headers 13] osMalloc.h -> include/libc64/os_malloc.h (#2175)
Dragorn421 Sep 8, 2024
37efc27
Run fix_bss.py in Jenkins and generate a patch (#2168)
cadmic Sep 8, 2024
2232f67
[Player ZTarget] Some func_80836BEC docs (#2172)
fig02 Sep 8, 2024
842c3bf
Merge remote-tracking branch 'decomp/main' into decomp_merge_4
Yanis002 Sep 9, 2024
6fcaa51
fix_bss.py: Restore z_locale special case (#2179)
cadmic Sep 9, 2024
f8ff377
fix build issues
Yanis002 Sep 9, 2024
6e0288d
Boomerang related state flags (#2180)
fig02 Sep 10, 2024
58d8abf
Added eye texture offsets for extraction for object_oE5.xml (#2181)
Javarooster-png Sep 10, 2024
2e79b83
More target related state flags (#2184)
fig02 Sep 11, 2024
5441559
Cleanup gSPMatrix, rename `Matrix_New` -> `Matrix_Finalize`, add `MAT…
Dragorn421 Sep 11, 2024
cbf9eac
[headers 12] Add kaleido_manager.h, move various protos to headers (#…
Dragorn421 Sep 11, 2024
76d97ac
[headers 14] libc64 headers (#2177)
Dragorn421 Sep 11, 2024
fd7b92d
[ntsc-1.2] Match remaining functions (#2182)
cadmic Sep 11, 2024
5419a18
[ntsc-1.2] Match N64 audio tables (#2183)
cadmic Sep 11, 2024
d9af701
Make needed extracted directories in extract scripts (#2185)
hensldm Sep 11, 2024
64570e8
Pause doc: Prompt page and save prompt state (#2170)
Dragorn421 Sep 11, 2024
f193311
Colliders: colType -> colMaterial (#2186)
Dragorn421 Sep 12, 2024
09c1816
Add OOT_PAL_N64 and move other shorthands to versions.h (#2188)
cadmic Sep 12, 2024
f089adf
[ntsc-1.2] Match ntsc-1.2 BSS and add to CI (#2187)
cadmic Sep 12, 2024
77df04a
Delete disassembly data for ntsc-1.2 (#2178)
cadmic Sep 12, 2024
cb7fe49
Fix find command error (#2192)
cadmic Sep 12, 2024
e6e0674
change flag name (#2194)
fig02 Sep 13, 2024
e658bed
Hostile Lock-On (#2193)
fig02 Sep 13, 2024
65cc42a
Use gSpiritBossNabooruKnuckleDefeatCs instead of gMinuetCs in sCutsce…
cadmic Sep 13, 2024
03a1502
More Player Z Target documentation (#2196)
fig02 Sep 14, 2024
dbbeb65
[Audio 8/?] Check-in handwritten sequences, build sequences, automate…
Thar0 Sep 15, 2024
d55a756
Merge remote-tracking branch 'decomp/main' into decomp_merge_4
Yanis002 Sep 16, 2024
2740bb0
[PAL N64] Match changes that first appear in NTSC 1.2 (#2201)
cadmic Sep 16, 2024
c91e62f
Document `zTargetActiveTimer` (#2200)
fig02 Sep 16, 2024
dc9782b
[PAL N64] Rename file select assets (#2197)
cadmic Sep 16, 2024
8f0e2fc
Name `PLAYER_STATE1_CHARGING_SPIN_ATTACK` (#2203)
fig02 Sep 16, 2024
48780cd
Colliders: elemType -> elemMaterial (#2189)
Dragorn421 Sep 16, 2024
3287437
[PAL N64] Match VI mode setup (#2198)
cadmic Sep 17, 2024
cc0b1bb
`PLAYER_STATE1_DEAD` (#2204)
fig02 Sep 17, 2024
306abef
Consistently use "OOT_VERSION <" and "OOT_VERSION >=" (#2199)
cadmic Sep 17, 2024
dc2ceb3
Pause doc: Pages drawing (#2190)
Dragorn421 Sep 18, 2024
2122a43
[PAL N64] Match actor changes that aren't in NTSC 1.2 or GC releases …
cadmic Sep 18, 2024
8348132
[PAL N64] Create macros for 50-Hz-related values (#2206)
cadmic Sep 18, 2024
a1a192b
[headers] z64inventory.h, move savectx/inventory macros to z64save.h …
Dragorn421 Sep 18, 2024
5178011
[PAL N64] Match handwritten audio sequences (#2210)
cadmic Sep 21, 2024
05b908d
Document `autoLockOnActor` (#2212)
fig02 Sep 21, 2024
fcd5745
PLAYER_STATE1_ACTOR_CARRY -> PLAYER_STATE1_CARRYING_ACTOR (#2213)
fig02 Sep 21, 2024
ebd2b8d
Partially document idle animations (#2092)
Pepe20129 Sep 22, 2024
bb38482
Standardize "ActorMovement" over "ActorMove" (#2214)
fig02 Sep 23, 2024
0f72540
[headers] Move z_actor functions to z64actor.h (#2216)
Dragorn421 Sep 23, 2024
56981d5
Document Player Knockback related functions (#1601)
mzxrules Sep 23, 2024
52a1c2f
[PAL N64] Miscellaneous changes (#2211)
cadmic Sep 24, 2024
3cea46a
Z-Targeting Loose Ends (#2217)
fig02 Sep 24, 2024
f9d892a
Pause doc: `KaleidoScope_DrawQuestStatus` (partial) (#2215)
Dragorn421 Sep 24, 2024
dc1501e
create ucode_disas.h (#2222)
mzxrules Sep 24, 2024
a09ea76
[headers] gfx_setupdl.h and z64skin_matrix.h (#2221)
Dragorn421 Sep 24, 2024
e331805
Pause docs: Songs playback (#2220)
Dragorn421 Sep 25, 2024
5ed5f19
[headers] audio functions to z64audio.h and z64ocarina.h (#2223)
Dragorn421 Sep 25, 2024
5098537
ActionChange -> ActionHandler (#2219)
fig02 Sep 25, 2024
7ccb0a6
[headers] Create letterbox.h, move more protos from functions.h (#2225)
Dragorn421 Sep 25, 2024
8ff4faa
Player Docs: `Player_ActionChange_6`, Rolling and Put Away (#1949)
fig02 Sep 25, 2024
0acaed6
[PAL N64] Match z_message.c (#2202)
cadmic Sep 25, 2024
9da16a8
Player: `Player_ActionHandler_Talk` (#2226)
fig02 Sep 26, 2024
43c3971
Pause docs: Quest quads (#2224)
Dragorn421 Sep 26, 2024
19621c6
[ntsc-1.0/1.1] Match actor changes introduced in PAL 1.0 (#2227)
cadmic Sep 26, 2024
f7a0117
[ntsc-1.0/1.1] Match z_boss_ganon.c and z_boss_ganon2.c changes from …
cadmic Sep 26, 2024
bccb219
Fix typos found by codespell (#2229)
cadmic Sep 26, 2024
12af606
Merge remote-tracking branch 'decomp/main' into decomp_merge_4
Yanis002 Sep 26, 2024
bd368e4
format
Yanis002 Sep 26, 2024
2f3c808
[PAL N64] Set up build system and extract assets for pal-1.0 and pal-…
cadmic Sep 26, 2024
bc8945e
[headers] Move libultra protos to ultra64.h (as a temporary measure) …
Dragorn421 Sep 27, 2024
ca70ba1
[includes] Explicit global.h includes for z_player (#2235)
Dragorn421 Sep 27, 2024
2e6637a
[ntsc-1.0/1.1] Match z_player.c (#2232)
cadmic Sep 27, 2024
f70e363
[headers] z64bgcheck.h functions (#2239)
Dragorn421 Sep 27, 2024
d80e538
Pause doc: Quest page cursor movement (#2236)
Dragorn421 Sep 27, 2024
1b94c75
Merge remote-tracking branch 'upstream/develop/2.1.0' into decomp_mer…
Yanis002 Sep 27, 2024
3a89793
fix make_options
Yanis002 Sep 27, 2024
fbf797f
[headers] Create `gfxalloc.h`, `map.h`, move protos to `gfx.h`, `z64{…
Dragorn421 Sep 27, 2024
86a146d
[includes] z_fishing (#2242)
Dragorn421 Sep 27, 2024
c6160e1
[ntsc-1.0/1.1] Match PAL 1.0 viconfig changes (#2231)
cadmic Sep 27, 2024
89df3ed
Pause doc: Item page quads (#2238)
Dragorn421 Sep 27, 2024
04498f8
[PAL N64] Match file select language selection (#2240)
cadmic Sep 28, 2024
f7f38ff
[PAL N64] Completely match pal-1.0 and pal-1.1 and add to CI (#2246)
cadmic Sep 29, 2024
80ed596
Name Talking Related Actor Flags (#2230)
fig02 Sep 30, 2024
bdc11c2
[ntsc-1.0/1.1] Match "game engine" files (#2244)
cadmic Sep 30, 2024
47c6c36
[headers] Create zelda_arena.h, move protos to z64effect.h, and misc …
Dragorn421 Oct 1, 2024
ed77e14
[headers] Create `one_point_cutscene.h`, `z64olib.h` and move stuff t…
Dragorn421 Oct 1, 2024
37e72d7
[ntsc-1.0/1.1] Match actor changes introduced in NTSC 1.1 (#2251)
cadmic Oct 1, 2024
49759e4
Actor flag: `ACTOR_FLAG_CARRY_X_ROT_INFLUENCE` (#2237)
fig02 Oct 1, 2024
8ced66d
Pause doc: item page cursor movement (#2249)
Dragorn421 Oct 2, 2024
801fe22
Fix build on certain Linux distributions (#2257)
cadmic Oct 2, 2024
089a2c4
Add missing HS_FISHING constant (#2256)
cadmic Oct 4, 2024
e9cbcb7
Document bug in Camera_BGCheckInfo (#2258)
cadmic Oct 4, 2024
6b31fda
Player: AnimMovement (#2245)
fig02 Oct 4, 2024
1d0e243
Player: Special Idle Animations (#2259)
fig02 Oct 5, 2024
93f22fc
[includes] z_collision_check.c (#2252)
Dragorn421 Oct 7, 2024
7dd8f2b
Document `Player_ChooseNextIdleAnim` (#2262)
fig02 Oct 8, 2024
2048a65
[ntsc-1.0/1.1] Match line numbers in debug strings (#2255)
cadmic Oct 9, 2024
d3bf8ae
[ntsc-1.0/1.1] Extract assets (except audio) for ntsc-1.0 and ntsc-1.…
cadmic Oct 9, 2024
60f9607
[ntsc-1.0/1.1] Match "system" files (#2254)
cadmic Oct 9, 2024
621b8f3
[ntsc-1.0/1.1] Match audio library (#2243)
cadmic Oct 9, 2024
ba9c605
Player doc: some rotation logic/data (#1443)
Dragorn421 Oct 10, 2024
33251cc
name action wrappers (#2261)
fig02 Oct 10, 2024
869bae3
Pause doc: misc, fixups (#2265)
Dragorn421 Oct 10, 2024
fdf502d
Document `Player_Action_Idle` (#2266)
fig02 Oct 10, 2024
53c5759
Name talking action related things (#2260)
fig02 Oct 11, 2024
746adfc
Use MASS_IMMOVABLE/MASS_HEAVY everywhere (#2269)
cadmic Oct 11, 2024
f79c9db
Document `Player_Action_TurnInPlace` (#2268)
fig02 Oct 11, 2024
44460ee
Document `Player_Action_SwingBottle` (#2263)
Pepe20129 Oct 11, 2024
eee7ba9
Rename RoomBehaviorType2 (#2270)
mzxrules Oct 13, 2024
b275588
Minor en_changer and en_bom_bowl_man documentation update (#2272)
mracsys Oct 13, 2024
d0b4725
Document `Player_Action_8084F390` (#2264)
Pepe20129 Oct 13, 2024
2f54db1
Rename RoomBehaviorType1 to RoomType (#2271)
mzxrules Oct 14, 2024
4f6e33e
Add multiversion instructions to README (#2247)
cadmic Oct 14, 2024
a53fb02
EnHy + objects docs (#1499)
hensldm Oct 15, 2024
df1815c
Document `ACTOR_FLAG_THROW_ONLY` (#2274)
fig02 Oct 15, 2024
f32f540
Merge remote-tracking branch 'decomp/main' into decomp_merge_4
Yanis002 Oct 17, 2024
2057d86
format
Yanis002 Oct 17, 2024
112daa9
fix build issues
Yanis002 Oct 17, 2024
0472b70
Merge remote-tracking branch 'upstream/develop/2.1.0' into decomp_mer…
Yanis002 Oct 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Match fp_math.c (#2116)
cadmic authored Sep 4, 2024
commit 87914c6cc6c38460a07452cc23d666975f786450
9 changes: 9 additions & 0 deletions include/libc/math.h
Original file line number Diff line number Diff line change
@@ -41,6 +41,13 @@ f32 fabsf(f32 f);
#define fabsf(f) __builtin_fabsf((f32)(f))
#endif

f64 fabs(f64 f);
#ifdef __sgi
#pragma intrinsic(fabs)
#else
#define fabs(f) __builtin_fabs((f64)(f))
#endif

f32 sqrtf(f32 f);
// IDO has a sqrtf intrinsic, but in N64 versions it's not used for some files.
// For these files we define NO_SQRTF_INTRINSIC to use the sqrtf function instead.
@@ -53,8 +60,10 @@ f64 sqrt(f64 f);
#pragma intrinsic(sqrt)
#endif

#if PLATFORM_GC
extern float qNaN0x3FFFFF;
extern float qNaN0x10000;
extern float sNaN0x3FFFFF;
#endif

#endif
2 changes: 2 additions & 0 deletions src/code/fp.s
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@

.balign 16

#if PLATFORM_GC
DATA(qNaN0x3FFFFF)
.word 0x7FBFFFFF
ENDDATA(qNaN0x3FFFFF)
@@ -17,6 +18,7 @@ ENDDATA(qNaN0x10000)
DATA(sNaN0x3FFFFF)
.word 0x7FFFFFFF
ENDDATA(sNaN0x3FFFFF)
#endif

.section .text

83 changes: 77 additions & 6 deletions src/code/fp_math.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "z64math.h"
#include "macros.h"

#if PLATFORM_GC
s32 gUseAtanContFrac;
#endif

/**
* @param angle radians
@@ -22,6 +24,16 @@ f32 Math_FCeilF(f32 x) {
return ceilf(x);
}

#if PLATFORM_N64
f64 Math_FAbs(f64 x) {
return x < 0.0 ? -x : x;
}

f32 Math_FAbsF(f32 x) {
return x < 0.0f ? -x : x;
}
#endif

f32 Math_FRoundF(f32 x) {
return roundf(x);
}
@@ -34,6 +46,7 @@ f32 Math_FNearbyIntF(f32 x) {
return nearbyintf(x);
}

#if PLATFORM_GC
/* Arctangent approximation using a Taylor series (one quadrant) */
f32 Math_FAtanTaylorQF(f32 x) {
static const f32 coeffs[] = {
@@ -89,6 +102,7 @@ f32 Math_FAtanTaylorF(f32 x) {
return -q;
}
}
#endif

/* Arctangent approximation using a continued fraction */
f32 Math_FAtanContFracF(f32 x) {
@@ -98,6 +112,17 @@ f32 Math_FAtanContFracF(f32 x) {
f32 sq;
s32 i;

#if PLATFORM_N64
if (x > 1.0f) {
sector = 1;
x = 1.0f / x;
} else if (x < -1.0f) {
sector = -1;
x = 1.0f / x;
} else {
sector = 0;
}
#else
if (x >= -1.0f && x <= 1.0f) {
sector = 0;
} else if (x > 1.0f) {
@@ -109,25 +134,46 @@ f32 Math_FAtanContFracF(f32 x) {
} else {
return qNaN0x10000;
}
#endif

sq = SQ(x);
conv = 0.0f;

#if PLATFORM_N64
z = 24.0f;
i = 24;
#else
z = 8.0f;
for (i = 8; i != 0; i--) {
i = 8;
#endif

while (i != 0) {
conv = SQ(z) * sq / (2.0f * z + 1.0f + conv);
z -= 1.0f;
i--;
}
conv = x / (1.0f + conv);

#if PLATFORM_N64
if (sector > 0) {
return M_PI / 2 - (x / (1.0f + conv));
} else if (sector < 0) {
return -M_PI / 2 - (x / (1.0f + conv));
} else {
return x / (1.0f + conv);
}
#else
conv = x / (1.0f + conv);
if (sector == 0) {
return conv;
} else if (sector > 0) {
return M_PI / 2 - conv;
} else {
return -M_PI / 2 - conv;
}
#endif
}

#if PLATFORM_GC
/**
* @return arctan(x) in radians, in (-pi/2,pi/2) range
*/
@@ -138,11 +184,33 @@ f32 Math_FAtanF(f32 x) {
return Math_FAtanContFracF(x);
}
}
#endif

/**
* @return angle to (x,y) from vector (1,0) around (0,0) in radians, in (-pi,pi] range
*/
f32 Math_FAtan2F(f32 y, f32 x) {
#if PLATFORM_N64
if (y == 0.0f && x == 0.0f) {
return 0.0f;
}

if (x == 0.0f) {
if (y < 0.0f) {
return -M_PI / 2;
} else {
return M_PI / 2;
}
} else if (x < 0.0f) {
if (y < 0.0f) {
return -(M_PI - Math_FAtanContFracF(fabs(y / x)));
} else {
return M_PI - Math_FAtanContFracF(fabs(y / x));
}
} else { // x > 0.0f
return Math_FAtanContFracF(y / x);
}
#else
if (x == 0.0f) {
if (y == 0.0f) {
return 0.0f;
@@ -155,11 +223,14 @@ f32 Math_FAtan2F(f32 y, f32 x) {
}
} else if (x >= 0.0f) {
return Math_FAtanF(y / x);
} else if (y < 0.0f) {
return Math_FAtanF(y / x) - M_PI;
} else {
return M_PI - Math_FAtanF(-(y / x));
} else { // x < 0.0f
if (y < 0.0f) {
return Math_FAtanF(y / x) - M_PI;
} else {
return M_PI - Math_FAtanF(-(y / x));
}
}
#endif
}

/**
4 changes: 2 additions & 2 deletions tools/disasm/ntsc-1.2/functions.txt
Original file line number Diff line number Diff line change
@@ -2873,8 +2873,8 @@ PadSetup_Init = 0x800CDC10; // type:func
Math_FTanF = 0x800CDD50; // type:func
Math_FFloorF = 0x800CDD84; // type:func
Math_FCeilF = 0x800CDDA4; // type:func
func_800CDDC4_unknown = 0x800CDDC4; // type:func
func_800CDDF8_unknown = 0x800CDDF8; // type:func
Math_FAbs = 0x800CDDC4; // type:func
Math_FAbsF = 0x800CDDF8; // type:func
Math_FRoundF = 0x800CDE28; // type:func
Math_FTruncF = 0x800CDE48; // type:func
Math_FNearbyIntF = 0x800CDE68; // type:func