Compare commits

...

154 Commits

Author SHA1 Message Date
Arceveti
882c9d781e Merge branch 'develop/2.3.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2024-03-30 15:14:06 -07: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
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
Arceveti
88ac68be53 Merge branch 'develop/2.2.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2024-02-14 01:50:26 -08: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
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
Arceveti
c4d0df7c1d Merge branch 'develop/2.2.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-12-15 14:48:07 -08:00
Arceveti
95b21c5195 Merge branch 'master' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-12-15 14:47:58 -08: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
Gregory Heskett
78cc957d31 Preserve vanilla reverb downsampling behavior whenever BETTER_REVERB isn't in use (#727) 2023-10-31 18:23:15 -04:00
Arceveti
e6c6a8b691 Move segment2 paintings data to paintings.c.in 2023-09-28 10:57:13 -07:00
Arceveti
1fe6bc0c57 Merge branch 'develop/2.1.2' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-09-27 14:54:33 -07:00
Arceveti
0761d2fdec Fix(?) painting warp checkpoints 2023-09-27 14:54:29 -07:00
Arceveti
1fb29f9340 Merge branch 'master' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-09-26 20:11:18 -07:00
Arceveti
fa3fc8dac9 Merge branch 'master' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-09-25 17:38:15 -07:00
Arceveti
3731f9209f Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-09-22 15:33:47 -07:00
Arceveti
941207b50f Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-09-11 13:57:44 -07:00
Arceveti
bd83b07625 Some documentation + add IEEE754 unions + formatting 2023-09-07 15:24:43 -07:00
Arceveti
e02659d23d Improve painting struct definitions 2023-09-01 19:22:14 -07:00
Arceveti
117ae7339b Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-09-01 19:18:50 -07:00
Arceveti
a4e297747a Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-08-23 17:13:22 -07:00
Arceveti
17e4f7b811 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-07-12 16:36:31 -07:00
Arceveti
1e0e6803ad Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-04-30 22:30:10 -04:00
Arceveti
b518acfc7d use _Bool for 'shaded' 2023-04-26 12:28:20 -04:00
Arceveti
dc0d6c698c _Bool/enum usage 2023-04-16 14:55:39 -04:00
Arceveti
41dc7217be initiate_painting_warp pointer formatting 2023-04-10 14:18:36 -04:00
Arceveti
33b70550e8 Fix arg formatting in painting_calculate_triangle_normals 2023-04-10 14:08:19 -04:00
Arceveti
5f694b9333 pointer formatting changes 2023-04-07 18:33:06 -04:00
Arceveti
199486a299 improve gfx allocation (formatting) + add gsLoadBlockTexture 2023-03-28 12:35:28 -04:00
Arceveti
8a0547550d Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-03-27 18:27:15 -04:00
Arceveti
4744c9cd7f Remove unused externs 2023-03-17 13:39:21 -04:00
Arceveti
643e6a7a64 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-03-17 12:15:20 -04:00
Arceveti
2c52e0699d Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-03-07 13:48:04 -05:00
Arceveti
9e30c865fc Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-02-10 21:50:17 -05:00
Arceveti
16fdf6299a Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-01-26 12:46:53 -05:00
Arceveti
d5b4190fe2 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2023-01-26 02:54:31 -05:00
Arceveti
cc683d2415 'vec3f_local_pos_to_world_pos' and 'vec3f_world_pos_to_local_pos' documentation + fix some comments 2023-01-14 14:40:38 -05:00
Arceveti
bfdae60182 Painting scale changes 2023-01-06 16:23:07 -05:00
Arceveti
f0509d42f8 Don't use PAINTING_SIZE for fake CCM paintings 2022-12-16 02:21:43 -05:00
Arceveti
bb5ad7835a Formatting changes :) 2022-12-16 00:07:17 -05:00
Arceveti
04210115ec Clean up non-rippling painting dl 2022-12-15 22:10:24 -05:00
Arceveti
be01f6c5d2 Use object scale as painting scale instead of painting_model_view_transform 2022-12-15 19:05:35 -05:00
Arceveti
3a526ef10f Center scaled paintings during cutscenes 2022-12-15 17:57:03 -05:00
Arceveti
23ea8b0130 Add PAINTING_IMAGE_TYPE_INVISIBLE + format PaintingImage structs 2022-12-14 22:54:59 -05:00
Arceveti
be58ea7396 WARP_DEST_LEVEL_NUM_MASK Usage 2022-12-14 21:27:06 -05:00
Arceveti
09ca176cb9 Rename 'PaintingIDs' to 'PaintingImageIDs' 2022-12-14 18:36:35 -05:00
Arceveti
aaa2250c29 Automatically determine neighboring triangles for each vertex instead of using a hardcoded list 2022-12-14 18:29:17 -05:00
Arceveti
98a413af23 Fix some typos/formatting 2022-12-14 18:10:45 -05:00
Arceveti
dbfb89d19c Update some variable names 2022-12-14 15:35:29 -05:00
Arceveti
9aab0fd00c Rename 'painting_data_mesh' to 'painting_data_vertices' 2022-12-13 22:30:12 -05:00
Arceveti
4fe3d3f606 Remove redundant painting data from segment2.c 2022-12-13 22:25:35 -05:00
Arceveti
33d7f63156 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-12-13 19:24:35 -05:00
Arceveti
a5df7ffedf Add PAINTING_WOBBLE_WARP_THRESHOLD + Change paintings.h defines to use vanilla values + Change oPaintingFlags to oPaintingStoredAction + Combine painting_update_ripples into bhv_painting_loop 2022-12-13 19:24:09 -05:00
Arceveti
1ed0a72b94 rr_painting uses RIPPLE_TRIGGER_NONE 2022-12-13 16:17:38 -05:00
Arceveti
9cee1eed3c Smaller PAINTING_EDGE_MARGIN 2022-12-12 18:46:42 -05:00
Arceveti
c97839cd34 Replace 'oPaintingLocalMarioPosX' and 'oPaintingLocalMarioPosY' with local variables 2022-12-12 18:25:42 -05:00
Arceveti
0b6417a467 Remove 'oPaintingChangedFlags' + rename some object fields & enums 2022-12-12 18:07:59 -05:00
Arceveti
04d832154c Make some function names clearer 2022-12-12 17:46:10 -05:00
Arceveti
d19ec64310 use oAction instead of oPaintingState 2022-12-12 15:50:09 -05:00
Arceveti
ec318df0a6 Fix some comments in paintings.h 2022-12-12 15:36:20 -05:00
Arceveti
1d2c50eda8 Remove unused gsSPLightColor commands in dl_paintings_env_mapped_begin 2022-12-12 15:23:36 -05:00
Arceveti
11d7f84db1 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-12-12 14:56:19 -05:00
Arceveti
66828dab80 Rename some structs 2022-12-12 14:56:12 -05:00
Arceveti
e27ba77533 Make PaintingState enum names clearer 2022-12-12 00:42:56 -05:00
Arceveti
2d23771587 Painting UV cleanup 2022-12-12 00:39:38 -05:00
Arceveti
f396d89b42 Rename 'oPaintingData' to 'oPaintingImageInfo' 2022-12-11 20:07:10 -05:00
Arceveti
d63bb4d3fc skip s16 conversion for ripple magnitude 2022-12-11 20:02:00 -05:00
Arceveti
508fe3958c Make 'sPaintingMesh' and 'sPaintingTriNorms' into local variables 2022-12-11 20:01:39 -05:00
Arceveti
a73531aa41 small changes 2022-12-10 22:22:01 -05:00
Arceveti
eed1293624 Replace gEnteredPaintingObject with a MarioState field 2022-12-10 18:38:32 -05:00
Arceveti
5d12ebffc1 Make WDW water level detextion relative to the painting instead of absolute height. 2022-12-10 18:09:52 -05:00
Arceveti
16ebce4ccc Rename 'oPaintingRippleX' and 'oPaintingRippleY' to 'oPaintingRipplePosX' and 'oPaintingRipplePosY' 2022-12-10 17:50:48 -05:00
Arceveti
578e70ed4c RippleAnimationInfo struct changes 2022-12-10 17:49:58 -05:00
Arceveti
be3294399e Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-12-10 15:33:10 -05:00
Arceveti
3c17702b4d Remove gRipplingPaintingObject + clean up painting eject sound 2022-12-10 01:38:12 -05:00
Arceveti
f98b8b8dc5 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-12-10 00:48:01 -05:00
Arceveti
2988324b93 Improve painting texture map names + change imageCount check to switch 2022-12-10 00:18:44 -05:00
Arceveti
2436072bcd Move painting functionality except for rendering into bhv_painting_loop + remove area update counter fields + change relative mario and ripple positions to floats 2022-12-09 21:41:13 -05:00
Arceveti
a1ec042d13 Paintings use regular object warp nodes + remove painting groups + painting struct cleanup + fix gTTCSpeedSetting being changed on exit + change relative painting coords to s32 2022-12-09 17:43:21 -05:00
Arceveti
171d08dae2 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-12-06 15:18:32 -05:00
Arceveti
e3243cb917 Add PAINTING_VERTEX macro for painting triangle mesh 2022-12-05 00:41:49 -05:00
Arceveti
656c72ac91 Remove SAVE_FLAG_DDD_MOVED_BACK + allow paintings to move during some cutscenes. 2022-12-04 22:11:13 -05:00
Arceveti
590084fd6a Remove reset_painting and NO_SEGMENTED_MEMORY ifdef 2022-12-04 20:04:49 -05:00
Arceveti
d4c7a58e28 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-11-28 15:16:17 -05:00
Arceveti
ab9f3279f4 Rename 'resetTimer' arg to 'doResetTimer' in painting_state 2022-11-07 19:08:26 -08:00
Arceveti
c78624db2f Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-11-07 19:06:24 -08:00
Arceveti
69330d30ec fix SurfaceClass enum 2022-11-07 18:19:17 -08:00
Arceveti
e9dd49478f Fix painting object field offsets 2022-11-03 04:07:13 -07:00
Arceveti
11fb0377fc Fix RR painting using the wrong ID 2022-10-21 13:33:39 -07:00
Arceveti
d08afdef68 Rename 'gRipplingPainting' to 'gRipplingPaintingObject' and 'gEnteredPainting' to 'gEnteredPaintingObject' 2022-10-21 13:24:46 -07:00
Arceveti
3ea3c1fb3c Change painting object data pointer to const void 2022-10-10 15:30:17 -07:00
Arceveti
a6676efee3 Revert some formatting changes in camera.c 2022-10-08 13:08:30 -07:00
Arceveti
2222429d9d Fix ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS comment + Undo removal of trailing whitespace 2022-10-08 13:04:48 -07:00
Arceveti
d7b63e82ed Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-10-03 18:59:49 -07:00
Arceveti
8e6b62547f Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-09-30 22:54:12 -07:00
Arceveti
12e6c855b3 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-09-29 14:33:09 -07:00
Arceveti
c7115d4a2c Fix seams between painting sections on console 2022-09-29 14:32:54 -07:00
Arceveti
5ea50a7b69 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-09-28 21:15:34 -07:00
Arceveti
fc093b9fdb Add get_exponent for painting texture setup + dl_painting_not_rippling cleanup 2022-08-16 21:57:17 -07:00
Arceveti
4b651cc174 Clean up painting texel calculations 2022-08-16 15:48:50 -07:00
Arceveti
7fe7f6b083 Fix tiny seam between painting segments 2022-08-16 12:15:29 -07:00
Arceveti
d1b0bad2fd Automatic texture maps & non-rippling display lists for paintings 2022-08-14 01:41:05 -07:00
Arceveti
c330431603 Rename 'commands' to 'gfxCmds' 2022-08-10 18:49:28 -07:00
Arceveti
df051e3ad3 Partially update main paintings.c comment + more formatting 2022-08-10 17:03:03 -07:00
Arceveti
5e992b540a Revert change that was using unimplemented functionality in geo_painting_draw 2022-08-10 16:04:23 -07:00
Arceveti
168293d3bc Some paintings.c refactoring 2022-08-10 16:01:37 -07:00
Arceveti
f9cbf8f59c Use defines for fake CCM paintings' coords 2022-08-10 15:59:15 -07:00
Arceveti
ee96ec7417 Remove extra newline 2022-08-09 22:28:53 -07:00
Arceveti
da9e796457 Move ripple constants outside of Painting struct 2022-08-09 20:46:27 -07:00
Arceveti
d7503663a0 Combine ripple setup dls + paintings.c gfx commands formatting + use PAINTING_SIZE for vertex dls 2022-08-09 19:49:00 -07:00
Arceveti
e2c0fe02ab Combine duplicate painting texture map data and move it to segment2 2022-08-09 15:44:34 -07:00
Arceveti
57d7529bce Allow paintings to use 32 vertex buffer + optimization + formatting 2022-08-09 14:53:06 -07:00
Arceveti
6e9df1f812 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-08-09 14:27:18 -07:00
Arceveti
d118c79ce4 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-painting-objects 2022-08-03 17:51:44 -07:00
Arceveti
d755fb4931 Make normalize_component return s8 instead of casting 2022-07-18 21:16:05 -07:00
Arceveti
786a569ed7 Revert formatting change in 'cutscene_exit_painting' 2022-07-18 21:12:09 -07:00
Arceveti
0ff4147366 Rename 'sPaintingEjectSoundPlayed' to 'gPaintingEjectSoundPlayed' 2022-07-18 21:11:23 -07:00
Arceveti
b340408c4f Merge branch 'develop/2.1.0' into develop/2.1.0-painting-objects 2022-07-05 19:39:18 -07:00
Arceveti
76809f51f6 Fix missing floor behind DDD painting 2022-07-05 19:27:20 -07:00
Arceveti
e176d806d7 Add painting objects + convert vanilla paintings into objects 2022-07-05 18:39:38 -07:00
137 changed files with 3505 additions and 8088 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "lib/libpl"]
path = lib/libpl
url = https://gitlab.com/parallel-launcher/libpl.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

@@ -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'

View File

@@ -135,7 +135,7 @@ endif
#==============================================================================#
# 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
@@ -253,6 +253,18 @@ ifeq ($(HVQM),1)
SRC_DIRS += src/hvqm
endif
# LIBPL - whether to include libpl library for interfacing with Parallel Launcher
# (library will be pulled into repo after building with this enabled for the first time)
# 1 - includes code in ROM
# 0 - does not
LIBPL ?= 0
LIBPL_DIR := lib/libpl
$(eval $(call validate-option,LIBPL,0 1))
ifeq ($(LIBPL),1)
DEFINES += LIBPL=1
SRC_DIRS += $(LIBPL_DIR)
endif
BUILD_DIR_BASE := build
# BUILD_DIR is the location where all build artifacts are placed
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
@@ -335,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 libpl submodule...)
DUMMY != git submodule update --init $(LIBPL_DIR) > /dev/null || echo FAIL
ifeq ($(DUMMY),FAIL)
$(error Failed to clone libpl submodule)
endif
endif
endif
$(info Building ROM...)
endif

View File

@@ -21,7 +21,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- **Fazana**: PuppyLib, ucode swapping, audio load time optimisations (with Arctic), general hacker qol improvements, visual debug
- **Reonu**: Starting the project/repo, widescreen, reonucam, various defines for hacker QoL
- **JoshDuMan**: Decomp guy, general assistance
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter, 4 controller support
- **Arceveti**: Silhouette, shadow optimizations, better hanging, breath meter, painting objects, 4 controller support, implementation of frameperfection's rounded corners fix, naming most unknowns, various hacker QOL improvements, and various optimizations/fixes
- **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
@@ -36,7 +36,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
**Lighting Engine by Wiseguy**
- 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.
- Alternatively, the main repo has `Puppylights` available, which is a more lightweight, but limited lighting library intended to be used to modify existing light properties. You can look at `puppylights.c` to find out how to use it.
**Puppycam**
- Puppycam is available on the master branch now, you can toggle it in `config/config_camera.h`. *

View File

@@ -1 +1 @@
v2.1.2
v2.2.0

View File

@@ -226,6 +226,9 @@ extern const Gfx mushroom_1up_seg3_dl_0302A660[];
// number
extern const GeoLayout number_geo[];
// painting
extern const GeoLayout painting_geo[];
// pebble
extern const Gfx pebble_seg3_dl_0301CB00[];

View File

@@ -18,6 +18,7 @@
#include "leaves/geo.inc.c"
#include "mario_cap/geo.inc.c"
#include "number/geo.inc.c"
#include "painting/geo.inc.c"
#include "mushroom_1up/geo.inc.c"
#include "star/geo.inc.c"
#include "dirt/geo.inc.c"

View File

@@ -0,0 +1,9 @@
#include "game/paintings.h"
const GeoLayout painting_geo[] = {
GEO_CULLING_RADIUS(2000),
GEO_OPEN_NODE(),
GEO_ASM(0, geo_painting_draw),
GEO_CLOSE_NODE(),
GEO_END(),
};

File diff suppressed because it is too large Load Diff

539
bin/segment2/paintings.c.in Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -143,7 +143,8 @@ const Gfx title_screen_bg_dl_face_easter_egg_end[] = {
};
#endif
#if defined(VERSION_SH)
// Not part of segment2, but define still covers same use case
#if (defined(COMPLETE_EN_US_SEGMENT2) && ENABLE_RUMBLE)
ALIGNED8 static const Texture title_texture_rumble_pak[] = {
#include "textures/title_screen_bg/title_screen_bg.06648.rgba16.inc.c"
};

View File

@@ -8,6 +8,7 @@
#include "game/behavior_actions.h"
#include "game/mario_actions_cutscene.h"
#include "game/mario_misc.h"
#include "game/paintings.h"
#include "game/object_helpers.h"
#include "game/debug.h"
#include "menu/file_select.h"
@@ -66,6 +67,7 @@
#define BC_HH(a, b) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 0, 16))
#define BC_W(a) ((uintptr_t)(u32)(a))
#define BC_PTR(a) ((uintptr_t)(a))
#define BC_BPTR(a, b) (_SHIFTL(a, 24, 8) + OS_K0_TO_PHYSICAL(b))
enum BehaviorCommands {
/*0x00*/ BHV_CMD_BEGIN,
@@ -180,8 +182,7 @@ enum BehaviorCommands {
// Executes a native game function.
#define CALL_NATIVE(func) \
BC_B(BHV_CMD_CALL_NATIVE), \
BC_PTR(func)
BC_BPTR(BHV_CMD_CALL_NATIVE, func)
// Adds a float to the specified field.
#define ADD_FLOAT(field, value) \
@@ -386,8 +387,7 @@ enum BehaviorCommands {
// Spawns a water droplet with the given parameters.
#define SPAWN_WATER_DROPLET(dropletParams) \
BC_B(BHV_CMD_SPAWN_WATER_DROPLET), \
BC_PTR(dropletParams)
BC_BPTR(BHV_CMD_SPAWN_WATER_DROPLET, dropletParams)
const BehaviorScript bhvStarDoor[] = {
@@ -2228,16 +2228,6 @@ const BehaviorScript bhvWaterLevelPillar[] = {
END_LOOP(),
};
const BehaviorScript bhvDddWarp[] = {
BEGIN(OBJ_LIST_SURFACE),
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
SET_FLOAT(oCollisionDistance, 30000),
BEGIN_LOOP(),
CALL_NATIVE(bhv_ddd_warp_loop),
CALL_NATIVE(load_object_collision_model),
END_LOOP(),
};
const BehaviorScript bhvMoatGrills[] = {
BEGIN(OBJ_LIST_SURFACE),
#ifdef UNLOCK_ALL
@@ -3495,6 +3485,15 @@ const BehaviorScript bhvUnlockDoorStar[] = {
END_LOOP(),
};
const BehaviorScript bhvPainting[] = {
BEGIN(OBJ_LIST_LEVEL),
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
CALL_NATIVE(bhv_painting_init),
BEGIN_LOOP(),
CALL_NATIVE(bhv_painting_loop),
END_LOOP(),
};
const BehaviorScript bhvInstantActiveWarp[] = {
BREAK(),
};
@@ -5873,7 +5872,7 @@ const BehaviorScript bhvRacingPenguin[] = {
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
LOAD_ANIMATIONS(oAnimations, penguin_seg5_anims_05008B74),
ANIMATE(PENGUIN_ANIM_IDLE),
SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 300, /*Gravity*/ -800, /*Bounciness*/ -5, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0),
SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 200, /*Gravity*/ -800, /*Bounciness*/ -5, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0),
SCALE(/*Unused*/ 0, /*Field*/ 400),
CALL_NATIVE(bhv_racing_penguin_init),
BEGIN_LOOP(),

View File

@@ -173,7 +173,6 @@ extern const BehaviorScript bhvBowserKeyUnlockDoor[];
extern const BehaviorScript bhvBowserKeyCourseExit[];
extern const BehaviorScript bhvInvisibleObjectsUnderBridge[];
extern const BehaviorScript bhvWaterLevelPillar[];
extern const BehaviorScript bhvDddWarp[];
extern const BehaviorScript bhvMoatGrills[];
extern const BehaviorScript bhvClockMinuteHand[];
extern const BehaviorScript bhvClockHourHand[];
@@ -294,6 +293,7 @@ extern const BehaviorScript bhvYellowBall[];
extern const BehaviorScript bhvMario[];
extern const BehaviorScript bhvToadMessage[];
extern const BehaviorScript bhvUnlockDoorStar[];
extern const BehaviorScript bhvPainting[];
extern const BehaviorScript bhvInstantActiveWarp[];
extern const BehaviorScript bhvAirborneWarp[];
extern const BehaviorScript bhvHardAirKnockBackWarp[];

View File

@@ -17,3 +17,9 @@
* Skips the title/splash screen (Super Mario 64 logo).
*/
// #define SKIP_TITLE_SCREEN
/**
* Skips the File Select screen
*/
// #define SKIP_FILE_SELECT

View File

@@ -14,6 +14,10 @@
*/
// #define DISABLE_ALL
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Enables a comprehensive standalone profiler. Automatically enabled by PUPPYPRINT_DEBUG.
* If not using PUPPYPRINT_DEBUG, press L + D-Pad Up to toggle the profiler.
@@ -85,3 +89,8 @@
* Forces a crash when the game starts. Useful for debugging the crash screen.
*/
// #define DEBUG_FORCE_CRASH_ON_BOOT
/**
* Intentionally crash the game whenever a runtime assertion fails (also invoked by the DEBUG define in the Makefile).
*/
#define DEBUG_ASSERTIONS

View File

@@ -7,7 +7,7 @@
/**
* Enables some mechanics that change behavior depending on hardcoded level numbers.
* TODO: separate this into separate defines, behavior params, or make these mechanics otherwise dynamic.
*/
*/
// #define ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
/**
@@ -71,7 +71,7 @@
// #define DIALOG_INDICATOR
/**
* Include the English characters that were missing from US segment2
* Include the English characters that were missing from US segment2 and the rumble pak texture if using rumble.
* J, Q, V, X, Z, ¨, !, !!, ?, &, %, ., and the beta key.
* [MAKE SURE TO INCLUDE EU AND JP/SH BASEROMS IN THE REPO TO OBTAIN THE ASSETS]
* If this is disabled, backup assets will be used.

View File

@@ -60,12 +60,12 @@
/**
* Makes the coins ia8 64x64 instead of ia16 32x32. Uses new ia8 textures so that vanilla coins look better.
*/
#define IA8_COINS
// #define IA8_COINS
/**
* Similar to the above, but 30 FPS (Textures by InTheBeef, cleaned up by Arceveti).
*/
#define IA8_30FPS_COINS
// #define IA8_30FPS_COINS
/**
* Use .rej microcode for certain objects (experimental - only should be used when F3DEX_GBI_2 is defined).
@@ -141,9 +141,10 @@
#define DEFAULT_CULLING_RADIUS 300
/**
* Eases the textured screen transitions to make them look smoother.
* Eases the textured screen transitions to make them look smoother.
* Extends the full radius for mario, bowser and the star transitions.
*/
#define EASE_IN_OUT_TRANSITIONS
// #define POLISHED_TRANSITIONS
/**
* Uses frustratio of 2 instead of 1.

View File

@@ -14,7 +14,7 @@
/**
* Decides whether you can exit course while moving (has no effect if you disable Exit Course).
*/
#define EXIT_COURSE_WHILE_MOVING
// #define EXIT_COURSE_WHILE_MOVING
/**
* Decides whether to treat exiting course as if the player had died.

View File

@@ -26,12 +26,12 @@
* - Precise turning control.
* - Prevents falling from the edges.
*/
#define BETTER_HANGING
// #define BETTER_HANGING
/**
* Change the movement speed when hanging from a ceiling (the vanilla value is 4.0f, has no effect if BETTER_HANGING is enabled).
*/
#define HANGING_SPEED 12.0f
#define HANGING_SPEED 4.0f
/**
* Prevents Mario from falling asleep while idle.
@@ -81,12 +81,12 @@
/**
* If A and Z are pressed on the same frame while running, Mario will long jump instead of ground pound.
*/
#define EASIER_LONG_JUMPS
// #define EASIER_LONG_JUMPS
/**
* Enables the ability to hold Z while twirling to descend faster.
*/
#define Z_TWIRL
// #define Z_TWIRL
/**
* Disables bonks when ground pounding next to a wall.
@@ -101,7 +101,7 @@
/**
* Allows Mario to grab hangable ceilings from any state.
*/
#define HANGING_FIX
// #define HANGING_FIX
/**
* The maximum angle the player can wall kick, in degrees. 0..90. To allow 45 degree wall kicks, you must supply `46` to allow 45 and under.
@@ -113,6 +113,11 @@
*/
#define DONT_LEDGE_GRAB_STEEP_SLOPES
/**
* Buffers an A input if you jump off a slope during the landing lag
*/
// #define SLOPE_BUFFER
/**
* Disables BLJs and crushes SimpleFlips's dreams.
*/
@@ -129,7 +134,7 @@
* be interrupted with text
* Uncomment this to fix this bug, and frustrate speedrunners
*/
// #define BUGFIX_DIALOG_TIME_STOP
#define BUGFIX_DIALOG_TIME_STOP
/**
* Enables Platform Displacement 2, an upgrade to the physics involving moving platforms and how Mario interacts with them.

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