Compare commits

..

350 Commits

Author SHA1 Message Date
Gregory Heskett
cadcdf4d55 Make G_PM_NPRIMITIVE a world default for fast64 exports 2025-11-06 02:36:14 -05:00
Gregory Heskett
6987bd6d1c Fix puppyprint ram size reporting (#910)
Fixes a crash on 3.0 that was introduced by segment reallocations and some hardcoding on Puppyprint's end. Also reworks the ram size reporting to make slightly more sense.
2025-11-06 02:30:32 -05:00
Matt Pharoah
68ea64189a Add support for realtime clock (#889) 2025-06-20 08:05:35 -04:00
bicyclesoda
1e5a6f6d45 make skyboxes easier to define (#869) 2025-02-20 13:31:00 -05:00
Fazana
338591eb1e Small and quick optimisations to vanilla text printing (#864)
* uncringe text a bit

* realised I can just rid of this too lol

* fixing another mistake

* Revert "realised I can just rid of this too lol"

This reverts commit d2c13b7ad4.
2025-02-13 22:24:38 -05:00
someone2639
8ed0d64a2d Fix incorrectly labeled JP vanilla dialog (#865)
* Fix incorrectly labeled JP vanilla dialog

lol

* the other one too

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-02-12 22:38:13 -05:00
Denis Kopyrin
ccb1419adb Split vanillla object from levels allowing pruning vanilla assets on fast64 imports and managing vanilla objects independently of levels (#796)
* Move level script to bank 0x1A

* Decouple vanilla objects in a separate bank

* Rollback group level scripts move, fixed nits

* Move actors_vanilla to actors/vanilla_actors

* Make EU translation segment last, remove vanilla objects segments copypaste

* Added LOAD_VANILLA_OBJECTS segment id stub
2025-01-29 20:58:46 -05:00
Matt Pharoah
8c268ce97f Merge pull request #852 from HackerN64/mpharoah/libpl2
Update to libpl2
2025-01-06 11:28:25 -05:00
Matt Pharoah
c08d70bc19 Update to libpl2 2025-01-04 20:48:41 -05:00
Gregory Heskett
749057b47b Bugfix: missing pipe sync before changing dialog envcolor (#836)
This has been observed to be an issue on console
2024-11-11 01:32:11 -05:00
Gregory Heskett
f40a69ab8c Merge branch 'master' into develop/3.0.0 2024-09-04 23:28:32 -04:00
Reonu
3f1f7f41be Add Arthurtilly to the CODEOWNERS file (#821)
* Add Arthurtilly to the CODEOWNERS file

* Update CODEOWNERS file to list each global owner on the same line

This should (allegedly) fix the issues of only the last entry being treated as an owner for reviews.

* Remove thecozies from CODEOWNERS file :(

---------

Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2024-09-04 23:24:02 -04:00
Denis Kopyrin
bf70500b4d Merge pull request #825 from Lilaa3/fast64-repo-settings
Add Fast64 repo settings file (fast64.json)
2024-09-05 07:51:25 +08:00
Lila
27fedee76f Update fast64.json 2024-09-04 10:38:21 +01:00
Lila
a918785a92 Aglab requested change 2024-08-25 19:26:57 +01:00
Lila
10720ea056 Fall back on fast64 default draw layers 2024-08-24 13:05:36 +01:00
Lila
8dc47095e2 Add repo settings file
Allows fast64 to know a repo's ideal settings as soon as decomp path is picked.
Settings are the default except for:
Matstack is on
Microcode is set to EX2
Force Extended RAM is off because hackersm64 already has it enabled by default
Refresh is set to Refresh 13
2024-08-19 15:44:53 +01:00
Gregory Heskett
797bb63f1a Merge branch 'master' into develop/3.0.0 2024-07-03 23:51:06 -04:00
Gregory Heskett
9ef945296b HackerSM64 Release: v2.3.0
Merge pull request #815 from HackerN64/develop/2.3.0
2024-07-03 23:05:21 -04:00
Gregory Heskett
e1c00d4bef HackerSM64 v2.3.0 2024-07-03 22:50:27 -04:00
Reonu
aacf2c5e6d Add more audio banks and add some occasional mappings for audio macros (#777)
* Add more audio banks and add some occasional mappings for audio macros

* Remove config define for extra sound banks

---------

Co-authored-by: gheskett <gheskett@gmail.com>
2024-07-03 22:50:27 -04:00
Gregory Heskett
4500ffb579 Bugfix: assemble_sound.py build corruption issues (#813) 2024-07-03 22:50:27 -04:00
Gregory Heskett
a6782e6912 Fix seg faulting issue with MinGW build system, most likely caused by use of execl (#812) 2024-07-03 22:50:27 -04:00
Denis Kopyrin
750ba10cb1 Fixed audiofile warnings properly (#814)
* Revert "Fixed audiofile warnings (#811)"

This reverts commit 500507509b.

* Fixed audiofile warnings properly
2024-07-03 22:50:01 -04:00
Denis Kopyrin
500507509b Fixed audiofile warnings (#811) 2024-07-01 21:53:54 -04:00
Gregory Heskett
7381e35db4 Bugfix: Surfaces not able to be placed at the beginning of a partition (#805)
* Bugfix: Surfaces not able to be placed at the beginning of a partition

* Replace clear_spacial_partition calls with a bzero
2024-07-01 21:48:26 -04:00
Gregory Heskett
6a3e7e7a87 Bugfix: Missed purging of debug box flags that no longer exist in Puppycam (#804) 2024-07-01 21:47:38 -04:00
Gregory Heskett
9adb8c6de8 EASIER_LONG_JUMPS: only long jump with A+Z while running (#801)
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2024-07-01 21:47:15 -04:00
Gregory Heskett
03ba81b5e3 Improve DEATH_ON_EXIT_COURSE define (#808) 2024-07-01 21:46:46 -04:00
Gregory Heskett
98b6231216 Pressing L in debug fly mode heals Mario (#809) 2024-07-01 21:46:12 -04:00
Denis Kopyrin
252a900b91 Added support for windows MinGW build (#800) 2024-07-01 21:45:36 -04:00
Denis Kopyrin
92822c6412 fixlights: added support for ripgrep (#802) 2024-07-01 21:44:54 -04:00
1ted59
0221d4ddf0 Fix spawned coins not being collectible until after the peak of their arc (#806)
If a spawned coin lands on the same frame it hits the peak of its arc, it will never have vertical speed < 0, so it will never be collectible.

Making this also set the coin to tangible if it has 0 speed fixes this issue.
2024-06-14 16:16:10 -04:00
Gregory Heskett
dcd58b2aad Restart music upon set_background_music() call if BETTER_REVERB preset changes (#797) 2024-06-01 10:55:58 -04:00
Denis Kopyrin
7ffa9a3bd7 Fixed fixlights.py compile error on python 3.12 (#798)
* Fixed fixlights.py compile error on python 3.12

* Fixed assemble_sound.py compile error on python 3.12
2024-05-22 13:48:24 -04:00
lolbinarycat
dbba4871e1 Add mips64-none-elf- to automatically detected prefixes (#799)
Co-authored-by: binarycat <binarycat@envs.net>
2024-05-18 02:11:10 -04:00
Gregory Heskett
520a6f3aed Bugfix: Blue coin duplication (#787)
Blue coins can be collected more than once if collected on the final frame of the switch timer when BLUE_COIN_SWITCH_RETRY is enabled. Fixing this on its own isn't enough though, as the blue coin switch also doesn't check for whether that coin was collected when it resets.
2024-05-03 01:54:43 -04:00
bicyclesoda
4d260f6885 Use G_TF_POINT on 3D billboard numbers (#791)
This matches the HUD filtering and just looks better IMO.
2024-04-30 23:19:20 -04:00
Gregory Heskett
aedae64e8b Remove destination warp node requirement (#788)
Also add assertions for common warp crashes and remove the hardcoded get_mario_spawn_type table size
2024-04-30 23:10:58 -04:00
bicyclesoda
f3e1496d29 Change test emulator from mupen64plus to parallel-launcher (#790)
* mupen64plus -> parallel-launcher

* Add WSL support

* Update Makefile

make it work
2024-04-29 16:42:13 -07:00
arthurtilly
0005bbbd6a Save up to 130KB of RAM at literally zero cost (#786) 2024-04-21 20:40:47 -04:00
Gregory Heskett
e494069b0a Add support for a user-defined config_local.h file (#785)
This allows hack collaborators to toggle debug features such as TEST_LEVEL without the need of pushing it up and negatively impacting other hack contributors. This is also useful for general HackerSM54 development, since it may be desirable to have PUPPYPRINT_DEBUG enabled by default or to not have to worry about pushing config defines up to a development branch that risk getting merged later on.

To use, simply create a new config_local.h file and place it in the config folder. Add #pragma once to the top of the file and add all the defines you wish! If you wish for something to be undefined when it's enabled by default, simply use #undef as opposed to a commented out #define. Use a combination of #undef and #define if you wish to change an existing value of a define. This local configuration will be completely ignored if DISABLE_ALL is being used in config_debug.h.

Regarding HackerSM64 Development: All feature developers are still responsible for making sure their features work in all scenarios regardless of whatever they have toggled in this file by default. This config file may be convenient but it is not an excuse to not properly test your changes!
2024-04-21 20:38:07 -04:00
arthurtilly
f852ff4359 Platform Displacement 2.1 (#776) 2024-04-22 09:14:12 +12:00
Gregory Heskett
2ae3426957 Change compression type to yay0 and ignore .inc.c files in most directories (#784)
rnc1 has noticeably slower load times in vanilla than yay0 does. gzip and mio0 are pretty useless and can be yeeted from the repo, but that's not part of this PR's scope.
2024-04-21 17:13:47 -04:00
Reonu
ca937d23ee Label unlabelled audio func (func_80321080 to stop_secondary_music) (#782) 2024-04-15 01:59:54 +01:00
Reonu
e32b0ea960 fix fast64 exports due to macro objects removal (#780)
Fast64 exports dummy macro object data even if you don't use macro objects in your level. This change allows HackerSM64 to compile even with Fast64 doing cringe.
2024-04-11 15:29:13 +01:00
arthurtilly
219f4683f7 ASCII/UTF-8 Text and Full Multilang Support (#775)
Co-authored-by: Axollyon <20480418+Axollyon@users.noreply.github.com>
Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: Arceveti <arceveti@gmail.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2024-03-18 21:22:04 +00:00
Matt Pharoah
7353db562c Merge pull request #774 from mpharoah/mpharoah/update-libpl
Update libpl
2024-03-06 17:28:42 -05:00
Matt Pharoah
82e0fdf391 Update libpl 2024-03-06 09:10:09 -05:00
Gregory Heskett
14140887dd Merge pull request #773 from HackerN64/merge-2.2.0-into-3.0.0
Merge 2.2.0 into 3.0.0
2024-03-02 11:07:12 -05:00
Gregory Heskett
d29a552813 Merge branch 'master' into merge-2.2.0-into-3.0.0 2024-03-02 10:43:33 -05:00
Gregory Heskett
3e5d14e650 Merge pull request #772 from HackerN64/develop/2.2.0
Release: HackerSM64 2.2.0
2024-03-02 08:16:09 -05:00
Gregory Heskett
197d8074e3 Vanilla bugfix: obj_init_animation referencing o instead of obj 2024-03-01 17:47:05 -05:00
Gregory Heskett
c5d9f535ee HackerSM64 v2.2.0 2024-03-01 17:03:30 -05:00
Gregory Heskett
8257f77c57 A few various Puppyprint bugfixes (#770) 2024-03-01 17:00:46 -05:00
arthurtilly
78747e9836 Toggle the default status of a few defines to avoid confusing new people (#740)
* define toggles

* disable blue preview
2024-02-29 19:03:43 -05:00
arthurtilly
c96118bcd8 Fix objects using throwmatrix having incorrect rotation when paused (#769)
* throwmatrix fix

* ok fixed it and removed some cringe matching

* happy bitch
2024-02-29 19:03:08 -05:00
Gregory Heskett
4c8233fe6a Fix automatic libpl cloning (#771) 2024-02-27 10:29:47 -05:00
Gregory Heskett
524e35c974 Add -falign-functions=32 to makefile flags (#745)
Seemingly provides minor performance benefit and should more importantly reduce perf lotto substantially (hopefully)
2024-02-22 00:38:19 -05:00
Matt Pharoah
fc5ffa7438 Update libpl (#767)
* Update libpl

* Update libpl again

* would you believe its another libpl update
2024-02-16 12:45:29 -05:00
arthurtilly
d07e6383f6 Fixed bugs relating to objects dying in lava (#766)
• Changed the generic object death function to now also check that an object has landed and is over lava before killing it. Previously it would die instantly if it was above lava which resulted in objects randomly dying above lava

• Also changed the same function to kill a non-buoyant and killable object (e.g. goombas) right when it touches water. Previously it would slowly sink to the bottom and then instantly die upon touching the floor underwater which is strange.

• Changed where lava checks are done so they are done in the same place as other object flag checks. This avoids bugs where e.g. objects die when touching the edge of a platform that is over lava, because the ground flags are updated, then the object's floor is updated to be over the lava, and then the lava move flags are updated causing the object to think it is over lava and touching ground at the same time (making it die)

• Fixed the coin flicker define for regular non-bully coins because apparently it just never worked and no-one noticed? Only the coins that come from bullies worked with this define and I guess people only ever tested coins in lava with bullies. I rewrote the coin behavior to be a little closer to the bully one. I think in the future the two types of moving coins could easily be merged into one object, they don't act visibly different at all.

Tested the PR with a lot of goombas being dropped into lava/water and also this stuff is in Mario Builder so I've been testing it there too. Feel free to test more.
2024-02-09 21:07:31 -05:00
Gregory Heskett
1de4b9144b Fix floating point crash with pitch bend table + various audio optimizations (#746)
* Move audio TTLs to improve dcache

Saves over 100us even when audio is idle

* Improve additional audio runtime by reducing some unnecessary float math

* Pause channel/layer processing on sfx channels when idle

* Fix possible floating point UB/crash with gPitchBendFrequencyScale
2024-02-04 02:29:38 -05:00
YoshiMilkman
88c2cdb0a0 Fix wall sidling with negative speed (#762) 2024-02-02 22:52:10 -05:00
Gregory Heskett
3a5a2f14dd Missed a comma 2024-02-02 22:27:48 -05:00
Gregory Heskett
b9ba17a4d6 Add libpl submodule (#753)
* Add libpl submodule

* Clone libpl submodule automatically while building (if enabled)
2024-02-02 22:08:34 -05:00
Gregory Heskett
4af18b6fc9 Merge pull request #758 from HackerN64/master
Merge HackerSM64 2.1.3 release into 3.0.0
2024-01-31 01:23:26 -05:00
Gregory Heskett
5064fcfb69 Merge pull request #757 from HackerN64/master
Merge HackerSM64 2.1.3 release into 2.2.0
2024-01-31 01:23:18 -05:00
Gregory Heskett
05bbe16e29 HackerSM64 Release: 2.1.3
* Preserve vanilla reverb downsampling behavior whenever BETTER_REVERB isn't in use (#727)

* Disable unrelated buttons controlling S&Q menu and pausing (#728)

* Update Dockerfile to Ubuntu 22.04 as 18.04 is EOL (#731)

* Update Dockerfile to Ubuntu 22.04 as 18.04 is EOL

* Dockerfile: Use modern syntax for mounting

* Add gcc-mips-linux-gnu to dockerfile

* Add DEBUG_ASSERTIONS define and enable it by default (#730)

* Add relevant model ID asserts to level script load commands (#722)

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

* Define changes for transitions, two bug fixes (#739)

* Fixed one or two bugs, cleaned up a few things, put every non vanilla styled change into POLISHED_TRANSITIONS

And renamed set_and_reset_transition_fade_timer

* Undid the renaming of set_and_reset_transition_fade_timer as suggested

* Fix silhouette occlusion layers rendering twice (#748)

* Fix Boo's Accelerating Upwards During Textbox (Vanilla Bug) (#742)

* Add assert for beginning geo layout command (#738)

* geo layout assert

* new idea

* Change assert message, add crash screen newline support, and change debug safeguards

* Fix weird text on Project64 GLideN64 (#715)

* Update version to 2.1.3 (#754)

* Fix rumble Issues (#756)

* Missed important use of thread6 stack define

* Fix build issues with rumble

---------

Co-authored-by: Gregory Heskett <gheskett@gmail.com>
Co-authored-by: Denis Kopyrin <aglab3@gmail.com>
Co-authored-by: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com>
Co-authored-by: someone2639 <someone2639@users.noreply.github.com>
Co-authored-by: someone2639 <someone2639@gmail.com>
Co-authored-by: Lilaa3 <87947656+Lilaa3@users.noreply.github.com>
Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
Co-authored-by: 1ted59 <24933689+1ted59@users.noreply.github.com>
Co-authored-by: arthurtilly <32559225+arthurtilly@users.noreply.github.com>
Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com>
2024-01-27 12:45:43 -05:00
Gregory Heskett
9cf3753d6e Update version to 2.1.3 (#754) 2024-01-27 12:39:03 -05:00
Gregory Heskett
325ee7c5ec Fix rumble Issues (#756)
* Missed important use of thread6 stack define

* Fix build issues with rumble
2024-01-27 12:39:03 -05:00
DNVIC
bf924a8ec3 Added a define for slope fix (#749)
* implemented a form of slope fix

* fixed the slope fix to not allow for hyper cheese

* implemented gheskett's suggestions

* Added space between comment and define

Co-authored-by: Gregory Heskett <gheskett@gmail.com>

---------

Co-authored-by: dnvic <business@dnvic.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2024-01-21 14:11:32 -05:00
iProgramInCpp
c39b289441 * Fix weird text on Project64 GLideN64 (#715)
Included in the PR will be a list of comparisons.

This does two things:
1. Restores the `dl_ia_text_tex_settings` from the original Super Mario 64. Not sure why this was changed.
2. Changes the S coordinate of two vertices from `vertex_ia8_char` from 480 to 512. This is an error from the original game.
2024-01-21 13:42:50 -05:00
arthurtilly
5ba00edf20 Add assert for beginning geo layout command (#738)
* geo layout assert

* new idea

* Change assert message, add crash screen newline support, and change debug safeguards

---------

Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2024-01-21 13:38:00 -05:00
1ted59
15a81037ef Fix Boo's Accelerating Upwards During Textbox (Vanilla Bug) (#742)
If a `Go On A Ghost Hunt` Boo is killed while it has a gravity of -1 (at the bottom of its oscillation), and does not hit a wall, it will keep the same negative gravity and continue moving until the textbox is closed. Boo Y speed isn't capped in this scenario, so the constant -1 gravity leads to the boo moving upwards at an increasing rate.

This leads to issues in `boo_act_4`. The distance eventually increases to a point where the boo object is too far to be returned in `cur_obj_nearest_object_with_behavior`. 

This can have 2 buggy effects:

- the wrong dialog box being brought up if the textbox is delayed (easiest to do by hanging on a ledge).
- the puzzle solved jingle being played incorrectly if you wait in the textbox long enough

This doesn't actually cause issues with King Boo, it just brings up the wrong text box. King Boo spawning is unaffected by this bug.

The fix is to stop the boo after the death animation has finished playing, stopping the boo from accelerating upwards. I don't believe this to cause any other issues (the boo is already dead after all!)

Thanks to Kyman for finding this bug.
2024-01-20 13:07:45 -05:00
Arceveti
b2707990f2 Fix silhouette occlusion layers rendering twice (#748) 2024-01-01 18:44:41 -05:00
Gregory Heskett
1d7a690361 Optimize BETTER_REVERB lightweight by an additional ~20% CPU, while also cutting memory requirements for it by ~30% (#744) 2023-12-30 23:22:05 -05:00
Lilaa3
08f0e3efa4 Define changes for transitions, two bug fixes (#739)
* Fixed one or two bugs, cleaned up a few things, put every non vanilla styled change into POLISHED_TRANSITIONS

And renamed set_and_reset_transition_fade_timer

* Undid the renaming of set_and_reset_transition_fade_timer as suggested
2023-12-29 18:32:19 -05:00
arthurtilly
6148582f5e remove puppylights (#736) 2023-12-16 23:26:31 -05:00
Gregory Heskett
913cda93b8 Audio cleanup checkpoint: Large portion of synthesis.c taken care of + occasional audio optimizations (#710) 2023-12-15 23:57:19 -05:00
someone2639
d7c840b8f1 Cache master displaylist on "hot" code paths (#724)
* add displaylist macros

* implement displaylist macro in memory.c

* API update

* implement displaylist macro on all 'hot' code paths

* Remove the macro entirely

* rename tmpDL

* remove the other two macros

* catch the last 2 missing statements

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-12-15 23:56:40 -05:00
arthurtilly
b73d8dd178 Math util cleanup (#566)
* math util cleanup

* clean up min/max 3 and also distance and angle functions

* improve pipelining and make macros safe

* macros safer and cleaned approaches

* fix build

* made sure puppycam builds (and fixed unused var warnings)

* added 32 bit mins and maxs
2023-12-15 23:44:06 -05:00
arthurtilly
9fc928ed70 Remove OBJECTS_REJ and clean up core render func (By Fazana) (#735)
* crowd pleaser

* Fix debug boxes

* fix comments

* renamed temp graphics head to be consistent

---------

Co-authored-by: Fazana <52551480+FazanaJ@users.noreply.github.com>
2023-12-15 08:48:32 -05:00
someone2639
76dae5e8dd Add file select skip define (#723)
* add config define to skip file select

* implement file select skip

* Add more coverage to the skip file select tweak

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-12-14 23:27:50 -05:00
someone2639
7df16608a7 Add relevant model ID asserts to level script load commands (#722)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-12-14 23:26:43 -05:00
arthurtilly
1646702393 shorten call_native command (#733) 2023-12-14 23:24:35 -05:00
arthurtilly
dcfcf50a80 wall fix (#734) 2023-12-14 23:24:03 -05:00
Gregory Heskett
4f2c48c733 Add DEBUG_ASSERTIONS define and enable it by default (#730) 2023-12-11 01:58:30 -05:00
MisterSheeple
72f8ea130f Update Dockerfile to Ubuntu 22.04 as 18.04 is EOL (#731)
* Update Dockerfile to Ubuntu 22.04 as 18.04 is EOL

* Dockerfile: Use modern syntax for mounting

* Add gcc-mips-linux-gnu to dockerfile
2023-12-10 22:40:34 -05:00
Denis Kopyrin
36c98b6cd1 Disable unrelated buttons controlling S&Q menu and pausing (#728) 2023-12-10 02:28:08 -05:00
arthurtilly
db2a739b8a Remove macro objects and free up bparam3 (#558)
* BoB, WF, JRB, CCM

* HMC and LLL

* SSL

* DDD to RR

* bowser courses

* overworld

* all stages done

* remove macro object code

* fix bparam3 and respawn info

* rename script_func_locals to be unique

* Remove level_misc_macros

* formatting changes :)

* added some enums for respawn info

---------

Co-authored-by: Arceveti <arceveti@gmail.com>
2023-11-28 15:36:33 -05:00
Gregory Heskett
78cc957d31 Preserve vanilla reverb downsampling behavior whenever BETTER_REVERB isn't in use (#727) 2023-10-31 18:23:15 -04:00
thecozies
7de18d10fc Merge pull request #714 from HackerN64/develop/2.1.2
Release: v2.1.2
2023-09-27 16:54:38 -05:00
Gregory Heskett
01c3f20c6f v2.1.2 2023-09-27 11:13:53 -05:00
thecozies
38f25d2b83 rename flips src dir (#711) 2023-09-27 11:55:14 -04:00
someone2639
48bea33052 spawn lakitu at the origin (#712)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-09-27 11:54:00 -04:00
thecozies
b8f770ae48 Release/2.1.1 (#709)
* removed extraneous mat stack index decrement in geo_process_camera (#708)

* Fixed typo in FCR enums (#707)

* v2.1.1

---------

Co-authored-by: Matt Pharoah <mtpharoah@gmail.com>
2023-09-26 14:05:46 -04:00
thecozies
31d46d4479 Merge pull request #692 from HackerN64/develop/2.1.0
Release/2.1.0
2023-09-25 18:40:02 -05:00
thecozies
5d45c1d46f v2.1.0 2023-09-25 18:22:46 -05:00
thecozies
37093031da Cpp support (#705)
* remove unused typedefs

* support for building c++ files
2023-09-25 14:41:51 -05:00
Lilaa3
af3b538ed9 Remove sharp transitions (#702)
* Cannon render mode fix

Slipped past me.

* Removed sharp transitions

I like the idea but it really isn´t vanilla and causes issues.
Might be worth revisiting but for now lets just get rid of it.

* fixes

Missing render mode set for transitions, reduced display list alloc for cannon
tested more this time
2023-09-25 08:26:31 -05:00
Gregory Heskett
e5bcf95703 Fix camera issues with NON_STOP_STARS (#700)
* Fix camera issues with NON_STOP_STARS

* Throw early return into stardance cutscene instead
2023-09-23 16:40:07 -05:00
Lilaa3
c39fb6f333 Small texture type fix for the cannon (#696)
* Small texture type fix for transitions

* Moved texture type define above other declarations
2023-09-23 17:32:21 -04:00
thecozies
ed1465247a Merge pull request #695 from gheskett/remove-puppylights
Remove Puppylights define from config file
2023-09-23 15:26:37 -05:00
thecozies
b6ba2b58ad Merge pull request #698 from HackerN64/perspective_fov_scale
remap scale with fov and avoid copy when world scale is 1
2023-09-23 15:13:41 -05:00
thecozies
b1ef06fcd1 remap scale with fov and avoid copy when world scale is 1 2023-09-23 15:05:30 -05:00
Gregory Heskett
3545b4658c Remove Puppylights define from config file, since it doesn't work anymore 2023-09-23 00:35:48 -04:00
thecozies
00b4475427 Merge pull request #694 from Arceveti/develop/2.1.0-four-controllers-base
Fix controller type checking (GCN false positive)
2023-09-22 17:18:31 -05:00
Arceveti
bf1cd9091f Fix controller type checking (GCN false positive) 2023-09-22 15:12:55 -07:00
thecozies
cd2e639206 Merge pull request #595 from Arceveti/develop/2.1.0-four-controllers-base
4 controllers support + osContCh optimization
2023-09-22 16:56:23 -05:00
Arceveti
4397811b92 Simplify controller type checking + fix controller swapping 2023-09-22 14:47:07 -07:00
Arceveti
c890838b24 Fix controllers on ports other than 0 2023-09-22 14:25:20 -07:00
thecozies
5f8c17ca74 Merge pull request #693 from thecozies/revert_frustratio
added USE_FRUSTRATIO2 define
2023-09-22 14:15:31 -05:00
thecozies
ff953bea63 added USE_FRUSTRATIO2 define 2023-09-22 13:16:34 -05:00
thecozies
f29fe44135 Merge pull request #691 from HackerN64/develop/2.1.0_pull_master
Develop/2.1.0 pull master
2023-09-22 12:41:56 -05:00
thecozies
48fed9878e Merge branch 'master' of github.com:HackerN64/HackerSM64 into develop/2.1.0_pull_master 2023-09-22 12:38:53 -05:00
Matt Pharoah
c9533d18ff Future proof console check (closes #663) (#690) 2023-09-22 13:09:32 -04:00
someone2639
544fcaf038 remove dependency on script exec permissions (#683)
* make fixlights.py and make_version.sh independent of exec perms

* add mips64-elf-ld warning

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-09-22 13:06:39 -04:00
Matt Pharoah
3a312e101c Improved WiiVC check to avoid false positives & added functions to read and manipulate fcr31 (#669)
* Added functions to access and manipulate the fcr31 register

* Improved WiiVC emulator check to avoid false positives

* Updated comments

* Moved float.h to include directory
2023-09-22 13:05:53 -04:00
someone2639
42cbaed631 Track whether the RCP hang timer has started to prevent double setting (#689)
* Track whether the RCP hang timer has started to prevent double setting

* removed single letter struct field

* remove debug lines

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-09-22 08:35:17 -05:00
Gregory Heskett
e61bf8fbc1 Fix STAR_DANCE_USES_STARS_MODEL define (#688) 2023-09-21 14:23:03 -05:00
thecozies
60bb21693b fix tile scrolled light materials (#687) 2023-09-21 14:13:58 -05:00
Gregory Heskett
da3a7e826a Add missing JRB vanilla level check (#685) 2023-09-20 00:29:19 -04:00
Gregory Heskett
a64be21db8 Added config option for previewable blue coins (#507)
* Added config option for previewable blue coins

* Clean up previewable blue coin implementation to only be a couple lines

---------

Co-authored-by: Colin Tong <tongcolin@live.ca>
2023-09-18 18:21:39 -04:00
Lilaa3
44b48ffacd Important Culling Fixes (#666)
* Culling fix

Precison of half fov horizontal being equal to or above 2 leads to many issues. using 1.5 would break rt64 and other emulators with ultra widescreen.
Vertical culling will be disabled by default until 3.0

* Improved emu checks and naming

* Comment changes

* Small typo fix
2023-09-18 09:18:35 -05:00
thecozies
c3f300be9f Wiseguy's fixed raycast traversal (#681)
* wiseguy's fixed raycast traversal

* Use while (TRUE) { for the sake of repo consistency
2023-09-18 08:40:37 -05:00
thecozies
63ddb28641 only set rooms while in a new room (#682) 2023-09-18 09:36:53 -04:00
thecozies
0a7e44de0e restore mips-n64 (#680) 2023-09-18 09:18:03 -04:00
Gregory Heskett
ab0cebab7a Rotate envmaps to be consistent with vanilla (#636)
* Start work on envmap rotation stuff

* n64graphic envmap rotation working

* Add comment to rotation function

* Fix DLs of non 32x32 env maps, fix envmap rotation

* fix metal flying vanish cap

* fix metal mario's medium poly butt

* new asset version for flipped env maps

* added missing env textures to extract script

* restore asset_needs_update

* Skip asset_needs_update calls if local version matches new version

* removed the goddard textures from envmap rotation

---------

Co-authored-by: mineqwerty <mineqwerty25@gmail.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-09-18 09:10:56 -04:00
Gregory Heskett
8a83359ed1 Add functional changes to inertia to support only specific directions specified in the config (#671)
* Add functional changes to inertia to support only specific directions specified in the config (needs cleanup)

* Reduce number of inertia defines

* Update Platform Displacement 2 define description

* comment adjustments
2023-09-18 07:17:31 -05:00
Arceveti
973eec3c93 Merge branch 'develop/2.1.0' of https://github.com/Arceveti/HackerSM64 into develop/2.1.0-four-controllers-base 2023-09-17 19:46:42 -07:00
someone2639
db85886294 Global folder integration for all features that need a baserom (#677)
* Look for shared baserom directory using XDG_DATA_DIR instead of polluting the home directory

* move global baserom folder detection to a new file that the makefile can use

* ignore __pycache__ in tools

* edit make patch to use global baserom detector

* Extract jp/sh/eu from global folder too

* genericize asset extraction for all versions

* force at least US to extract

---------

Co-authored-by: Matt Pharoah <mtpharoah@gmail.com>
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-09-17 21:54:37 -04:00
Gregory Heskett
620b7cdded Fix typo describing BETTER_REVERB parameters (#678) 2023-09-17 14:37:08 -04:00
Matt Pharoah
c21fd01977 Look for shared baserom directory using XDG_DATA_DIR instead of polluting the home directory (#670) 2023-09-17 11:00:18 -04:00
CowQuack
90d313b4e2 fixed fading warps not downwarping (#675) 2023-09-12 14:44:21 -04:00
Arceveti
8f9c1856a7 Add make rebuildtools (#674) 2023-09-11 17:15:22 -04:00
Gregory Heskett
ca4757639e Bugfix: Selecting headset audio and then disabling stereo headset effects define leads to game crash in sound select (#672)
* Bugfix: Selecting headset audio and then disabling stereo headset effects define leads to game crash in sound select

* More involved modifications
2023-09-11 12:06:37 -04:00
Arceveti
8105fde1f5 Updates from main input branch 2023-09-06 13:15:29 -07:00
Arceveti
50b4ebf051 Merge branch 'develop/2.1.0' of https://github.com/HackerN64/HackerSM64 into develop/2.1.0-four-controllers-base 2023-09-05 12:57:54 -07:00
Matt Pharoah
d105eff491 Fixed broken build (#668) 2023-09-01 15:08:24 -04:00
CowQuack
90a9e978cc Fix the stationary action and ledgegrab downwarps when pushed off a ledge, and added a special downwarp for grabbing Bowser (#664)
* fix stationary/ledge downwarp, special bowser case

* Comment clarity

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

---------

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-08-30 21:53:04 -04:00
FConnuli
d13f0cb2fc Create compile_flags.txt (#653)
Added compile_flags.txt for the clangd lsp to work for the project
2023-08-29 18:08:45 -04:00
someone2639
683bb80c72 file purge + extract_assets revamp (#644)
* remove gen_asset_list (frozen)

* move format.sh

* remove rasm2armips (decompilation helper)

* remove patch_libmalloc (IDO exclusive)

* remove unnecessary sha1's and makefile definitions

* remove libultra math script (IDO exclusive)

* remove patch_elf_32bit

* actually remove bitwidth tool

* remove the need for all the sha1 files

* extract_assets can now find a baserom named anything

* added error handling and some more graceful error handling

* formatting the error message

* more relevant error info

* add a check for a roms folder

* fix gitignore to prevent patch_elf from being re-committed

* naming clarity; change to baseroms/; feedback addressed

* skip rom verification if assets have been extracted

* changes addressed

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-08-29 09:06:41 -05:00
Lilaa3
5e9f8c7ee0 Improved transitions (#642)
* Improved transitions

Code quality improvements.
Shape transitions now all scale down to 0 instead of 16 (mario and bowser).
Ease in was added which leads to far smoother transitions.
HD_TRANSITIONS define added, makes use of the tex edge render mode to deliver smooth transition textures.
lerpf was added to math utils.

* Cleaner textures, rounding only during vertex creation

* Another attempt

* cozies naming suggestion

* Improvements and suggestions

SHARP_TRANSITION_TEXTURES is now off by default (I still think the textures for it could be improved).
lerpf, to_smoothstop, smoothstart, smoothstop and smoothstep have all been added.
make_vertex has been inlined.
make_simple_vertex has been added (colourless vertex).
Transition colors (and canon colors) are now defined using primative colour instead of setting individual vertices color´s.
Transition´s now use smoothstep (ease-in-out) instead of ease out only.
Naming has been improved.

* Proper function inling and removal of GBI_FLOATS variant of make_vertex and make_simple_vertex

* More requested changes

* Accidental final new line removal fixed

* Comment about pop in fix.

* Comment fix

The issue with writing comments for stuff is when you want to change code later on.
2023-08-29 08:57:32 -05:00
Gregory Heskett
1e0498ba68 Fix Puppyprint compiler warning (#661)
lol
2023-08-29 09:11:50 -04:00
Fazana
ca0e373a2c remove decompression heap (#660) 2023-08-29 07:55:21 -05:00
Gregory Heskett
1fd8930881 Remove singular version ifdef from sounds.h (#655)
Makes tooling more difficult but also just hard to look at
2023-08-29 07:49:40 -05:00
Matt Pharoah
febcb71ea3 Added emulator detection (#651)
* Added emulator detection

* Fixed missing assignments

* Disable interrupts around the count factor test

* Added more comments to emutest

* Changed PJ64 enum values so the versions work as a bitfield

* Updated README

* Fixed comments

* Updated enum values so you can safely AND and OR all emulator version flags together

* Remove redundant gIsConsole, gIsVC, and gCacheEmulated global variables

* Changed console check to be more future proof against Ares

* Use assembly file instead of casting to a function pointer

* Moved round_double_to_float back to its own compilation unit

* Moved the ParallelN64 check before the Ares check for better future-proofing

* Align pj64_get_count_factor_asm with cache lines... not that it actually matters for pj64

* Adjusted some comments

* Made emulator check thread-safe on emulators that emulate PI timings

* Added gIsConsole macro for backwards compatibility

* Added cen64 to INSTANT_INPUT_BLACKLIST

* Updated comment
2023-08-28 18:03:26 -04:00
Gregory Heskett
0138b8ea53 Revert dialogue scrolling to behave like vanilla (#658) 2023-08-23 17:11:42 -07:00
Fazana
d0e5bf665b Bugfix: Puppyprint question mark (#654) 2023-08-01 12:48:00 -04:00
Lilaa3
7c32cf8b63 Dynamic collision fixes + actual OR_LONG (#648)
* Dynamic collision fixes + actual OR_LONG

Dynamic collision will now check Mario´s vertical distance seperately, this is done to implement a check for when mario is above an object, in which case the collision distance is expanded by 2000 units to avoid shadows not appearing.
Or long works correctly now, replaces the behaviour command NOP_1.

* Micro optimzation

Avoids sqrtf by using the squared lateral distance and squaring the the collision distance for the comparison.

* Requested changes

* minor change

* Re ordering

* How
2023-06-29 17:25:54 -05:00
Gregory Heskett
4dc17a32a2 Slice BETTER_REVERB memory requirements in half (#649)
which also improves performance by almost 10%
2023-06-29 10:09:32 -04:00
Gregory Heskett
37787dffc9 Add SET_ECHO level script command + minor BETTER_REVERB refactoring (#591)
* Add SET_ECHO level script command + minor BETTER_REVERB refactoring

* Add Puppyprint debug page for trying out different BETTER_REVERB presets and configurations

Also fix a missing Puppyprint enum that was causing issues

* Modify Puppyprint BETTER_REVERB page + other minor improvements

* Swap order of RSP commands to allow reverb downsampling to sound more similar to that of without downsampling
2023-06-28 15:15:38 -04:00
someone2639
e2cf2d5119 IPL3 documentation; undefined_syms.txt finally deleted (#545)
* yeet undefined_syms; IPL3 documentation; theoretical addition of checksum skip and initial DMA length/location change

* another comment about how to set dma len

* comment is now correct in ultratypes

* do the rename

* remove insinuations that ipl3 can be modified

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-06-26 12:35:52 -05:00
someone2639
1eba347c07 replace abs with c macro; replace round with asm extern function (#647)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-06-25 23:57:21 -04:00
someone2639
13b8339560 pack including static symbols using 'nm' (#646)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-06-25 23:56:43 -04:00
someone2639
823101164d import new flips + flags (#645)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-06-25 23:12:04 -04:00
Lilaa3
16e55ad952 Culling improvements + GRAPH_RENDER_INVISIBLE check change (#590)
* Culling improvements + earlier GRAPH_RENDER_INVISIBLE check

GRAPH_RENDER_INVISIBLE is now checked during geo_process_object before any uncessesary transformation is applied to
the object, translation is still calculated for sound even if the object is invisible.
Half fov is now computed during geo_process_perspective.
Vertical culling has been added (only when bellow the screen to prevent shadow´s being culled).
Emulators have basically infinite culling aspect ratio to prevent early culling with widescreen viewport hacks.
Default culling radius is now a define.
This was written by both me and Kaze Emanuar, he provided the suggestion to use absf and informed me of
integer division being remarkably slow (although it´s only used once during geo_process_perspective).

* Badly placed new line (major fix)

* integer

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

* parenthesis

doesn´t affect order of operation, just for code quality

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

* uncessary whitespace

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

---------

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-06-23 10:06:24 -05:00
Gregory Heskett
73fad6195d Bugfix: fix profiler freeze (hopefully) (#640) 2023-06-20 20:24:20 -05:00
someone2639
8240262c07 Update S2DEX Text Engine to latest version; fix build issues (#532)
Now its just part of HackerSM64 entirely, and HackerSM64 will be the source of all changes (as long as said changes can reasonably apply to homebrew games)
2023-06-17 16:51:03 -04:00
Reonu
fffebd1065 add death on exit course define (#564)
if the define is enabled, exiting course is the same as dying (warps to failure warp node)
2023-06-16 20:57:33 -04:00
Gregory Heskett
7f08d3d963 Revert floor sorting optimizations (#639)
They cause some weird collision bugs, and are thus not worth keeping until properly investigated.
2023-06-13 12:57:33 -04:00
Fazana
5764ae0ece Puppy Camera for 2.1 (#554) 2023-06-09 11:13:57 -04:00
CowQuack
4c9a91c2be Improved the extended inst names and added missing (#634)
* Improved the extended inst names and added missing

* Added percussion loop and renamed cowbell
2023-06-07 15:56:56 -04:00
Gregory Heskett
8f6fde697f Disable Stereo Headset Effects and stub out all known code references via define (#633)
* Disable stereoheadseteffects and stub out all known code references via define

By effect this also completely removes Headset sound options from the game config, as it serves no purpose whatsoever compared to stereo.
Because it's stubbed out everywhere rather than only the necessary locations to prevent it, this should boost audio runtime slightly for everything, not just the stuff that actively used it.

* Rename DISABLE_HEADSET_STEREO_EFFECTS to ENABLE_HEADSET_STEREO_EFFECTS

* Reorganize and reduce audio Note struct

* Add performance to define description

* Rename ENABLE_HEADSET_STEREO_EFFECTS to ENABLE_STEREO_HEADSET_EFFECTS
2023-06-07 13:58:59 -04:00
CowQuack
0c7f44a51a Merge pull request #629 from HackerN64/develop/2.1.0-red-coin-count-increase
Develop/2.1.0 red coin count increase
2023-06-07 12:42:09 -04:00
CowQuack
91af40e72a Update src/game/behaviors/red_coin.inc.c
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-06-07 12:26:27 -04:00
CowQuack
7cdb0764a5 le comment
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-06-07 12:24:20 -04:00
Fazana
57f7338e6a Change puppyprint log function calls to defines (#632) 2023-06-07 07:58:22 -04:00
Gregory Heskett
42cf450ba8 Increase size/configurability of volume ramping tables (#623)
Vanilla's ramping table sounds absolutely horrendous, most noticeably when it comes to slow volume fade-ins/outs. By default, precision has been increased by 4x vanilla US, which overall has an insignificant impact on performance. This is still half as precise as EU's volume ramping table, that's about the point where additional memory and performance aspects are impacted more significantly.
2023-06-07 06:46:25 -04:00
Gregory Heskett
50b023ef21 Allow envelopes with delay values of 0 on init (#625)
This allows sounds to start instantly without any fade-in. Using new soundbanks with delay values of 0 will not compile with base decomp, but old decomp-compliant soundbanks will work with this commit.
2023-06-07 06:46:12 -04:00
mineqwerty
3fc7b50488 Readme red coin star clarity 2023-06-05 19:33:04 -04:00
mineqwerty
d1c56b60a3 fixed spawning bug with level red coin stars 2023-06-05 18:28:13 -04:00
CowQuack
dde6e7da1a condition that forces level reload on exit course (#630)
* condition that forces level reload on exit course

* Changed exit course to use a specific warp flag
2023-06-05 17:26:28 -05:00
Gregory Heskett
81c0a8ae61 Improve BETTER_REVERB runtime by about 15-20% overall (#619)
Refactored everything to be more memory efficient and execute fewer function calls than prior

Also accidentally discovered a significant bug with the audio modes always being forced to stereo so this is definitely 2.1 scope lmao
2023-06-05 17:09:03 -05:00
Arceveti
580fd45079 Use FillRectangle for shade_screen (#611) 2023-06-05 17:06:37 -05:00
thecozies
351f6f8961 added make_patch and flips (#628) 2023-06-05 17:02:58 -05:00
thecozies
aabad79e46 removed denorm col tri in wdw (#631) 2023-06-05 17:54:03 -04:00
mineqwerty
ea818c2ec0 added support for multi area red coin stars in bp2 2023-06-05 16:37:39 -04:00
mineqwerty
daf53f85aa fixed nitpicks and dialog trigger number 2023-06-05 10:59:44 -04:00
mineqwerty
c4441e8ee6 forgot to cap red coins in the menu 2023-06-04 22:34:16 -04:00
mineqwerty
af53a42b0b pause screen red coins 2023-06-04 22:29:37 -04:00
mineqwerty
0d14f6bb58 revert testing changes 2023-06-04 21:21:45 -04:00
mineqwerty
f80acbbefc testing changes 2023-06-04 21:20:39 -04:00
mineqwerty
62772067d5 added support for up to 99 red coins in an area 2023-06-04 21:19:51 -04:00
Gregory Heskett
e9054a6b6b Bugfix: Enabling silhouettes with OBJECTS_REJ disabled does not compile (#627) 2023-05-12 02:47:25 -04:00
thecozies
34b97c9249 v2.0.9 2023-05-11 09:13:42 -04:00
thecozies
23e01e712b copied new unf usb lib 2023-05-11 09:13:42 -04:00
thecozies
a34c2f4cb0 Aligned gfx buffers to 32 2023-05-11 09:13:42 -04:00
Gregory Heskett
b6d83b3291 Merge pull request #624 from HackerN64/v2.0.9
Release/2.0.9
2023-05-10 19:24:01 -04:00
thecozies
9717d89fb8 v2.0.9 2023-05-09 17:19:16 -04:00
someone2639
38e9b08695 Fix builds on Make 4.4 (#588)
* Fix builds on Make 4.4

* oops

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-05-09 17:19:16 -04:00
Gregory Heskett
f795173176 Start samples at full velocity when using envelopes that start with a delay of 1 (#576)
* Start samples at full velocity when using envelopes that start with a delay of 1

This can help eliminate sample artifacting that happens during a transition between a sudden fade-in into normal volume. It's not completely eliminated due to some processing weirdness, but it's a massive improvement.

* Fix vanilla issue causing misalignment when samples are initialized and played back with low attack values

NOW the artifacting is actually gone for real

* Improve artifacting bugfix

The first solution would've honestly been satisfactory, but this one seems to be slightly more accurate while actually removing code rather than adding it
2023-05-05 18:10:26 -04:00
thecozies
312496d769 copied new unf usb lib 2023-05-05 11:18:42 -05:00
thecozies
d68233a1c0 Aligned gfx buffers to 32 2023-05-05 11:16:57 -05:00
Gregory Heskett
93b5832d8c Bugfix: Klepto holding transparent star doesn't spawn star (#622) 2023-04-20 20:40:25 -05:00
Gregory Heskett
6317475853 Bugfix (Kind of): Fix incorrect comments for the sound IDs defined in sounds.h (#609)
Not ultra important for decomp but otherwise makes binary hacking a massive pain when referencing sounds here
2023-04-19 17:03:49 -04:00
Gregory Heskett
7348ba8976 Clear all references to every object's oFloor each frame when using with dynamic collision (#616) 2023-04-19 17:00:26 -04:00
Arceveti
18d8c51e3d Prevent transition looping fix (#608) 2023-03-21 12:25:19 -04:00
Arceveti
16f1dc41b4 Merge branch 'develop/2.1.0' of https://github.com/Arceveti/HackerSM64 into develop/2.1.0-four-controllers-base 2023-03-17 12:20:28 -04:00
Arceveti
51fb2d9e93 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 12:07:04 -04:00
Arceveti
171f377412 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 12:05:57 -04:00
Arceveti
f7bdca7533 Fix end cake screen crash & flickering (#606) 2023-03-17 12:03:58 -04:00
Gregory Heskett
851ba192f6 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 10:52:05 -04:00
thecozies
c09103d456 Invert skip room proc obj (#605)
* Invert functionality of obj room proc to be opt-in

* Fixed comment for enabling profiler
2023-03-15 10:49:07 -04:00
Fazana
17498e081d 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-12 12:29:08 -04:00
Fazana
f85b0c6946 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-10 10:20:55 -05:00
Fazana
a3eaccedd4 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-10 10:04:01 -05:00
Fazana
ef38abb1c0 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-09 22:39:26 -05:00
Arceveti
97f7e78175 Fix gControllers 2023-03-09 16:06:53 -05:00
Arceveti
397e687a6c Add MAX_NUM_PLAYERS 2023-03-09 16:02:48 -05:00
Arceveti
169e9cff2e Support using 4 controllers at once 2023-03-09 14:29:25 -05:00
Fazana
c76c5824e3 Update game_init.c (#592) 2023-03-08 14:34:43 +00:00
Gregory Heskett
81e1cb38da Bugfix: Fix reference to missing function (#589) 2023-03-07 00:32:19 -05:00
someone2639
8d8812ab1b Fix builds on Make 4.4 (#588)
* Fix builds on Make 4.4

* oops

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-03-06 23:19:15 -05:00
Gregory Heskett
4c67e48456 Add define for wiping save data if existing save data from vanilla or another hack exists (#579) 2023-03-06 20:53:08 -05:00
axollyon
be753ae220 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-06 20:49:39 -05:00
Arceveti
337dac828f 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-01-31 15:50:19 -05:00
Gregory Heskett
1fadb78632 Prevent UB that can happen when using more than 64 total soundbanks (#575) 2023-01-29 14:29:39 -05:00
Gregory Heskett
52a7aedaf4 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-01-26 09:03:07 -06:00
Gregory Heskett
7fdb5af8fd 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-01-24 09:22:49 -05:00
Gregory Heskett
d702f188c6 Bugfix: Stack sizes moved to main.h (#573)
Crash screen does not enjoy importing buffers/buffers.h
2023-01-24 09:19:53 -05:00
Fazana
35dffd9b4e 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-01-24 02:13:49 +00:00
Gregory Heskett
dc71aef024 Vibrato optimizations (#530)
Optimize vibrato to even exceed vanilla's implementation, all without restricting usability from the current implementation. This should save up to about 1ms of audio runtime.
2023-01-20 17:45:53 -05:00
Gregory Heskett
65d29dc337 Increase max number of concurrent layers and channels (#527)
At worst, this eats up a few KB of memory. Runtime difference should be negligible when the extra data is not being used.
2023-01-20 10:31:30 -05:00
Reonu
683ac0b2bf Added (emu-only) RCVI hack. (#425)
* Added emu-only RCVI hack

* newline moment

* Changed the value to *20

hi arthur

* RCVI hack compiler warning

* Revise BETTER_REVERB comments to better reflect RCVI hack's existence

* Fix potentially confusing comment

* More BETTER_REVERB typos :peterVOID:

* Address requested PR changes for RCVI Hack

Co-authored-by: gheskett <gheskett@gmail.com>
2023-01-20 09:36:19 -05:00
arthurtilly
818da65ae6 Fix huge stack allocation in surface loading functions (#569) 2023-01-20 01:06:06 -05:00
Arceveti
7551748a35 Remove GRAPH_NODE_TYPE_FUNCTIONAL define & restore functionality using an alternative method. (#557)
Fixes Mirror Mario and similar things.
2023-01-20 00:59:18 -05:00
someone2639
9bec16d2f0 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>
2022-12-13 15:55:31 -05:00
Arceveti
8043823cce 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>
2022-12-12 14:40:55 -05:00
Arceveti
f04a3ab624 Make JRB mist and DDD objects act-specific. (#393)
* Add JRB_ACT_SPECIFIC_MIST and DDD_ACT_SPECIFIC_OBJECTS

* Disable the act-specific defines by default

* Make act-specific objects/mist non-optional

* Update JRB mist comment

* Act-specific whirlpools + fix act 6 objects

* Initialize gCurrActNum + revert formatting change

* Use -1 for ALL_ACTS

* Revert ALL_ACTS line
2022-12-10 15:25:53 -05:00
Gregory Heskett
d028d6ea7d Bugfix: Save & Quit crashes game (#548) 2022-12-08 10:41:50 -05:00
someone2639
7ef2077353 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>
2022-12-06 21:41:55 +01:00
Reonu
22b3c9ba08 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
2022-12-06 18:44:16 +01:00
Reonu
a15db3c56b 2.0.7 (fix compiler warnings) (#542)
2.0.7
2022-12-05 16:28:01 +01:00
thecozies
e87dfa74d8 v2.0.7 2022-12-05 08:39:28 -06:00
thecozies
e3e1aa02ac Add GCC opt flag to suppress warnings 2022-12-05 08:38:41 -06:00
axollyon
d3d2bb9247 Update VERSION.txt
HackerSM64 2.0.6
2022-12-04 11:50:20 +01:00
Gregory Heskett
dc1a824ce9 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>
2022-12-04 23:05:59 +13:00
Arceveti
1098ea95ea Merge master/2.0.5 into 2.1.0 (#536)
* 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)

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>
2022-11-28 15:06:34 -05:00
axollyon
efd4e3f9dc Update VERSION.txt (#534) 2022-11-24 02:46:09 +01:00
Gregory Heskett
b1146308a7 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>
2022-11-24 09:57:44 +13:00
Reonu
86841a3385 Add super slippery surface type (#422)
* Added super slippery surface·

* fix requested changes

* add comment for forcing mario to belly slide

* hi arthur

* society

* adress nitpick

Co-authored-by: aglab2 <aglab3@gmail.com>
2022-11-08 17:08:45 +01:00
Gregory Heskett
12b91fe73c Disable DISABLE_ALL (#528)
Because literally who is gonna make a hack without ever using any debug features?
2022-11-03 08:54:04 +01:00
Gregory Heskett
a42bd9bc2e Implemented native Gamecube controller support and corresponding emulator hint in ROM header (#505)
* Implemented native Gamecube controller support and corresponding emulator hint in ROM header

* Added X and Y buttons to VALID_BUTTONS in sm64.h

* Added workaround in controller type detection for mupen bug

* read GC controllers from port 2

* L to Z logic for GC controller uses a threshold

* Changed threshold for L trig to around 33%

Changed threshold based on feedback

* Added gGamecubeControllerPort

* fixed wrong check

* Bugfix: Game crashes when less than 2 controllers are connected

* Suppress compiler warnings

* Bugfix: button swapping still takes place on non-GC controllers

* Wrap port 2 stuff in console check

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

* GC console check

* Funny emulator crash moment

* block comment moment

* Added centering for the gamecube controller, support reset command (#511)

* Added centering for the gamecube controller, support reset command

* Use struct 'ControllerCenters' for 'gGamecubeControllerCenters'

* Store gamecube controller centers per controller

* Clamp GC controller stick values to s8

* the

formatting changes

Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: Denis Kopyrin <aglab3@gmail.com>
2022-11-03 08:52:19 +01:00
Reonu
a784c180a8 Wrap boulder room check under vanilla specific level checks (#521) 2022-11-03 00:36:59 +01:00
Gregory Heskett
987f76190f Bugfix: RCP has gone loud because SOMEONE didn't look at their compiler output (#526) 2022-11-03 12:35:04 +13:00
Reonu
088dbbdd2b Make warp surfaces use the force parameter if set (#525) 2022-11-03 00:25:24 +01:00
arthurtilly
ab94fd7f63 Make objects not run their code if the room they are in isn't loaded. (#502) 2022-11-03 11:35:47 +13:00
Gregory Heskett
d7d0364682 Add define to disable pitch shifting of Mario sound effects (#522)
* Add define to disable pitch shifting of Mario sound effects

* Point new voice sequence macros to existing ones

* Remove pitch shifting sequence macros from peach sounds
2022-11-02 17:24:39 -05:00
Reonu
38d3c82860 Merge pull request #469 from someone2639/rcp_hung
add scheduler entry for when RCP locks up (addresses #344)
2022-11-02 20:14:48 +01:00
axollyon
b8e22f2fbd Update version to 2.0.4 (#515) 2022-10-27 01:17:08 -04:00
arthurtilly
1a71619f47 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
2022-10-26 19:12:29 +13:00
Denis Kopyrin
a7a637eb10 Disable cache emulation checks for VC (#509)
* Disable cache emulation checks for VC

* Get rid of unnecessary gIsVC initialization
2022-10-19 20:57:53 -05:00
Gregory Heskett
fc6a6055d9 Bugfix: WF stationary platforms given static collision despite being able to delete themselves (#510)
Resulted in a memory leak and stale object referencing that impacted Mario's positioning
2022-10-19 12:38:58 -04:00
Gregory Heskett
6291c77a18 Convert oBehParams to be unsigned, and fix GLOBAL_STAR_IDS to support more than 128 stars (#503) 2022-10-04 22:56:10 -05:00
Gregory Heskett
68f09d34ea Bugfix: Reset mario's room when switching areas (#504)
Mario's room sometimes is not reset when warping between different areas, generally when warping from one area with rooms to another without them. This can cause things like doors to not render properly.
2022-10-03 18:06:53 -05:00
Chasarr
0dd3ef7f50 Fix CROSS variable on multiple environments (#483)
The name of the compiler that CROSS is set to varies from system to
system. (gcc-mips-linux-gnu on Debian) This was not handled in
s2d_engine and calc_bss.sh
2022-09-30 17:54:07 -05:00
Gregory Heskett
da4b4db7ae Bugfix: Change instant warps to use ints instead of shorts (#500)
Additionally clean up some inconsistencies surrounding instant warps
2022-09-30 17:41:58 -05:00
thecozies
8c56afddba Added ability to automatically pull unfloader and build for unf debug (#462)
`make unf` added: build rom then pull the unfloader binary if needed, then load rom in debug mode
also, `make load` will pull unfloader as well!
2022-09-30 17:40:50 -05:00
Gregory Heskett
3d0be18ed3 Bugfix: Memory leak caused by missing pool pop state (#497) 2022-09-30 09:54:08 +13:00
Reonu
74730e7852 Simplified lives defines (#439)
* Combined ENABLE_LIVES and DEFAULT_NUM_LIVES, and removed SAVE_NUM_LIVES

* removed commented out lines

* numLives no longer modified by default when lives are disabled

This allows for the variable to be repurposed more easily

* Remove SAVE_NUM_LIVES define

* Remove SAVE_NUM_LIVES and DISABLE_LIVES define (Take 2)

* Apply MAX_NUM_LIVES and MAX_NUM_COINS to update_hud_values()

Co-authored-by: gheskett <gheskett@gmail.com>
2022-09-30 09:52:22 +13:00
thecozies
1ef73290d9 Added WORLDSPACE_LIGHTING define (#461)
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2022-09-30 09:50:49 +13:00
Arceveti
ebf19af70e Clean up a bit of code in file_select.c, fixing copy menu buttons not properly getting deleted when switching pages. 2022-09-28 21:49:25 -04:00
Gregory Heskett
8864e5f3a2 Revert "Implemented native Gamecube controller support and corresponding emulator hint in ROM header (#408)" (#494)
This reverts commit 4dfb8d9a64.
2022-09-22 07:30:02 -04:00
Mr-Wiseguy
4dfb8d9a64 Implemented native Gamecube controller support and corresponding emulator hint in ROM header (#408)
* Implemented native Gamecube controller support and corresponding emulator hint in ROM header

* Added X and Y buttons to VALID_BUTTONS in sm64.h

* Added workaround in controller type detection for mupen bug

* read GC controllers from port 2

* L to Z logic for GC controller uses a threshold

* Changed threshold for L trig to around 33%

Changed threshold based on feedback

* Added gGamecubeControllerPort

* fixed wrong check

Co-authored-by: Reonu <danileon95@gmail.com>
2022-09-21 21:30:36 -05:00
someone2639
6dbe379990 remove warnings from rnc1/2 files (#468)
Co-authored-by: someone2639 <someone2639@gmail.com>
2022-09-21 20:42:38 -05:00
thecozies
de34eb3b84 Remove redundant s2d directory and delete unused files/defines (#457) 2022-09-21 20:18:37 -05:00
someone2639
2e701ad9e7 add error macro that will always fire (#492)
* add error macro that will always fire

* add an aggress macro

like an assert macro but more aggressive and independent of DEBUG being defined (gives us 3 crash reporting options)

Co-authored-by: someone2639 <someone2639@gmail.com>
2022-09-21 20:03:24 -05:00
someone2639
4ae3a431bc Use the error macro for rcp hang 2022-09-21 20:36:39 -04:00
thecozies
c09f178df0 reverted geo bone (#474) 2022-09-21 19:14:12 -05:00
Tubular Bells
d5019ffd78 Clean up remaining DISABLE_LEVEL_CHECKS ifndefs (#479) 2022-09-21 19:13:19 -05:00
Arceveti
058399308a Fix inverted null check in obj_get_model_id (#484) 2022-09-21 19:10:41 -05:00
Gregory Heskett
c0e00beaf7 Sound effect tables now support up to 255 sounds instead of 128 (#465) 2022-09-21 18:51:31 -05:00
Tubular Bells
1af9f2b94a Restores dither effect on teleport (#476) 2022-09-21 18:49:23 -05:00
Tubular Bells
ac45e70e5c Restored exit course sound effect functionality independent of vanilla level check. (#475)
May be worth revisiting in the future to address the fact the exit course warp node will always trigger this sound effect, even when shared with other warps. Would potentially also be nice to add an option for using this sound effect with 0xF3 floor warps.
2022-09-21 18:29:00 -05:00
Gregory Heskett
aa5df070c0 Add define for using JP red coin sound (#489) 2022-09-21 11:58:25 -04:00
thecozies
af0982e8d5 Merge pull request #491 from HackerN64/master
Remove Wiseguy from codeowners file :( (#490)
2022-09-21 10:56:46 -05:00
Gregory Heskett
7d6579971a Remove Wiseguy from codeowners file :( (#490)
* Remove Wiseguy from codeowners file :(
* Add ArcticJaguar725 as the primary CODEWOWNER for the moment
2022-09-21 09:10:06 -05:00
Reonu
b225c91d58 fix level mesh not updating (#477) 2022-08-09 11:08:49 -05:00
Tubular Bells
f65eb9a003 Reformat config comments (#470) 2022-08-03 15:05:03 -05:00
someone2639
93fd414035 add scheduler entry for when RCP locks up 2022-07-26 20:56:17 -04:00
Gregory Heskett
98958df324 Line endings for all text files now forced to \n instead of \r\n (#464) 2022-07-23 15:56:18 -05:00
Reonu
77f4bec4bc Delete config_interaction.h (#440) 2022-07-22 09:20:29 -05:00
Reonu
27ff45daaf Replace unused 0C bank with aglab's / scut's extended 0C bank (#412) 2022-07-22 09:00:03 -05:00
Arceveti
3149239b9a Clean up gotos from find_wall_collisions_from_list (#288) 2022-07-22 08:58:17 -05:00
thecozies
a3e831d160 Merge pull request #456 from HackerN64/master
Merge master into 2.1.0
2022-07-19 12:22:10 -05:00
thecozies
a549e1a95a Merge pull request #454 from HackerN64/develop/2.0.3
HackerSM64 2.0.3 Release: Audio Crash
2022-07-19 11:44:14 -05:00
thecozies
83fea6d310 v2.0.3 2022-07-19 11:35:48 -05:00
Reonu
5b7b0ab8d6 moved CASTLE_MUSIC_FIX into level specific checks (#437) 2022-07-19 08:34:00 -05:00
Reonu
5a9b5a9751 Mat Stack Fix
* Implemented new lightweight CPU/RDP profiler
* Added RSP profiling to the lightweight profiler
* Added CPU audio to lightweight profiler
* Changed lingering manual light struct definitions to gdSPDefLights1, made a dummy light for Koopa's pink shorts
* Ran script to convert all light commands to lightcolor commands
* Added define guards for the profiler
* Wrote function for setting up global light direction in the frame
* Moved camera matrix into projection stack
* Corrected cameraToObject for the new matrix stack (fixes culling and sound)
* Fixed billboarding with new matrix stack
* Fixed shadows with new matrix stack
* Fixed some areas where the game was previously extracting the camera matrix from various matrices
* Restored vanilla light and env map directions under new matrix stack
* Fix goddard crash
* Fix geo_process_level_of_detail
* Remove 'construct_float' from 'geo_process_level_of_detail'
* Removed some accidentally added files
* Removed unnecessary matrix multiplications in geo_process_object
* Added fixlights script to build system for fixing custom assets and added option to disable it if needed
* Fixed visual debug with new matstack and cleaned up visual debug code
* Fixed handling of WORLD_SCALE in view matrix so it doesn't get cancelled out
* Fixed clip planes not scaling based on WORLD_SCALE

Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
Co-authored-by: Arceveti <arceveti@gmail.com>
Co-authored-by: thecozies <collinpferguson@gmail.com>
2022-07-19 08:04:54 -05:00
arthurtilly
1820b146c0 Fixed memory leak between areas from automatic surface pool size (#452)
* fixed mem leak

* Add comment to second pop
2022-07-19 06:24:16 -05:00
thecozies
f4b13d474a Merge pull request #431 from gheskett/gcc10-compiler-warning
Suppress a gcc10 compiler warning for uninitialized variable
2022-07-19 06:19:25 -05:00
Fazana
f6bb8b5aab Clear only used dynamic cells (#451)
Clear only used dynamic cells
2022-07-18 21:22:22 -05:00
gheskett
8698cc0f89 Bugfix: patch_audio_bank crash (hopefully) resolved for good 2022-07-15 00:25:18 -04:00
Denis Kopyrin
0eb42f2f18 Fixed function addresses being incorrect in crash screen stacktrace (#333) 2022-07-05 22:54:07 -04:00
arthurtilly
b864e0d6da Adjust the static surface pool's size automatically per level and add static object collision (#444) 2022-07-05 22:27:23 -04:00
Reonu
c55153242d Merge pull request #429 from HackerN64/develop/merge-2.0.1-into-2.1.0
Merge 2.0.2 (master) into develop/2.1.0
2022-07-01 15:47:19 +01:00
gheskett
6f6c055f1c Suppress a gcc10 compiler warning for uninitialized variable 2022-06-29 00:17:04 -04:00
Arceveti
e6d68e6d76 Merge branch 'master' of https://github.com/Reonu/HackerSM64 into develop/merge-master-2.0.1-into-2.1.0 2022-06-28 12:43:02 -07:00
Mr-Wiseguy
62d6ee135f HackerSM64 2.0.2 release 2022-06-28 09:43:19 -04:00
thecozies
3d330e0b84 Merge pull request #387 from HackerN64/develop/2.0.1
HackerSM64 2.0.2 Release
2022-06-28 08:40:54 -05:00
Arceveti
1691e48326 Fix inverted tilting pyramids when platform displacement 2 is disabled (#397) 2022-06-28 09:30:49 -04:00
Reonu
e5af0e8ca5 Add :Zone_Identifier files to gitignore (#428) 2022-06-28 09:28:54 -04:00
Mr-Wiseguy
cf570b4406 Added dcache coherency emulation test that disables instant input if passed (fixes Ares) (#427) 2022-06-28 12:57:14 +01:00
Reonu
1012fb7957 Add extra hud defines (#409)
* Added extra HUD defines

* moved the defines to hud.h
2022-06-27 22:17:44 -04:00
Reonu
aa1a48afeb Fix shindou audio bzero size (#426) 2022-06-27 22:15:47 -04:00
Mr-Wiseguy
5e1258e806 Merge branch 'master' into develop/2.0.1 2022-06-17 01:11:34 -04:00
Mr-Wiseguy
1166d7441d Merge branch 'master' into develop/2.1.0 2022-06-17 01:08:18 -04:00
Gregory Heskett
5ef0e8c9f6 Bugfix, refactor, and slightly improve BETTER_REVERB runtime (#391)
* Buxfix, refactor, and slightly improve BETTER_REVERB runtime

* Update BETTER_REVERB defaults and add some more customizability

* Improve BETTER_REVERB runtime even further

* Rename some reverb variables to make more sense in context
2022-06-17 00:05:40 -05:00
axollyon
25b421aaae Added buttonReleased member in the controller struct (#421) 2022-06-17 00:48:20 -04:00
Arceveti
c938bbf407 Add missing check for 9 vert shadows in LEGACY_SHADOW_IDS ifdef (#406)
* Add missing check for 9 vert shadows in LEGACY_SHADOW_IDS ifdef

* Add legacy shadow ids to ShadowType enum
2022-06-09 15:52:10 +01:00
KazeEmanuar
a1ab7c51f0 Made raycasts not hit backfaces
* Update name of lighting engine branch in readme
2022-06-09 10:04:58 -04:00
Arceveti
4cfbc656a9 Re-implement FALL_DAMAGE_HEIGHT_SMALL usage in play_far_fall_sound (#407) 2022-05-19 17:12:28 -04:00
Arceveti
fe6aee22e1 Remove redundant snufit offset vector (fixes gcc11 compiler warning) (#395) 2022-05-02 15:36:59 -04:00
Arceveti
ad3aa42eff Fix construct_float by changing addiu to ori (#394) 2022-05-02 14:56:04 -04:00
Mr-Wiseguy
031cc24fa6 New profiler (#390)
* Implemented new lightweight CPU/RDP profiler

* Integrated new profiler into puppyprint debug and improved profiler visuals, removed existing puppyprint profiling code
2022-05-01 00:42:58 -04:00
thecozies
8d06db06e1 Added specific extracted assets to gitignore (#386)
* Added specific extracted assets to gitignore

* Add .orig files to gitignore

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

Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
2022-04-28 17:50:27 +03:00
Arceveti
642a85fec6 Fix build warnings & errors when building non-US versions (#305)
* Fix build warnings & errors when building non-US versions

* Revert ADSR_STATE_LOOP change in adsr_update in effects.c + add fallthrough comments + clean up ifdefs

* null initialization for loadedPool in heap.c

* Better placement of null initialization of arg0 in alloc_bank_or_seq
2022-04-15 12:46:17 -04:00
Reonu
3092929822 Tie JRB dark skybox with ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS (#378)
The JRB skybox is darkened if you haven't collected JRB's first star. This behaviour should be under `ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS`
2022-04-14 18:53:11 -04:00
CrashOveride95
51f8ccfbb0 Comment out username printing during debug builds because people use their real names on their computers
I still wanna give people the option so
2022-04-10 17:37:14 -04:00
CrashOveride95
2118234f9b Remove datetime from version.c to make debug builds reproducible 2022-04-10 17:37:14 -04:00
Gregory Heskett
ac0299e5b5 Bugfix: 2x+ skyboxes given insufficient memory space (#372) 2022-03-30 18:41:22 -04:00
Fazana
f98d43c9de Puppycamera hotfixes (#367)
* fixed some embarassing typos
2022-03-27 03:20:28 -04:00
Denis Kopyrin
4a3ef802d5 Fixed eeprom saving on VC (#334)
* Fixed eeprom saving on VC

* Specify SM for EEP4K, for any other savetype use ED

* Moved IS_VC() check to an earlier point, switch IS_VC()->gIsVC

* Moved binary VC files to bin folder, added checks for EEP

* Do not keep vc_bin if EEP is not set
2022-03-26 22:39:44 -04:00
someone2639
bf8ea238e5 Fix some bad comment descriptions in math_util (#328) 2022-03-25 13:23:34 -04:00
Fazana
4b9a0b89a0 Add missing syncs for G_PM_NPRIMITIVE (#345) 2022-03-25 13:08:09 -04:00
Denis Kopyrin
3ac257e6fb Added no cap music restarts define (#335) 2022-03-20 08:48:40 -05:00
Mr-Wiseguy
b3cb639e6e Fixed makefile issue causing audio files to be compiled with different flags the first time they're built (#318) 2022-03-18 14:15:08 -04:00
Arceveti
12595397cd Fix OBJECTS_REJ build error & warning + silhouette incompatibility (#324)
* Fix OBJECTS_REJ build error & warning

* Fix Mario rendering
2022-03-18 11:03:39 -07:00
Arceveti
65eb5a755f Reimplement 'FIX_WATER_RINGS' (#325)
* Reimplement 'FIX_WATER_RINGS'
2022-03-18 11:02:38 -07:00
Gregory Heskett
eaf9d3e4f9 Merge pull request #352 from gheskett/develop/mingw-custom-audio-fix
Fix custom audio files not compiling under MinGW (in case it ever matters)
2022-03-18 12:47:54 -05:00
Arceveti
8cfd9af4ee Uncomment the last gSPPopMatrix in render_hud_cannon_reticle (#351) 2022-03-15 17:38:38 -04:00
gheskett
3f0143ec0f Fix custom audio files not compiling under MinGW (in case it ever matters) 2022-03-13 18:57:17 -04:00
tuxlovesyou
33b2a07759 Added LOAD_MIO0_TEXTURE alias for backwards-compatibility (#349)
Sometimes tools like Fast64 will export script.c files with
LOAD_MIO0_TEXTURE() macro "calls" even when you have "YAY0" toggled
under the export menu.  To keep this from being a roadblock for
compilation, LOAD_MIO0_TEXTURE() is defined in this commit as an alias
to the LOAD_YAY0_TEXTURE() macro! :-)
2022-03-11 22:10:46 -05:00
axollyon
a0e8600776 Saves default conf on boot now, simplify condition (#321) 2022-03-08 08:49:10 -06:00
Gregory Heskett
cc92b33676 Merge pull request #338 from Reonu/develop/gheskett/audio-changes
Develop/gheskett/audio changes
2022-03-08 08:21:55 -06:00
gheskett
8163bc4837 sAudioFirstBoot renamed to sAudioIsInitialized 2022-03-08 01:03:54 -05:00
gheskett
9f2f4a27b6 Whoops 2022-03-08 00:51:22 -05:00
gheskett
448d18de2b Bugfixes, sound bank heap defines, BETTER_REVERB improvements 2022-03-08 00:49:13 -05:00
gheskett
c4a23d0036 Bugfix: the smaller MAX_SIMULTANEOUS_NOTES define, when used, can lead to silence on audio init 2022-02-27 00:20:52 -05:00
gheskett
f061076a4f Audio safeguard error 2022-02-26 03:01:08 -05:00
gheskett
8f2b9c8979 Pointless memory allocation 2022-02-26 02:52:40 -05:00
gheskett
056e319105 Some formatting changes :( (But also some safeguards and updated documentation) 2022-02-26 01:56:07 -05:00
gheskett
6bd3988dd8 Add MAX_SIMULTANEOUS_NOTES defines and better document audio allocations for audio heap (looks kinda awful still) 2022-02-25 05:11:16 -05:00
gheskett
fe8384a440 Deprecate sBackgroundMusicDefaultVolume 2022-02-24 02:07:39 -05:00
Arceveti
4265019923 Fix NON_STOP_STARS & bhvCelebrationStar related issues with Bowser keys (#299)
Fix NON_STOP_STARS issues & bhvCelebrationStar related issues with Bowser keys
2022-01-22 14:07:55 -08:00
Arceveti
730f020b6d Fix formatting inconsistencies in config files (#303)
Fix formatting inconsistencies in config files
2022-01-21 20:00:25 -08:00
Arceveti
483b72e7da Fix render menu buttons functions (#300) 2022-01-19 14:41:14 -08:00
Arceveti
36d41a7f94 Renamed HackerSM64 modified assets so they don't conflict with vanilla assets (#293) 2022-01-16 21:30:06 -08:00
Arceveti
af34a81c06 Fix credits text ifdef (#301) 2022-01-16 21:29:06 -08:00
1288 changed files with 48092 additions and 52582 deletions

141
.gitignore vendored
View File

@@ -38,6 +38,9 @@
# datadump
/tools/ddump/*
# python cache in tools/
/tools/__pycache__/*
# Text editor remnants
*.swp
.vscode/*
@@ -525,21 +528,26 @@ assets/demos/pss.bin
assets/demos/unused.bin
assets/demos/wf.bin
levels/bbh/0.rgba16.png
actors/vanilla_actors/bbh/0.rgba16.png
levels/bbh/1.rgba16.png
levels/bbh/2.rgba16.png
levels/bbh/3.rgba16.png
levels/bbh/4.rgba16.png
levels/bbh/5.rgba16.png
levels/bbh/6.rgba16.png
actors/vanilla_actors/bbh/4.rgba16.png
actors/vanilla_actors/bbh/5.rgba16.png
actors/vanilla_actors/bbh/6.rgba16.png
actors/vanilla_actors/bitdw/0.rgba16.png
levels/bitdw/0.rgba16.png
levels/bitdw/1.rgba16.png
levels/bitdw/2.rgba16.png
levels/bitdw/3.rgba16.png
actors/vanilla_actors/bitfs/0.rgba16.png
levels/bitfs/0.rgba16.png
actors/vanilla_actors/bitfs/1.rgba16.png
levels/bitfs/1.rgba16.png
levels/bitfs/2.rgba16.png
levels/bits/0.rgba16.png
levels/bits/1.rgba16.png
actors/vanilla_actors/bits/2.rgba16.png
levels/bits/2.rgba16.png
levels/bob/0.rgba16.png
levels/bob/1.rgba16.png
@@ -556,9 +564,9 @@ levels/bowser_3/2.rgba16.png
levels/castle_grounds/0.rgba16.png
levels/castle_grounds/1.rgba16.png
levels/castle_grounds/2.rgba16.png
levels/castle_grounds/3.rgba16.png
levels/castle_grounds/4.rgba16.png
levels/castle_grounds/5.ia8.png
actors/vanilla_actors/castle_grounds/3.rgba16.png
actors/vanilla_actors/castle_grounds/4.rgba16.png
actors/vanilla_actors/castle_grounds/5.ia8.png
levels/castle_inside/1.rgba16.png
levels/castle_inside/10.rgba16.png
levels/castle_inside/11.rgba16.png
@@ -596,22 +604,25 @@ levels/castle_inside/38.rgba16.png
levels/castle_inside/39.rgba16.png
levels/castle_inside/4.rgba16.png
levels/castle_inside/40.rgba16.png
levels/castle_inside/5.rgba16.png
levels/castle_inside/6.rgba16.png
levels/castle_inside/7.rgba16.png
actors/vanilla_actors/castle_inside/5.rgba16.png
actors/vanilla_actors/castle_inside/6.rgba16.png
actors/vanilla_actors/castle_inside/7.rgba16.png
levels/castle_inside/8.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/ccm/0.rgba16.png
levels/ccm/1.rgba16.png
actors/vanilla_actors/ccm/1.rgba16.png
levels/ccm/10.rgba16.png
levels/ccm/11.rgba16.png
levels/ccm/12.rgba16.png
actors/vanilla_actors/ccm/12.rgba16.png
levels/ccm/2.rgba16.png
levels/ccm/3.rgba16.png
actors/vanilla_actors/ccm/2.rgba16.png
actors/vanilla_actors/ccm/3.rgba16.png
levels/ccm/4.rgba16.png
levels/ccm/5.rgba16.png
levels/ccm/6.rgba16.png
actors/vanilla_actors/ccm/5.rgba16.png
actors/vanilla_actors/ccm/6.rgba16.png
levels/ccm/7.rgba16.png
levels/ccm/8.ia16.png
levels/ccm/9.ia16.png
@@ -620,11 +631,12 @@ levels/cotmc/1.rgba16.png
levels/cotmc/2.rgba16.png
levels/cotmc/3.rgba16.png
levels/cotmc/4.rgba16.png
levels/ddd/0.rgba16.png
actors/vanilla_actors/ddd/0.rgba16.png
levels/ddd/1.rgba16.png
levels/ddd/2.rgba16.png
actors/vanilla_actors/ddd/2.rgba16.png
levels/ddd/3.rgba16.png
levels/ddd/4.rgba16.png
actors/vanilla_actors/ddd/4.rgba16.png
levels/ending/cake.png
levels/ending/cake_eu.png
levels/ending/eu_023000.rgba16.png
@@ -636,10 +648,10 @@ levels/ending/eu_028000.rgba16.png
levels/hmc/0.rgba16.png
levels/hmc/1.rgba16.png
levels/hmc/2.rgba16.png
levels/hmc/3.rgba16.png
levels/hmc/4.rgba16.png
levels/hmc/5.rgba16.png
levels/hmc/6.rgba16.png
actors/vanilla_actors/hmc/3.rgba16.png
actors/vanilla_actors/hmc/4.rgba16.png
actors/vanilla_actors/hmc/5.rgba16.png
actors/vanilla_actors/hmc/6.rgba16.png
levels/hmc/7.rgba16.png
levels/intro/0.rgba16.png
levels/intro/1.rgba16.png
@@ -650,40 +662,41 @@ levels/intro/3_sh_tm.rgba16.png
levels/intro/3_tm.rgba16.png
levels/jrb/0.rgba16.png
levels/jrb/1.rgba16.png
levels/jrb/2.rgba16.png
levels/jrb/3.rgba16.png
levels/lll/0.rgba16.png
levels/lll/1.rgba16.png
levels/lll/10.rgba16.png
levels/lll/11.rgba16.png
levels/lll/12.rgba16.png
levels/lll/13.rgba16.png
levels/lll/14.rgba16.png
levels/lll/15.rgba16.png
levels/lll/16.rgba16.png
levels/lll/17.rgba16.png
levels/lll/18.rgba16.png
levels/lll/19.rgba16.png
levels/lll/2.rgba16.png
levels/lll/20.rgba16.png
levels/lll/21.rgba16.png
levels/lll/22.rgba16.png
levels/lll/23.rgba16.png
levels/lll/24.rgba16.png
levels/lll/25.rgba16.png
actors/vanilla_actors/jrb/2.rgba16.png
actors/vanilla_actors/jrb/3.rgba16.png
actors/vanilla_actors/lll/0.rgba16.png
actors/vanilla_actors/lll/1.rgba16.png
actors/vanilla_actors/lll/10.rgba16.png
actors/vanilla_actors/lll/11.rgba16.png
actors/vanilla_actors/lll/12.rgba16.png
actors/vanilla_actors/lll/13.rgba16.png
actors/vanilla_actors/lll/14.rgba16.png
actors/vanilla_actors/lll/15.rgba16.png
actors/vanilla_actors/lll/16.rgba16.png
actors/vanilla_actors/lll/17.rgba16.png
actors/vanilla_actors/lll/18.rgba16.png
actors/vanilla_actors/lll/19.rgba16.png
actors/vanilla_actors/lll/2.rgba16.png
actors/vanilla_actors/lll/20.rgba16.png
actors/vanilla_actors/lll/21.rgba16.png
actors/vanilla_actors/lll/22.rgba16.png
actors/vanilla_actors/lll/23.rgba16.png
actors/vanilla_actors/lll/24.rgba16.png
actors/vanilla_actors/lll/25.rgba16.png
levels/lll/26.rgba16.png
levels/lll/27.ia16.png
levels/lll/28.rgba16.png
levels/lll/29.rgba16.png
actors/vanilla_actors/lll/29.rgba16.png
levels/lll/3.rgba16.png
levels/lll/30.rgba16.png
levels/lll/31.rgba16.png
levels/lll/32.rgba16.png
levels/lll/4.rgba16.png
levels/lll/5.rgba16.png
levels/lll/6.rgba16.png
actors/vanilla_actors/lll/6.rgba16.png
levels/lll/7.rgba16.png
levels/lll/8.rgba16.png
actors/vanilla_actors/lll/8.rgba16.png
levels/lll/9.rgba16.png
levels/menu/main_menu_seg7.00018.rgba16.png
levels/menu/main_menu_seg7.00818.rgba16.png
@@ -918,59 +931,64 @@ levels/menu/main_menu_seg7_us.0B800.ia8.png
levels/pss/0.rgba16.png
levels/pss/1.ia16.png
levels/pss/2.rgba16.png
levels/rr/1.rgba16.png
actors/vanilla_actors/rr/1.rgba16.png
levels/rr/2.rgba16.png
levels/rr/quarter_flying_carpet.rgba16.png
actors/vanilla_actors/rr/quarter_flying_carpet.rgba16.png
levels/sl/0.rgba16.png
levels/sl/1.rgba16.png
levels/sl/2.rgba16.png
actors/vanilla_actors/sl/2.rgba16.png
levels/sl/3.rgba16.png
levels/sl/4.rgba16.png
levels/ssl/0.rgba16.png
levels/ssl/1.ia16.png
levels/ssl/10.rgba16.png
levels/ssl/11.rgba16.png
actors/vanilla_actors/ssl/10.rgba16.png
actors/vanilla_actors/ssl/11.rgba16.png
levels/ssl/2.rgba16.png
levels/ssl/3.rgba16.png
levels/ssl/4.rgba16.png
levels/ssl/5.rgba16.png
levels/ssl/6.rgba16.png
actors/vanilla_actors/ssl/5.rgba16.png
actors/vanilla_actors/ssl/6.rgba16.png
levels/ssl/7.rgba16.png
levels/ssl/8.rgba16.png
levels/ssl/9.rgba16.png
actors/vanilla_actors/ssl/8.rgba16.png
actors/vanilla_actors/ssl/9.rgba16.png
levels/thi/0.rgba16.png
levels/thi/1.rgba16.png
actors/vanilla_actors/thi/1.rgba16.png
levels/totwc/0.rgba16.png
levels/totwc/1.rgba16.png
levels/totwc/2.rgba16.png
levels/totwc/3.ia16.png
levels/ttc/0.rgba16.png
actors/vanilla_actors/ttc/0.rgba16.png
actors/vanilla_actors/ttc/1.rgba16.png
levels/ttc/1.rgba16.png
levels/ttc/2.rgba16.png
levels/ttm/0.ia16.png
levels/ttm/1.rgba16.png
levels/ttm/2.rgba16.png
levels/ttm/3.rgba16.png
levels/ttm/4.rgba16.png
actors/vanilla_actors/ttm/4.rgba16.png
levels/ttm/5.rgba16.png
levels/ttm/6.rgba16.png
levels/ttm/7.rgba16.png
levels/ttm/8.rgba16.png
actors/vanilla_actors/ttm/8.rgba16.png
levels/vcutm/0.rgba16.png
levels/vcutm/1.rgba16.png
levels/vcutm/2.rgba16.png
actors/vanilla_actors/vcutm/2.rgba16.png
levels/vcutm/3.rgba16.png
levels/wdw/0.rgba16.png
levels/wdw/1.rgba16.png
levels/wdw/2.rgba16.png
levels/wdw/3.rgba16.png
actors/vanilla_actors/wdw/1.rgba16.png
actors/vanilla_actors/wdw/2.rgba16.png
actors/vanilla_actors/wdw/3.rgba16.png
levels/wdw/4.rgba16.png
actors/vanilla_actors/wf/0.rgba16.png
levels/wf/0.rgba16.png
levels/wf/1.rgba16.png
actors/vanilla_actors/wf/2.rgba16.png
levels/wf/2.rgba16.png
levels/wf/3.rgba16.png
levels/wf/4.rgba16.png
levels/wf/5.ia8.png
actors/vanilla_actors/wf/3.rgba16.png
actors/vanilla_actors/wf/4.rgba16.png
actors/vanilla_actors/wf/5.ia8.png
levels/wmotr/0.rgba16.png
levels/wmotr/1.rgba16.png
levels/wmotr/2.rgba16.png
@@ -2146,3 +2164,6 @@ lib/libs2d_engine.a
# :Zone_Identifier files
*Zone.Identifier
# user-specific config file
include/config/config_local.h

3
.gitmodules vendored Normal file
View File

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

View File

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

View File

@@ -2,9 +2,7 @@
# 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
* @thecozies
* @gheskett
* @Reonu @gheskett @arthurtilly
# 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,17 +1,18 @@
FROM ubuntu:18.04 as build
FROM ubuntu:22.04 as build
RUN apt-get update && \
apt-get install -y \
binutils-mips-linux-gnu \
bsdmainutils \
bsdextrautils \
build-essential \
gcc-mips-linux-gnu \
libcapstone-dev \
pkgconf \
python3
RUN mkdir /sm64
WORKDIR /sm64
ENV PATH="/sm64/tools:${PATH}"
RUN mkdir /hackersm64
WORKDIR /hackersm64
ENV PATH="/hackersm64/tools:${PATH}"
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'
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'

193
Makefile
View File

@@ -124,12 +124,18 @@ 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
DEFAULT_OPT_FLAGS = -Ofast -falign-functions=32
# 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
@@ -247,11 +253,23 @@ 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/libpl2
$(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 ?= rnc1
COMPRESS ?= yay0
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
ifeq ($(COMPRESS),gzip)
DEFINES += GZIP=1
@@ -299,23 +317,23 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
# Make sure assets exist
NOEXTRACT ?= 0
ifeq ($(NOEXTRACT),0)
DUMMY != $(PYTHON) extract_assets.py $(VERSION) >&2 || echo FAIL
DUMMY != $(PYTHON) extract_assets.py us >&2 || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to extract assets from US ROM)
endif
ifneq (,$(wildcard baserom.jp.z64))
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 (,$(wildcard baserom.eu.z64))
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 (,$(wildcard baserom.sh.z64))
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)
@@ -329,6 +347,18 @@ 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 libpl2 submodule...)
DUMMY != git submodule update --init $(LIBPL_DIR) > /dev/null || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to clone libpl2 submodule)
endif
endif
endif
$(info Building ROM...)
endif
@@ -350,9 +380,10 @@ SOUND_BIN_DIR := $(BUILD_DIR)/sound
TEXTURE_DIR := textures
ACTOR_DIR := actors
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
SRC_DIRS += src src/boot src/game src/engine src/audio src/menu src/buffers actors levels bin data assets asm lib sound
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
LIBZ_SRC_DIRS := src/libz
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
BIN_DIRS := bin bin/$(VERSION)
@@ -362,12 +393,17 @@ 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)
LIBZ_C_FILES := $(foreach dir,$(LIBZ_SRC_DIRS),$(wildcard $(dir)/*.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) $(VNL_ACTRS_C_FILES)
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))
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/*)
@@ -384,6 +420,7 @@ 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
@@ -401,12 +438,16 @@ 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
@@ -415,14 +456,6 @@ 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
@@ -430,10 +463,12 @@ 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))
@@ -450,6 +485,13 @@ 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
@@ -466,15 +508,15 @@ DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
# C compiler options
CFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS)
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
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 += -Wno-missing-braces
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
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 += -Wno-missing-braces
else
CFLAGS += -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -signed -32
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
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
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
@@ -490,18 +532,17 @@ 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
N64GRAPHICS_CI := $(TOOLS_DIR)/n64graphics_ci
BINPNG := $(TOOLS_DIR)/BinPNG.py
TEXTCONV := $(TOOLS_DIR)/textconv
AIFF_EXTRACT_CODEBOOK := $(TOOLS_DIR)/aiff_extract_codebook
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
@@ -513,8 +554,13 @@ ifneq (,$(call find-command,armips))
else
RSPASM := $(TOOLS_DIR)/armips
endif
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
EMULATOR = mupen64plus
ifneq (,$(call find-command,wslview))
EMULATOR = "/mnt/c/Program Files (x86)/parallel-launcher/parallel-launcher.exe"
else
EMULATOR = parallel-launcher
endif
EMU_FLAGS =
ifneq (,$(call find-command,wslview))
@@ -537,7 +583,7 @@ endif
# For non-IDO, use objcopy instead of extract_data_for_mio
ifneq ($(COMPILER),ido)
EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data
EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data --only-section=.rodata
endif
# Common build print status function
@@ -559,7 +605,10 @@ all: $(ROM)
clean:
$(RM) -r $(BUILD_DIR_BASE)
make -C src/s2d_engine clean
rebuildtools:
$(MAKE) -C tools distclean
$(MAKE) -C tools
distclean: clean
$(PYTHON) extract_assets.py --clean
@@ -587,8 +636,11 @@ 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/boot.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/version.o: $(BUILD_DIR)/src/game/version_data.h
$(BUILD_DIR)/lib/aspMain.o: $(BUILD_DIR)/rsp/audio.bin
@@ -606,29 +658,6 @@ $(BUILD_DIR)/src/libz/%.o: OPT_FLAGS := -Os
$(BUILD_DIR)/src/libz/%.o: CFLAGS += -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-pointer-sign
endif
ifeq ($(VERSION),eu)
TEXT_DIRS := text/de text/us text/fr
# 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
$(BUILD_DIR)/src/usb/usb.o: OPT_FLAGS := -O0
$(BUILD_DIR)/src/usb/usb.o: CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wno-unused-function
$(BUILD_DIR)/src/usb/debug.o: OPT_FLAGS := -O0
@@ -646,17 +675,11 @@ $(BUILD_DIR)/src/game/rendering_graph_node.o: OPT_FLAGS := $(GRAPH_NODE_OPT_FLAG
# $(info MATH_UTIL_OPT_FLAGS: $(MATH_UTIL_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) $(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)
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)
# Make sure build directory exists before compiling anything
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
#==============================================================================#
@@ -701,6 +724,11 @@ $(LEVEL_ELF_FILES): $(BUILD_DIR)/levels/%/leveldata.elf: $(BUILD_DIR)/levels/%/l
$(call print,Linking ELF file:,$<,$@)
$(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
$(call print,Extracting compressible data from:,$<,$@)
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@
@@ -729,23 +757,15 @@ 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 $^ $@
$(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)
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS)
@$(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) $$(cat $(ENDIAN_BITWIDTH))
$(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)
$(SOUND_BIN_DIR)/sound_data.tbl: $(SOUND_BIN_DIR)/sound_data.ctl
@true
@@ -756,9 +776,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) $(ENDIAN_BITWIDTH)
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json $(SOUND_SEQUENCE_DIRS) $(SOUND_SEQUENCE_FILES)
@$(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) $$(cat $(ENDIAN_BITWIDTH))
$(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)
$(SOUND_BIN_DIR)/bank_sets: $(SOUND_BIN_DIR)/sequences.bin
@true
@@ -791,20 +811,6 @@ $(BUILD_DIR)/assets/demo_data.c: assets/demo_data.json $(wildcard assets/demos/*
@$(PRINT) "$(GREEN)Generating demo data $(NO_COL)\n"
$(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
$(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
$(call print,Preprocessing level headers:,$<,$@)
@@ -813,7 +819,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)tools/make_version.sh $(CROSS) > $@
$(V)sh tools/make_version.sh $(CROSS) > $@
#==============================================================================#
# Compilation Recipes #
@@ -822,12 +828,15 @@ $(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 != $(FIXLIGHTS_PY) actors
DUMMY != $(FIXLIGHTS_PY) levels
DUMMY != $(PYTHON) $(FIXLIGHTS_PY) actors
DUMMY != $(PYTHON) $(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 $@ $<
@@ -864,7 +873,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 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
$(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
$(BUILD_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf
$(call print,Getting Goddard size...)
@@ -872,13 +881,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.map $(BUILD_DIR)/bin/addr.bin $(BUILD_DIR)/bin/name.bin
$(V)python3 tools/mapPacker.py $(BUILD_DIR)/sm64_prelim.elf $(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) undefined_syms.txt $(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)/libz.a $(BUILD_DIR)/libgoddard.a
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
$(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
$(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
# Build ROM
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
@@ -903,7 +912,7 @@ endif
$(BUILD_DIR)/$(TARGET).objdump: $(ELF)
$(OBJDUMP) -D $< > $@
.PHONY: all clean distclean default test load
.PHONY: all clean distclean default test load rebuildtools
# with no prerequisites, .SECONDARY causes no intermediate target to be removed
.SECONDARY:

View File

@@ -41,15 +41,21 @@ LEVEL_FILES := $(addsuffix leveldata,$(LEVEL_DIRS))
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 := \
$(SEGMENTS:%=$(BUILD_DIR)/bin/%.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 := \
$(SEGMENTS:%=$(BUILD_DIR)/bin/%.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)
@@ -243,9 +249,11 @@ $(BUILD_DIR)/bin/machine.elf: SEGMENT_ADDRESS := 0x09000000
$(BUILD_DIR)/bin/mountain.elf: SEGMENT_ADDRESS := 0x09000000
$(BUILD_DIR)/bin/grass.elf: SEGMENT_ADDRESS := 0x09000000
# EU segment 19 translations
$(BUILD_DIR)/bin/eu/translation_de.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/eu/translation_en.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/eu/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_de.elf: SEGMENT_ADDRESS := 0x1B000000
$(BUILD_DIR)/bin/translation_en.elf: SEGMENT_ADDRESS := 0x1B000000
$(BUILD_DIR)/bin/translation_fr.elf: SEGMENT_ADDRESS := 0x1B000000
$(BUILD_DIR)/bin/translation_jp.elf: SEGMENT_ADDRESS := 0x1B000000
$(BUILD_DIR)/bin/translation_es.elf: SEGMENT_ADDRESS := 0x1B000000
# --------------------------------------
# Skybox Rules
@@ -270,3 +278,36 @@ IPL3_RAW_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%,$(IP
CRASH_TEXTURE_FILES := $(wildcard $(TEXTURE_DIR)/crash_custom/*.png)
CRASH_TEXTURE_C_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%.inc.c,$(CRASH_TEXTURE_FILES)))
# --------------------------------------
# Vanilla Objects Rules
# --------------------------------------
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

@@ -17,35 +17,25 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- **MrComit**: General use object defines, JUMP_KICK_FIX
- **aglab2**: Bugfixes (particularly puppycam), refactor stuff
- **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine
- **Arthurtilly**: Platform Displacement 2
- **Arthurtilly**: ASCII / UTF-8 support, Multilang, Platform Displacement 2
- **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
- **Reonu**: Starting the project + widescreen, reonucam, various defines for hacker QoL, and a custom Spanish (Spain) translation of the game.
- **JoshDuMan**: Decomp guy, general assistance
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter, 4 controller support
- **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
- **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds, emulator detector
- **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
**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.
- Lighting Engine is available on a separate branch ([base/lighting-engine](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine)). Instructions on how to use it are in the readme of that branch.
**Puppycam**
- Puppycam is available on the master branch now, you can toggle it in `config/config_camera.h`. *
@@ -92,14 +82,14 @@ 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 `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.
- There is a `gEmulator` variable to detect console or specific emulators and emulator versions
- 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. *
- The clown font includes the entire English alphabet.
- Colored ia4 text support. Format: `"@XXXXXXXX[YOUR TEXT]@--------"` (By ArcticJaguar725)
- Example Text: `"@FF0000FFRED @00FF00FFGREEN @0000FFFFBLUE @FFFFFF00INVISIBLE @--------NORMAL"`
- 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.
- Colored ia4 text support. Format: `"@XXXXXX[YOUR TEXT]@--------"` (By Arthurtilly)
- Example Text: `"@FF0000RED @00FF00GREEN @0000FFBLUE @FFFFFFWHITE"`
- 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.
- 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. *
@@ -115,7 +105,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 `gIsConsole` 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 `gEmulator` 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. *
@@ -131,7 +121,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).
@@ -145,7 +135,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 `gIsConsole` variable to wrap your code in an emulator check.
- Automatic console and emulator detection: Use the `gEmulator` 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.0.8
v2.3.0

View File

@@ -44,7 +44,8 @@ const Gfx bully_seg5_dl_050002E0[] = {
// 0x05000398 - 0x05000408
const Gfx bully_seg5_dl_05000398[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATEI, G_CC_MODULATEI),
gsDPSetCombineMode(G_CC_DECALRGB, G_CC_DECALRGB),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -54,6 +55,7 @@ const Gfx bully_seg5_dl_05000398[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
@@ -297,9 +299,6 @@ 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),
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, 1, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, 1),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 1, 3, 0x0),
gsSP2Triangles( 2, 3, 4, 0x0, 1, 5, 6, 0x0),
gsSP2Triangles( 1, 6, 7, 0x0, 0, 5, 1, 0x0),
@@ -437,7 +436,8 @@ const Gfx bully_seg5_dl_05003D08[] = {
// 0x05003D40 - 0x05003DB8
const Gfx bully_seg5_dl_05003D40[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -448,6 +448,7 @@ const Gfx bully_seg5_dl_05003D40[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
@@ -490,7 +491,8 @@ const Gfx bully_seg5_dl_05003E70[] = {
// 0x05003EA8 - 0x05003F20
const Gfx bully_seg5_dl_05003EA8[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -501,6 +503,7 @@ const Gfx bully_seg5_dl_05003EA8[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
@@ -528,7 +531,8 @@ const Gfx bully_seg5_dl_05003F80[] = {
// 0x05003FC8 - 0x05004038
const Gfx bully_seg5_dl_05003FC8[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -538,5 +542,6 @@ const Gfx bully_seg5_dl_05003FC8[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};

View File

@@ -155,10 +155,6 @@ static const Vtx goomba_seg8_vertex_0801B238[] = {
// 0x0801B2E8 - 0x0801B560
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),
@@ -224,7 +220,7 @@ const Gfx goomba_seg8_dl_0801B5A0[] = {
gsSPDisplayList(goomba_seg8_dl_0801B2E8),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, SHADE, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, SHADE),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPEndDisplayList(),
};
@@ -266,10 +262,10 @@ const Gfx floomba_seg8_dl_blink[] = {
// 0x0801B618
static const Vtx goomba_seg8_vertex_0801B618[] = {
{{{ 18, 18, 0}, 0, { 990, 0}, {0x00, 0x00, 0x7f, 0xff}}},
{{{ -18, 18, 0}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}},
{{{ -18, -18, 0}, 0, { 0, 990}, {0x00, 0x00, 0x7f, 0xff}}},
{{{ 18, -18, 0}, 0, { 990, 990}, {0x00, 0x00, 0x7f, 0xff}}},
{{{ 18, 18, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -18, 18, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -18, -18, 0}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 18, -18, 0}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
};
// 0x0801B658 - 0x0801B690
@@ -285,8 +281,8 @@ const Gfx goomba_seg8_dl_0801B658[] = {
// 0x0801B690 - 0x0801B700
const Gfx goomba_seg8_dl_0801B690[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA),
// gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
@@ -295,7 +291,7 @@ const Gfx goomba_seg8_dl_0801B690[] = {
gsSPDisplayList(goomba_seg8_dl_0801B658),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineLERP(ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, SHADE, ENVIRONMENT, 0, SHADE, 0, 0, 0, 0, SHADE),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
@@ -776,10 +772,6 @@ static const Vtx goomba_seg8_vertex_0801CDF0[] = {
// 0x0801CE20 - 0x0801CF78
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),
@@ -809,10 +801,6 @@ const Gfx goomba_seg8_dl_0801CE20[] = {
// 0x0801CF78 - 0x0801D0D0
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),
@@ -842,10 +830,6 @@ const Gfx goomba_seg8_dl_0801CF78[] = {
// 0x0801D0D0 - 0x0801D360
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),
@@ -898,10 +882,6 @@ const Gfx goomba_seg8_dl_0801D0D0[] = {
// 0x0801D360 - 0x0801D760
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),
@@ -977,6 +957,6 @@ const Gfx goomba_seg8_dl_0801D360[] = {
// 0x0801D760 - 0x0801D770
const Gfx goomba_seg8_dl_0801D760[] = {
// gsSPNumLights(NUMLIGHTS_1),
gsSPNumLights(NUMLIGHTS_1),
gsSPEndDisplayList(),
};

View File

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

View File

@@ -331,8 +331,4 @@ extern const Gfx white_particle_small_dl_end[];
extern const Gfx white_particle_small_dl[];
extern const Gfx white_particle_small_unused_dl[];
#include "mario/geo_header.h"
#include "lantern/geo_header.h"
#endif

View File

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

View File

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

View File

@@ -11,3 +11,30 @@
#include "manta/geo.inc.c"
#include "sushi/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,13 +0,0 @@
#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

@@ -1,19 +0,0 @@
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[];

View File

@@ -1,359 +0,0 @@
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(),
};

File diff suppressed because it is too large Load Diff

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