Compare commits

..

80 Commits

Author SHA1 Message Date
Arceveti
b6a1e5c1cd Make only shells from boxes despawn + cleanup exclamation_box.inc.c (#604)
Fixes #583 and cleans up exclamation_box.inc.c so that it doesn't loop through the entire contents list
2023-03-17 17:42:28 -04:00
Arceveti
6ca3aa3392 Fix rooms and doors (#601)
* Fix rooms and doors

* Update object_helpers.c

* Update object_list_processor.h

* Update object_list_processor.c

* Fix formatting

* Revert a formatting

* Clean up geo_switch_area

* Clean up geo_switch_area (more)

* Move TransitionRoomData struct

* Revert star door collision check optimization

* Move load_object_collision_model and bhv_door_rendering_loop back out of star_door.inc.c

* Combine metal door model IDs

* Revert metal door sound fixes
2023-03-17 17:42:21 -04:00
Arceveti
31cfdd859d Fix end cake screen crash & flickering (#606) 2023-03-17 17:42:14 -04:00
Gregory Heskett
d9c83c4265 Add lightweight configuration settings to BETTER_REVERB (#602)
* Add light configuration settings to BETTER_REVERB

This can reduce runtime demand down to ~75% of the standard demand, at the cost of the configurability of generally more advanced parameters

* Reformat the BETTER_REVERB preset entries to be easier to look at

* :peterVOID:

* haha lol formatting change definitely related to reverb yes this isn't unwarranted at all lmao hehe hoho
2023-03-15 18:03:01 -04:00
thecozies
27278438a6 Invert skip room proc obj (#605)
* Invert functionality of obj room proc to be opt-in

* Fixed comment for enabling profiler
2023-03-15 18:02:43 -04:00
Reonu
2037bb80ad Fix 100 coin stars spawning inside ceilings + being able to spawn multiple 100 coin stars (#541)
* Going below 100 coins and getting 100 coins again will no longer result in multiple 100 coin stars spawning

* 100 coin stars can no longer clip into ceilings

* Renamed set_home_to_mario to spawned_star_set_target_above_mario since it's a more descriptive name of what it does
2023-03-14 23:53:39 -04:00
Gregory Heskett
4b1a111c35 Bugfix: Save & Quit crashes game (#548) 2023-03-14 23:53:27 -04:00
Arceveti
8886235095 Merge master/2.0.8 into 2.1.0 (#551)
* Imminent fixes for bugs found on master branch (#512)

* The vanilla level checks define for Yoshi is inverted, causing him to require 120 stars when it is off and appear at 0 stars when it's on

*  The downwarp fix results in Mario levitating in midair when grabbing Bowser midair. While downwarps should still be fixed, the change should be reverted immediately until a better fix is made.

*  Some checks of Mario's floor class were using the wrong defines, which can lead to unexpected behavior in the event anyone wants to reorder surface types. By default the SURFACE_CLASS_SLIPPERY and SURFACE_SLIPPERY defines have the same value, which is why this mistake is hard to notice.

*  The firsty frames define was implemented poorly, not allowing for vanilla firsty behavior no matter what the values were set to. This has been reverted, while avoiding the UB in the original vanilla code.

*  Removed the ledge grab changes that fix QSLGs and change the false ledgegrab define since Arceveti wanted to in his PR

* Update version to 2.0.4 (#515)

* HackerSM64 2.0.5 (#517)

* Bugfix: race condition with accessing cleared audio memory pools

* Bugfix: skyboxes access tiles out of range when looking straight down (#518)

* Vscode fixes (#516)

* Revert s32 angles and remove Angle typedef usage (#529)

* Fix some surface shadowing (#531)

* Delete rtc.h

* Remove `wait_for_audio_frames()`

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

* Update VERSION.txt (#534)

* HackerSM64 2.0.6 (#539)

* revert random_u16 to be a u16 (#538)

* Added safety gcc math flags (#537)

* removed useless compilation flags that could cause performance loss

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: thecozies <collinpferguson@gmail.com>

* Update VERSION.txt

HackerSM64 2.0.6

* Add GCC opt flag to suppress warnings

* v2.0.7

* 2.0.8 (fix more compiler warnings) (#543)

* fix Waddress in mario_step.c

* fix Winfinite-recursion in unused dynlist_proc function

* in fact remove the offending function entirely

* fix warnings in RNC decompress functions

* update version

* fix version in VERSION.txt

premature on my part, will update it to 2.0.10 next time

Co-authored-by: someone2639 <someone2639@gmail.com>

Co-authored-by: arthurtilly <32559225+arthurtilly@users.noreply.github.com>
Co-authored-by: axollyon <20480418+axollyon@users.noreply.github.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
Co-authored-by: thecozies <collinpferguson@gmail.com>
Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: someone2639 <someone2639@users.noreply.github.com>
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-03-14 23:50:02 -04:00
someone2639
e177423653 rendering_graph_node layer table updated with gcc extensions for legibility (#467)
* rendering_graph_node layer table updated with gcc extensions for legibility

* side effect removed

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-03-14 23:49:00 -04:00
Arceveti
5e49712e0a Remove GRAPH_NODE_TYPE_FUNCTIONAL define & restore functionality using an alternative method. (#557)
Fixes Mirror Mario and similar things.
2023-03-14 23:48:17 -04:00
Fazana
4b237fd244 2.1.0 Puppyprint Changes (#362)
* Puppyprint text size

* Update puppyprint.c

* Revert broken render_multi_image changes

* revert multi image tweak

parallel momento

* Update puppyprint debug colors to work with new hexadecimal system

* Puppyprint color reversion to currEnv + some bugfixes

* Remove a pointless color array

* Add forgotten comment

* i can type yes definitely

* Fix some puppyprint formatting edge cases

* Missed one last puppyprint edge case

* Additional strLen check

* Variable length fix + command ignoring strlen

* type changes

* Update puppyprint.c

* Box clamping

* Revamped profiling, fixed right alignment

* Update puppycam2.c

* Deferred printing

* Update puppyprint.c

* Fixed negatives being stupid

* Puppyprint Memory view rework

* Update level_script.c

* tweaks

* Fix new line spacing with different scales

also small bit of optimisation

* Spacing fixes

* Lightweight text option

* puppyprint debug now using light text where applicable

* Update puppyprint.c

* Update puppyprint.c

* level select menu

* merge profilers into one WIP

* Fully ascii compliant

* Finishing touches hopefully

* Update puppyprint.c

* new font

* vanilla font

* o

* Update hud.c

* last kerning fixes

* Requested changes

* requested changes

* fix the j

* requested changes

* change ur clothes

* Update surface_collision.c

* requested changes

* Update puppyprint.h

* Update camera.c

* .

* Update puppyprint.c

* Update puppyprint.c

* Update puppyprint.c

* fix J

* font

* font system rework

* ia4 outline font

* pain

* fix deferred printing

* fix format change

* Add audio profiling to Puppyprint Debug

* Optimize audio profiling substantially

* Minor audio optimizations

* requested changes

* oops accidentally commited 6 lmfao

* Update game_init.c

* Update puppyprint.c

* Update puppyprint.c

* Improve Puppyprint deferred prints

This is safer, more readable, and more runtime efficient all in the same package

* change return type

* fix building with profiler only

* Update profiling.c

* fix upscaled texture rectangles from multi image

---------

Co-authored-by: gheskett <gheskett@gmail.com>
2023-03-14 23:39:14 -04:00
Fazana
3ae3cee418 I think github are gonna give me badges for all these PR's (#597)
* Update game_init.c

* fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo

* Update segment2.c

* Update model.inc.c
2023-03-14 23:35:46 -04:00
Fazana
9bdb9d0e28 Frustratio funny fix part 3 (#596)
* Update game_init.c

* fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo

* Update segment2.c
2023-03-14 23:35:39 -04:00
Fazana
ec3e5ae01f Frustratio funny fix 2 (#593)
* Update game_init.c

* fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo
2023-03-14 23:35:32 -04:00
Fazana
a27bd2cdf3 Update game_init.c (#592) 2023-03-14 23:35:25 -04:00
someone2639
4f14898a01 Fix builds on Make 4.4 (#588)
* Fix builds on Make 4.4

* oops

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-03-14 23:35:12 -04:00
Gregory Heskett
827d80aab7 Add define for wiping save data if existing save data from vanilla or another hack exists (#579) 2023-03-14 23:35:06 -04:00
Gregory Heskett
49fcfbafc9 Bugfix: Fix reference to missing function (#589) 2023-03-14 23:34:59 -04:00
axollyon
542d0a853e Small improvements to object loading within rooms (#580)
* Small improvements to object loading within rooms
* Only check if Mario is in the same room as the object once
* Implement object render distance within rooms (from thecozies)

* Remove sLevelsWithRooms (also from thecozies)
Honestly surprised this wasn't already in Hacker

* Remove comment for sLevelsWithRooms in config_game

* Make compatible with the painting objects PR
Move room detection to get_room_at_pos (from Arceveti)

* address enum comment
2023-03-14 23:34:51 -04:00
arthurtilly
735dc6b363 Fix huge stack allocation in surface loading functions (#569) 2023-03-14 23:33:58 -04:00
Arceveti
ebac28a62d Update macros.h + allow ALIGN macros to be used anywhere (#574)
* Update macros.h + allow ALIGN macros to be used anywhere

* Fix wrong alignment in synthesis_sh.c

* Revert bitmask in VIRTUAL_TO_PHYSICAL macro
2023-03-14 23:32:56 -04:00
Gregory Heskett
0b63049267 Prevent UB that can happen when using more than 64 total soundbanks (#575) 2023-03-14 23:32:02 -04:00
Gregory Heskett
0e048762d5 Replace debug libultra builds with their ido counterparts (#572)
* Replace debug libultra builds with their ido counterparts

This is necessary because GameCube controllers apparently rely on the IDO build, also the release build is IDO anyway

* Remove fallthrough warnings from usb/debug.c

* remove need for debug libultra with unf and use lib define in ld

Co-authored-by: thecozies <collinpferguson@gmail.com>
2023-03-14 23:32:02 -04:00
Gregory Heskett
44065c2c68 Add support for preset options to be used with BETTER_REVERB (#508)
* Bugfix: BETTER_REVERB starts before buffers are ready

* Add support for preset options to be used with BETTER_REVERB

* Some BETTER_REVERB cleanup

* The funny whoops

* Address suggested level script change

* Bugfix: useReverb crashes when disabled

* Allow window size override for vanilla-esque BETTER_REVERB presets

* Remove unnecessary downsampling limit check

* Fix up a few things + some slight reformatting

* Add light documentation to the BETTER_REVERB parameters

* Adjust BETTER_REVERB preset types to make more sense

* Reset BETTER_REVERB data buffer to be unallocated when not in use

* Properly disable BETTER_REVERB when disabling all reverb processing

* Remove an unnecessary BETTER_REVERB ifdef

* Remove D_80332108

* Revise BETTER_REVERB config description
2023-03-14 23:32:02 -04:00
Gregory Heskett
a7b8d637ce Bugfix: Stack sizes moved to main.h (#573)
Crash screen does not enjoy importing buffers/buffers.h
2023-03-14 23:32:02 -04:00
Fazana
047cd233dd Random epic tweaks (#568)
* various tweaks to tackle redundancy

* Update collision.inc.c

* inline the function

* fix surface denorms

* oops forgot to remove a comment that I just proved false lol

* stack asserts

* Update main.c

* Update main.c

* fix bug plural s

* Update main.c

* comment
2023-03-14 23:32:02 -04:00
Mr-Wiseguy
71f9b98787 Fixed lighting engine 2023-03-14 23:32:02 -04:00
gheskett
6ccfa1982c RCVI Hack
Squashed commit of the following:

commit 20659308252d6d491ca3bf1394effb1fa81b0a52
Author: gheskett <gheskett@gmail.com>
Date:   Sun Jul 24 22:23:36 2022 -0400

    Address requested PR changes for RCVI Hack

commit 1106dac21d1a89868a239eeff651e2e460cd2b5c
Author: gheskett <gheskett@gmail.com>
Date:   Thu Jun 30 01:08:31 2022 -0400

    More BETTER_REVERB typos :peterVOID:

commit 6fc99d6f2bf0ae046868e615124b091261c05d7d
Author: gheskett <gheskett@gmail.com>
Date:   Tue Jun 28 20:02:53 2022 -0400

    Fix potentially confusing comment

commit 939df10f9c0e5995c6a8e0b1e202c9009f9a63b4
Author: gheskett <gheskett@gmail.com>
Date:   Tue Jun 28 19:51:50 2022 -0400

    Revise BETTER_REVERB comments to better reflect RCVI hack's existence

commit da20edb7eaa226160f4a361240ab62a16fb100e6
Author: gheskett <gheskett@gmail.com>
Date:   Tue Jun 28 18:13:08 2022 -0400

    RCVI hack compiler warning

commit f76e5fdeff41b5b4e0db827d18784c40d85592be
Author: Reonu <danileon95@gmail.com>
Date:   Mon Jun 27 19:25:51 2022 +0100

    Changed the value to *20

    hi arthur

commit a3764af59142e2c261ce45588d6a103e29de8faa
Author: Reonu <danileon95@gmail.com>
Date:   Mon Jun 27 19:19:04 2022 +0100

    newline moment

commit 9d8992a87bba423b3d2ad1468d7ce76df0494577
Author: Reonu <danileon95@gmail.com>
Date:   Mon Jun 27 19:09:10 2022 +0100

    Added emu-only RCVI hack
2023-03-14 23:32:02 -04:00
gheskett
6b362ede1f Add support for preset options to be used with BETTER_REVERB
Squashed commit of the following:

commit b35416d47774e5e7d7f314ea4d4de6c1316ce41a
Author: gheskett <gheskett@gmail.com>
Date:   Mon Oct 3 17:46:14 2022 -0400

    Remove unnecessary downsampling limit check

commit 704350ec5b5f24349ec7f24226c1d7bb8936788e
Author: gheskett <gheskett@gmail.com>
Date:   Mon Oct 3 17:43:57 2022 -0400

    Allow window size override for vanilla-esque BETTER_REVERB presets

commit f683ecff1c395a021a013edd4035b0447f935ceb
Author: gheskett <gheskett@gmail.com>
Date:   Mon Oct 3 17:30:07 2022 -0400

    Bugfix: useReverb crashes when disabled

commit b63bd5c0a9a88ab504decf85b1e7d28b96ad10c6
Author: gheskett <gheskett@gmail.com>
Date:   Mon Oct 3 17:15:06 2022 -0400

    Address suggested level script change

commit af29f90b54d04f0007ba46768a26af5423108d86
Author: gheskett <gheskett@gmail.com>
Date:   Sat Oct 1 16:21:39 2022 -0400

    The funny whoops

commit eb4a1c161412c878f19ed6e05d8779016a46881f
Author: gheskett <gheskett@gmail.com>
Date:   Sat Oct 1 16:19:45 2022 -0400

    Some BETTER_REVERB cleanup

commit 6c2be22f2b54b415a70b10d3e82dacb8ff40a229
Author: gheskett <gheskett@gmail.com>
Date:   Sat Oct 1 15:50:05 2022 -0400

    Add support for preset options to be used with BETTER_REVERB

commit ebe0d04506e22e40c40f1b3830337859234d8fc2
Author: gheskett <gheskett@gmail.com>
Date:   Sat Oct 1 12:36:48 2022 -0400

    Bugfix: BETTER_REVERB starts before buffers are ready
2023-03-14 23:32:02 -04:00
gheskett
9dda4c7816 Increase max number of concurrent layers and channels
Squashed commit of the following:

commit bdf49cfec0
Author: gheskett <gheskett@gmail.com>
Date:   Wed Nov 2 21:50:22 2022 -0400

    Increase max number of concurrent layers and channels

    At worst, this eats up a few KB of memory. Runtime difference should be negligible when the extra data is not being used.
2023-03-14 23:32:02 -04:00
gheskett
8bf5423931 Vibrato optimizations
Squashed commit of the following:

commit a5607eb172706b8032d4a2fe6d6000fab4272907
Author: gheskett <gheskett@gmail.com>
Date:   Thu Nov 3 21:56:46 2022 -0400

    Optimize vibrato to even exceed vanilla's implementation, all without restricting usability from the current implementation
2023-03-14 23:32:02 -04:00
gheskett
6de1438162 Updated 2.0.5
Squashed commit of the following:

commit 2f3565f85d
Author: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
Date:   Fri Nov 4 20:50:59 2022 -0400

    Fix some surface shadowing (#531)

commit 8caefbc6ae
Author: Arceveti <73617174+Arceveti@users.noreply.github.com>
Date:   Thu Nov 3 14:19:52 2022 -0700

    Revert s32 angles and remove Angle typedef usage (#529)

    * Revert s32 angles

    * Remove Angle typedef usage

    * Remove angle typedef definitions

commit 716dfc0e4f
Author: thecozies <79979276+thecozies@users.noreply.github.com>
Date:   Thu Nov 3 16:19:21 2022 -0500

    Vscode fixes (#516)

    * Force dry runs to exit to prevent VSCode makefile default issues

    * change x64 in vscode conf to x86 for better ide compatibility

commit ae0116500b
Author: Gregory Heskett <gheskett@gmail.com>
Date:   Tue Nov 1 12:43:46 2022 -0400

    Bugfix: skyboxes access tiles out of range when looking straight down (#518)

commit 3654fbd173
Author: gheskett <gheskett@gmail.com>
Date:   Sat Oct 29 14:49:30 2022 -0400

    Bugfix: race condition with accessing cleared audio memory pools

commit b8e22f2fbd
Author: axollyon <20480418+axollyon@users.noreply.github.com>
Date:   Thu Oct 27 01:17:08 2022 -0400

    Update version to 2.0.4 (#515)

commit 1a71619f47
Author: arthurtilly <32559225+arthurtilly@users.noreply.github.com>
Date:   Wed Oct 26 19:12:29 2022 +1300

    Imminent fixes for bugs found on master branch (#512)

    * The vanilla level checks define for Yoshi is inverted, causing him to require 120 stars when it is off and appear at 0 stars when it's on

    *  The downwarp fix results in Mario levitating in midair when grabbing Bowser midair. While downwarps should still be fixed, the change should be reverted immediately until a better fix is made.

    *  Some checks of Mario's floor class were using the wrong defines, which can lead to unexpected behavior in the event anyone wants to reorder surface types. By default the SURFACE_CLASS_SLIPPERY and SURFACE_SLIPPERY defines have the same value, which is why this mistake is hard to notice.

    *  The firsty frames define was implemented poorly, not allowing for vanilla firsty behavior no matter what the values were set to. This has been reverted, while avoiding the UB in the original vanilla code.

    *  Removed the ledge grab changes that fix QSLGs and change the false ledgegrab define since Arceveti wanted to in his PR

commit 7d6579971a
Author: Gregory Heskett <gheskett@gmail.com>
Date:   Wed Sep 21 10:10:06 2022 -0400

    Remove Wiseguy from codeowners file :( (#490)

    * Remove Wiseguy from codeowners file :(
    * Add ArcticJaguar725 as the primary CODEWOWNER for the moment

commit a549e1a95a
Merge: 62d6ee13 83fea6d3
Author: thecozies <79979276+thecozies@users.noreply.github.com>
Date:   Tue Jul 19 11:44:14 2022 -0500

    Merge pull request #454 from HackerN64/develop/2.0.3

    HackerSM64 2.0.3 Release: Audio Crash

commit 83fea6d310
Author: thecozies <collinpferguson@gmail.com>
Date:   Tue Jul 19 11:35:48 2022 -0500

    v2.0.3

commit 8698cc0f89
Author: gheskett <gheskett@gmail.com>
Date:   Fri Jul 15 00:25:18 2022 -0400

    Bugfix: patch_audio_bank crash (hopefully) resolved for good
2022-11-12 12:30:36 -05:00
gheskett
15d624102a Merge 2.1 again, (hopefully) fix conflicts correctly 2022-11-12 12:10:24 -05:00
axollyon
854da9c9b1 2.1.0 Lighting Engine (#495)
Updated lighting engine to 2.1.0 (latest version as of 9/22/22)
2022-09-22 18:07:21 -04:00
Mr-Wiseguy
d05444e034 Merge branch 'master' into base/lighting-engine 2022-06-17 01:14:04 -04:00
Mr-Wiseguy
f3a97f3510 Removed negatives in geolayout light direction 2022-06-12 23:04:17 -04:00
Mr-Wiseguy
3b5fd86225 Fixed directional lights specified in geo layouts 2022-06-12 23:01:13 -04:00
Mr-Wiseguy
5f23b22e22 Fixed typo in lighting engine documentation 2022-06-08 17:17:32 -04:00
Reonu
17d7d32fd3 Fixed level mesh not updating when building (#414) 2022-06-08 13:19:59 -04:00
Reonu
10ff5ba8dc actually fixed snowman for lighting engine 2022-04-10 12:02:35 +03:00
Reonu
5adfaefd79 Actually fixed bully for lighting engine 2022-04-09 11:28:20 +03:00
Mr-Wiseguy
c6d79a82ed Merge branch 'develop/2.1.0-matrix-stack-change' into base/lighting-engine 2022-04-05 19:51:24 -04:00
Mr-Wiseguy
04ebaf034b Fixed clip planes not scaling based on WORLD_SCALE 2022-04-05 19:50:38 -04:00
Mr-Wiseguy
6ebe9a664e Merge branch 'develop/2.1.0-matrix-stack-change' into base/lighting-engine 2022-04-05 17:07:05 -04:00
Mr-Wiseguy
59b423fd93 Fixed handling of WORLD_SCALE in view matrix so it doesn't get cancelled out 2022-04-05 17:03:58 -04:00
Reonu
d976334d61 fix line jump oopsie 2022-03-29 11:38:33 +03:00
Reonu
6d361a88a4 made snowman lighting engine compatible 2022-03-29 11:35:55 +03:00
Reonu
a256a22e38 made bully lighting engine compatible 2022-03-29 11:35:37 +03:00
Mr-Wiseguy
70ff3079c0 Fixed visual debug with new matstack and cleaned up visual debug code 2022-03-27 03:19:21 -04:00
Mr-Wiseguy
9f99848580 Added fixlights script to build system for fixing custom assets and added option to disable it if needed 2022-03-27 00:10:16 -04:00
Mr-Wiseguy
253aeb8074 Removed set light color from breakable box model that broke lighting on it 2022-03-17 12:46:17 -04:00
Mr-Wiseguy
cc91c06d0a Moved setup_global_light to an earlier point in the frame so that behaviors can set light parameters 2022-03-17 12:43:18 -04:00
Mr-Wiseguy
8d7658c8ba Simplified some code in geo_process_camera 2022-02-17 00:22:08 -05:00
Mr-Wiseguy
57e3b1f31b Merged matrix stack changes 2022-02-17 00:15:08 -05:00
Mr-Wiseguy
d09bb4ef25 Removed unnecessary matrix multiplications in geo_process_object 2022-02-16 23:46:29 -05:00
Mr-Wiseguy
2c5bf00235 Removed some accidentally added files 2022-02-16 23:46:29 -05:00
Arceveti
f4a69f3d4a Remove 'construct_float' from 'geo_process_level_of_detail' 2022-02-15 22:40:27 -08:00
Arceveti
aeaca2a880 Fix geo_process_level_of_detail 2022-02-15 21:45:12 -08:00
Arceveti
647599eb1d Fix goddard crash 2022-02-15 21:45:06 -08:00
Mr-Wiseguy
ce31dd4586 Restored vanilla light and env map directions under new matrix stack 2022-02-15 19:44:29 -05:00
Mr-Wiseguy
58d2d3c20f Fixed some areas where the game was previously extracting the camera matrix from various matrices 2022-02-14 22:18:00 -05:00
Mr-Wiseguy
f90ad6d2a8 Fixed shadows with new matrix stack 2022-02-14 21:21:51 -05:00
Mr-Wiseguy
ec21aa7e74 Fixed billboarding with new matrix stack 2022-02-14 21:17:24 -05:00
Mr-Wiseguy
11b3bff9f0 Corrected cameraToObject for the new matrix stack (fixes culling and sound) 2022-02-14 19:14:03 -05:00
Mr-Wiseguy
cc7165c1ea Moved camera matrix into projection stack 2022-02-14 18:15:37 -05:00
Mr-Wiseguy
9b0b1312fd Wrote function for setting up global light direction in the frame 2022-02-14 17:42:18 -05:00
Mr-Wiseguy
9ed1f1a569 Added define guards for the profiler 2022-02-14 17:41:05 -05:00
Mr-Wiseguy
aa04129fd2 Ran script to convert all light commands to lightcolor commands 2022-02-14 17:01:42 -05:00
Mr-Wiseguy
9c645dc642 Changed lingering manual light struct definitions to gdSPDefLights1, made a dummy light for Koopa's pink shorts 2022-02-14 16:56:51 -05:00
Mr-Wiseguy
a7b208e8e8 Added CPU audio to lightweight profiler 2022-01-17 19:23:48 -05:00
Mr-Wiseguy
52600eb453 Added RSP profiling to the lightweight profiler 2022-01-16 23:31:13 -05:00
Mr-Wiseguy
ee5f5adc9d Implemented new lightweight CPU/RDP profiler 2022-01-16 17:18:11 -05:00
Mr-Wiseguy
d5f62fac42 Fixed gbi.h so that F3DZEX_NoN still defines G_POINT_LIGHTING correctly (#315) 2022-01-15 13:32:05 -05:00
Mr-Wiseguy
56be09724d Merge ucode downgrade into lighting engine (#314)
* Fix level enum conflict with 99+ levels (#307)

* Set oDrawingDistance to 4500 for WF breakable walls (#304)

* Downgraded from F3DZEX2.08J to F3DZEX2.08I so that point lighting works on Jabo (#313)

* Downgraded from F3DZEX2.08J to F3DZEX2.08I so that point lighting works on Jabo

* Swapped to MM's rspboot to fix bug caused by MM's F3DZEX2

Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
2022-01-15 10:50:30 +00:00
Mr-Wiseguy
3146970844 Merge pending 2.0.2 changes into lighting engine branch #310 2022-01-14 22:32:43 -05:00
Reonu
d7251a268e merge with master 2022-01-12 20:53:00 +00:00
Mr-Wiseguy
2b9f736b20 Fixed crash caused by duplicate geo commands and fixed world scale lighting issues 2022-01-01 18:36:52 -05:00
Reonu
d84bc0633b meme 2022-01-01 22:19:59 +00:00
Reonu
2e0c964646 pain 2022-01-01 22:01:48 +00:00
Reonu
865638eb7f pain 2022-01-01 22:00:34 +00:00
279 changed files with 29334 additions and 24141 deletions

6
.gitignore vendored
View File

@@ -38,9 +38,6 @@
# datadump
/tools/ddump/*
# python cache in tools/
/tools/__pycache__/*
# Text editor remnants
*.swp
.vscode/*
@@ -2149,6 +2146,3 @@ lib/libs2d_engine.a
# :Zone_Identifier files
*Zone.Identifier
# user-specific config file
include/config/config_local.h

3
.gitmodules vendored
View File

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

View File

@@ -26,8 +26,7 @@
"VERSION_US=1",
"F3DEX_GBI_2=1",
"F3DZEX_NON_GBI_2=1",
"F3DEX_GBI_SHARED=1",
"LIBPL=1"
"F3DEX_GBI_SHARED=1"
],
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
"cStandard": "gnu17",

View File

@@ -2,7 +2,9 @@
# Each line is a file pattern followed by one or more owners.
# These owners will be the default owners for everything in the repo.
* @Reonu @gheskett @arthurtilly
* @Reonu
* @thecozies
* @gheskett
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners

View File

@@ -1,18 +1,17 @@
FROM ubuntu:22.04 as build
FROM ubuntu:18.04 as build
RUN apt-get update && \
apt-get install -y \
binutils-mips-linux-gnu \
bsdextrautils \
bsdmainutils \
build-essential \
gcc-mips-linux-gnu \
libcapstone-dev \
pkgconf \
python3
RUN mkdir /hackersm64
WORKDIR /hackersm64
ENV PATH="/hackersm64/tools:${PATH}"
RUN mkdir /sm64
WORKDIR /sm64
ENV PATH="/sm64/tools:${PATH}"
CMD echo 'Usage: docker run --rm -v ${PWD}:/hackersm64 hackersm64 make VERSION=us -j4\n' \
'See https://github.com/HackerN64/HackerSM64/blob/master/README.md for more information'
CMD echo 'usage: docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 sm64 make VERSION=us -j4\n' \
'see https://github.com/n64decomp/sm64/blob/master/README.md for advanced usage'

128
Makefile
View File

@@ -124,18 +124,12 @@ endif
TEXT_ENGINE := none
$(eval $(call validate-option,TEXT_ENGINE,none s2dex_text_engine))
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
SRC_DIRS += src/s2d_engine
endif
# add more text engines here
#==============================================================================#
# Optimization flags #
#==============================================================================#
# Default non-gcc opt flags
DEFAULT_OPT_FLAGS = -Ofast -falign-functions=32
DEFAULT_OPT_FLAGS = -Ofast
# 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.
# TODO: Figure out how to allow -fassociative-math to be enabled
@@ -253,23 +247,11 @@ ifeq ($(HVQM),1)
SRC_DIRS += src/hvqm
endif
# LIBPL - whether to include libpl library for interfacing with Parallel Launcher
# (library will be pulled into repo after building with this enabled for the first time)
# 1 - includes code in ROM
# 0 - does not
LIBPL ?= 0
LIBPL_DIR := lib/libpl
$(eval $(call validate-option,LIBPL,0 1))
ifeq ($(LIBPL),1)
DEFINES += LIBPL=1
SRC_DIRS += $(LIBPL_DIR)
endif
BUILD_DIR_BASE := build
# BUILD_DIR is the location where all build artifacts are placed
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
COMPRESS ?= yay0
COMPRESS ?= rnc1
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
ifeq ($(COMPRESS),gzip)
DEFINES += GZIP=1
@@ -317,23 +299,23 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
# Make sure assets exist
NOEXTRACT ?= 0
ifeq ($(NOEXTRACT),0)
DUMMY != $(PYTHON) extract_assets.py us >&2 || echo FAIL
DUMMY != $(PYTHON) extract_assets.py $(VERSION) >&2 || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to extract assets from US ROM)
endif
ifneq (,$(shell python3 tools/detect_baseroms.py jp))
ifneq (,$(wildcard baserom.jp.z64))
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))
ifneq (,$(wildcard baserom.eu.z64))
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))
ifneq (,$(wildcard baserom.sh.z64))
DUMMY != $(PYTHON) extract_assets.py sh >&2 || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to extract assets from SH ROM)
@@ -347,18 +329,6 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
ifeq ($(DUMMY),FAIL)
$(error Failed to build tools)
endif
# Clone any needed submodules
ifeq ($(LIBPL),1)
ifeq ($(wildcard $(LIBPL_DIR)/*.h),)
$(info Cloning libpl submodule...)
DUMMY != git submodule update --init $(LIBPL_DIR) > /dev/null || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to clone libpl submodule)
endif
endif
endif
$(info Building ROM...)
endif
@@ -393,15 +363,11 @@ include Makefile.split
# Source code files
LEVEL_C_FILES := $(wildcard levels/*/leveldata.c) $(wildcard levels/*/script.c) $(wildcard levels/*/geo.c)
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) $(LEVEL_C_FILES)
CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp))
LIBZ_C_FILES := $(foreach dir,$(LIBZ_SRC_DIRS),$(wildcard $(dir)/*.c))
LIBZ_C_FILES := $(foreach dir,$(LIBZ_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))
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
# Ignore all .inc.c files
C_FILES := $(filter-out %.inc.c,$(C_FILES))
# Sound files
SOUND_BANK_FILES := $(wildcard sound/sound_banks/*.json)
SOUND_SAMPLE_DIRS := $(wildcard sound/samples/*)
@@ -418,7 +384,6 @@ SOUND_SEQUENCE_FILES := \
# Object files
O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
$(foreach file,$(CPP_FILES),$(BUILD_DIR)/$(file:.cpp=.o)) \
$(foreach file,$(S_FILES),$(BUILD_DIR)/$(file:.s=.o)) \
$(foreach file,$(GENERATED_C_FILES),$(file:.c=.o)) \
lib/PR/hvqm/hvqm2sp1.o lib/PR/hvqm/hvqm2sp2.o
@@ -436,16 +401,12 @@ DEP_FILES := $(O_FILES:.o=.d) $(LIBZ_O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(B
# detect prefix for 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
@@ -454,6 +415,14 @@ endif
LIBRARIES := nustd hvqm2 z goddard
# Text engine
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
LIBRARIES += s2d_engine
DUMMY != $(MAKE) -C src/s2d_engine COPY_DIR=$(shell pwd)/lib/ CROSS=$(CROSS)
endif
# add more text engines here
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
export LD_LIBRARY_PATH=./tools
@@ -461,12 +430,10 @@ export LD_LIBRARY_PATH=./tools
AS := $(CROSS)as
ifeq ($(COMPILER),gcc)
CC := $(CROSS)gcc
CXX := $(CROSS)g++
$(BUILD_DIR)/actors/%.o: OPT_FLAGS := -Ofast -mlong-calls
$(BUILD_DIR)/levels/%.o: OPT_FLAGS := -Ofast -mlong-calls
else ifeq ($(COMPILER),clang)
CC := clang
CXX := clang++
endif
# Prefer gcc's cpp if installed on the system
ifneq (,$(call find-command,cpp-10))
@@ -483,13 +450,6 @@ AR := $(CROSS)ar
OBJDUMP := $(CROSS)objdump
OBJCOPY := $(CROSS)objcopy
ifeq ($(LD), tools/mips64-elf-ld)
ifeq ($(shell ls -la tools/mips64-elf-ld | awk '{print $1}' | grep x),)
$(warning [ERROR]: A required file in this repository is no longer executable.)
$(error * Please run: 'chmod +x tools/mips64-elf-ld', then run `make` again)
endif
endif
ifeq ($(TARGET_N64),1)
TARGET_CFLAGS := -nostdinc -DTARGET_N64 -D_LANGUAGE_C
CC_CFLAGS := -fno-builtin
@@ -530,6 +490,7 @@ CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
YAY0TOOL := $(TOOLS_DIR)/slienc
MIO0TOOL := $(TOOLS_DIR)/mio0
RNCPACK := $(TOOLS_DIR)/rncpack
ROMALIGN := $(TOOLS_DIR)/romalign
FILESIZER := $(TOOLS_DIR)/filesizer
N64CKSUM := $(TOOLS_DIR)/n64cksum
N64GRAPHICS := $(TOOLS_DIR)/n64graphics
@@ -541,7 +502,6 @@ VADPCM_ENC := $(TOOLS_DIR)/vadpcm_enc
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
SKYCONV := $(TOOLS_DIR)/skyconv
FIXLIGHTS_PY := $(TOOLS_DIR)/fixlights.py
FLIPS := $(TOOLS_DIR)/flips
ifeq ($(GZIPVER),std)
GZIP := gzip
else
@@ -553,13 +513,8 @@ ifneq (,$(call find-command,armips))
else
RSPASM := $(TOOLS_DIR)/armips
endif
ifneq (,$(call find-command,wslview))
EMULATOR = "/mnt/c/Program Files (x86)/parallel-launcher/parallel-launcher.exe"
else
EMULATOR = parallel-launcher
endif
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
EMULATOR = mupen64plus
EMU_FLAGS =
ifneq (,$(call find-command,wslview))
@@ -604,10 +559,7 @@ all: $(ROM)
clean:
$(RM) -r $(BUILD_DIR_BASE)
rebuildtools:
$(MAKE) -C tools distclean
$(MAKE) -C tools
make -C src/s2d_engine clean
distclean: clean
$(PYTHON) extract_assets.py --clean
@@ -635,11 +587,8 @@ unf: $(ROM) $(LOADER)
libultra: $(BUILD_DIR)/libultra.a
patch: $(ROM)
$(FLIPS) --create --bps $(shell python3 tools/detect_baseroms.py $(VERSION)) $(ROM) $(BUILD_DIR)/$(TARGET_STRING).bps
# Extra object file dependencies
$(BUILD_DIR)/asm/ipl3.o: $(IPL3_RAW_FILES)
$(BUILD_DIR)/asm/boot.o: $(IPL3_RAW_FILES)
$(BUILD_DIR)/src/game/crash_screen.o: $(CRASH_TEXTURE_C_FILES)
$(BUILD_DIR)/src/game/version.o: $(BUILD_DIR)/src/game/version_data.h
$(BUILD_DIR)/lib/aspMain.o: $(BUILD_DIR)/rsp/audio.bin
@@ -780,15 +729,23 @@ endif
$(BUILD_DIR)/%.table: %.aiff
$(call print,Extracting codebook:,$<,$@)
$(V)$(AIFF_EXTRACT_CODEBOOK) $< $@
$(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
$(call print,Encoding ADPCM:,$(word 2,$^),$@)
$(V)$(VADPCM_ENC) -c $^ $@
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS)
$(ENDIAN_BITWIDTH): $(TOOLS_DIR)/determine-endian-bitwidth.c
@$(PRINT) "$(GREEN)Generating endian-bitwidth $(NO_COL)\n"
$(V)$(CC) -c $(CFLAGS) -o $@.dummy2 $< 2>$@.dummy1; true
$(V)grep -o 'msgbegin --endian .* --bitwidth .* msgend' $@.dummy1 > $@.dummy2
$(V)head -n1 <$@.dummy2 | cut -d' ' -f2-5 > $@
$(V)$(RM) $@.dummy1
$(V)$(RM) $@.dummy2
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH)
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
$(V)$(PYTHON) $(TOOLS_DIR)/assemble_sound.py $(BUILD_DIR)/sound/samples/ sound/sound_banks/ $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/ctl_header $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/tbl_header $(C_DEFINES)
$(V)$(PYTHON) $(TOOLS_DIR)/assemble_sound.py $(BUILD_DIR)/sound/samples/ sound/sound_banks/ $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/ctl_header $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/tbl_header $(C_DEFINES) $$(cat $(ENDIAN_BITWIDTH))
$(SOUND_BIN_DIR)/sound_data.tbl: $(SOUND_BIN_DIR)/sound_data.ctl
@true
@@ -799,9 +756,9 @@ $(SOUND_BIN_DIR)/ctl_header: $(SOUND_BIN_DIR)/sound_data.ctl
$(SOUND_BIN_DIR)/tbl_header: $(SOUND_BIN_DIR)/sound_data.ctl
@true
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json $(SOUND_SEQUENCE_DIRS) $(SOUND_SEQUENCE_FILES)
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json $(SOUND_SEQUENCE_DIRS) $(SOUND_SEQUENCE_FILES) $(ENDIAN_BITWIDTH)
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
$(V)$(PYTHON) $(TOOLS_DIR)/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/sequences_header $(SOUND_BIN_DIR)/bank_sets sound/sound_banks/ sound/sequences.json $(SOUND_SEQUENCE_FILES) $(C_DEFINES)
$(V)$(PYTHON) $(TOOLS_DIR)/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/sequences_header $(SOUND_BIN_DIR)/bank_sets sound/sound_banks/ sound/sequences.json $(SOUND_SEQUENCE_FILES) $(C_DEFINES) $$(cat $(ENDIAN_BITWIDTH))
$(SOUND_BIN_DIR)/bank_sets: $(SOUND_BIN_DIR)/sequences.bin
@true
@@ -856,7 +813,7 @@ $(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
# Generate version_data.h
$(BUILD_DIR)/src/game/version_data.h: tools/make_version.sh
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
$(V)sh tools/make_version.sh $(CROSS) > $@
$(V)tools/make_version.sh $(CROSS) > $@
#==============================================================================#
# Compilation Recipes #
@@ -865,15 +822,12 @@ $(BUILD_DIR)/src/game/version_data.h: tools/make_version.sh
# Compile C code
ifeq ($(FIXLIGHTS),1)
# This must not be run multiple times at once, so we run it ahead of time rather than in a rule
DUMMY != $(PYTHON) $(FIXLIGHTS_PY) actors
DUMMY != $(PYTHON) $(FIXLIGHTS_PY) levels
DUMMY != $(FIXLIGHTS_PY) actors
DUMMY != $(FIXLIGHTS_PY) levels
endif
$(BUILD_DIR)/%.o: %.c
$(call print,Compiling:,$<,$@)
$(V)$(CC) -c $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
$(BUILD_DIR)/%.o: %.cpp
$(call print,Compiling (C++):,$<,$@)
$(V)$(CXX) -c $(CFLAGS) -std=c++17 -Wno-register -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
$(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
$(call print,Compiling:,$<,$@)
$(V)$(CC) -c $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
@@ -910,7 +864,7 @@ $(BUILD_DIR)/sm64_prelim.ld: sm64.ld $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $
$(BUILD_DIR)/sm64_prelim.elf: $(BUILD_DIR)/sm64_prelim.ld
@$(PRINT) "$(GREEN)Linking Preliminary ELF file: $(BLUE)$@ $(NO_COL)\n"
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $< -Map $(BUILD_DIR)/sm64_prelim.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 undefined_syms.txt -T $< -Map $(BUILD_DIR)/sm64_prelim.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
$(BUILD_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf
$(call print,Getting Goddard size...)
@@ -918,13 +872,13 @@ $(BUILD_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf
$(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
$(call print,Assembling:,$<,$@)
$(V)python3 tools/mapPacker.py $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/bin/addr.bin $(BUILD_DIR)/bin/name.bin
$(V)python3 tools/mapPacker.py $(BUILD_DIR)/sm64_prelim.map $(BUILD_DIR)/bin/addr.bin $(BUILD_DIR)/bin/name.bin
$(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
$(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) undefined_syms.txt $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a
@$(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 undefined_syms.txt -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 -lrtc
# Build ROM
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
@@ -949,7 +903,7 @@ endif
$(BUILD_DIR)/$(TARGET).objdump: $(ELF)
$(OBJDUMP) -D $< > $@
.PHONY: all clean distclean default test load rebuildtools
.PHONY: all clean distclean default test load
# with no prerequisites, .SECONDARY causes no intermediate target to be removed
.SECONDARY:

View File

@@ -1,22 +0,0 @@
**Lighting Engine by Wiseguy**
- Lighting Engine is NOT finished. It's a WIP. Expect issues and expect it to be somewhat hard to use. Point lights in particular are extremely finnicky.
- In order for lighting engine to work, your materials must have Shade Color in the combiner, **but you have to DISABLE Shade Color in sources**. If you leave Shade Color ticked for even a single material, the lighting will break **for the entire mesh**. Until Fast64 gets some sort of Lighting Engine support, it's recommended you create some custom presets to make this less annoying.
- You can intentionally make a material fullbright by leaving Shade Color out of the combiner for that material. Useful for, say, a lamp.
- Use the function `set_directional_light` to set the directional light for the current area. It takes a `Vec3f` for the direction and three `s32` for the RGB values.
- Use the function `set_ambient_light` to set the ambient light for the current area. It takes three `s32` for the RGB values.
- You can use the function `emit_light` to emit a point light via code. It takes a `Vec3f` for the position, three `s32` for the RGB values and three `u32` for each one of the falloff types. The falloff is basically how strong the light is: the HIGHER the falloff is, the DIMMER the light will be. The three types of falloffs can be stacked, and work like this:
- 2 for constant falloff = the point light is half as bright always.
- 2 for linear falloff = the point light is half as bright when you double the distance
- 2 for quadratic falloff = the point is half as bright when you double the square of the distance
- Important note regarding point lights: They are affected by WORLD_SCALE, which is set based on your extended bounds mode. Esentially, at 2x bounds lights will be twice as bright as in 1x bounds, and with 4x bounds they will be twice as bright as that. This can be dealt with simply by using high falloffs, but it can be annoying if you decide to change the extended bounds mode mid-development.
- You can also make an object emit light by using the `OBJ_FLAG_EMIT_LIGHT` object flag, as well as `SET_LIGHT_COLOR` and `SET_LIGHT_FALLOFF` in the script.
Actors ready for use with lighting engine:
- mario (it is a completely CUSTOM mario)
- breakable box
- bully
- goomba
- snowman
- white particle
- white particle small

View File

@@ -21,16 +21,15 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- **Fazana**: PuppyLib, ucode swapping, audio load time optimisations (with Arctic), general hacker qol improvements, visual debug
- **Reonu**: Starting the project/repo, widescreen, reonucam, various defines for hacker QoL
- **JoshDuMan**: Decomp guy, general assistance
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter, 4 controller support
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter
- **axollyon**: Console testing, bugfixes, idea-guying, and had a hand in silhouettes
- **Wiseguy**: World scale reimplementation, silhouette, graph node optimisations, instant input patch, cake screen fix, segmented code support, and various optimizations/fixes
- **Kaze**: Graph node optimisations, automatic optimal collision distance
- **Pyro Jay**: Texture improvements, repo banner art, some QoL stuff
- **CrashOveride**: creating the [ultrasm64](https://github.com/CrashOveride95/ultrasm64) repo
- **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds, emulator detector
- **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds
- **anonymous_moose**: porting falco's extended bounds to decomp
- **tuxlovesyou**: `LOAD_MIO0_TEXTURE` macro and moral support
- **devwizard**: the PJ64 pre-v3.0 detection part of the emulator detector
Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
@@ -93,7 +92,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Many general use defines for object struct members, meant for use in custom object behaviors. Check `include/object_fields.h` for more info on this. (By MrComit)
- Included `actors/group0.c` in `behavior_data.c`
- The internal ROM name is now set with a define in `config/config_rom.h` to make it simpler
- There is a `gEmulator` variable to detect console or specific emulators and emulator versions
- There is a `gIsConsole` variable that is 1 when running on console and 0 when running on emulator. This way you can wrap your code in a console check.
- Expanded audio heap allows for a larger concurrent note count and the importing of more m64 sequences and sound banks (By ArcticJaguar725) *
- 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. *
@@ -116,7 +115,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
**Neat Misc. Changes:**
- Instant Input patch by Wiseguy (Removes all input lag caused by plugins supporting framebuffer)
- This means that you'll have to do your framebuffer effects on buffer 0 for emulator, but NOT for console. You can use the `gEmulator` variable to check for console when doing your framebuffer effects.
- This means that you'll have to do your framebuffer effects on buffer 0 for emulator, but NOT for console. You can use the `gIsConsole` variable to check for console when doing your framebuffer effects.
- Widescreen (16:9) support toggleable by pressing `L` in the pause menu. *
- S2DEX engine by someone2639! To use it, compile with `make TEXT_ENGINE=s2dex_text_engine` or just set `TEXT_ENGINE` to `s2dex_text_engine` in the makefile.
- ia8 (64x64) coins, the vanilla coin texture is upgraded to accomodate. *
@@ -132,7 +131,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Use `render_multi_image` to draw large texture rectangles consisting of multiple images on the screen.
- 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.
- 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.
# UltraSM64
- This repo contains a full decompilation of Super Mario 64 (J), (U), (E), and (SH).
@@ -146,7 +145,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- It has been patched with someone2639's shiftable segments patch
- Wiseguy's instant input patch has been added to allow for less input lag on emulation (Does not affect console)
This does mean that any framebuffer effects will have to be done on buffer 0 if targeting emulators
- Automatic console and emulator detection: Use the `gEmulator` variable to wrap your code in an emulator check.
- Automatic console and emulator detection: Use the `gIsConsole` variable to wrap your code in an emulator check.
- Separate defines for emulator and console black border height.
- Getting HVQM FMV support to work with the game is WIP.

View File

@@ -1 +1 @@
v2.3.0
v2.0.8

View File

@@ -44,6 +44,8 @@ static const Vtx breakable_box_seg8_vertex[] = {
// 0x08012C30 - 0x08012CD8
const Gfx breakable_box_seg8_sub_dl_end[] = {
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x3f3f3fff),
gsSPVertex(breakable_box_seg8_vertex, 26, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),

View File

@@ -294,6 +294,8 @@ static const Vtx bully_seg5_vertex_05003608[] = {
// 0x05003708 - 0x050037A0
const Gfx bully_seg5_dl_05003708[] = {
gsSPLightColor(LIGHT_1, 0xe300ff),
gsSPLightColor(LIGHT_2, 0x3800ff),
gsSPVertex(bully_seg5_vertex_05002C68, 14, 0),
gsDPPipeSync(),
gsDPSetPrimColor(0, 0, 0, 227, 00, 255),
@@ -311,6 +313,8 @@ const Gfx bully_seg5_dl_05003708[] = {
// 0x050037A0 - 0x05003838
const Gfx bully_seg5_dl_050037A0[] = {
gsSPLightColor(LIGHT_1, 0xff00ff),
gsSPLightColor(LIGHT_2, 0x3f00ff),
gsSPVertex(bully_seg5_vertex_05002D88, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 1, 0x0),
gsSP2Triangles( 3, 1, 0, 0x0, 5, 6, 7, 0x0),
@@ -325,6 +329,8 @@ const Gfx bully_seg5_dl_050037A0[] = {
// 0x05003878 - 0x05003C50
const Gfx bully_seg5_dl_05003878[] = {
gsSPLightColor(LIGHT_1, 0xff),
gsSPLightColor(LIGHT_2, 0xff),
gsSPVertex(bully_seg5_vertex_05002F08, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),

View File

@@ -157,6 +157,10 @@ static const Vtx goomba_seg8_vertex_0801B238[] = {
const Gfx goomba_seg8_dl_0801B2E8[] = {
gsDPPipeSync(),
gsDPSetEnvColor(0xFF, 0xFF, 0xFF, 0xFF),
// gsSPLight(&goomba_seg8_lights_0801AD30.l, 1),
// gsSPLight(&goomba_seg8_lights_0801AD30.a, 2),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPVertex(goomba_seg8_vertex_0801AD48, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 5, 4, 0x0, 5, 7, 3, 0x0),
@@ -774,6 +778,10 @@ static const Vtx goomba_seg8_vertex_0801CDF0[] = {
const Gfx goomba_seg8_dl_0801CE20[] = {
gsDPPipeSync(),
gsDPSetEnvColor(0x54, 0x2e, 0x10, 0xFF),
// gsSPLight(&goomba_seg8_lights_080194D0.l, 1),
// gsSPLight(&goomba_seg8_lights_080194D0.a, 2),
gsSPLightColor(LIGHT_1, 0x542e10ff),
gsSPLightColor(LIGHT_2, 0x150b04ff),
gsSPVertex(goomba_seg8_vertex_0801B700, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
@@ -803,6 +811,10 @@ const Gfx goomba_seg8_dl_0801CE20[] = {
const Gfx goomba_seg8_dl_0801CF78[] = {
gsDPPipeSync(),
gsDPSetEnvColor(0x61, 0x34, 0x13, 0xFF),
// gsSPLight(&goomba_seg8_lights_080194E8.l, 1),
// gsSPLight(&goomba_seg8_lights_080194E8.a, 2),
gsSPLightColor(LIGHT_1, 0x613413ff),
gsSPLightColor(LIGHT_2, 0x180d04ff),
gsSPVertex(goomba_seg8_vertex_0801BA50, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 1, 4, 5, 0x0, 1, 5, 2, 0x0),
@@ -832,6 +844,10 @@ const Gfx goomba_seg8_dl_0801CF78[] = {
const Gfx goomba_seg8_dl_0801D0D0[] = {
gsDPPipeSync(),
gsDPSetEnvColor(0x77, 0x42, 0x20, 0xFF),
// gsSPLight(&goomba_seg8_lights_08019500.l, 1),
// gsSPLight(&goomba_seg8_lights_08019500.a, 2),
gsSPLightColor(LIGHT_1, 0x774220ff),
gsSPLightColor(LIGHT_2, 0x1d1008ff),
gsSPVertex(goomba_seg8_vertex_0801BDC0, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
@@ -884,6 +900,10 @@ const Gfx goomba_seg8_dl_0801D0D0[] = {
const Gfx goomba_seg8_dl_0801D360[] = {
gsDPPipeSync(),
gsDPSetEnvColor(0xde, 0xb4, 0x4e, 0xFF),
// gsSPLight(&goomba_seg8_lights_08019518.l, 1),
// gsSPLight(&goomba_seg8_lights_08019518.a, 2),
gsSPLightColor(LIGHT_1, 0xdeb44eff),
gsSPLightColor(LIGHT_2, 0x372d13ff),
gsSPVertex(goomba_seg8_vertex_0801C620, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 1, 0x0, 4, 1, 0, 0x0),

View File

@@ -27,6 +27,7 @@
#include "sparkle_animation/model.inc.c"
#ifdef S2DEX_TEXT_ENGINE
#include "src/s2d_engine/s2d_config.h"
#include "src/s2d_engine/config.h"
#include FONT_C_FILE
#endif
#include "lantern/model.inc.c"

View File

@@ -333,4 +333,6 @@ extern const Gfx white_particle_small_unused_dl[];
#include "mario/geo_header.h"
#include "lantern/geo_header.h"
#endif

View File

@@ -16,3 +16,5 @@
#include "water_splash/geo.inc.c"
#include "sparkle_animation/geo.inc.c"
#include "mario/geo.inc.c"
#include "lantern/geo.inc.c"

13
actors/lantern/geo.inc.c Normal file
View File

@@ -0,0 +1,13 @@
#include "src/game/envfx_snow.h"
const GeoLayout lantern_geo[] = {
GEO_NODE_START(),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, lantern_Lantern_mesh),
GEO_BILLBOARD_WITH_PARAMS_AND_DL(LAYER_TRANSPARENT, 0, 0, 0, lantern_Flame_mesh),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, lantern_Glass_mesh),
GEO_DISPLAY_LIST(LAYER_OPAQUE, lantern_material_revert_render_settings),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, lantern_material_revert_render_settings),
GEO_CLOSE_NODE(),
GEO_END(),
};

View File

@@ -0,0 +1,19 @@
extern const GeoLayout lantern_geo[];
extern Vtx lantern_Lantern_mesh_vtx_0[20];
extern Gfx lantern_Lantern_mesh_tri_0[];
extern Vtx lantern_Lantern_mesh_vtx_1[6];
extern Gfx lantern_Lantern_mesh_tri_1[];
extern Vtx lantern_Lantern_mesh_vtx_2[18];
extern Gfx lantern_Lantern_mesh_tri_2[];
extern Vtx lantern_Lantern_mesh_vtx_3[16];
extern Gfx lantern_Lantern_mesh_tri_3[];
extern Vtx lantern_Flame_mesh_vtx_0[3];
extern Gfx lantern_Flame_mesh_tri_0[];
extern Vtx lantern_Glass_mesh_vtx_0[13];
extern Gfx lantern_Glass_mesh_tri_0[];
extern Gfx lantern_Lantern_mesh[];
extern Gfx lantern_Flame_mesh[];
extern Gfx lantern_Glass_mesh[];
extern Gfx lantern_material_revert_render_settings[];

359
actors/lantern/model.inc.c Normal file
View File

@@ -0,0 +1,359 @@
Gfx lantern_sm64lanternfire_i8_aligner[] = {gsSPEndDisplayList()};
u8 lantern_sm64lanternfire_i8[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0,
0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x2, 0x6, 0x2, 0x4, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x1, 0x4, 0x18, 0xC, 0x8, 0x7, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x8,
0x19, 0x2F, 0x3B, 0xE, 0xB, 0x5, 0x1, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0xC, 0x3, 0x23, 0x43, 0x2E,
0x4D, 0x33, 0x10, 0x15, 0x4, 0x1, 0x0, 0x0, 0x0,
0x0, 0x1, 0x1E, 0x11, 0x31, 0x67, 0x5F, 0x5F, 0x4E,
0x1D, 0x33, 0x18, 0x2, 0x0, 0x0, 0x0, 0x1, 0xD,
0xF, 0x36, 0x50, 0x72, 0x72, 0x64, 0x5B, 0x55, 0x5B,
0x18, 0x5, 0x1, 0x0, 0x0, 0x2, 0x21, 0x2A, 0x5C,
0x7E, 0x7D, 0x8C, 0x7F, 0x65, 0x62, 0x44, 0x3B, 0x18,
0x4, 0x0, 0x0, 0x13, 0x39, 0x38, 0x70, 0x87, 0x8C,
0x9F, 0x9C, 0x85, 0x96, 0x6A, 0x4A, 0x2F, 0x3, 0x0,
0x0, 0x20, 0x44, 0x5C, 0xA4, 0xA4, 0x99, 0xB3, 0xBE,
0xC3, 0x7E, 0xA6, 0x92, 0x3F, 0x4, 0x0, 0x0, 0x3,
0x6E, 0x98, 0xB3, 0xD7, 0xAD, 0xBD, 0xCA, 0xE5, 0xCE,
0xAD, 0x8A, 0x68, 0xA, 0x0, 0x0, 0x1A, 0x7A, 0x9B,
0xE1, 0xE3, 0xDD, 0xE0, 0xED, 0xF5, 0xE7, 0xD1, 0xD2,
0x83, 0x12, 0x0, 0x0, 0xE, 0x73, 0xC0, 0xF4, 0xF2,
0xFD, 0xFA, 0xFB, 0xFB, 0xF1, 0xD5, 0xAE, 0x87, 0x6,
0x0, 0x0, 0x2, 0x31, 0x92, 0xD9, 0xF5, 0xFF, 0xFF,
0xFE, 0xFB, 0xE0, 0xB6, 0xA9, 0x2A, 0x0, 0x0, 0x0,
0x0, 0x0, 0x21, 0x4C, 0x72, 0x99, 0x9F, 0xA1, 0x8B,
0x66, 0x4F, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
};
Vtx lantern_Lantern_mesh_vtx_cull[8] = {
{{{-61, -75, -42},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-61, -75, 26},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-61, 58, 26},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-61, 58, -42},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{61, -75, -42},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{61, -75, 26},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{61, 58, 26},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{61, 58, -42},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
};
Vtx lantern_Lantern_mesh_vtx_0[20] = {
{{{36, -75, 21},0, {-16, 1008},{0x0, 0x71, 0x3A, 0xFF}}},
{{{0, -10, 0},0, {-16, 1008},{0x0, 0x71, 0x3A, 0xFF}}},
{{{-36, -75, 21},0, {-16, 1008},{0x0, 0x71, 0x3A, 0xFF}}},
{{{0, -75, -42},0, {-16, 1008},{0x32, 0x71, 0xE3, 0xFF}}},
{{{0, -10, 0},0, {-16, 1008},{0x32, 0x71, 0xE3, 0xFF}}},
{{{36, -75, 21},0, {-16, 1008},{0x32, 0x71, 0xE3, 0xFF}}},
{{{-36, -75, 21},0, {-16, 1008},{0xCE, 0x71, 0xE3, 0xFF}}},
{{{0, -10, 0},0, {-16, 1008},{0xCE, 0x71, 0xE3, 0xFF}}},
{{{0, -75, -42},0, {-16, 1008},{0xCE, 0x71, 0xE3, 0xFF}}},
{{{-31, -24, 18},0, {-16, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{31, -24, 18},0, {-16, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{0, -24, -36},0, {-16, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{0, -73, 0},0, {832, 832},{0x73, 0x36, 0x0, 0xFF}}},
{{{-40, 11, -12},0, {160, 832},{0x7A, 0xDD, 0x0, 0xFF}}},
{{{-40, 11, 12},0, {160, 832},{0x7A, 0xDD, 0x0, 0xFF}}},
{{{0, 37, 10},0, {160, 160},{0x0, 0x81, 0x0, 0xFF}}},
{{{0, 37, -10},0, {160, 160},{0x0, 0x81, 0x0, 0xFF}}},
{{{40, 11, 12},0, {832, 160},{0x86, 0xDD, 0x0, 0xFF}}},
{{{40, 11, -12},0, {832, 160},{0x86, 0xDD, 0x0, 0xFF}}},
{{{0, -73, 0},0, {832, 832},{0x8D, 0x36, 0x0, 0xFF}}},
};
Gfx lantern_Lantern_mesh_tri_0[] = {
gsSPVertex(lantern_Lantern_mesh_vtx_0 + 0, 20, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 13, 15, 14, 0),
gsSP2Triangles(13, 16, 15, 0, 16, 17, 15, 0),
gsSP2Triangles(16, 18, 17, 0, 18, 19, 17, 0),
gsSPEndDisplayList(),
};Vtx lantern_Lantern_mesh_vtx_1[6] = {
{{{0, -75, -42},0, {-16, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-36, -75, 21},0, {-16, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{36, -75, 21},0, {-16, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-7, -44, 26},0, {-16, 1008},{0x0, 0xBF, 0x93, 0xFF}}},
{{{0, -33, 19},0, {-16, 1008},{0x0, 0xBF, 0x93, 0xFF}}},
{{{7, -44, 26},0, {-16, 1008},{0x0, 0xBF, 0x93, 0xFF}}},
};
Gfx lantern_Lantern_mesh_tri_1[] = {
gsSPVertex(lantern_Lantern_mesh_vtx_1 + 0, 6, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSPEndDisplayList(),
};Vtx lantern_Lantern_mesh_vtx_2[18] = {
{{{0, -73, 0},0, {-16, 1008},{0x0, 0x73, 0xCA, 0xFF}}},
{{{-31, -24, 18},0, {-16, 1008},{0x0, 0x73, 0xCA, 0xFF}}},
{{{31, -24, 18},0, {-16, 1008},{0x0, 0x73, 0xCA, 0xFF}}},
{{{0, -73, 0},0, {-16, 1008},{0x99, 0x2C, 0x3C, 0xFF}}},
{{{31, -24, 18},0, {-16, 1008},{0x99, 0x2C, 0x3C, 0xFF}}},
{{{0, -24, -36},0, {-16, 1008},{0x99, 0x2C, 0x3C, 0xFF}}},
{{{0, -73, 0},0, {-16, 1008},{0x67, 0x2C, 0x3C, 0xFF}}},
{{{0, -24, -36},0, {-16, 1008},{0x67, 0x2C, 0x3C, 0xFF}}},
{{{-31, -24, 18},0, {-16, 1008},{0x67, 0x2C, 0x3C, 0xFF}}},
{{{-7, -44, 26},0, {-16, 1008},{0x0, 0x54, 0xA1, 0xFF}}},
{{{7, -44, 26},0, {-16, 1008},{0x0, 0x54, 0xA1, 0xFF}}},
{{{0, -73, 0},0, {-16, 1008},{0x0, 0x54, 0xA1, 0xFF}}},
{{{7, -44, 26},0, {-16, 1008},{0x98, 0xE0, 0x41, 0xFF}}},
{{{0, -33, 19},0, {-16, 1008},{0x98, 0xE0, 0x41, 0xFF}}},
{{{0, -73, 0},0, {-16, 1008},{0x98, 0xE0, 0x41, 0xFF}}},
{{{0, -33, 19},0, {-16, 1008},{0x68, 0xE0, 0x41, 0xFF}}},
{{{-7, -44, 26},0, {-16, 1008},{0x68, 0xE0, 0x41, 0xFF}}},
{{{0, -73, 0},0, {-16, 1008},{0x68, 0xE0, 0x41, 0xFF}}},
};
Gfx lantern_Lantern_mesh_tri_2[] = {
gsSPVertex(lantern_Lantern_mesh_vtx_2 + 0, 18, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 15, 16, 17, 0),
gsSPEndDisplayList(),
};Vtx lantern_Lantern_mesh_vtx_3[16] = {
{{{0, -73, 0},0, {1008, 1008},{0x3B, 0x2B, 0x68, 0xFF}}},
{{{-40, 11, -12},0, {160, 832},{0x39, 0xF3, 0x71, 0xFF}}},
{{{-61, 11, 0},0, {-16, 1008},{0x39, 0xF7, 0x71, 0xFF}}},
{{{0, 58, 0},0, {-16, -16},{0x0, 0xBD, 0x6C, 0xFF}}},
{{{0, 37, -10},0, {160, 160},{0x0, 0xBD, 0x6C, 0xFF}}},
{{{61, 11, 0},0, {1008, -16},{0xC7, 0xF7, 0x71, 0xFF}}},
{{{40, 11, -12},0, {832, 160},{0xC7, 0xF3, 0x71, 0xFF}}},
{{{0, -73, 0},0, {832, 832},{0xC5, 0x2B, 0x68, 0xFF}}},
{{{0, -73, 0},0, {832, 832},{0x3B, 0x2B, 0x98, 0xFF}}},
{{{-61, 11, 0},0, {-16, 1008},{0x39, 0xF6, 0x8F, 0xFF}}},
{{{-40, 11, 12},0, {160, 832},{0x39, 0xF3, 0x8F, 0xFF}}},
{{{0, 58, 0},0, {-16, -16},{0x0, 0xBD, 0x94, 0xFF}}},
{{{0, 37, 10},0, {160, 160},{0x0, 0xBD, 0x94, 0xFF}}},
{{{61, 11, 0},0, {1008, -16},{0xC7, 0xF6, 0x8F, 0xFF}}},
{{{40, 11, 12},0, {832, 160},{0xC7, 0xF3, 0x8F, 0xFF}}},
{{{0, -73, 0},0, {1008, 1008},{0xC5, 0x2B, 0x98, 0xFF}}},
};
Gfx lantern_Lantern_mesh_tri_3[] = {
gsSPVertex(lantern_Lantern_mesh_vtx_3 + 0, 16, 0),
gsSP2Triangles(0, 1, 2, 0, 1, 3, 2, 0),
gsSP2Triangles(1, 4, 3, 0, 4, 5, 3, 0),
gsSP2Triangles(4, 6, 5, 0, 6, 7, 5, 0),
gsSP2Triangles(8, 9, 10, 0, 10, 9, 11, 0),
gsSP2Triangles(10, 11, 12, 0, 12, 11, 13, 0),
gsSP2Triangles(12, 13, 14, 0, 14, 13, 15, 0),
gsSPEndDisplayList(),
};
Vtx lantern_Flame_mesh_vtx_cull[8] = {
{{{-24, -16, 0},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-24, -16, 0},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-24, 46, 0},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-24, 46, 0},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{24, -16, 0},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{24, -16, 0},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{24, 46, 0},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{24, 46, 0},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
};
Vtx lantern_Flame_mesh_vtx_0[3] = {
{{{-24, -16, 0},0, {-172, 495},{0x0, 0x0, 0x7F, 0xFF}}},
{{{24, -16, 0},0, {639, 495},{0x0, 0x0, 0x7F, 0xFF}}},
{{{0, 46, 0},0, {238, -104},{0x0, 0x0, 0x7F, 0xFF}}},
};
Gfx lantern_Flame_mesh_tri_0[] = {
gsSPVertex(lantern_Flame_mesh_vtx_0 + 0, 3, 0),
gsSP1Triangle(0, 1, 2, 0),
gsSPEndDisplayList(),
};
Vtx lantern_Glass_mesh_vtx_cull[8] = {
{{{-25, -35, -25},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-25, -35, 25},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-25, 44, 25},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{-25, 44, -25},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{25, -35, -25},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{25, -35, 25},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{25, 44, 25},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
{{{25, 44, -25},0, {-16, -16},{0x0, 0x0, 0x0, 0xFF}}},
};
Vtx lantern_Glass_mesh_vtx_0[13] = {
{{{-25, -5, 25},0, {453, 1008},{0x59, 0xC, 0xA7, 0xFF}}},
{{{-25, -5, -25},0, {453, 752},{0x59, 0xC, 0x59, 0xFF}}},
{{{0, 44, 0},0, {624, 752},{0x0, 0x81, 0x0, 0xFF}}},
{{{0, -35, 0},0, {368, 1008},{0x0, 0x7F, 0x0, 0xFF}}},
{{{25, -5, -25},0, {453, 496},{0xA7, 0xC, 0x59, 0xFF}}},
{{{0, 44, 0},0, {624, 496},{0x0, 0x81, 0x0, 0xFF}}},
{{{0, -35, 0},0, {368, 752},{0x0, 0x7F, 0x0, 0xFF}}},
{{{25, -5, 25},0, {453, 240},{0xA7, 0xC, 0xA7, 0xFF}}},
{{{0, 44, 0},0, {624, 240},{0x0, 0x81, 0x0, 0xFF}}},
{{{0, -35, 0},0, {368, 496},{0x0, 0x7F, 0x0, 0xFF}}},
{{{-25, -5, 25},0, {453, -16},{0x59, 0xC, 0xA7, 0xFF}}},
{{{0, 44, 0},0, {624, -16},{0x0, 0x81, 0x0, 0xFF}}},
{{{0, -35, 0},0, {368, 240},{0x0, 0x7F, 0x0, 0xFF}}},
};
Gfx lantern_Glass_mesh_tri_0[] = {
gsSPVertex(lantern_Glass_mesh_vtx_0 + 0, 13, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 1, 0, 0),
gsSP2Triangles(1, 4, 5, 0, 6, 4, 1, 0),
gsSP2Triangles(4, 7, 8, 0, 9, 7, 4, 0),
gsSP2Triangles(7, 10, 11, 0, 12, 10, 7, 0),
gsSPEndDisplayList(),
};
Gfx mat_lantern_base_f3d[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(SHADE, 0, ENVIRONMENT, 0, 0, 0, 0, 1, SHADE, 0, ENVIRONMENT, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetEnvColor(112, 43, 44, 255),
gsSPEndDisplayList(),
};
Gfx mat_lantern_black_f3d[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(SHADE, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT, SHADE, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT),
gsSPSetGeometryMode(G_CULL_FRONT),
gsSPClearGeometryMode(G_CULL_BACK),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetEnvColor(47, 47, 47, 255),
gsSPEndDisplayList(),
};
Gfx mat_revert_lantern_black_f3d[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_CULL_FRONT),
gsSPSetGeometryMode(G_CULL_BACK),
gsSPEndDisplayList(),
};
Gfx mat_lantern_grey_f3d[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(SHADE, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT, SHADE, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT),
gsSPSetGeometryMode(G_CULL_FRONT),
gsSPClearGeometryMode(G_CULL_BACK),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetEnvColor(175, 175, 175, 255),
gsSPEndDisplayList(),
};
Gfx mat_revert_lantern_grey_f3d[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_CULL_FRONT),
gsSPSetGeometryMode(G_CULL_BACK),
gsSPEndDisplayList(),
};
Gfx mat_lantern_base_f3d_reverse[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(SHADE, 0, ENVIRONMENT, 0, 0, 0, 0, 1, SHADE, 0, ENVIRONMENT, 0, 0, 0, 0, 1),
gsSPSetGeometryMode(G_CULL_FRONT),
gsSPClearGeometryMode(G_CULL_BACK),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetEnvColor(112, 43, 44, 255),
gsSPEndDisplayList(),
};
Gfx mat_revert_lantern_base_f3d_reverse[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_CULL_FRONT),
gsSPSetGeometryMode(G_CULL_BACK),
gsSPEndDisplayList(),
};
Gfx mat_lantern_flame_f3d[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0, TEXEL0),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPTileSync(),
gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 16, lantern_sm64lanternfire_i8),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 2, 0, 7, 0, G_TX_CLAMP | G_TX_NOMIRROR, 4, 0, G_TX_CLAMP | G_TX_NOMIRROR, 4, 0),
gsDPLoadSync(),
gsDPLoadTile(7, 0, 0, 60, 60),
gsDPPipeSync(),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 2, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 4, 0, G_TX_CLAMP | G_TX_NOMIRROR, 4, 0),
gsDPSetTileSize(0, 0, 0, 60, 60),
gsDPSetEnvColor(188, 148, 78, 255),
gsSPEndDisplayList(),
};
Gfx mat_lantern_glass_f3d[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsSPSetGeometryMode(G_CULL_FRONT),
gsSPClearGeometryMode(G_CULL_BACK),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetEnvColor(154, 154, 154, 47),
gsSPEndDisplayList(),
};
Gfx mat_revert_lantern_glass_f3d[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_CULL_FRONT),
gsSPSetGeometryMode(G_CULL_BACK),
gsSPEndDisplayList(),
};
Gfx lantern_Lantern_mesh[] = {
gsSPClearGeometryMode(G_LIGHTING),
gsSPVertex(lantern_Lantern_mesh_vtx_cull + 0, 8, 0),
gsSPSetGeometryMode(G_LIGHTING),
gsSPCullDisplayList(0, 7),
gsSPDisplayList(mat_lantern_base_f3d),
gsSPDisplayList(lantern_Lantern_mesh_tri_0),
gsSPDisplayList(mat_lantern_black_f3d),
gsSPDisplayList(lantern_Lantern_mesh_tri_1),
gsSPDisplayList(mat_revert_lantern_black_f3d),
gsSPDisplayList(mat_lantern_grey_f3d),
gsSPDisplayList(lantern_Lantern_mesh_tri_2),
gsSPDisplayList(mat_revert_lantern_grey_f3d),
gsSPDisplayList(mat_lantern_base_f3d_reverse),
gsSPDisplayList(lantern_Lantern_mesh_tri_3),
gsSPDisplayList(mat_revert_lantern_base_f3d_reverse),
gsSPEndDisplayList(),
};
Gfx lantern_Flame_mesh[] = {
gsSPClearGeometryMode(G_LIGHTING),
gsSPVertex(lantern_Flame_mesh_vtx_cull + 0, 8, 0),
gsSPSetGeometryMode(G_LIGHTING),
gsSPCullDisplayList(0, 7),
gsSPDisplayList(mat_lantern_flame_f3d),
gsSPDisplayList(lantern_Flame_mesh_tri_0),
gsSPEndDisplayList(),
};
Gfx lantern_Glass_mesh[] = {
gsSPClearGeometryMode(G_LIGHTING),
gsSPVertex(lantern_Glass_mesh_vtx_cull + 0, 8, 0),
gsSPSetGeometryMode(G_LIGHTING),
gsSPCullDisplayList(0, 7),
gsSPDisplayList(mat_lantern_glass_f3d),
gsSPDisplayList(lantern_Glass_mesh_tri_0),
gsSPDisplayList(mat_revert_lantern_glass_f3d),
gsSPEndDisplayList(),
};
Gfx lantern_material_revert_render_settings[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_LIGHTING),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 0),
gsDPSetEnvColor(255, 255, 255, 255),
gsDPSetAlphaCompare(G_AC_NONE),
gsSPEndDisplayList(),
};

View File

@@ -4991,9 +4991,9 @@ Gfx mario_000_displaylist_005_mesh_tri_0[] = {
Gfx mat_mario_blue[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetPrimColor(0, 0, 0, 0, 254, 255),
gsDPSetEnvColor(0, 0, 254, 255),
gsSPEndDisplayList(),
};
@@ -5023,16 +5023,16 @@ Gfx mat_revert_mario_metal[] = {
Gfx mat_mario_red[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, 1, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetPrimColor(0, 0, 254, 0, 0, 255),
gsDPSetEnvColor(254, 0, 0, 255),
gsSPEndDisplayList(),
};
Gfx mat_mario_body[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, 1, TEXEL0, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPTileSync(),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, mario_mario_button_rgba16),
@@ -5048,7 +5048,7 @@ Gfx mat_mario_body[] = {
Gfx mat_mario_face_0___eye_open[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, 1, TEXEL0, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_mario_face_1_ci8_pal_rgba16),
@@ -5077,16 +5077,16 @@ Gfx mat_revert_mario_face_0___eye_open[] = {
Gfx mat_mario_skin[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetPrimColor(0, 0, 253, 192, 121, 255),
gsDPSetEnvColor(253, 192, 121, 255),
gsSPEndDisplayList(),
};
Gfx mat_mario_mustache[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, 1, TEXEL0, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_mario_mustache_ci4_pal_rgba16),
@@ -5115,16 +5115,16 @@ Gfx mat_revert_mario_mustache[] = {
Gfx mat_mario_hair[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, 1, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetPrimColor(0, 0, 115, 5, 0, 255),
gsDPSetEnvColor(115, 5, 0, 255),
gsSPEndDisplayList(),
};
Gfx mat_mario_sideburns[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, 1, TEXEL0, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPTileSync(),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, mario_mario_sideburn_rgba16),
@@ -5140,7 +5140,7 @@ Gfx mat_mario_sideburns[] = {
Gfx mat_mario_cap[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, 1, TEXEL0, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_mario_logo_rgba16_ci8_pal_rgba16),
@@ -5169,7 +5169,7 @@ Gfx mat_revert_mario_cap[] = {
Gfx mat_mario_face_1___eye_half[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, 1, TEXEL0, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPTileSync(),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, mario_mario_face_2_rgba16),
@@ -5185,7 +5185,7 @@ Gfx mat_mario_face_1___eye_half[] = {
Gfx mat_mario_face_2___eye_closed[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, 1, TEXEL0, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPTileSync(),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, mario_mario_face_3_rgba16),
@@ -5201,7 +5201,7 @@ Gfx mat_mario_face_2___eye_closed[] = {
Gfx mat_mario_face_7___eye_X[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, 1, TEXEL0, 0, SHADE, 0, 0, 0, 0, 1),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPTileSync(),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, mario_mario_face_4_rgba16),
@@ -5263,18 +5263,18 @@ Gfx mat_revert_mario_wing_1[] = {
Gfx mat_mario_gloves[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetPrimColor(0, 0, 254, 254, 254, 255),
gsDPSetEnvColor(254, 254, 254, 255),
gsSPEndDisplayList(),
};
Gfx mat_mario_shoes[] = {
gsDPPipeSync(),
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 1),
gsDPSetPrimColor(0, 0, 114, 27, 14, 255),
gsDPSetEnvColor(114, 27, 14, 255),
gsSPEndDisplayList(),
};
@@ -5519,6 +5519,17 @@ Gfx mario_000_displaylist_001_mesh_mat_override_metal_0[] = {
};
// 0x04000000 # solid color blue - butt, left thigh, right thigh - all poly types
// 0x04000018 # solid color red - left & right arm, torso (tshirt part), caps - all poly types
// 0x04000030 # solid color white - metal butt & left thigh - normal left & right hand closed & open (with cap too) and all wings - all poly types
// 0x04000048 # solid color brown 1 - foot - all poly types
// 0x04000060 # solid color beige skin - face (cap on and off dls) - all poly types
// 0x04000078 # solid color brown 2 - hair - all poly types
Gfx mario_000_displaylist_002_mesh[] = {
gsSPDisplayList(mat_mario_wing_2),
@@ -5835,12 +5846,11 @@ Gfx mario_material_revert_render_settings[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_LIGHTING),
gsSPClearGeometryMode(G_TEXTURE_GEN),
//gsSPClearGeometryMode(G_POINT_LIGHTING),
gsSPNumLights(NUMLIGHTS_1),
//gsSPClearGeometryMode(G_POINT_LIGHTING),
gsSPNumLights(NUMLIGHTS_1),
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 0),
gsDPSetEnvColor(255, 255, 255, 255),
gsDPSetPrimColor(0, 0, 255, 255, 255, 255),
gsDPSetAlphaCompare(G_AC_NONE),
gsSPEndDisplayList(),
};

View File

@@ -271,8 +271,8 @@ const Gfx mario_cap_seg3_dl_03022FF8[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_MODULATERGBFADE, G_CC_MODULATERGBFADE),
gsDPLoadTextureBlock(mario_cap_seg3_texture_0301CF50, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_cap_seg3_texture_0301CF50, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_cap_seg3_dl_03022B30),
@@ -281,7 +281,7 @@ const Gfx mario_cap_seg3_dl_03022FF8[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_OFF),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_OFF),
gsDPSetAlphaCompare(G_AC_NONE),
gsDPSetEnvColor(255, 255, 255, 255),
gsSPEndDisplayList(),
@@ -365,8 +365,14 @@ const Gfx mario_cap_seg3_dl_03023298[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_MODULATERGBFADE, G_CC_MODULATERGBFADE),
gsDPLoadTextureBlock(mario_cap_seg3_texture_0301CF50, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_0301CF50),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 64 * 32 - 1, CALC_DXT(64, G_IM_SIZ_16b_BYTES)),
gsDPPipeSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (64 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_cap_seg3_dl_03022B30),

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