Compare commits

..

49 Commits

Author SHA1 Message Date
someone2639
93a0816b6c Add system capabilities variable that tracks individual features instead of broad emulator support (#907)
Also implements check for FBE.

* start implementing selftest

* add some more

* gSupportsLibpl destroyed

* SYS_SUPPORTS -> SYSCAP

* add emux check

* make it compile

* play around with it until it writes the ASM i want

* format

* explain what im doing

* hopefully guard emux

* one feedback

* two feedback

* better libpl check

* better comment

* resolve some feedbackg

* add FBE check

* dont need to skip this check if its only for the first frame'

* skip framebuffer check if on a system that we know supports it.

* document that nothing in the repo has emux yet

* goodbye emux

* feed1

* various detectable

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2026-01-17 01:52:48 -05:00
Gregory Heskett
85b72619e4 Bugfix: Floating platform in JRB rises instead of sinks when Mario stands on its edge (#924)
This was introduced back in 2021 by some very absolutely quite small changes :)
2026-01-17 01:51:24 -05:00
LucretiaArc
9500f7a8d7 Fix build errors and warnings (#926)
* Close .assets-local.txt before attempting to remove it in extract_assets.py
* Bare $(MAKE) doesn't work if the path to make has spaces, so quote it
* Suppress warning for unused parameter in Flips.cpp
* Don't override OS environment variable, since it broke MinGW
* Specify extension for aiff_extract_codebook target, fixes dependency order for MinGW
2026-01-17 01:51:06 -05:00
someone2639
e206d4477c Fix getGoddardSize so that any arbitrary build folder can be used (#915)
* fix getGoddardSize

* newline

* HOW did this get in here

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2026-01-17 01:50:46 -05:00
Gregory Heskett
63250a04fb Replace render_multi_image() with draw_sprite() (#914)
* Replace render_multi_image() with draw_sprite()

This function is more stable and can handle more use cases than render_multi_image() could. It can handle fractional scaling and also doesn't suffer from the seams that ParaLLEl displays when upscaling texrects.

It does have some minor drawbacks though, mainly that it doesn't handle the complete displaylist for the user (mainly to allow customization of primitives outside of the function). It also isn't currently as optimized as render_multi_image() was for combiner and render modes (also copy mode does not render correctly).

Neither function supports rendering of CI textures still.

* Add additional comments and documentation to draw_sprite function
2026-01-17 01:50:23 -05:00
Denis Kopyrin
d20112107c Fixed incorrect RDP sync in act select menu (#920)
DPRenderMode is not allowed to be changed before DPPipeSync is done.
This causes crashes on act select with F3DEX3 during tri draw before.
2026-01-08 14:53:24 -05:00
arthurtilly
29a402dbb1 Change optimization flags (#916)
This saves about 90KB of RAM in the code segment

When Kaze found out we still use Ofast his response was "LOL"

Never listen to Fazana ever again

I did this PR through github file editor out of spite
2025-11-19 01:14:37 -05:00
Gregory Heskett
8bb943d533 Tie Bowser key celebration to key model rather than course ID (#913)
This should allow people to put course-exiting ordinary stars into Bowser courses without playing a key animation. Similarly, this will allow Bowser fights to exist in ordinary levels without playing the standard star animation on level exit. Save flags for keys still need to be handled manually in these cases though.
2025-11-07 09:22:28 -05:00
someone2639
76559c07f7 fish behavior level check -> param check (#906)
* Make fish SA check into a bparam2 flag

* light docs; rename the bp flag

* actually rename the thing

---------

Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
Co-authored-by: someone2639 <someone2639@gmail.com>
2025-11-06 23:44:00 -05:00
Gregory Heskett
83426bae74 Do not apply config_local.h if DISABLE_ALL is active (#909)
It does not make sense to apply a config that doesn't even exist upstream for a release build.
2025-11-06 23:39:17 -05:00
Denis Kopyrin
233d105662 Fix deflate buffers overrunning decompressor context (#897)
* Fix deflate buffers overrunning decompressor context

* Add NULL checks

---------

Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2025-11-06 03:54:21 -05:00
LucretiaArc
cf88d09f5e Debug fly improvements (#908)
* Prevent interference between debug fly and other uses of dpad, dejank debug fly camera transitions

* Better whitespace

* Move extern to puppyprint.h

* This bothered Arctic
2025-11-05 18:07:04 -05:00
Anoliah
533d1ddaa2 Add vanilla cam processing ifdef to vanilla camera trigger arrays (#912) 2025-11-05 02:38:20 -05:00
bicyclesoda
e513c7272f Enforce gnu17 standard (#875)
Supported by both GCC and clang (https://clang.llvm.org/docs/UsersManual.html#extensions-supported-by-clang).

Currently, C23 cannot build this repo and apparently the consensus is to support C/gnu17 for the time being anyways.
2025-11-05 02:12:44 -05:00
someone2639
6589012fe5 Only run ROM extraction tools once on every make invocation (#902)
* add makefile util function to extract all assets

* indent

* start leveraging multiple-export functionality in extract_assets

* find-rom util; use the native hash library in detect-baseroms

* look back on my variable naming decisions with shame

* more docs; remove debug prints

* what if i just have detect_baseroms list the roms

* beef up usage string in extract_assets

* only one python invocation now; fix failure condition

* remove commented hashlib

* give it a last documentation pass

* warning fix that doesnt happen on my end

* long

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-11-02 19:39:34 -05:00
Christopher Dieringer
3af936f6de fix: more resilient toolchain detection (#901) 2025-11-01 04:26:49 -04:00
Anoliah
cbd0c05447 rework vanilla camera overrides (#873) 2025-10-31 15:20:47 +13:00
LuigiXHero
8f4b5b99c9 Stopgap readme fix (#871)
* Update README.md

Replaces the super out of date build instructions with a link to the wiki. As a stopgap before the readme rewrite.

* Restore UNFLoader section

Arctic said to

* Change rom requirements in readme
2025-10-30 11:24:00 +13:00
Gregory Heskett
94bfaff1ae Fix deflate warnings for the last time hopefully (#895)
Missed this one
2025-07-07 22:14:23 -04:00
someone2639
da18d323f4 fix armips compile error (#894)
* fix armips

* oops

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-07-04 01:04:59 -04:00
Denis Kopyrin
2dd4171fee Remove more gzip complaining lines (#893) 2025-07-03 13:20:08 -04:00
Denis Kopyrin
3c65ad1fed Fixed gzip to work with gcc15 & macOS ARM (#892) 2025-07-03 20:55:47 +08:00
Denis Kopyrin
39d0ccb412 Add new GZIP DEFLATE decompressor/compressor (#850) 2025-07-02 00:37:50 -04:00
Gregory Heskett
a334872dec Move all music samples to instruments folder and add instrument compatibility tables for legacy and Refresh 16 (#883)
Placing all music samples in the same folder allows for samples like Bowser organ and the course_select 'la' samples to be used among other samples (extended soundbank should be updated eventually to take advantage of this). Compatibility tables additionally allow for use of both legacy soundbanks and those designed around Refresh 16 (instruments folder only).
2025-07-01 02:42:58 -04:00
Gregory Heskett
e8e4210406 Fix uninitialized variable warning with GCC 14 (#884) 2025-07-01 02:40:25 -04:00
Denis Kopyrin
72f200653b Fixed gcc15 build (#891) 2025-07-01 02:39:47 -04:00
Gregory Heskett
e43749b254 Add debug asserts for exceeding GFX and audio pool sizes (#876) 2025-06-21 03:27:44 -04:00
Gregory Heskett
67ab8512b7 Switch to the ED header to support UNFLoader save type autodetection + newer flashcarts (#858)
* Force save type for UNFLoader

This fixes save type not being autodetected on SC64 with EEP4K due to the non-ED cartridge ID. Changing from SM to ED is a last resort, as emulators or other flashcarts have no means of autodetecting whether a ROM is an SM64 hack otherwise.

* Rely on ED header for UNFLoader autodetection of save type instead
2025-06-21 03:24:19 -04:00
Fallden4
2c15b0e642 Infinite stairs warp is disabled when UNLOCK_ALL is defined (#881)
* Make it so the infinite stairs warp is disabled when UNLOCK_ALL is defined

* match indentation

* Infinite stairs music is not played if UNLOCK_ALL is defined

* Address requested changes

---------

Co-authored-by: htauk <htauktechy@proton.me>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2025-06-21 02:44:51 -04:00
Matt Pharoah
3edf4bc593 Add support for realtime clock (#889) 2025-06-20 14:09:07 -04:00
Matt Pharoah
48ecd1da98 Fixed make patch (#870) 2025-02-25 18:26:26 -05:00
arthurtilly
e1486216d7 Clean up and simplify emutest.c, and change instant input to a whitelist (#868)
* Simplify emutest.c

* add mupen check back

* change return type

* some more cleanup

* changed gEmulator to u8
2025-02-16 02:14:09 -05:00
LucretiaArc
50b773d9ed Fix chuckya grab escape 2025-02-05 00:31:27 -05:00
Gregory Heskett
a4f6c95360 Add support for variadic debug assertions (#857)
Additionally clean up some crash screen display issues and add automatic newlining to assertions when they run past the edge of the screen
2025-01-29 20:36:19 -05:00
LucretiaArc
dc212c24f7 Add geo command for cylindrical billboarding (#856)
* Add cylindrical billboard geo command

* oops

* add room for layers

* Make cylindrical billboarding part of GEO_CMD_NODE_BILLBOARD, remove node pos option

* use the correct billboarding type this time, formatting

* Rename GEO_BILLBOARD mode parameter, combine mtxf_billboard variants

* funny register

* Adjust comments to better explain cylindrical billboarding, debug assert to check axis when using it
2025-01-25 16:00:27 -05:00
Gregory Heskett
aef3252921 Bugfix (Vanilla): Warping to cake screen in area other than Area 1 crashes the game (#844)
This also simultaneously fixes same-area exit course crashes, although that has already been dealt with by enforcing level warps (which is probably the preferred solution anyway).
2025-01-19 18:16:30 -05:00
Gregory Heskett
d3a104ac39 Bugfix: Sign range half of what it was in vanilla (#855)
Also fix a compiler warning in lz4tpack.c
2025-01-19 18:16:02 -05:00
Denis Kopyrin
8281d4bc23 Remove use of math inline assembly that can be generated with fast math (#853) 2025-01-19 06:25:14 -05:00
Matt Pharoah
bb60f2d851 Update libpl1 (#851) 2025-01-19 06:19:38 -05:00
Fazana
3f579629c8 Add support for building on ARM64 MacOS (#854)
* preliminary attempt

* simplify a bit

* oops

* Move declaration

* error out if you try to make patch

* style fix

* Update Makefile

* I hate makefile

* Update Makefile
2025-01-19 06:17:45 -05:00
Denis Kopyrin
d43157c82c Added racing DMA LZ4 & LZ4T implementations (#824)
* compression: added racing DMA LZ4 & LZ4T implementations

* debug: added reworked level load time measurement

* Get rid of LZ4, updated LZ4T to latest version

* lz4t: remove LIKELY/UNLIKLELY use, optimized slow decompressor for size

* lz4t: remove pointless goto

* lz4t: remove function macros, use static inlines instead

* perf: rework measurements for level loads to be more accurate

* perf: avoid hardcoded constants in time calculations
2024-12-29 19:33:28 +08:00
Gregory Heskett
ff82298b31 Place stack canaries behind DEBUG_ASSERTIONS instead of DEBUG (#843) 2024-11-11 01:33:05 -05:00
LucretiaArc
c46fa2d090 Support pre word-swapped textures, fix puppyprint rendering for lowercase z and tilde, minor font fixes (#838)
* Fix puppyprint rendering lowercase z and tilde, minor font fixes

* Add support for generating pre word swapped textures

* Use image for fasttext font texture

* Adjustments to fasttext font and puppyprint outline font
2024-11-04 21:11:01 -05:00
Lila
c4c18b3d0e Check for opensuse's cross mips gcc package (#842)
Makes it possible to rely on the official repo.
Ideally the following instructions would also be added to the wiki for opensuse:
```
sudo zypper install cross-mips-binutils git capstone pkgconf python311 cross-mips-gcc14
# install packages under devel_basis, equivalent to build-essential in deb
sudo zypper install --type pattern devel_basis
```
2024-10-31 14:08:08 -04:00
thecozies
7298e94a1f reset adjacent rooms when loading a new area (#704) 2024-09-05 01:48:26 -04:00
Gregory Heskett
27d328f86a Dialogs in dialogs.h no longer have to be in order (#832) 2024-09-05 01:13:05 -04:00
Gregory Heskett
27372fe74a Merge pull request #795 from gheskett/develop/2.3.0_update-unf
Update to newest UNF (d5f2ad100b76e372036453f8d25f9b6fbbbd2d1a) (November 22, 2023)
2024-09-05 01:07:23 -04:00
Gregory Heskett
e3472e05cf Add option for .local/share/HackerSM64/UNFLoader-dir.txt
This allows referencing a custom UNFLoader path to be used, ideally for placing on the C drive for WSL instances. UNFLoader tends to hang for an unbearably long time when saved somewhere within the WSL directory structure, and simply using the Linux build isn't an option because it can't access Windows USB devices trivially.
2024-08-03 19:57:50 -04:00
Gregory Heskett
74cb8ce062 Update to newest UNF (d5f2ad100b76e372036453f8d25f9b6fbbbd2d1a) (November 22 2023) 2024-08-03 19:33:09 -04:00
1195 changed files with 37185 additions and 22399 deletions

141
.gitignore vendored
View File

@@ -528,26 +528,21 @@ assets/demos/pss.bin
assets/demos/unused.bin assets/demos/unused.bin
assets/demos/wf.bin assets/demos/wf.bin
levels/bbh/0.rgba16.png levels/bbh/0.rgba16.png
actors/vanilla_actors/bbh/0.rgba16.png
levels/bbh/1.rgba16.png levels/bbh/1.rgba16.png
levels/bbh/2.rgba16.png levels/bbh/2.rgba16.png
levels/bbh/3.rgba16.png levels/bbh/3.rgba16.png
actors/vanilla_actors/bbh/4.rgba16.png levels/bbh/4.rgba16.png
actors/vanilla_actors/bbh/5.rgba16.png levels/bbh/5.rgba16.png
actors/vanilla_actors/bbh/6.rgba16.png levels/bbh/6.rgba16.png
actors/vanilla_actors/bitdw/0.rgba16.png
levels/bitdw/0.rgba16.png levels/bitdw/0.rgba16.png
levels/bitdw/1.rgba16.png levels/bitdw/1.rgba16.png
levels/bitdw/2.rgba16.png levels/bitdw/2.rgba16.png
levels/bitdw/3.rgba16.png levels/bitdw/3.rgba16.png
actors/vanilla_actors/bitfs/0.rgba16.png
levels/bitfs/0.rgba16.png levels/bitfs/0.rgba16.png
actors/vanilla_actors/bitfs/1.rgba16.png
levels/bitfs/1.rgba16.png levels/bitfs/1.rgba16.png
levels/bitfs/2.rgba16.png levels/bitfs/2.rgba16.png
levels/bits/0.rgba16.png levels/bits/0.rgba16.png
levels/bits/1.rgba16.png levels/bits/1.rgba16.png
actors/vanilla_actors/bits/2.rgba16.png
levels/bits/2.rgba16.png levels/bits/2.rgba16.png
levels/bob/0.rgba16.png levels/bob/0.rgba16.png
levels/bob/1.rgba16.png levels/bob/1.rgba16.png
@@ -564,9 +559,9 @@ levels/bowser_3/2.rgba16.png
levels/castle_grounds/0.rgba16.png levels/castle_grounds/0.rgba16.png
levels/castle_grounds/1.rgba16.png levels/castle_grounds/1.rgba16.png
levels/castle_grounds/2.rgba16.png levels/castle_grounds/2.rgba16.png
actors/vanilla_actors/castle_grounds/3.rgba16.png levels/castle_grounds/3.rgba16.png
actors/vanilla_actors/castle_grounds/4.rgba16.png levels/castle_grounds/4.rgba16.png
actors/vanilla_actors/castle_grounds/5.ia8.png levels/castle_grounds/5.ia8.png
levels/castle_inside/1.rgba16.png levels/castle_inside/1.rgba16.png
levels/castle_inside/10.rgba16.png levels/castle_inside/10.rgba16.png
levels/castle_inside/11.rgba16.png levels/castle_inside/11.rgba16.png
@@ -604,25 +599,22 @@ levels/castle_inside/38.rgba16.png
levels/castle_inside/39.rgba16.png levels/castle_inside/39.rgba16.png
levels/castle_inside/4.rgba16.png levels/castle_inside/4.rgba16.png
levels/castle_inside/40.rgba16.png levels/castle_inside/40.rgba16.png
actors/vanilla_actors/castle_inside/5.rgba16.png levels/castle_inside/5.rgba16.png
actors/vanilla_actors/castle_inside/6.rgba16.png levels/castle_inside/6.rgba16.png
actors/vanilla_actors/castle_inside/7.rgba16.png levels/castle_inside/7.rgba16.png
levels/castle_inside/8.rgba16.png levels/castle_inside/8.rgba16.png
levels/castle_inside/9.rgba16.png levels/castle_inside/9.rgba16.png
actors/vanilla_actors/castle_inside/castle_light.ia16.png
levels/castle_inside/castle_light.ia16.png levels/castle_inside/castle_light.ia16.png
levels/ccm/0.rgba16.png levels/ccm/0.rgba16.png
levels/ccm/1.rgba16.png levels/ccm/1.rgba16.png
actors/vanilla_actors/ccm/1.rgba16.png
levels/ccm/10.rgba16.png levels/ccm/10.rgba16.png
levels/ccm/11.rgba16.png levels/ccm/11.rgba16.png
actors/vanilla_actors/ccm/12.rgba16.png levels/ccm/12.rgba16.png
levels/ccm/2.rgba16.png levels/ccm/2.rgba16.png
actors/vanilla_actors/ccm/2.rgba16.png levels/ccm/3.rgba16.png
actors/vanilla_actors/ccm/3.rgba16.png
levels/ccm/4.rgba16.png levels/ccm/4.rgba16.png
actors/vanilla_actors/ccm/5.rgba16.png levels/ccm/5.rgba16.png
actors/vanilla_actors/ccm/6.rgba16.png levels/ccm/6.rgba16.png
levels/ccm/7.rgba16.png levels/ccm/7.rgba16.png
levels/ccm/8.ia16.png levels/ccm/8.ia16.png
levels/ccm/9.ia16.png levels/ccm/9.ia16.png
@@ -631,12 +623,11 @@ levels/cotmc/1.rgba16.png
levels/cotmc/2.rgba16.png levels/cotmc/2.rgba16.png
levels/cotmc/3.rgba16.png levels/cotmc/3.rgba16.png
levels/cotmc/4.rgba16.png levels/cotmc/4.rgba16.png
actors/vanilla_actors/ddd/0.rgba16.png levels/ddd/0.rgba16.png
levels/ddd/1.rgba16.png levels/ddd/1.rgba16.png
levels/ddd/2.rgba16.png levels/ddd/2.rgba16.png
actors/vanilla_actors/ddd/2.rgba16.png
levels/ddd/3.rgba16.png levels/ddd/3.rgba16.png
actors/vanilla_actors/ddd/4.rgba16.png levels/ddd/4.rgba16.png
levels/ending/cake.png levels/ending/cake.png
levels/ending/cake_eu.png levels/ending/cake_eu.png
levels/ending/eu_023000.rgba16.png levels/ending/eu_023000.rgba16.png
@@ -648,10 +639,10 @@ levels/ending/eu_028000.rgba16.png
levels/hmc/0.rgba16.png levels/hmc/0.rgba16.png
levels/hmc/1.rgba16.png levels/hmc/1.rgba16.png
levels/hmc/2.rgba16.png levels/hmc/2.rgba16.png
actors/vanilla_actors/hmc/3.rgba16.png levels/hmc/3.rgba16.png
actors/vanilla_actors/hmc/4.rgba16.png levels/hmc/4.rgba16.png
actors/vanilla_actors/hmc/5.rgba16.png levels/hmc/5.rgba16.png
actors/vanilla_actors/hmc/6.rgba16.png levels/hmc/6.rgba16.png
levels/hmc/7.rgba16.png levels/hmc/7.rgba16.png
levels/intro/0.rgba16.png levels/intro/0.rgba16.png
levels/intro/1.rgba16.png levels/intro/1.rgba16.png
@@ -662,41 +653,40 @@ levels/intro/3_sh_tm.rgba16.png
levels/intro/3_tm.rgba16.png levels/intro/3_tm.rgba16.png
levels/jrb/0.rgba16.png levels/jrb/0.rgba16.png
levels/jrb/1.rgba16.png levels/jrb/1.rgba16.png
actors/vanilla_actors/jrb/2.rgba16.png levels/jrb/2.rgba16.png
actors/vanilla_actors/jrb/3.rgba16.png levels/jrb/3.rgba16.png
actors/vanilla_actors/lll/0.rgba16.png levels/lll/0.rgba16.png
actors/vanilla_actors/lll/1.rgba16.png levels/lll/1.rgba16.png
actors/vanilla_actors/lll/10.rgba16.png levels/lll/10.rgba16.png
actors/vanilla_actors/lll/11.rgba16.png levels/lll/11.rgba16.png
actors/vanilla_actors/lll/12.rgba16.png levels/lll/12.rgba16.png
actors/vanilla_actors/lll/13.rgba16.png levels/lll/13.rgba16.png
actors/vanilla_actors/lll/14.rgba16.png levels/lll/14.rgba16.png
actors/vanilla_actors/lll/15.rgba16.png levels/lll/15.rgba16.png
actors/vanilla_actors/lll/16.rgba16.png levels/lll/16.rgba16.png
actors/vanilla_actors/lll/17.rgba16.png levels/lll/17.rgba16.png
actors/vanilla_actors/lll/18.rgba16.png levels/lll/18.rgba16.png
actors/vanilla_actors/lll/19.rgba16.png levels/lll/19.rgba16.png
actors/vanilla_actors/lll/2.rgba16.png levels/lll/2.rgba16.png
actors/vanilla_actors/lll/20.rgba16.png levels/lll/20.rgba16.png
actors/vanilla_actors/lll/21.rgba16.png levels/lll/21.rgba16.png
actors/vanilla_actors/lll/22.rgba16.png levels/lll/22.rgba16.png
actors/vanilla_actors/lll/23.rgba16.png levels/lll/23.rgba16.png
actors/vanilla_actors/lll/24.rgba16.png levels/lll/24.rgba16.png
actors/vanilla_actors/lll/25.rgba16.png levels/lll/25.rgba16.png
levels/lll/26.rgba16.png levels/lll/26.rgba16.png
levels/lll/27.ia16.png levels/lll/27.ia16.png
levels/lll/28.rgba16.png levels/lll/28.rgba16.png
levels/lll/29.rgba16.png levels/lll/29.rgba16.png
actors/vanilla_actors/lll/29.rgba16.png
levels/lll/3.rgba16.png levels/lll/3.rgba16.png
levels/lll/30.rgba16.png levels/lll/30.rgba16.png
levels/lll/31.rgba16.png levels/lll/31.rgba16.png
levels/lll/32.rgba16.png levels/lll/32.rgba16.png
levels/lll/4.rgba16.png levels/lll/4.rgba16.png
levels/lll/5.rgba16.png levels/lll/5.rgba16.png
actors/vanilla_actors/lll/6.rgba16.png levels/lll/6.rgba16.png
levels/lll/7.rgba16.png levels/lll/7.rgba16.png
actors/vanilla_actors/lll/8.rgba16.png levels/lll/8.rgba16.png
levels/lll/9.rgba16.png levels/lll/9.rgba16.png
levels/menu/main_menu_seg7.00018.rgba16.png levels/menu/main_menu_seg7.00018.rgba16.png
levels/menu/main_menu_seg7.00818.rgba16.png levels/menu/main_menu_seg7.00818.rgba16.png
@@ -931,73 +921,64 @@ levels/menu/main_menu_seg7_us.0B800.ia8.png
levels/pss/0.rgba16.png levels/pss/0.rgba16.png
levels/pss/1.ia16.png levels/pss/1.ia16.png
levels/pss/2.rgba16.png levels/pss/2.rgba16.png
actors/vanilla_actors/rr/1.rgba16.png levels/rr/1.rgba16.png
levels/rr/2.rgba16.png levels/rr/2.rgba16.png
actors/vanilla_actors/rr/quarter_flying_carpet.rgba16.png levels/rr/quarter_flying_carpet.rgba16.png
levels/sl/0.rgba16.png levels/sl/0.rgba16.png
levels/sl/1.rgba16.png levels/sl/1.rgba16.png
actors/vanilla_actors/sl/2.rgba16.png levels/sl/2.rgba16.png
levels/sl/3.rgba16.png levels/sl/3.rgba16.png
levels/sl/4.rgba16.png levels/sl/4.rgba16.png
levels/ssl/0.rgba16.png levels/ssl/0.rgba16.png
levels/ssl/1.ia16.png levels/ssl/1.ia16.png
actors/vanilla_actors/ssl/10.rgba16.png levels/ssl/10.rgba16.png
actors/vanilla_actors/ssl/11.rgba16.png levels/ssl/11.rgba16.png
levels/ssl/2.rgba16.png levels/ssl/2.rgba16.png
levels/ssl/3.rgba16.png levels/ssl/3.rgba16.png
levels/ssl/4.rgba16.png levels/ssl/4.rgba16.png
actors/vanilla_actors/ssl/5.rgba16.png levels/ssl/5.rgba16.png
actors/vanilla_actors/ssl/6.rgba16.png levels/ssl/6.rgba16.png
levels/ssl/7.rgba16.png levels/ssl/7.rgba16.png
actors/vanilla_actors/ssl/8.rgba16.png levels/ssl/8.rgba16.png
actors/vanilla_actors/ssl/9.rgba16.png levels/ssl/9.rgba16.png
levels/thi/0.rgba16.png levels/thi/0.rgba16.png
levels/thi/1.rgba16.png levels/thi/1.rgba16.png
actors/vanilla_actors/thi/1.rgba16.png
levels/totwc/0.rgba16.png levels/totwc/0.rgba16.png
levels/totwc/1.rgba16.png levels/totwc/1.rgba16.png
levels/totwc/2.rgba16.png levels/totwc/2.rgba16.png
levels/totwc/3.ia16.png levels/totwc/3.ia16.png
actors/vanilla_actors/ttc/0.rgba16.png levels/ttc/0.rgba16.png
actors/vanilla_actors/ttc/1.rgba16.png
levels/ttc/1.rgba16.png levels/ttc/1.rgba16.png
levels/ttc/2.rgba16.png levels/ttc/2.rgba16.png
levels/ttm/0.ia16.png levels/ttm/0.ia16.png
levels/ttm/1.rgba16.png levels/ttm/1.rgba16.png
levels/ttm/2.rgba16.png levels/ttm/2.rgba16.png
levels/ttm/3.rgba16.png levels/ttm/3.rgba16.png
actors/vanilla_actors/ttm/4.rgba16.png levels/ttm/4.rgba16.png
levels/ttm/5.rgba16.png levels/ttm/5.rgba16.png
levels/ttm/6.rgba16.png levels/ttm/6.rgba16.png
levels/ttm/7.rgba16.png levels/ttm/7.rgba16.png
actors/vanilla_actors/ttm/8.rgba16.png levels/ttm/8.rgba16.png
levels/vcutm/0.rgba16.png levels/vcutm/0.rgba16.png
levels/vcutm/1.rgba16.png levels/vcutm/1.rgba16.png
actors/vanilla_actors/vcutm/2.rgba16.png levels/vcutm/2.rgba16.png
levels/vcutm/3.rgba16.png levels/vcutm/3.rgba16.png
levels/wdw/0.rgba16.png levels/wdw/0.rgba16.png
levels/wdw/1.rgba16.png levels/wdw/1.rgba16.png
actors/vanilla_actors/wdw/1.rgba16.png levels/wdw/2.rgba16.png
actors/vanilla_actors/wdw/2.rgba16.png levels/wdw/3.rgba16.png
actors/vanilla_actors/wdw/3.rgba16.png
levels/wdw/4.rgba16.png levels/wdw/4.rgba16.png
actors/vanilla_actors/wf/0.rgba16.png
levels/wf/0.rgba16.png levels/wf/0.rgba16.png
levels/wf/1.rgba16.png levels/wf/1.rgba16.png
actors/vanilla_actors/wf/2.rgba16.png
levels/wf/2.rgba16.png levels/wf/2.rgba16.png
actors/vanilla_actors/wf/3.rgba16.png levels/wf/3.rgba16.png
actors/vanilla_actors/wf/4.rgba16.png levels/wf/4.rgba16.png
actors/vanilla_actors/wf/5.ia8.png levels/wf/5.ia8.png
levels/wmotr/0.rgba16.png levels/wmotr/0.rgba16.png
levels/wmotr/1.rgba16.png levels/wmotr/1.rgba16.png
levels/wmotr/2.rgba16.png levels/wmotr/2.rgba16.png
levels/wmotr/3.rgba16.png levels/wmotr/3.rgba16.png
levels/wmotr/4.rgba16.png levels/wmotr/4.rgba16.png
sound/samples/bowser_organ/00_organ_1.aiff
sound/samples/bowser_organ/01_organ_1_lq.aiff
sound/samples/bowser_organ/02_boys_choir.aiff
sound/samples/course_start/00_la.aiff
sound/samples/instruments/00.aiff sound/samples/instruments/00.aiff
sound/samples/instruments/01_banjo_1.aiff sound/samples/instruments/01_banjo_1.aiff
sound/samples/instruments/02.aiff sound/samples/instruments/02.aiff
@@ -1074,7 +1055,6 @@ sound/samples/instruments/45b_la.aiff
sound/samples/instruments/46_pizzicato_strings_1.aiff sound/samples/instruments/46_pizzicato_strings_1.aiff
sound/samples/instruments/47_pizzicato_strings_2.aiff sound/samples/instruments/47_pizzicato_strings_2.aiff
sound/samples/instruments/48_steel_drum.aiff sound/samples/instruments/48_steel_drum.aiff
sound/samples/piranha_music_box/00_music_box.aiff
sound/samples/sfx_1/00_twirl.aiff sound/samples/sfx_1/00_twirl.aiff
sound/samples/sfx_1/01_brushing.aiff sound/samples/sfx_1/01_brushing.aiff
sound/samples/sfx_1/02_hand_touch.aiff sound/samples/sfx_1/02_hand_touch.aiff
@@ -2167,3 +2147,4 @@ lib/libs2d_engine.a
# user-specific config file # user-specific config file
include/config/config_local.h include/config/config_local.h
.DS_Store

6
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "lib/libpl2"] [submodule "lib/libpl"]
path = lib/libpl2 path = lib/libpl
url = https://gitlab.com/parallel-launcher/libpl2.git url = https://gitlab.com/parallel-launcher/libpl.git

242
Makefile
View File

@@ -67,7 +67,7 @@ else ifeq ($(SAVETYPE),sram)
DEFINES += SRAM=1 DEFINES += SRAM=1
endif endif
DEFINES += NO_ERRNO_H=1 NO_GZIP=1 DEFINES += NO_ERRNO_H=1
# VERSION - selects the version of the game to build # VERSION - selects the version of the game to build
# jp - builds the 1996 Japanese version # jp - builds the 1996 Japanese version
@@ -135,7 +135,7 @@ endif
#==============================================================================# #==============================================================================#
# Default non-gcc opt flags # Default non-gcc opt flags
DEFAULT_OPT_FLAGS = -Ofast -falign-functions=32 DEFAULT_OPT_FLAGS = -Os -ffinite-math-only -fno-signed-zeros -fno-math-errno
# Note: -fno-associative-math is used here to suppress warnings, ideally we would enable this as an optimization but # Note: -fno-associative-math is used here to suppress warnings, ideally we would enable this as an optimization but
# this conflicts with -ftrapping-math apparently. # this conflicts with -ftrapping-math apparently.
# TODO: Figure out how to allow -fassociative-math to be enabled # TODO: Figure out how to allow -fassociative-math to be enabled
@@ -258,7 +258,7 @@ endif
# 1 - includes code in ROM # 1 - includes code in ROM
# 0 - does not # 0 - does not
LIBPL ?= 0 LIBPL ?= 0
LIBPL_DIR := lib/libpl2 LIBPL_DIR := lib/libpl
$(eval $(call validate-option,LIBPL,0 1)) $(eval $(call validate-option,LIBPL,0 1))
ifeq ($(LIBPL),1) ifeq ($(LIBPL),1)
DEFINES += LIBPL=1 DEFINES += LIBPL=1
@@ -269,12 +269,10 @@ BUILD_DIR_BASE := build
# BUILD_DIR is the location where all build artifacts are placed # BUILD_DIR is the location where all build artifacts are placed
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE) BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
COMPRESS ?= yay0 COMPRESS ?= lz4t
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp)) $(eval $(call validate-option,COMPRESS,mio0 yay0 lz4t gzip rnc1 rnc2 uncomp))
ifeq ($(COMPRESS),gzip) ifeq ($(COMPRESS),gzip)
DEFINES += GZIP=1 DEFINES += GZIP=1
LIBZRULE := $(BUILD_DIR)/libz.a
LIBZLINK := -lz
else ifeq ($(COMPRESS),rnc1) else ifeq ($(COMPRESS),rnc1)
DEFINES += RNC1=1 DEFINES += RNC1=1
else ifeq ($(COMPRESS),rnc2) else ifeq ($(COMPRESS),rnc2)
@@ -283,13 +281,12 @@ else ifeq ($(COMPRESS),yay0)
DEFINES += YAY0=1 DEFINES += YAY0=1
else ifeq ($(COMPRESS),mio0) else ifeq ($(COMPRESS),mio0)
DEFINES += MIO0=1 DEFINES += MIO0=1
else ifeq ($(COMPRESS),lz4t)
DEFINES += LZ4T=1
else ifeq ($(COMPRESS),uncomp) else ifeq ($(COMPRESS),uncomp)
DEFINES += UNCOMPRESSED=1 DEFINES += UNCOMPRESSED=1
endif endif
GZIPVER ?= std
$(eval $(call validate-option,GZIPVER,std libdef))
# Whether to hide commands or not # Whether to hide commands or not
VERBOSE ?= 0 VERBOSE ?= 0
ifeq ($(VERBOSE),0) ifeq ($(VERBOSE),0)
@@ -314,36 +311,18 @@ PYTHON := python3
ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),) ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
# Make sure assets exist # Extract assets if necessary
NOEXTRACT ?= 0 NOEXTRACT ?= 0
ifeq ($(NOEXTRACT),0) ifeq ($(NOEXTRACT),0)
DUMMY != $(PYTHON) extract_assets.py us >&2 || echo FAIL DUMMY != $(PYTHON) extract_assets.py >&2 || echo FAIL
ifeq ($(DUMMY),FAIL) ifeq ($(DUMMY),FAIL)
$(error Failed to extract assets from US ROM) $(error Failed to extract assets from found baseroms)
endif
ifneq (,$(shell python3 tools/detect_baseroms.py jp))
DUMMY != $(PYTHON) extract_assets.py jp >&2 || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to extract assets from JP ROM)
endif
endif
ifneq (,$(shell python3 tools/detect_baseroms.py eu))
DUMMY != $(PYTHON) extract_assets.py eu >&2 || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to extract assets from EU ROM)
endif
endif
ifneq (,$(shell python3 tools/detect_baseroms.py sh))
DUMMY != $(PYTHON) extract_assets.py sh >&2 || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to extract assets from SH ROM)
endif
endif endif
endif endif
# Make tools if out of date # Make tools if out of date
$(info Building tools...) $(info Building tools...)
DUMMY != $(MAKE) -s -C $(TOOLS_DIR) >&2 || echo FAIL DUMMY != "$(MAKE)" -s -C $(TOOLS_DIR) >&2 || echo FAIL
ifeq ($(DUMMY),FAIL) ifeq ($(DUMMY),FAIL)
$(error Failed to build tools) $(error Failed to build tools)
endif endif
@@ -351,10 +330,10 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
# Clone any needed submodules # Clone any needed submodules
ifeq ($(LIBPL),1) ifeq ($(LIBPL),1)
ifeq ($(wildcard $(LIBPL_DIR)/*.h),) ifeq ($(wildcard $(LIBPL_DIR)/*.h),)
$(info Cloning libpl2 submodule...) $(info Cloning libpl submodule...)
DUMMY != git submodule update --init $(LIBPL_DIR) > /dev/null || echo FAIL DUMMY != git submodule update --init $(LIBPL_DIR) > /dev/null || echo FAIL
ifeq ($(DUMMY),FAIL) ifeq ($(DUMMY),FAIL)
$(error Failed to clone libpl2 submodule) $(error Failed to clone libpl submodule)
endif endif
endif endif
endif endif
@@ -373,17 +352,15 @@ BUILD_DIR_BASE := build
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE) BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
ROM := $(BUILD_DIR)/$(TARGET_STRING).z64 ROM := $(BUILD_DIR)/$(TARGET_STRING).z64
ELF := $(BUILD_DIR)/$(TARGET_STRING).elf ELF := $(BUILD_DIR)/$(TARGET_STRING).elf
LIBZ := $(BUILD_DIR)/libz.a
LD_SCRIPT := sm64.ld LD_SCRIPT := sm64.ld
YAY0_DIR := $(BUILD_DIR)/bin YAY0_DIR := $(BUILD_DIR)/bin
SOUND_BIN_DIR := $(BUILD_DIR)/sound SOUND_BIN_DIR := $(BUILD_DIR)/sound
TEXTURE_DIR := textures TEXTURE_DIR := textures
ACTOR_DIR := actors ACTOR_DIR := actors
LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h))) LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h)))
VNL_ACTRS_DIRS := $(patsubst actors/vanilla_actors/%,%,$(dir $(wildcard actors/vanilla_actors/*/header.h)))
# Directories containing source files # Directories containing source files
SRC_DIRS += src src/boot src/game src/engine src/audio src/menu src/buffers lib/librtc actors levels bin data assets asm lib sound SRC_DIRS += src src/boot src/boot/deflate src/game src/engine src/audio src/menu src/buffers lib/librtc actors levels bin data assets asm lib sound
LIBZ_SRC_DIRS := src/libz LIBZ_SRC_DIRS := src/libz
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
BIN_DIRS := bin bin/$(VERSION) BIN_DIRS := bin bin/$(VERSION)
@@ -393,10 +370,8 @@ include Makefile.split
# Source code files # Source code files
LEVEL_C_FILES := $(wildcard levels/*/leveldata.c) $(wildcard levels/*/script.c) $(wildcard levels/*/geo.c) LEVEL_C_FILES := $(wildcard levels/*/leveldata.c) $(wildcard levels/*/script.c) $(wildcard levels/*/geo.c)
VNL_ACTRS_C_FILES := $(wildcard actors/vanilla_actors/*/data.c) $(wildcard actors/vanilla_actors/*/geo.c) C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) $(LEVEL_C_FILES)
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) $(LEVEL_C_FILES) $(VNL_ACTRS_C_FILES)
CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp)) CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp))
LIBZ_C_FILES := $(foreach dir,$(LIBZ_SRC_DIRS),$(wildcard $(dir)/*.c))
GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c)) GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s)) S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
@@ -425,36 +400,18 @@ O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
$(foreach file,$(GENERATED_C_FILES),$(file:.c=.o)) \ $(foreach file,$(GENERATED_C_FILES),$(file:.c=.o)) \
lib/PR/hvqm/hvqm2sp1.o lib/PR/hvqm/hvqm2sp2.o lib/PR/hvqm/hvqm2sp1.o lib/PR/hvqm/hvqm2sp2.o
LIBZ_O_FILES := $(foreach file,$(LIBZ_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
GODDARD_O_FILES := $(foreach file,$(GODDARD_C_FILES),$(BUILD_DIR)/$(file:.c=.o)) GODDARD_O_FILES := $(foreach file,$(GODDARD_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
# Automatic dependency files # Automatic dependency files
DEP_FILES := $(O_FILES:.o=.d) $(LIBZ_O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d DEP_FILES := $(O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d
#==============================================================================# #==============================================================================#
# Compiler Options # # Compiler Options #
#==============================================================================# #==============================================================================#
# detect prefix for MIPS toolchain CROSS := $(call find-mips-toolchain)
ifneq ($(call find-command,mips64-elf-ld),)
CROSS := mips64-elf-
else ifneq ($(call find-command,mips-n64-ld),)
CROSS := mips-n64-
else ifneq ($(call find-command,mips64-ld),)
CROSS := mips64-
else ifneq ($(call find-command,mips-linux-gnu-ld),)
CROSS := mips-linux-gnu-
else ifneq ($(call find-command,mips64-linux-gnu-ld),)
CROSS := mips64-linux-gnu-
else ifneq ($(call find-command,mips64-none-elf-ld),)
CROSS := mips64-none-elf-
else ifneq ($(call find-command,mips-ld),)
CROSS := mips-
else
$(error Unable to detect a suitable MIPS toolchain installed)
endif
LIBRARIES := nustd hvqm2 z goddard LIBRARIES := nustd hvqm2 goddard
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i)) LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
@@ -470,16 +427,18 @@ else ifeq ($(COMPILER),clang)
CC := clang CC := clang
CXX := clang++ CXX := clang++
endif endif
# Prefer gcc's cpp if installed on the system
ifneq (,$(call find-command,cpp-10)) ARCH := $(shell uname -p)
CPP := cpp-10
# Check processor architecture. ARM users need a different binutils package.
ifeq ($(ARCH), arm)
LD := tools/mips64-elf-ld-arm
else else
CPP := cpp ifneq ($(call find-command,mips-n64-ld),)
endif LD := mips-n64-ld
ifneq ($(call find-command,mips-n64-ld),) else
LD := mips-n64-ld LD := tools/mips64-elf-ld
else endif
LD := tools/mips64-elf-ld
endif endif
AR := $(CROSS)ar AR := $(CROSS)ar
OBJDUMP := $(CROSS)objdump OBJDUMP := $(CROSS)objdump
@@ -505,24 +464,35 @@ endif
C_DEFINES := $(foreach d,$(DEFINES),-D$(d)) C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES) DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
# Prefer gcc's cpp if installed on the system
ifneq (,$(call find-command,clang))
CPP := clang
CPPFLAGS := -E -P -x c -Wno-trigraphs $(DEF_INC_CFLAGS)
else ifneq (,$(call find-command,cpp-10))
CPP := cpp-10
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
else
CPP := cpp
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
endif
# C compiler options # C compiler options
CFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS) CFLAGS = -std=gnu17 -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS)
ifeq ($(COMPILER),gcc) ifeq ($(COMPILER),gcc)
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-trigraphs CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra
CFLAGS += -Wno-missing-braces CFLAGS += -Wno-missing-braces
else ifeq ($(COMPILER),clang) else ifeq ($(COMPILER),clang)
CFLAGS += -mfpxx -target mips -mabi=32 -G 0 -mhard-float -fomit-frame-pointer -fno-stack-protector -fno-common -I include -I src/ -I $(BUILD_DIR)/include -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-trigraphs CFLAGS += -mfpxx -target mips -mabi=32 -G 0 -mhard-float -fomit-frame-pointer -fno-stack-protector -fno-common -I include -I src/ -I $(BUILD_DIR)/include -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra
CFLAGS += -Wno-missing-braces CFLAGS += -Wno-missing-braces
else else
CFLAGS += -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -signed -32 CFLAGS += -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -signed -32
endif endif
ASMFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) -mips3 $(DEF_INC_CFLAGS) -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-trigraphs ASMFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) -mips3 $(DEF_INC_CFLAGS) -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d)) ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d))) RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
# C preprocessor flags # C preprocessor flags
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
#==============================================================================# #==============================================================================#
# Miscellaneous Tools # # Miscellaneous Tools #
@@ -531,23 +501,21 @@ CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
# N64 tools # N64 tools
YAY0TOOL := $(TOOLS_DIR)/slienc YAY0TOOL := $(TOOLS_DIR)/slienc
MIO0TOOL := $(TOOLS_DIR)/mio0 MIO0TOOL := $(TOOLS_DIR)/mio0
LZ4TPACK := $(TOOLS_DIR)/lz4tpack
DEFLATEPACK := $(TOOLS_DIR)/deflatepack
RNCPACK := $(TOOLS_DIR)/rncpack RNCPACK := $(TOOLS_DIR)/rncpack
FILESIZER := $(TOOLS_DIR)/filesizer FILESIZER := $(TOOLS_DIR)/filesizer
N64CKSUM := $(TOOLS_DIR)/n64cksum N64CKSUM := $(TOOLS_DIR)/n64cksum
N64GRAPHICS := $(TOOLS_DIR)/n64graphics N64GRAPHICS := $(TOOLS_DIR)/n64graphics
N64GRAPHICS_CI := $(TOOLS_DIR)/n64graphics_ci N64GRAPHICS_CI := $(TOOLS_DIR)/n64graphics_ci
BINPNG := $(TOOLS_DIR)/BinPNG.py BINPNG := $(TOOLS_DIR)/BinPNG.py
TEXTCONV := $(TOOLS_DIR)/textconv
AIFF_EXTRACT_CODEBOOK := $(TOOLS_DIR)/aiff_extract_codebook AIFF_EXTRACT_CODEBOOK := $(TOOLS_DIR)/aiff_extract_codebook
VADPCM_ENC := $(TOOLS_DIR)/vadpcm_enc VADPCM_ENC := $(TOOLS_DIR)/vadpcm_enc
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
SKYCONV := $(TOOLS_DIR)/skyconv SKYCONV := $(TOOLS_DIR)/skyconv
FIXLIGHTS_PY := $(TOOLS_DIR)/fixlights.py FIXLIGHTS_PY := $(TOOLS_DIR)/fixlights.py
FLIPS := $(TOOLS_DIR)/flips FLIPS := $(TOOLS_DIR)/flips
ifeq ($(GZIPVER),std)
GZIP := gzip
else
GZIP := libdeflate-gzip
endif
# Use the system installed armips if available. Otherwise use the one provided with this repository. # Use the system installed armips if available. Otherwise use the one provided with this repository.
ifneq (,$(call find-command,armips)) ifneq (,$(call find-command,armips))
RSPASM := armips RSPASM := armips
@@ -563,10 +531,19 @@ endif
EMU_FLAGS = EMU_FLAGS =
# Adding a txt file to this location will then reference a UNFLoader path specified in the file, instead of locally.
# This is expecially important for WSL users because UNFLoader.exe is incredibly slow when run within WSL's filesystem, so this can be used to point to the C drive.
# The file should only contain the directory path that contains UNFLoader[.exe] (do not specify the filename).
LOADER_DIR_FILE_SPECIFICATION_PATH = ~/.local/share/HackerSM64/UNFLoader-dir.txt
LOADER_DIR = ./$(TOOLS_DIR)
ifneq (,$(wildcard $(LOADER_DIR_FILE_SPECIFICATION_PATH)))
LOADER_DIR = $(shell cat $(LOADER_DIR_FILE_SPECIFICATION_PATH))
endif
ifneq (,$(call find-command,wslview)) ifneq (,$(call find-command,wslview))
LOADER = ./$(TOOLS_DIR)/UNFLoader.exe UNFLOADER_EXEC = $(LOADER_DIR)/UNFLoader.exe
else else
LOADER = ./$(TOOLS_DIR)/UNFLoader UNFLOADER_EXEC = $(LOADER_DIR)/UNFLoader
endif endif
SHA1SUM = sha1sum SHA1SUM = sha1sum
@@ -583,7 +560,7 @@ endif
# For non-IDO, use objcopy instead of extract_data_for_mio # For non-IDO, use objcopy instead of extract_data_for_mio
ifneq ($(COMPILER),ido) ifneq ($(COMPILER),ido)
EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data --only-section=.rodata EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data
endif endif
# Common build print status function # Common build print status function
@@ -607,12 +584,12 @@ clean:
$(RM) -r $(BUILD_DIR_BASE) $(RM) -r $(BUILD_DIR_BASE)
rebuildtools: rebuildtools:
$(MAKE) -C tools distclean "$(MAKE)" -C tools distclean
$(MAKE) -C tools "$(MAKE)" -C tools
distclean: clean distclean: clean
$(PYTHON) extract_assets.py --clean $(PYTHON) extract_assets.py --clean
$(MAKE) -C $(TOOLS_DIR) clean "$(MAKE)" -C $(TOOLS_DIR) clean
test: $(ROM) test: $(ROM)
$(EMULATOR) $(EMU_FLAGS) $< $(EMULATOR) $(EMU_FLAGS) $<
@@ -622,26 +599,33 @@ test-pj64: $(ROM)
# someone2639 # someone2639
# download and extract most recent unfloader build if needed # download and extract most recent unfloader build if needed
$(LOADER): $(UNFLOADER_EXEC):
ifeq (,$(wildcard $(LOADER))) ifeq (,$(wildcard $(UNFLOADER_EXEC)))
@$(PRINT) "Downloading latest UNFLoader...$(NO_COL)\n" @$(PRINT) "Downloading latest UNFLoader...$(NO_COL)\n"
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(TOOLS_DIR) $(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(LOADER_DIR)
endif endif
load: $(ROM) $(LOADER) load: $(ROM) $(UNFLOADER_EXEC)
$(LOADER) -r $< $(UNFLOADER_EXEC) -r $<
unf: $(ROM) $(LOADER) unf: $(ROM) $(UNFLOADER_EXEC)
$(LOADER) -d -r $< $(UNFLOADER_EXEC) -d -r $<
libultra: $(BUILD_DIR)/libultra.a libultra: $(BUILD_DIR)/libultra.a
patch: $(ROM) patch: $(ROM)
$(FLIPS) --create --bps $(shell python3 tools/detect_baseroms.py $(VERSION)) $(ROM) $(BUILD_DIR)/$(TARGET_STRING).bps ifeq ($(shell uname), Darwin)
ifeq ($(MAKECMDGOALS), patch)
$(error "The 'make patch' command is not supported on macOS.")
endif
else
$(FLIPS) --create --bps "$(shell python3 tools/detect_baseroms.py $(VERSION))" "$(ROM)" "$(BUILD_DIR)/$(TARGET_STRING).bps"
endif
# Extra object file dependencies # Extra object file dependencies
$(BUILD_DIR)/asm/ipl3.o: $(IPL3_RAW_FILES) $(BUILD_DIR)/asm/ipl3.o: $(IPL3_RAW_FILES)
$(BUILD_DIR)/src/game/crash_screen.o: $(CRASH_TEXTURE_C_FILES) $(BUILD_DIR)/src/game/crash_screen.o: $(CRASH_TEXTURE_C_FILES)
$(BUILD_DIR)/src/game/fasttext.o: $(FASTTEXT_TEXTURE_C_FILES)
$(BUILD_DIR)/src/game/version.o: $(BUILD_DIR)/src/game/version_data.h $(BUILD_DIR)/src/game/version.o: $(BUILD_DIR)/src/game/version_data.h
$(BUILD_DIR)/lib/aspMain.o: $(BUILD_DIR)/rsp/audio.bin $(BUILD_DIR)/lib/aspMain.o: $(BUILD_DIR)/rsp/audio.bin
$(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/sequences.bin $(SOUND_BIN_DIR)/bank_sets $(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/sequences.bin $(SOUND_BIN_DIR)/bank_sets
@@ -653,9 +637,27 @@ endif
$(CRASH_TEXTURE_C_FILES): TEXTURE_ENCODING := u32 $(CRASH_TEXTURE_C_FILES): TEXTURE_ENCODING := u32
ifeq ($(COMPILER),gcc) ifeq ($(VERSION),eu)
$(BUILD_DIR)/src/libz/%.o: OPT_FLAGS := -Os TEXT_DIRS := text/de text/us text/fr
$(BUILD_DIR)/src/libz/%.o: CFLAGS += -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-pointer-sign
# EU encoded text inserted into individual segment 0x19 files,
# and course data also duplicated in leveldata.c
$(BUILD_DIR)/bin/eu/translation_en.o: $(BUILD_DIR)/text/us/define_text.inc.c
$(BUILD_DIR)/bin/eu/translation_de.o: $(BUILD_DIR)/text/de/define_text.inc.c
$(BUILD_DIR)/bin/eu/translation_fr.o: $(BUILD_DIR)/text/fr/define_text.inc.c
$(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/us/define_courses.inc.c
$(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/de/define_courses.inc.c
$(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/fr/define_courses.inc.c
else
ifeq ($(VERSION),sh)
TEXT_DIRS := text/jp
$(BUILD_DIR)/bin/segment2.o: $(BUILD_DIR)/text/jp/define_text.inc.c
else
TEXT_DIRS := text/$(VERSION)
# non-EU encoded text inserted into segment 0x02
$(BUILD_DIR)/bin/segment2.o: $(BUILD_DIR)/text/$(VERSION)/define_text.inc.c
endif
endif endif
$(BUILD_DIR)/src/usb/usb.o: OPT_FLAGS := -O0 $(BUILD_DIR)/src/usb/usb.o: OPT_FLAGS := -O0
@@ -675,11 +677,17 @@ $(BUILD_DIR)/src/game/rendering_graph_node.o: OPT_FLAGS := $(GRAPH_NODE_OPT_FLAG
# $(info MATH_UTIL_OPT_FLAGS: $(MATH_UTIL_OPT_FLAGS)) # $(info MATH_UTIL_OPT_FLAGS: $(MATH_UTIL_OPT_FLAGS))
# $(info GRAPH_NODE_OPT_FLAGS: $(GRAPH_NODE_OPT_FLAGS)) # $(info GRAPH_NODE_OPT_FLAGS: $(GRAPH_NODE_OPT_FLAGS))
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) asm/debug $(GODDARD_SRC_DIRS) $(LIBZ_SRC_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) $(addprefix actors/vanilla_actors/,$(VNL_ACTRS_DIRS)) rsp include) $(YAY0_DIR) $(addprefix $(YAY0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION) ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) asm/debug $(GODDARD_SRC_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) rsp include) $(YAY0_DIR) $(addprefix $(YAY0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
# Make sure build directory exists before compiling anything # Make sure build directory exists before compiling anything
DUMMY != mkdir -p $(ALL_DIRS) DUMMY != mkdir -p $(ALL_DIRS)
$(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h
$(BUILD_DIR)/src/menu/file_select.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/game/puppycam2.o: $(BUILD_DIR)/include/text_strings.h
#==============================================================================# #==============================================================================#
@@ -692,9 +700,13 @@ $(BUILD_DIR)/%: %.png
$(call print,Converting:,$<,$@) $(call print,Converting:,$<,$@)
$(V)$(N64GRAPHICS) -s raw -i $@ -g $< -f $(lastword $(subst ., ,$@)) $(V)$(N64GRAPHICS) -s raw -i $@ -g $< -f $(lastword $(subst ., ,$@))
$(BUILD_DIR)/%.preswap.inc.c: %.preswap.png
$(call print,Converting:,$<,$@)
$(V)$(N64GRAPHICS) -s $(TEXTURE_ENCODING) -i $@ -g $< -f $(lastword ,$(subst ., ,$*)) -S
$(BUILD_DIR)/%.inc.c: %.png $(BUILD_DIR)/%.inc.c: %.png
$(call print,Converting:,$<,$@) $(call print,Converting:,$<,$@)
$(V)$(N64GRAPHICS) -s $(TEXTURE_ENCODING) -i $@ -g $< -f $(lastword ,$(subst ., ,$(basename $<))) $(V)$(N64GRAPHICS) -s $(TEXTURE_ENCODING) -i $@ -g $< -f $(lastword ,$(subst ., ,$*))
# Color Index CI8 # Color Index CI8
$(BUILD_DIR)/%.ci8.inc.c: %.ci8.png $(BUILD_DIR)/%.ci8.inc.c: %.ci8.png
@@ -724,11 +736,6 @@ $(LEVEL_ELF_FILES): $(BUILD_DIR)/levels/%/leveldata.elf: $(BUILD_DIR)/levels/%/l
$(call print,Linking ELF file:,$<,$@) $(call print,Linking ELF file:,$<,$@)
$(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map --just-symbols=$(BUILD_DIR)/bin/$(TEXTURE_BIN).elf -o $@ $< $(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map --just-symbols=$(BUILD_DIR)/bin/$(TEXTURE_BIN).elf -o $@ $<
.SECONDEXPANSION:
$(VANILLA_ACTORS_ELF_FILES): $(BUILD_DIR)/actors/vanilla_actors/%/data.elf: $(BUILD_DIR)/actors/vanilla_actors/%/data.o $(BUILD_DIR)/bin/$$(TEXTURE_BIN).elf
$(call print,Linking ELF file:,$<,$@)
$(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map --just-symbols=$(BUILD_DIR)/bin/$(TEXTURE_BIN).elf -o $@ $<
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf $(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf
$(call print,Extracting compressible data from:,$<,$@) $(call print,Extracting compressible data from:,$<,$@)
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@ $(V)$(EXTRACT_DATA_FOR_MIO) $< $@
@@ -747,6 +754,8 @@ else ifeq ($(COMPRESS),yay0)
include compression/yay0rules.mk include compression/yay0rules.mk
else ifeq ($(COMPRESS),mio0) else ifeq ($(COMPRESS),mio0)
include compression/mio0rules.mk include compression/mio0rules.mk
else ifeq ($(COMPRESS),lz4t)
include compression/lz4trules.mk
else ifeq ($(COMPRESS),uncomp) else ifeq ($(COMPRESS),uncomp)
include compression/uncomprules.mk include compression/uncomprules.mk
endif endif
@@ -811,6 +820,20 @@ $(BUILD_DIR)/assets/demo_data.c: assets/demo_data.json $(wildcard assets/demos/*
@$(PRINT) "$(GREEN)Generating demo data $(NO_COL)\n" @$(PRINT) "$(GREEN)Generating demo data $(NO_COL)\n"
$(V)$(PYTHON) $(TOOLS_DIR)/demo_data_converter.py assets/demo_data.json $(DEF_INC_CFLAGS) > $@ $(V)$(PYTHON) $(TOOLS_DIR)/demo_data_converter.py assets/demo_data.json $(DEF_INC_CFLAGS) > $@
# Encode in-game text strings
$(BUILD_DIR)/include/text_strings.h: include/text_strings.h.in
$(call print,Encoding:,$<,$@)
$(V)$(TEXTCONV) charmap.txt $< $@
$(BUILD_DIR)/include/text_menu_strings.h: include/text_menu_strings.h.in
$(call print,Encoding:,$<,$@)
$(V)$(TEXTCONV) charmap_menu.txt $< $@
$(BUILD_DIR)/text/%/define_courses.inc.c: text/define_courses.inc.c text/%/courses.h
@$(PRINT) "$(GREEN)Preprocessing: $(BLUE)$@ $(NO_COL)\n"
$(V)$(CPP) $(CPPFLAGS) $< -o - -I text/$*/ | $(TEXTCONV) charmap.txt - $@
$(BUILD_DIR)/text/%/define_text.inc.c: text/define_text.inc.c text/%/courses.h text/%/dialogs.h
@$(PRINT) "$(GREEN)Preprocessing: $(BLUE)$@ $(NO_COL)\n"
$(V)$(CPP) $(CPPFLAGS) $< -o - -I text/$*/ | $(TEXTCONV) charmap.txt - $@
# Level headers # Level headers
$(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in $(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
$(call print,Preprocessing level headers:,$<,$@) $(call print,Preprocessing level headers:,$<,$@)
@@ -861,13 +884,8 @@ $(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
@$(PRINT) "$(GREEN)Linking libgoddard: $(BLUE)$@ $(NO_COL)\n" @$(PRINT) "$(GREEN)Linking libgoddard: $(BLUE)$@ $(NO_COL)\n"
$(V)$(AR) rcs -o $@ $(GODDARD_O_FILES) $(V)$(AR) rcs -o $@ $(GODDARD_O_FILES)
# Link libz
$(BUILD_DIR)/libz.a: $(LIBZ_O_FILES)
@$(PRINT) "$(GREEN)Linking libz: $(BLUE)$@ $(NO_COL)\n"
$(V)$(AR) rcs -o $@ $(LIBZ_O_FILES)
# SS2: Goddard rules to get size # SS2: Goddard rules to get size
$(BUILD_DIR)/sm64_prelim.ld: sm64.ld $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/libgoddard.a $(BUILD_DIR)/libz.a $(BUILD_DIR)/sm64_prelim.ld: sm64.ld $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/libgoddard.a
$(call print,Preprocessing preliminary linker script:,$<,$@) $(call print,Preprocessing preliminary linker script:,$<,$@)
$(V)$(CPP) $(CPPFLAGS) -DPRELIMINARY=1 -DBUILD_DIR=$(BUILD_DIR) -DULTRALIB=lib$(ULTRALIB) -MMD -MP -MT $@ -MF $@.d -o $@ $< $(V)$(CPP) $(CPPFLAGS) -DPRELIMINARY=1 -DBUILD_DIR=$(BUILD_DIR) -DULTRALIB=lib$(ULTRALIB) -MMD -MP -MT $@ -MF $@.d -o $@ $<
@@ -877,7 +895,7 @@ $(BUILD_DIR)/sm64_prelim.elf: $(BUILD_DIR)/sm64_prelim.ld
$(BUILD_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf
$(call print,Getting Goddard size...) $(call print,Getting Goddard size...)
$(V)python3 tools/getGoddardSize.py $(BUILD_DIR)/sm64_prelim.map $(VERSION) $(V)python3 tools/getGoddardSize.py $(BUILD_DIR)/sm64_prelim.map $(BUILD_DIR)
$(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
$(call print,Assembling:,$<,$@) $(call print,Assembling:,$<,$@)
@@ -885,7 +903,7 @@ $(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
$(V)$(CROSS)gcc -c $(ASMFLAGS) $(foreach i,$(INCLUDE_DIRS),-Wa,-I$(i)) -x assembler-with-cpp -MMD -MF $(BUILD_DIR)/$*.d -o $@ $< $(V)$(CROSS)gcc -c $(ASMFLAGS) $(foreach i,$(INCLUDE_DIRS),-Wa,-I$(i)) -x assembler-with-cpp -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
# Link SM64 ELF file # Link SM64 ELF file
$(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a $(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/libgoddard.a
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n" @$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc $(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc

View File

@@ -41,21 +41,15 @@ LEVEL_FILES := $(addsuffix leveldata,$(LEVEL_DIRS))
LEVEL_ELF_FILES := $(foreach level_dir,$(LEVEL_DIRS),$(BUILD_DIR)/levels/$(level_dir)leveldata.elf) LEVEL_ELF_FILES := $(foreach level_dir,$(LEVEL_DIRS),$(BUILD_DIR)/levels/$(level_dir)leveldata.elf)
VANILLA_ACTORS_FILES := $(addsuffix data,$(VNL_ACTRS_DIRS))
VANILLA_ACTORS_ELF_FILES := $(foreach level_dir,$(VNL_ACTRS_DIRS),$(BUILD_DIR)/actors/vanilla_actors/$(level_dir)data.elf)
SEG_FILES := \ SEG_FILES := \
$(SEGMENTS:%=$(BUILD_DIR)/bin/%.elf) \ $(SEGMENTS:%=$(BUILD_DIR)/bin/%.elf) \
$(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.elf) \ $(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.elf) \
$(LEVEL_FILES:%=$(BUILD_DIR)/levels/%.elf) \ $(LEVEL_FILES:%=$(BUILD_DIR)/levels/%.elf)
$(VANILLA_ACTORS_FILES:%=$(BUILD_DIR)/actors/vanilla_actors/%.elf)
YAY0_FILES := \ YAY0_FILES := \
$(SEGMENTS:%=$(BUILD_DIR)/bin/%.szp) \ $(SEGMENTS:%=$(BUILD_DIR)/bin/%.szp) \
$(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.szp) \ $(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.szp) \
$(LEVEL_FILES:%=$(BUILD_DIR)/levels/%.szp) \ $(LEVEL_FILES:%=$(BUILD_DIR)/levels/%.szp)
$(VANILLA_ACTORS_FILES:%=$(BUILD_DIR)/actors/vanilla_actors/%.szp)
YAY0_OBJ_FILES := $(YAY0_FILES:.szp=.szp.o) YAY0_OBJ_FILES := $(YAY0_FILES:.szp=.szp.o)
@@ -249,11 +243,9 @@ $(BUILD_DIR)/bin/machine.elf: SEGMENT_ADDRESS := 0x09000000
$(BUILD_DIR)/bin/mountain.elf: SEGMENT_ADDRESS := 0x09000000 $(BUILD_DIR)/bin/mountain.elf: SEGMENT_ADDRESS := 0x09000000
$(BUILD_DIR)/bin/grass.elf: SEGMENT_ADDRESS := 0x09000000 $(BUILD_DIR)/bin/grass.elf: SEGMENT_ADDRESS := 0x09000000
# EU segment 19 translations # EU segment 19 translations
$(BUILD_DIR)/bin/translation_de.elf: SEGMENT_ADDRESS := 0x1B000000 $(BUILD_DIR)/bin/eu/translation_de.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_en.elf: SEGMENT_ADDRESS := 0x1B000000 $(BUILD_DIR)/bin/eu/translation_en.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_fr.elf: SEGMENT_ADDRESS := 0x1B000000 $(BUILD_DIR)/bin/eu/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_jp.elf: SEGMENT_ADDRESS := 0x1B000000
$(BUILD_DIR)/bin/translation_es.elf: SEGMENT_ADDRESS := 0x1B000000
# -------------------------------------- # --------------------------------------
# Skybox Rules # Skybox Rules
@@ -279,35 +271,5 @@ IPL3_RAW_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%,$(IP
CRASH_TEXTURE_FILES := $(wildcard $(TEXTURE_DIR)/crash_custom/*.png) CRASH_TEXTURE_FILES := $(wildcard $(TEXTURE_DIR)/crash_custom/*.png)
CRASH_TEXTURE_C_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%.inc.c,$(CRASH_TEXTURE_FILES))) CRASH_TEXTURE_C_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%.inc.c,$(CRASH_TEXTURE_FILES)))
# -------------------------------------- FASTTEXT_TEXTURE_FILES := $(wildcard $(TEXTURE_DIR)/fasttext/*.png)
# Vanilla Objects Rules FASTTEXT_TEXTURE_C_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%.inc.c,$(FASTTEXT_TEXTURE_FILES)))
# --------------------------------------
define vanilla_objects_rules =
VANILLA_ACTORS_$(1)_TEXTURE_FILES := $$(patsubst %.png,%.inc.c,$$(wildcard actors/vanilla_actors/$(1)/*.png))
$$(BUILD_DIR)/actors/vanilla_actors/$(1)/data.o: $$(addprefix $$(BUILD_DIR)/,$$(VANILLA_ACTORS_$(1)_TEXTURE_FILES))
$$(BUILD_DIR)/actors/vanilla_actors/$(1)/data.elf: SEGMENT_ADDRESS := 0x0e000000
$$(BUILD_DIR)/actors/vanilla_actors/$(1)/data.elf: TEXTURE_BIN := $(2)
endef
$(eval $(call vanilla_objects_rules,bob,generic))
$(eval $(call vanilla_objects_rules,wf,grass))
$(eval $(call vanilla_objects_rules,jrb,water))
$(eval $(call vanilla_objects_rules,ccm,snow))
$(eval $(call vanilla_objects_rules,bbh,spooky))
$(eval $(call vanilla_objects_rules,hmc,cave))
$(eval $(call vanilla_objects_rules,lll,fire))
$(eval $(call vanilla_objects_rules,ssl,generic))
$(eval $(call vanilla_objects_rules,ddd,water))
$(eval $(call vanilla_objects_rules,sl,snow))
$(eval $(call vanilla_objects_rules,wdw,grass))
$(eval $(call vanilla_objects_rules,ttm,mountain))
$(eval $(call vanilla_objects_rules,thi,grass))
$(eval $(call vanilla_objects_rules,ttc,machine))
$(eval $(call vanilla_objects_rules,rr,sky))
$(eval $(call vanilla_objects_rules,bitdw,sky))
$(eval $(call vanilla_objects_rules,bitfs,sky))
$(eval $(call vanilla_objects_rules,bits,sky))
$(eval $(call vanilla_objects_rules,vcutm,outside))
$(eval $(call vanilla_objects_rules,castle_inside,inside))
$(eval $(call vanilla_objects_rules,castle_grounds,outside))

View File

@@ -4,9 +4,9 @@
HackerSM64 now has a discord server! https://discord.gg/brETAakcXr HackerSM64 now has a discord server! https://discord.gg/brETAakcXr
This repo requires BOTH a US ROM and a JP ROM in order to build. Place baserom.us.z64 in the repo as usual and ALSO include baserom.jp.z64. This repo requires a US ROM in order to build. JP/EU ROMs are optional for some assets.
This repo needs gcc in order to be able to build it. To install it, run `sudo apt install gcc-mips-linux-gnu` [How to install everything needed and build HackerSM64](https://github.com/HackerN64/HackerSM64/wiki/Installing-HackerSM64)
This is a fork of the ultrasm64 repo by CrashOveride which includes the following commonly used patches (patches marked with `*` are toggleable in the config files): This is a fork of the ultrasm64 repo by CrashOveride which includes the following commonly used patches (patches marked with `*` are toggleable in the config files):
@@ -17,9 +17,9 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- **MrComit**: General use object defines, JUMP_KICK_FIX - **MrComit**: General use object defines, JUMP_KICK_FIX
- **aglab2**: Bugfixes (particularly puppycam), refactor stuff - **aglab2**: Bugfixes (particularly puppycam), refactor stuff
- **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine - **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine
- **Arthurtilly**: ASCII / UTF-8 support, Multilang, Platform Displacement 2 - **Arthurtilly**: Platform Displacement 2
- **Fazana**: PuppyLib, ucode swapping, audio load time optimisations (with Arctic), general hacker qol improvements, visual debug - **Fazana**: PuppyLib, ucode swapping, audio load time optimisations (with Arctic), general hacker qol improvements, visual debug
- **Reonu**: Starting the project + widescreen, reonucam, various defines for hacker QoL, and a custom Spanish (Spain) translation of the game. - **Reonu**: Starting the project/repo, widescreen, reonucam, various defines for hacker QoL
- **JoshDuMan**: Decomp guy, general assistance - **JoshDuMan**: Decomp guy, general assistance
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter, 4 controller support - **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter, 4 controller support
- **axollyon**: Console testing, bugfixes, idea-guying, and had a hand in silhouettes - **axollyon**: Console testing, bugfixes, idea-guying, and had a hand in silhouettes
@@ -87,9 +87,9 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- You can set a test level in `config/config_debug.h` in order to boot straight into it, so you can quickly test the level you're working on. * - You can set a test level in `config/config_debug.h` in order to boot straight into it, so you can quickly test the level you're working on. *
- Allow all surfaces in the game to have a `force` parameter. Activating this doesn't REQUIRE you to set `force` for every surface: If you don't set, it will default to 0x0000 rather than crashing. Increases RAM usage of collision. * - Allow all surfaces in the game to have a `force` parameter. Activating this doesn't REQUIRE you to set `force` for every surface: If you don't set, it will default to 0x0000 rather than crashing. Increases RAM usage of collision. *
- The clown font includes the entire English alphabet. - The clown font includes the entire English alphabet.
- Colored ia4 text support. Format: `"@XXXXXX[YOUR TEXT]@--------"` (By Arthurtilly) - Colored ia4 text support. Format: `"@XXXXXXXX[YOUR TEXT]@--------"` (By ArcticJaguar725)
- Example Text: `"@FF0000RED @00FF00GREEN @0000FFBLUE @FFFFFFWHITE"` - Example Text: `"@FF0000FFRED @00FF00FFGREEN @0000FFFFBLUE @FFFFFF00INVISIBLE @--------NORMAL"`
- NOTE: Text will need to be recolored each time it scrolls in a dialog box, or the custom color will reset. The text will use gDialogTextAlpha as the alpha value when changing the color. - NOTE: It is not mandatory to reset the text color with `"@--------"`, but text will need to be recolored each time it scrolls in a dialog box, or the custom color will reset.
- Toggle visiblity of collision surfaces and object hitboxes with Visual Surface Debug. `config/config_debug.h` has VISUAL_DEBUG which can be turned on to enable this feature. - Toggle visiblity of collision surfaces and object hitboxes with Visual Surface Debug. `config/config_debug.h` has VISUAL_DEBUG which can be turned on to enable this feature.
- Workaround for infinite death loops caused by using the wrong warp type for death warps. Mario's HP will be restored when being warped to any warp if (and only if) he was warped while dead. * - Workaround for infinite death loops caused by using the wrong warp type for death warps. Mario's HP will be restored when being warped to any warp if (and only if) he was warped while dead. *
@@ -118,7 +118,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- This repo supports a much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general. See `audio/synthesis.c` for more details and configuration info. (By ArcticJaguar725) * - This repo supports a much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general. See `audio/synthesis.c` for more details and configuration info. (By ArcticJaguar725) *
- Fazana's "puppyprint" text engine. * - Fazana's "puppyprint" text engine. *
- Use `print_small_text` to print normal text. The two last params are aligment and how many characters to print (-1 means PRINT_ALL). - Use `print_small_text` to print normal text. The two last params are aligment and how many characters to print (-1 means PRINT_ALL).
- Use `render_multi_image` to draw large texture rectangles consisting of multiple images on the screen.
- More info in `puppyprint.c` - More info in `puppyprint.c`
- Wiseguy's Farcall TLB mapping allows to store executable code inside uncompressed segments, that can be loaded and ran as needed, instead of it having to be loaded at all times. See `farcall.h` in the include folder for instructions and details. - Wiseguy's Farcall TLB mapping allows to store executable code inside uncompressed segments, that can be loaded and ran as needed, instead of it having to be loaded at all times. See `farcall.h` in the include folder for instructions and details.
- Red Coin Stars now support up to 99 red coins! In addition, multi-area red coin missions can now be created by setting the 2nd behavior paramater of the red coin star to the number of reds required for the star to spawn. - Red Coin Stars now support up to 99 red coins! In addition, multi-area red coin missions can now be created by setting the 2nd behavior paramater of the red coin star to the number of reds required for the star to spawn.
@@ -139,14 +138,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Separate defines for emulator and console black border height. - Separate defines for emulator and console black border height.
- Getting HVQM FMV support to work with the game is WIP. - Getting HVQM FMV support to work with the game is WIP.
Requirements are the same as regular SM64, however a GCC MIPS cross compiler is also required. If you're on Debian-like Linux, you can use the ``gcc-mips-linux-gnu`` package. The toolchain that comes with my SDK is also supported.
## Additional Prerequisites
BinPNG (the CI texture converter) requires some python3 dependencies. Use pip to install them.
``pip install pypng bitstring``
## UNFLoader support ## UNFLoader support
The repository supports UNFLoader for debugging. The repository supports UNFLoader for debugging.
@@ -207,7 +198,3 @@ Thanks to "someone2639" for this hacky-ass idea
Q: Will this allow me to use FlashRAM/Transfer Pak/microcode swapping/Other Cool N64 Features? Q: Will this allow me to use FlashRAM/Transfer Pak/microcode swapping/Other Cool N64 Features?
A: Theoretically, all yes. A: Theoretically, all yes.
## Installation help
Go read the original SM64 repo README.md

View File

@@ -105,7 +105,4 @@ extern const struct Animation *const unagi_seg5_anims_05012824[];
extern const Gfx whirlpool_seg5_dl_05013B58[]; extern const Gfx whirlpool_seg5_dl_05013B58[];
extern const Gfx whirlpool_seg5_dl_05013CB8[]; extern const Gfx whirlpool_seg5_dl_05013CB8[];
extern const Trajectory jrb_seg7_trajectory_unagi_1[];
extern const Trajectory jrb_seg7_trajectory_unagi_2[];
#endif #endif

View File

@@ -11,30 +11,3 @@
#include "manta/geo.inc.c" #include "manta/geo.inc.c"
#include "sushi/geo.inc.c" #include "sushi/geo.inc.c"
#include "unagi/geo.inc.c" #include "unagi/geo.inc.c"
#include "surface_terrains.h"
// 0x0700D20C - 0x0700D23E
const Trajectory jrb_seg7_trajectory_unagi_1[] = {
TRAJECTORY_POS(0, /*pos*/ 5300, -3800, 1200),
TRAJECTORY_POS(1, /*pos*/ 3700, -3600, 1700),
TRAJECTORY_POS(2, /*pos*/ 3400, -3400, 3500),
TRAJECTORY_POS(3, /*pos*/ 3900, -3600, 4400),
TRAJECTORY_POS(4, /*pos*/ 5300, -3800, 4400),
TRAJECTORY_POS(5, /*pos*/ 6200, -4000, 2700),
TRAJECTORY_END(),
};
// 0x0700D240 - 0x0700D28A
const Trajectory jrb_seg7_trajectory_unagi_2[] = {
TRAJECTORY_POS(0, /*pos*/ 5381, 0, 2758),
TRAJECTORY_POS(1, /*pos*/ 5803, -3130, 3036),
TRAJECTORY_POS(2, /*pos*/ 4876, -3045, 2706),
TRAJECTORY_POS(3, /*pos*/ 4313, -3246, 2736),
TRAJECTORY_POS(4, /*pos*/ 3792, -3413, 3668),
TRAJECTORY_POS(5, /*pos*/ 4971, -3130, 3688),
TRAJECTORY_POS(6, /*pos*/ 5392, -3130, 3326),
TRAJECTORY_POS(7, /*pos*/ 6341, -3130, 2450),
TRAJECTORY_POS(8, /*pos*/ 9431, -3130, 1400),
TRAJECTORY_END(),
};

View File

@@ -1,27 +0,0 @@
#include <ultra64.h>
#include "sm64.h"
#include "surface_terrains.h"
#include "moving_texture_macros.h"
#include "surface_terrains.h"
#include "textures.h"
#include "dialog_ids.h"
#include "make_const_nonconst.h"
#include "actors/vanilla_actors/bbh/texture.inc.c"
#include "actors/vanilla_actors/bbh/staircase_step/model.inc.c"
#include "actors/vanilla_actors/bbh/tilting_trap_platform/model.inc.c"
#include "actors/vanilla_actors/bbh/tumbling_platform_far/model.inc.c"
#include "actors/vanilla_actors/bbh/tumbling_platform_near/model.inc.c"
#include "actors/vanilla_actors/bbh/moving_bookshelf/model.inc.c"
#include "actors/vanilla_actors/bbh/mesh_elevator/model.inc.c"
#include "actors/vanilla_actors/bbh/merry_go_round/model.inc.c"
#include "actors/vanilla_actors/bbh/coffin/model.inc.c"
#include "actors/vanilla_actors/bbh/staircase_step/collision.inc.c"
#include "actors/vanilla_actors/bbh/tilting_trap_platform/collision.inc.c"
#include "actors/vanilla_actors/bbh/tumbling_platform_near/collision.inc.c"
#include "actors/vanilla_actors/bbh/moving_bookshelf/collision.inc.c"
#include "actors/vanilla_actors/bbh/mesh_elevator/collision.inc.c"
#include "actors/vanilla_actors/bbh/merry_go_round/collision.inc.c"
#include "actors/vanilla_actors/bbh/coffin/collision.inc.c"

View File

@@ -1,37 +0,0 @@
#include <ultra64.h>
#include "sm64.h"
#include "geo_commands.h"
#include "game/level_geo.h"
#include "game/geo_misc.h"
#include "game/camera.h"
#include "game/moving_texture.h"
#include "game/screen_transition.h"
#include "game/paintings.h"
#include "make_const_nonconst.h"
#include "actors/vanilla_actors/bbh/header.h"
#include "actors/vanilla_actors/bbh/staircase_step/geo.inc.c"
#include "actors/vanilla_actors/bbh/tilting_trap_platform/geo.inc.c"
#include "actors/vanilla_actors/bbh/tumbling_platform_far/geo.inc.c"
#include "actors/vanilla_actors/bbh/tumbling_platform_near/geo.inc.c"
#include "actors/vanilla_actors/bbh/moving_bookshelf/geo.inc.c"
#include "actors/vanilla_actors/bbh/mesh_elevator/geo.inc.c"
#include "actors/vanilla_actors/bbh/merry_go_round/geo.inc.c"
#include "actors/vanilla_actors/bbh/coffin/geo.inc.c"
#include "level_commands.h"
const LevelScript script_func_vo_bbh[] = {
LOAD_MODEL_FROM_GEO(MODEL_BBH_STAIRCASE_STEP, geo_bbh_0005B0),
LOAD_MODEL_FROM_GEO(MODEL_BBH_TILTING_FLOOR_PLATFORM, geo_bbh_0005C8),
LOAD_MODEL_FROM_GEO(MODEL_BBH_TUMBLING_PLATFORM, geo_bbh_0005E0),
LOAD_MODEL_FROM_GEO(MODEL_BBH_TUMBLING_PLATFORM_PART, geo_bbh_0005F8),
LOAD_MODEL_FROM_GEO(MODEL_BBH_MOVING_BOOKSHELF, geo_bbh_000610),
LOAD_MODEL_FROM_GEO(MODEL_BBH_MESH_ELEVATOR, geo_bbh_000628),
LOAD_MODEL_FROM_GEO(MODEL_BBH_MERRY_GO_ROUND, geo_bbh_000640),
LOAD_MODEL_FROM_GEO(MODEL_BBH_WOODEN_TOMB, geo_bbh_000658),
RETURN(),
};

View File

@@ -1,29 +0,0 @@
#pragma once
#include "types.h"
extern const GeoLayout geo_bbh_0005B0[];
extern const GeoLayout geo_bbh_0005C8[];
extern const GeoLayout geo_bbh_0005E0[];
extern const GeoLayout geo_bbh_0005F8[];
extern const GeoLayout geo_bbh_000610[];
extern const GeoLayout geo_bbh_000628[];
extern const GeoLayout geo_bbh_000640[];
extern const GeoLayout geo_bbh_000658[];
extern const Gfx bbh_seg7_dl_0701F2E8[];
extern const Gfx bbh_seg7_dl_0701F5F8[];
extern const Gfx bbh_seg7_dl_0701F7E8[];
extern const Gfx bbh_seg7_dl_0701FAB0[];
extern const Gfx bbh_seg7_dl_0701FD28[];
extern const Gfx bbh_seg7_dl_0701FFE8[];
extern const Gfx bbh_seg7_dl_070202F0[];
extern const Gfx bbh_seg7_dl_070206F0[];
extern const Collision bbh_seg7_collision_staircase_step[];
extern const Collision bbh_seg7_collision_tilt_floor_platform[];
extern const Collision bbh_seg7_collision_07026B1C[];
extern const Collision bbh_seg7_collision_haunted_bookshelf[];
extern const Collision bbh_seg7_collision_mesh_elevator[];
extern const Collision bbh_seg7_collision_merry_go_round[];
extern const Collision bbh_seg7_collision_coffin[];

View File

@@ -1,19 +0,0 @@
// 0x07000000 - 0x07001000
ALIGNED8 static const Texture bbh_seg7_texture_07000000[] = {
#include "actors/vanilla_actors/bbh/0.rgba16.inc.c"
};
// 0x07003000 - 0x07003400
ALIGNED8 static const Texture bbh_seg7_texture_07003000[] = {
#include "actors/vanilla_actors/bbh/4.rgba16.inc.c"
};
// 0x07003400 - 0x07004400
ALIGNED8 static const Texture bbh_seg7_texture_07003400[] = {
#include "actors/vanilla_actors/bbh/5.rgba16.inc.c"
};
// 0x07004400 - 0x07004800
ALIGNED8 static const Texture bbh_seg7_texture_07004400[] = {
#include "actors/vanilla_actors/bbh/6.rgba16.inc.c"
};

View File

@@ -1,35 +0,0 @@
#include <PR/ultratypes.h>
#include <PR/gbi.h>
#include "dialog_ids.h"
#include "surface_terrains.h"
#include "macros.h"
#include "moving_texture_macros.h"
#include "surface_terrains.h"
#include "textures.h"
#include "types.h"
#include "make_const_nonconst.h"
#include "actors/vanilla_actors/bitdw/texture.inc.c"
#include "actors/vanilla_actors/bitdw/sliding_platform/model.inc.c"
#include "actors/vanilla_actors/bitdw/seesaw_platform/model.inc.c"
#include "actors/vanilla_actors/bitdw/square_platform/model.inc.c"
#include "actors/vanilla_actors/bitdw/ferris_wheel_axle/model.inc.c"
#include "actors/vanilla_actors/bitdw/ferris_platform/model.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_1/model.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_2/model.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_3/model.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_4/model.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_5/model.inc.c"
#include "actors/vanilla_actors/bitdw/sliding_platform/collision.inc.c"
#include "actors/vanilla_actors/bitdw/seesaw_platform/collision.inc.c"
#include "actors/vanilla_actors/bitdw/square_platform/collision.inc.c"
#include "actors/vanilla_actors/bitdw/ferris_wheel_axle/collision.inc.c"
#include "actors/vanilla_actors/bitdw/ferris_platform/collision.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_1/collision.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_2/collision.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_3/collision.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_4/collision.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_5/collision.inc.c"

View File

@@ -1,41 +0,0 @@
#include <ultra64.h>
#include "sm64.h"
#include "geo_commands.h"
#include "game/level_geo.h"
#include "game/geo_misc.h"
#include "game/camera.h"
#include "game/moving_texture.h"
#include "game/screen_transition.h"
#include "game/paintings.h"
#include "make_const_nonconst.h"
#include "actors/vanilla_actors/bitdw/header.h"
#include "actors/vanilla_actors/bitdw/sliding_platform/geo.inc.c"
#include "actors/vanilla_actors/bitdw/seesaw_platform/geo.inc.c"
#include "actors/vanilla_actors/bitdw/square_platform/geo.inc.c"
#include "actors/vanilla_actors/bitdw/ferris_wheel_axle/geo.inc.c"
#include "actors/vanilla_actors/bitdw/ferris_platform/geo.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_1/geo.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_2/geo.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_3/geo.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_4/geo.inc.c"
#include "actors/vanilla_actors/bitdw/collapsing_stairs_5/geo.inc.c"
#include "level_commands.h"
const LevelScript script_func_vo_bitdw[] = {
LOAD_MODEL_FROM_GEO(MODEL_BITDW_SQUARE_PLATFORM, geo_bitdw_000558),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_SEESAW_PLATFORM, geo_bitdw_000540),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_SLIDING_PLATFORM, geo_bitdw_000528),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_FERRIS_WHEEL_AXLE, geo_bitdw_000570),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_BLUE_PLATFORM, geo_bitdw_000588),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_STAIRCASE_FRAME4, geo_bitdw_0005A0),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_STAIRCASE_FRAME3, geo_bitdw_0005B8),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_STAIRCASE_FRAME2, geo_bitdw_0005D0),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_STAIRCASE_FRAME1, geo_bitdw_0005E8),
LOAD_MODEL_FROM_GEO(MODEL_BITDW_STAIRCASE, geo_bitdw_000600),
RETURN(),
};

View File

@@ -1,36 +0,0 @@
#pragma once
#include "types.h"
extern const GeoLayout geo_bitdw_000528[];
extern const GeoLayout geo_bitdw_000540[];
extern const GeoLayout geo_bitdw_000558[];
extern const GeoLayout geo_bitdw_000570[];
extern const GeoLayout geo_bitdw_000588[];
extern const GeoLayout geo_bitdw_0005A0[];
extern const GeoLayout geo_bitdw_0005B8[];
extern const GeoLayout geo_bitdw_0005D0[];
extern const GeoLayout geo_bitdw_0005E8[];
extern const GeoLayout geo_bitdw_000600[];
extern const Gfx bitdw_seg7_dl_0700AFA0[];
extern const Gfx bitdw_seg7_dl_0700B220[];
extern const Gfx bitdw_seg7_dl_0700B480[];
extern const Gfx bitdw_seg7_dl_0700B8D8[];
extern const Gfx bitdw_seg7_dl_0700BB58[];
extern const Gfx bitdw_seg7_dl_0700C0E0[];
extern const Gfx bitdw_seg7_dl_0700C670[];
extern const Gfx bitdw_seg7_dl_0700CC00[];
extern const Gfx bitdw_seg7_dl_0700D190[];
extern const Gfx bitdw_seg7_dl_0700D3E8[];
extern const Collision bitdw_seg7_collision_0700F688[];
extern const Collision bitdw_seg7_collision_0700F70C[];
extern const Collision bitdw_seg7_collision_moving_pyramid[];
extern const Collision bitdw_seg7_collision_0700F7F0[];
extern const Collision bitdw_seg7_collision_0700F898[];
extern const Collision bitdw_seg7_collision_0700F91C[];
extern const Collision bitdw_seg7_collision_0700FA3C[];
extern const Collision bitdw_seg7_collision_0700FB5C[];
extern const Collision bitdw_seg7_collision_0700FC7C[];
extern const Collision bitdw_seg7_collision_0700FD9C[];

View File

@@ -1,4 +0,0 @@
// 0x07000000 - 0x07000002
ALIGNED8 static const Texture bitdw_seg7_texture_07000000[] = {
#include "actors/vanilla_actors/bitdw/0.rgba16.inc.c"
};

View File

@@ -1,38 +0,0 @@
#include <PR/ultratypes.h>
#include <PR/gbi.h>
#include "dialog_ids.h"
#include "surface_terrains.h"
#include "macros.h"
#include "moving_texture_macros.h"
#include "surface_terrains.h"
#include "textures.h"
#include "types.h"
#include "make_const_nonconst.h"
#include "actors/vanilla_actors/bitfs/texture.inc.c"
#include "actors/vanilla_actors/bitfs/elevator/model.inc.c"
#include "actors/vanilla_actors/bitfs/sinking_cage_platform/model.inc.c"
#include "actors/vanilla_actors/bitfs/sinking_cage_pole/model.inc.c"
#include "actors/vanilla_actors/bitfs/tilting_square_platform/model.inc.c"
#include "actors/vanilla_actors/bitfs/tumbling_platform_near/model.inc.c"
#include "actors/vanilla_actors/bitfs/tumbling_platform_far/model.inc.c"
#include "actors/vanilla_actors/bitfs/stretching_platform/1.inc.c"
#include "actors/vanilla_actors/bitfs/stretching_platform/2.inc.c"
#include "actors/vanilla_actors/bitfs/moving_square_platform/model.inc.c"
#include "actors/vanilla_actors/bitfs/sliding_platform/model.inc.c"
#include "actors/vanilla_actors/bitfs/platform_on_track/model.inc.c"
#include "actors/vanilla_actors/bitfs/sinking_platforms/model.inc.c"
#include "actors/vanilla_actors/bitfs/seesaw_platform/model.inc.c"
#include "actors/vanilla_actors/bitfs/elevator/collision.inc.c"
#include "actors/vanilla_actors/bitfs/sinking_cage_platform/collision.inc.c"
#include "actors/vanilla_actors/bitfs/tilting_square_platform/collision.inc.c"
#include "actors/vanilla_actors/bitfs/tumbling_platform_near/collision.inc.c"
#include "actors/vanilla_actors/bitfs/stretching_platform/collision.inc.c"
#include "actors/vanilla_actors/bitfs/moving_square_platform/collision.inc.c"
#include "actors/vanilla_actors/bitfs/sliding_platform/collision.inc.c"
#include "actors/vanilla_actors/bitfs/platform_on_track/collision.inc.c"
#include "actors/vanilla_actors/bitfs/sinking_platforms/collision.inc.c"
#include "actors/vanilla_actors/bitfs/seesaw_platform/collision.inc.c"

View File

@@ -1,45 +0,0 @@
#include <ultra64.h>
#include "sm64.h"
#include "geo_commands.h"
#include "game/level_geo.h"
#include "game/geo_misc.h"
#include "game/camera.h"
#include "game/moving_texture.h"
#include "game/screen_transition.h"
#include "game/paintings.h"
#include "make_const_nonconst.h"
#include "actors/vanilla_actors/bitfs/header.h"
#include "actors/vanilla_actors/bitfs/elevator/geo.inc.c"
#include "actors/vanilla_actors/bitfs/sinking_cage_platform/geo.inc.c"
#include "actors/vanilla_actors/bitfs/sinking_cage_pole/geo.inc.c"
#include "actors/vanilla_actors/bitfs/tilting_square_platform/geo.inc.c"
#include "actors/vanilla_actors/bitfs/tumbling_platform_near/geo.inc.c"
#include "actors/vanilla_actors/bitfs/tumbling_platform_far/geo.inc.c"
#include "actors/vanilla_actors/bitfs/stretching_platform/geo.inc.c"
#include "actors/vanilla_actors/bitfs/moving_square_platform/geo.inc.c"
#include "actors/vanilla_actors/bitfs/sliding_platform/geo.inc.c"
#include "actors/vanilla_actors/bitfs/platform_on_track/geo.inc.c"
#include "actors/vanilla_actors/bitfs/sinking_platforms/geo.inc.c"
#include "actors/vanilla_actors/bitfs/seesaw_platform/geo.inc.c"
#include "level_commands.h"
const LevelScript script_func_vo_bitfs[] = {
LOAD_MODEL_FROM_GEO(MODEL_BITFS_PLATFORM_ON_TRACK, bitfs_geo_000758),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_TILTING_SQUARE_PLATFORM, bitfs_geo_0006C0),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_SINKING_PLATFORMS, bitfs_geo_000770),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_BLUE_POLE, bitfs_geo_0006A8),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_SINKING_CAGE_PLATFORM, bitfs_geo_000690),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_ELEVATOR, bitfs_geo_000678),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_STRETCHING_PLATFORMS, bitfs_geo_000708),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_SEESAW_PLATFORM, bitfs_geo_000788),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_MOVING_SQUARE_PLATFORM, bitfs_geo_000728),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_SLIDING_PLATFORM, bitfs_geo_000740),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_TUMBLING_PLATFORM_PART, bitfs_geo_0006D8),
LOAD_MODEL_FROM_GEO(MODEL_BITFS_TUMBLING_PLATFORM, bitfs_geo_0006F0),
RETURN(),
};

View File

@@ -1,42 +0,0 @@
#pragma once
#include "types.h"
extern const GeoLayout bitfs_geo_000678[];
extern const GeoLayout bitfs_geo_000690[];
extern const GeoLayout bitfs_geo_0006A8[];
extern const GeoLayout bitfs_geo_0006C0[];
extern const GeoLayout bitfs_geo_0006D8[];
extern const GeoLayout bitfs_geo_0006F0[];
extern const GeoLayout bitfs_geo_000708[];
extern const GeoLayout bitfs_geo_000728[];
extern const GeoLayout bitfs_geo_000740[];
extern const GeoLayout bitfs_geo_000758[];
extern const GeoLayout bitfs_geo_000770[];
extern const GeoLayout bitfs_geo_000788[];
extern const Gfx bitfs_seg7_dl_0700F508[];
extern const Gfx bitfs_seg7_dl_0700F6A8[];
extern const Gfx bitfs_seg7_dl_0700FB38[];
extern const Gfx bitfs_seg7_dl_0700FD08[];
extern const Gfx bitfs_seg7_dl_0700FF90[];
extern const Gfx bitfs_seg7_dl_07010168[];
extern const Gfx bitfs_seg7_dl_07010340[];
extern const Gfx bitfs_seg7_dl_07011138[];
extern const Gfx bitfs_seg7_dl_07011318[];
extern const Gfx bitfs_seg7_dl_07011568[];
extern const Gfx bitfs_seg7_dl_07011798[];
extern const Gfx bitfs_seg7_dl_07011BA0[];
extern const Gfx bitfs_seg7_dl_07011D98[];
extern const Gfx bitfs_seg7_dl_07011E28[];
extern const Collision bitfs_seg7_collision_elevator[];
extern const Collision bitfs_seg7_collision_sinking_cage_platform[];
extern const Collision bitfs_seg7_collision_inverted_pyramid[];
extern const Collision bitfs_seg7_collision_07015288[];
extern const Collision bitfs_seg7_collision_squishable_platform[];
extern const Collision bitfs_seg7_collision_07015714[];
extern const Collision bitfs_seg7_collision_07015768[];
extern const Collision bitfs_seg7_collision_platform_on_track[];
extern const Collision bitfs_seg7_collision_sinking_platform[];
extern const Collision bitfs_seg7_collision_07015928[];

View File

@@ -1,9 +0,0 @@
// 0x07000000 - 0x07001000
ALIGNED8 static const Texture bitfs_seg7_texture_07000000[] = {
#include "actors/vanilla_actors/bitfs/0.rgba16.inc.c"
};
// 0x07001000 - 0x07001800
ALIGNED8 static const Texture bitfs_seg7_texture_07001000[] = {
#include "actors/vanilla_actors/bitfs/1.rgba16.inc.c"
};

View File

@@ -1,38 +0,0 @@
#include <ultra64.h>
#include "sm64.h"
#include "surface_terrains.h"
#include "moving_texture_macros.h"
#include "surface_terrains.h"
#include "textures.h"
#include "make_const_nonconst.h"
#include "actors/vanilla_actors/bits/texture.inc.c"
#include "actors/vanilla_actors/bits/20/model.inc.c"
#include "actors/vanilla_actors/bits/21/model.inc.c"
#include "actors/vanilla_actors/bits/22/model.inc.c"
#include "actors/vanilla_actors/bits/23/model.inc.c"
#include "actors/vanilla_actors/bits/24/model.inc.c"
#include "actors/vanilla_actors/bits/25/model.inc.c"
#include "actors/vanilla_actors/bits/26/model.inc.c"
#include "actors/vanilla_actors/bits/27/model.inc.c"
#include "actors/vanilla_actors/bits/28/model.inc.c"
#include "actors/vanilla_actors/bits/29/model.inc.c"
#include "actors/vanilla_actors/bits/30/model.inc.c"
#include "actors/vanilla_actors/bits/31/model.inc.c"
#include "actors/vanilla_actors/bits/32/model.inc.c"
#include "actors/vanilla_actors/bits/20/collision.inc.c"
#include "actors/vanilla_actors/bits/21/collision.inc.c"
#include "actors/vanilla_actors/bits/22/collision.inc.c"
#include "actors/vanilla_actors/bits/23/collision.inc.c"
#include "actors/vanilla_actors/bits/24/collision.inc.c"
#include "actors/vanilla_actors/bits/25/collision.inc.c"
#include "actors/vanilla_actors/bits/26/collision.inc.c"
#include "actors/vanilla_actors/bits/27/collision.inc.c"
#include "actors/vanilla_actors/bits/28/collision.inc.c"
#include "actors/vanilla_actors/bits/29/collision.inc.c"
#include "actors/vanilla_actors/bits/30/collision.inc.c"
#include "actors/vanilla_actors/bits/31/collision.inc.c"
#include "actors/vanilla_actors/bits/32/collision.inc.c"

Some files were not shown because too many files have changed in this diff Show More