Compare commits

..

317 Commits

Author SHA1 Message Date
thecozies
dde93edb07 v2.0.0 2021-12-30 10:49:10 -06:00
Gregory Heskett
0a53b7a602 Update README.md (#277) 2021-12-30 10:47:36 -06:00
Reonu
c228f8583f rename CUSTOM_DEBUG, add comments (#275) 2021-12-30 09:35:37 -06:00
thecozies
fde55ad6ef Improved movement config documentation related to turning around (#271)
Fixes #270
2021-12-30 04:57:36 -06:00
thecozies
47b20c859f Config cleanup/refactor (#269)
* Moved puppyprint define to graphics / rearranged some debug defines for ease of access

* Moved compatibility safeguards to config_safeguards.h

* spacing and comment formatting

* #272 Move GFX_POOL_SIZE to config_graphics.h

* disable EASIER_DIALOG_TRIGGER by default

* prevent redefining warnings

* small ifdef typo

* changed ifndef to undefs

Fixes #262
Fixes #272
2021-12-29 18:19:41 -06:00
thecozies
f9db11c7ec derive margin_radius from radius after capping at 200 (#266)
Fixes #259
2021-12-29 13:06:00 -06:00
thecozies
1aca17942a #264: Document non-stop stars' issues (#267)
* #264: Document non-stop stars' issues

* Update include/config/config_game.h

* nonstop vanilla comment
2021-12-29 10:50:03 +00:00
thecozies
34b0eba5c1 skip wall offsets < 0 (#255)
Fixes #255
2021-12-28 12:26:32 -06:00
Reonu
d71063f270 Fixed save and quitting while in widescreen (#257)
* Fixed save and quitting while in widescreen

* use define for the level

* all my homies hate ifdefs
2021-12-28 18:25:37 +00:00
Arceveti
2baabaf687 Swap static and dynamic surface checks back to vanilla order (#253)
* Swap static and dynamic surface checks back to vanilla order

* re-enable DISABLE_ALL config

Fixes #251 #252
2021-12-28 08:56:39 -06:00
Arceveti
133334994a Fix stuttering on thin slopes (#248)
* Fix stuttering on thin slopes

* Revert vec3f_find_ceil calls to vanilla

* Rename vec3f_find_ceil to find_mario_ceil

* Update src/engine/surface_collision.h

Fixes #249
2021-12-28 05:58:08 -06:00
thecozies
b564bed602 revert air step line to vanilla to fix bitfs scaling platform issue (#247)
Fixes #200
2021-12-27 13:03:13 -06:00
thecozies
bd5f810a3b Develop/refactor default defines (#242)
* Changed default config options

* Added build dir to includePaths for pngs

* disable NO_SLEEP by default

* Disable puppyprint by default

Sorry fazana 😔

* fix typos

* add comment about BETTER_REVERB console perf

* disable blue coin switch retry by default

* Update config_audio.h

Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: Mr-Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com>
2021-12-27 18:58:27 +00:00
Reonu
4477f16781 actually prevent floomba redefinition 2021-12-26 03:28:48 +00:00
Reonu
5ea71e38dd prevent double definition of floombas 2021-12-26 03:26:15 +00:00
Reonu
3fd984f2b5 Merge pull request #246 from Reonu/develop/refactor__better-intro-defines
Renamed HD_INTRO_TEXTURES define, separated intro floombas
2021-12-26 03:15:27 +00:00
Reonu
947c8c5234 Renamed HD_INTRO_TEXTURES define, separated intro floombas 2021-12-26 02:53:00 +00:00
Reonu
0bc97ea620 Merge pull request #245 from Reonu/develop/refactor__revert-ceil-buffer
revert ceil buffer
2021-12-25 14:19:42 +00:00
thecozies
119e34bae5 revert ceil buffer 2021-12-25 08:14:26 -06:00
Reonu
d99b79f335 Merge pull request #234 from Reonu/develop/arceveti/refactor/more_unlock_all
Make UNLOCK_ALL apply to more things
2021-12-24 22:19:32 +00:00
Arceveti
21c16b0482 UNLOCK_ALL unlocks cap boxes (slightly more epic edition) 2021-12-24 14:13:24 -08:00
Reonu
bb32509898 UNLOCK_ALL unlocks the cap boxes 2021-12-24 21:54:52 +00:00
Reonu
82f0338877 Merge pull request #243 from Reonu/develop/reonu/delete_patches
delete unnecesary patches
2021-12-24 20:07:20 +00:00
Reonu
8ecc76bdcf murdered more patches 2021-12-24 19:30:55 +00:00
Arceveti
247dd8eab9 Apply suggested changes 2021-12-24 11:24:28 -08:00
Reonu
1734c7afe4 delete unnecesary patches 2021-12-24 19:18:27 +00:00
Reonu
40d01909df Merge pull request #241 from Reonu/reonucam_credit
added reonucam credit
2021-12-24 18:52:38 +00:00
Reonu
eb0f4792b7 Merge pull request #238 from Reonu/develop/refactor__water-upwarp-define
Added WATER_PLUNGE_UPWARP define
2021-12-24 18:11:52 +00:00
Reonu
b7134c5931 added reonucam credit 2021-12-24 18:07:02 +00:00
Arceveti
d1e9c84326 Fix how shadows handle water/transparency/height (#228)
* Fix how shadows handle water/transparency/height

* Change shadow check for flying carpets from a level specific check to a oPlatformOnTrackType check

Fixes #179
2021-12-24 11:08:13 -06:00
Reonu
b3a383e8d3 Add reonucam patch (#239)
* added reonucam patch
Fixes #218
2021-12-24 11:04:42 -06:00
thecozies
9dda63419d added WATER_PLUNGE_UPWARP define 2021-12-24 09:06:47 -06:00
Arceveti
4b4740ec43 Change chain chomp load/unload distances depending on number of segments (#237)
Fixes #192
2021-12-24 06:20:59 -06:00
Arceveti
5915a5e7f2 Fix wrong ifdef/ifndef in bhv_invisible_objects_under_bridge_init 2021-12-23 15:19:09 -08:00
Arceveti
f5a6159104 Make UNLOCK_ALL apply to more things 2021-12-23 15:12:15 -08:00
Arceveti
b205c47da9 Fix coin formation coins being deleted if they spawn in the middle of a floor, also fix TTM slide coin position (#232)
Fixes #201
2021-12-23 16:37:45 -06:00
Arceveti
78bff66c30 Make area in SL igloo wider to prevent a softlock (#233)
Fixes #210
2021-12-23 16:28:29 -06:00
Arceveti
5c21b3467d Fix VISUAL_DEBUG breaking/crashing when OBJECTS_REJ is disabled (#211)
* Fix VISUAL_DEBUG breaking/crashing when OBJECTS_REJ is disabled

* Change vtl decrement in visual_surface_display from 6 to 3

Fixes #207
2021-12-22 15:47:49 -06:00
Fazana
6a341ad1ba Default all objects to non-rej (#227)
Fixes #221 (Default all objects to non-rej)

* Fix #221
2021-12-22 14:03:38 -06:00
Mr-Wiseguy
468ecb80a5 Moved extended bounds and world scale configuration to a new config_world.h file 2021-12-22 11:55:48 -05:00
Mr-Wiseguy
d4d8a0540f Replaced mtxf_to_mtx_asm with an equivalent implementation that supports WORLD_SCALE 2021-12-22 11:55:48 -05:00
Mr-Wiseguy
eb2211948d Renamed sAudioEnabled to gAudioEnabled 2021-12-22 11:24:15 -05:00
Mr-Wiseguy
ccea32c26d Fixed puppyprint debug RDP us calculations 2021-12-22 11:24:15 -05:00
Mr-Wiseguy
6627c2378a Fixed sAudioEnabled so that it disables audio CPU processing as well 2021-12-22 11:24:15 -05:00
Arceveti
d6e5d9e2cf Allow stop_and_set_height_to_floor to work at any height if Mario is teleporting (#213)
* Revert stop_and_set_height_to_floor to vanilla

Fixes #208
2021-12-22 06:48:20 -06:00
thecozies
2418aa7700 Merge pull request #226 from Reonu/develop/arceveti/refactor/fix_max_referenced_walls_typo
Fix "MAX_REFERENCED_WALLS" typo
2021-12-22 06:47:01 -06:00
Arceveti
7e2746eac4 Fix "MAX_REFERENCED_WALLS" typo 2021-12-21 19:30:29 -08:00
thecozies
602b7ee1d9 Merge pull request #219 from Reonu/develop/refactor__FAST_VERTICAL_CAMERA_MOVEMENT
utilize reonucam technique for FAST_VERTICAL_CAMERA_MOVEMENT

Fixes #164
2021-12-21 06:11:35 -06:00
thecozies
072282b68b utilize reonucam technique for FAST_VERTICAL_CAMERA_MOVEMENT 2021-12-21 06:07:14 -06:00
thecozies
9c22158b8e Merge pull request #202 from Reonu/develop/arceveti/refactor/drawing_distance_fix
Fix some drawing distance issues caused by AUTO_COLLISION_DISTANCE

Fixes #173
2021-12-21 05:24:28 -06:00
thecozies
b10d01cf53 Merge pull request #216 from Reonu/develop/refactor__config_doc
Config documentation

Fixes #191
2021-12-21 05:04:26 -06:00
Axollyon
afcc1f28a5 Start level comment & exit course comment/collapse 2021-12-20 15:50:55 -05:00
thecozies
6668ae391a Merge pull request #206 from Reonu/develop/arceveti/refactor/find_ceil_buffer
Re-implement Y buffer for find_ceil

Fixes #200
2021-12-20 06:42:37 -06:00
thecozies
c241f6941f Merge pull request #212 from Reonu/develop/arceveti/refactor/power_stars_heal
Re-implement POWER_STARS_HEAL for normal Power Stars
Fixes #209
2021-12-20 06:09:06 -06:00
Arceveti
102f21d533 Re-implement POWER_STARS_HEAL for normal Power Stars 2021-12-20 00:16:34 -08:00
Arceveti
eadfff013a Re-implement Y buffer for find_ceil 2021-12-19 14:30:47 -08:00
Arceveti
58836138c8 Merge branch 'develop/arceveti/refactor/drawing_distance_fix' of https://github.com/Reonu/HackerSM64 into develop/arceveti/refactor/drawing_distance_fix 2021-12-19 12:05:25 -08:00
Arceveti
94e19d439f Revert formatting changes to match vanilla decomp 2021-12-19 12:05:20 -08:00
Arceveti
63b2838e91 Update data/behavior_data.c
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2021-12-19 12:02:49 -08:00
Arceveti
eb0bb591f0 Update data/behavior_data.c
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2021-12-19 12:02:46 -08:00
Arceveti
a5033a56c9 Update data/behavior_data.c
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2021-12-19 12:02:42 -08:00
Reonu
6e03037f2e Merge pull request #205 from Reonu/better-credits
Update readme with better credits
2021-12-19 18:57:23 +00:00
thecozies
87b66c7400 Merge pull request #204 from Reonu/develop/refactor__spline_fix
Fixed spline poll code using the wrong values for keyframes

Fixes #170
2021-12-19 10:53:11 -06:00
thecozies
5538b207a5 Merge pull request #197 from Reonu/develop/arceveti/refactor__legacy_shadow_ids_fix
Fix LEGACY_SHADOW_IDS id conflict

Fixes #181
2021-12-19 10:44:03 -06:00
thecozies
bbdfcfd0bf Merge pull request #166 from Reonu/object_transparency
Fix some transparent objects rendering behind env boxes.
2021-12-19 10:09:42 -06:00
Reonu
e49bc4273a remove specific callouts + add auto col distance 2021-12-19 11:14:56 +00:00
Reonu
a6c4bfd5d6 silhouette + axo + ratio 2021-12-19 00:16:53 +00:00
Reonu
675977a4d6 added S2DEX engine to credits 2021-12-18 13:43:30 +00:00
Reonu
c5d3cd4f53 le funny typo 2021-12-18 13:35:16 +00:00
Reonu
9141396ec4 add fazana 2021-12-18 11:09:34 +00:00
Reonu
390ce3fdb9 added falco and moose 2021-12-18 11:07:56 +00:00
Reonu
48bea623e4 add arthur 2021-12-18 11:05:57 +00:00
Reonu
33056f6f3c Update readme with better credits
Better credits for individual contributors
2021-12-18 11:03:03 +00:00
Mr-Wiseguy
1c13a86569 Fixed spline poll code using the wrong values for keyframes 2021-12-18 01:35:37 -05:00
Arceveti
75eb23b21f Fix rumble build 2021-12-18 00:14:43 -05:00
Arceveti
5d46bb1f8e Fix some drawing distance issues caused by AUTO_COLLISION_DISTANCE 2021-12-17 13:56:33 -08:00
axollyon
665e5bac05 Merge pull request #199 from Reonu/develop/arceveti/refactor__fire_bars_fix
Use the vanilla default value for rotating fire bars if bparam2 is 0
2021-12-17 15:54:33 -05:00
Axollyon
46cc527da3 START_LEVEL safeguard 2021-12-17 15:48:20 -05:00
Arceveti
1360622242 Use the vanilla default value for rotating fire bars if bparam2 is 0 2021-12-17 12:26:05 -08:00
Arceveti
15a58d4dff Fix LEGACY_SHADOW_IDS id conflict 2021-12-17 11:50:41 -08:00
Arceveti
b5f785d669 Update src/game/object_helpers.c
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2021-12-17 10:35:57 -08:00
Arceveti
a2faba2a93 Update src/game/object_helpers.c
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2021-12-17 10:35:52 -08:00
thecozies
10dfcd9433 Merge pull request #196 from Reonu/develop/refactor__UNLOCK_FPS_fix
Fixes #196
2021-12-17 09:31:52 -06:00
thecozies
564af66ceb Fixed UNLOCK_FPS strobing 2021-12-17 09:27:19 -06:00
thecozies
dda3ebd29e Merge pull request #161 from Reonu/develop/arceveti/refactor_door_z_fix
Make the door lock a part of the key door model to eliminate z-fighting, also reduce z fighting on numbered doors with AUTO_LOD enabled.

Fixes #163
2021-12-17 08:40:08 -06:00
thecozies
de1decf039 Merge pull request #187 from Reonu/fazana/fix_rumble
Fix rumble build

Fixes #187
2021-12-17 06:51:51 -06:00
Fazana
112761e484 Fix rumble build 2021-12-17 12:45:05 +00:00
axollyon
236498a201 Merge pull request #185 from Reonu/develop/refactor__ukiki_cage_no_auto_coll
Set OBJ_FLAG_DONT_CALC_COLL_DIST on bhvUkikiCage
2021-12-17 02:24:14 -05:00
Axollyon
e7564adfb3 Set OBJ_FLAG_DONT_CALC_COLL_DIST on bhvUkikiCage 2021-12-17 02:19:06 -05:00
Mr-Wiseguy
18103b25f1 Removed superfluous RDP commands when switching microcodes which would override scissor 2021-12-16 22:03:54 -05:00
thecozies
91b59799f9 Merge pull request #177 from Reonu/develop/refactor__geo-billboard-fix
fixed geo_process_billboard floating point exception

Fixes #175
2021-12-16 17:31:13 -06:00
thecozies
6f45ad5eec Merge pull request #178 from Reonu/develop/refactor__allow-more-water-directions
Allow water to face any direction

Fixes #176
2021-12-16 17:00:51 -06:00
axollyon
55bfa653e2 Merge pull request #180 from Reonu/develop/refactor__fix_bbh_focOffset
Initialize focOffset so that BBH doesn't crash
2021-12-16 16:16:02 -05:00
Axollyon
a0d96ee90e Initialize focOffset so that BBH doesn't crash 2021-12-16 16:10:57 -05:00
thecozies
45dccaa1c0 Allow water to face any direction 2021-12-16 09:45:17 -06:00
thecozies
5be59e7970 fixed geo_process_billboard floating point exception 2021-12-16 09:17:58 -06:00
thecozies
61e7e8e506 Merge pull request #160 from Reonu/develop/arceveti/refactor_cap_bounce_fix
Use boolean defines for oCapDoScaleVertically

Fixes #157
2021-12-16 05:16:36 -06:00
Gregory Heskett
6832ebca2c Resolved some compiler warnings and added FALL_THROUGH define (#168)
* Address some more compiler warnings with different define toggles

* Remove unnecessary fallthrough attribute
2021-12-15 22:41:59 -05:00
Arceveti
552b765ed0 Move flames to LAYER_TRANSPARENT_INTER 2021-12-15 17:51:58 -08:00
Arceveti
993e8ec4e2 Make the door lock a part of the key door model to eliminate z-fighting, also reduce z fighting on numbered doors with AUTO_LOD enabled. 2021-12-15 17:30:22 -08:00
Arceveti
2a70709cfa Use boolean defines for oCapDoScaleVertically 2021-12-15 14:29:45 -08:00
thecozies
212e71120f Merge pull request #158 from Reonu/approach_s16_fix
Cast return value of approach_s16 to s16

fixes #138
2021-12-15 16:23:13 -06:00
Arceveti
b5af7fa0e1 Fix approach_s16 return value 2021-12-15 14:19:53 -08:00
thecozies
f50860cf8b Merge pull request #152 from aglab2/int2str
Adjust height value for terrain angle to kick in
2021-12-15 15:25:18 -06:00
thecozies
7c558d73e3 Merge pull request #156 from Reonu/develop/arceveti/refactor_fix_unagi_transparent_star
Add COURSE_NUM_TO_INDEX to the save_file_get_star_flags() check in bhv_unagi_init

fixes #155
2021-12-15 15:24:24 -06:00
thecozies
499eaa20ab Merge pull request #142 from Reonu/develop/arceveti/refactor_fix_build_warnings
Fix two build warnings for unused functions
2021-12-15 15:19:42 -06:00
Arceveti
51a9e18132 Add COURSE_NUM_TO_INDEX to save_file_get_star_flags check in bhv_unagi_init 2021-12-15 13:08:36 -08:00
Arceveti
ed4f8267e0 Fix fread() build warning 2021-12-15 13:00:44 -08:00
thecozies
a2cee228ca Merge pull request #153 from Reonu/develop/refactor__fix-hi-score-flashing
fixed hi score flashing
2021-12-15 13:53:20 -06:00
Fazana
58f3130de6 Remove menudata backup (#131)
Not considered important enough to keep
2021-12-15 14:19:45 -05:00
thecozies
dad1cd742a fixed hi score flashing 2021-12-15 09:57:33 -06:00
aglab2
4c915eb666 Adjust height value for terrain angle to kick in 2021-12-15 22:18:44 +08:00
thecozies
d6d64deb7e Merge pull request #151 from aglab2/int2str
Fixed puppyroll #134
2021-12-15 08:01:49 -06:00
aglab2
a1205e12a1 Fixed puppyroll #134 2021-12-15 21:10:36 +08:00
Reonu
fd043ea324 Merge pull request #150 from Reonu/develop/refactor__groundpound-fix
Change groundpound-fix define and functionality to just disable bonking
2021-12-15 15:05:15 +02:00
thecozies
9e12023873 Change groundpound-fix define and functionality to just disable bonking 2021-12-15 06:51:50 -06:00
thecozies
4fe0f19d0a Merge pull request #149 from aglab2/int2str
Fixed incorrect digit for 100s #145
2021-12-15 05:41:07 -06:00
aglab2
8a5a3a9f29 Fixed incorrect digit for 100s #145 2021-12-15 19:39:52 +08:00
thecozies
a929717881 Merge pull request #144 from Reonu/develop/thecozies/fp-exception-castle-grounds
Fixed stale reference bug from obj_mark_for_deletion change
2021-12-14 09:49:23 -06:00
thecozies
d2d3d60c9f Fixed stale reference bug from obj_mark_for_deletion change 2021-12-14 09:38:52 -06:00
Arceveti
282adb36b5 Fix build warnings for unused functions 2021-12-13 20:00:44 -08:00
thecozies
edc6fe6b57 Merge pull request #125 from Reonu/fix_build_warnings
Fix build warnings
2021-12-13 17:03:27 -06:00
thecozies
50d1b73bac Merge pull request #139 from Reonu/sliding_platform_fix
Fix sliding platforms using the wrong bparams
2021-12-13 17:03:11 -06:00
thecozies
8c110adb36 Merge pull request #140 from Reonu/develop/arceveti/legacy_shadow_ids
Add LEGACY_SHADOW_IDS define for Fast64 compatibility
2021-12-13 17:02:01 -06:00
Arceveti
836c6a4850 Better find_in_bounds_yaw_wdw_bob_thi ifdef 2021-12-13 14:22:16 -08:00
Arceveti
a5fce270ef Apply suggested changes 2021-12-13 14:14:16 -08:00
Arceveti
f2148ce405 Add LEGACY_SHADOW_IDS define for Fast64 compatibility 2021-12-13 14:09:52 -08:00
Arceveti
19c79e95fe Fix sliding platform bparams 2021-12-13 14:00:14 -08:00
thecozies
a2c4243600 Merge pull request #137 from Reonu/Reonu-patch-1
Fix BUGFIX_DIALOG_TIME_STOP
2021-12-13 13:43:31 -06:00
Reonu
d92ddeecd8 Fix BUGFIX_DIALOG_TIME_STOP
Fixes #136
2021-12-13 21:42:17 +02:00
thecozies
97eebacb1e Merge pull request #117 from Reonu/geo_process_master_list_sub_fix
Fix SILHOUETTE, OBJECTS_REJ, and ucode loading, also clean up render phase system and OBJECTS_REJ ifdefs a bit.
2021-12-13 07:13:55 -06:00
thecozies
913ea2dfdd Merge pull request #129 from Reonu/fazana/refactorfix (Puppycamera fixes)
Puppycamera fixes
2021-12-13 06:54:32 -06:00
Fazana
a5a826052e Further Puppycamera fixes 2021-12-13 06:52:42 -06:00
Fazana
9f538f8e7d Some puppytech fixes 2021-12-13 06:52:42 -06:00
thecozies
f7b79d132d Merge pull request #126 from Reonu/develop/bugfix/object-y-pos
bugfix: miscalculation in obj_turn_toward_object
2021-12-13 06:00:42 -06:00
thecozies
933b3d3ec4 Merge pull request #122 from aglab2/develop-fixup
Fixed clang compilation issues
2021-12-13 05:39:38 -06:00
thecozies
639e2e2898 Merge pull request #120 from Reonu/goddard-build-errors-fix
Goddard build errors fix
2021-12-13 05:35:53 -06:00
thecozies
ee60c7a2a5 Merge pull request #119 from Reonu/fix_fast64_import
Fix Fast64 importing by reverting sSegmentTable change
2021-12-13 05:34:14 -06:00
gheskett
460b45d8b0 bugfix: miscalculation in obj_turn_toward_object 2021-12-12 14:33:00 -05:00
Arceveti
8455f92421 Fix build warnings 2021-12-11 20:58:09 -08:00
Arceveti
81ff820c05 Add INTER mode for geo_update_layer_transparency 2021-12-11 20:31:50 -08:00
aglab2
f4f2a502c3 Fixed clang compilation issues 2021-12-12 12:22:13 +08:00
Mr-Wiseguy
ad23ec4ca6 Readded missing functions that caused build errors with Mario head enabled 2021-12-11 23:14:43 -05:00
Arceveti
ae0ba99459 Fix Fast64 importing by reverting sSegmentTable change 2021-12-11 20:13:39 -08:00
Mr-Wiseguy
19657d25b0 Fixed build with BETTER_HANGING off 2021-12-11 23:00:24 -05:00
Arceveti
3f0206bb1f Merge branch 'develop/refactor' of https://github.com/Reonu/HackerSM64 into geo_process_master_list_sub_fix 2021-12-11 19:55:34 -08:00
Arceveti
1f6d00e316 Fix duplicate comment & graph render layers/flags bitmask 2021-12-11 19:51:53 -08:00
Arceveti
50eb8a8473 Clean up OBJECTS_REJ ifdefs 2021-12-11 19:47:15 -08:00
Mr-Wiseguy
bdf489067b Fixed build with BETTER_HANGING off 2021-12-11 22:21:30 -05:00
Arceveti
958ae2b987 Fix SILHOUETTE, OBJECTS_REJ, and ucode loading, also clean up render phase system a bit. 2021-12-11 16:04:14 -08:00
thecozies
0812acc11b Merge pull request #111 from Reonu/develop/refactor__puppyprint-combo
Allow easier command for opening puppyprint debug
2021-12-11 17:26:34 -06:00
thecozies
94bbcc2d2a Merge pull request #114 from Reonu/develop/arceveti/refactor_fix
Fix shadow scaling and shifting
2021-12-11 17:26:07 -06:00
Arceveti
05d4be8fdf Fix shadow scaling and shifting 2021-12-11 15:13:05 -08:00
Fazana
141042c59a Rearranged framebuffers & fixed puppyprint console printing 2021-12-11 17:08:55 -06:00
thecozies
03014f34cb Allow easier command for opening puppyprint debug 2021-12-11 16:48:04 -06:00
thecozies
81f642aba4 camera conf documentation 2021-12-11 15:58:46 -06:00
thecozies
f740731fd6 surface load optimizations 2021-12-11 15:58:27 -06:00
thecozies
b529941cbb surface collision performance improvements 2021-12-11 15:55:42 -06:00
thecozies
9ddaf82c82 optimized file positions + support function/data sections 2021-12-11 15:40:22 -06:00
thecozies
b803b7f350 compilation flags 2021-12-11 15:39:33 -06:00
thecozies
2f5cec36a7 updated README 2021-12-11 15:37:43 -06:00
thecozies
e2ab5b3f90 stomp smoke -> small water splash 2021-12-11 15:37:17 -06:00
thecozies
75a188c7d9 rename stomp smoke 2021-12-11 15:36:36 -06:00
thecozies
fe8e30296d dialogs / text 2021-12-11 15:36:04 -06:00
thecozies
e966fe76ee title screen cleanup 2021-12-11 15:35:29 -06:00
thecozies
daa28cf98a star select cleanup 2021-12-11 15:34:33 -06:00
thecozies
1b1724b557 sram to ultrasm64 2021-12-11 15:32:49 -06:00
thecozies
9b13050d01 spawn sound cleanup 2021-12-11 15:32:29 -06:00
thecozies
b1dbbf0e05 spawn object optimizations and documentation 2021-12-11 15:32:09 -06:00
thecozies
6da4ca07f6 sound init: clean up define usage + documentation 2021-12-11 15:29:46 -06:00
thecozies
f28fc49027 skybox refactor 2021-12-11 15:26:32 -06:00
thecozies
ec042fc2eb shadow overhaul 2021-12-11 15:25:05 -06:00
thecozies
c2655c8bb7 segment2.h 2021-12-11 15:24:46 -06:00
thecozies
e538c669c1 screen transition documentation 2021-12-11 15:24:29 -06:00
thecozies
990757ef62 intro geo documentation 2021-12-11 15:23:17 -06:00
thecozies
9ec1709032 file select 2021-12-11 15:21:07 -06:00
thecozies
7ed9933735 reset various files to ultrasm64 2021-12-11 15:18:50 -06:00
thecozies
25dc528e18 s2d engine 2021-12-11 15:17:42 -06:00
thecozies
44982fdf74 save file documentation and unlock defines 2021-12-11 15:17:08 -06:00
thecozies
a7a7fb1140 hqvm back to ultrasm64 2021-12-11 15:12:33 -06:00
thecozies
a3622efc15 rumble opt and doc 2021-12-11 15:12:10 -06:00
thecozies
e18131a846 rendering graph node performance optimizations 2021-12-11 15:11:01 -06:00
thecozies
4d98245769 puppyprint updates and formatting changes 2021-12-11 14:31:19 -06:00
thecozies
b858817530 puppycam absf 2021-12-11 14:29:15 -06:00
thecozies
8303bc66f1 print / printf 2021-12-11 14:27:21 -06:00
thecozies
b6cc6ce79a platform displacement 2021-12-11 14:25:59 -06:00
thecozies
f5acebbaec paintings 2021-12-11 14:25:02 -06:00
thecozies
221c3b9ec5 object list processor documentation 2021-12-11 14:23:02 -06:00
thecozies
5778ec7e38 object helpers 2021-12-11 13:09:59 -06:00
thecozies
2c362ebb7c fix flamethrower bug 2021-12-11 12:51:44 -06:00
thecozies
fffa0db0bc object collision 2021-12-11 12:06:48 -06:00
thecozies
9a4c45e4ab object behaviors 2021-12-11 12:03:55 -06:00
thecozies
f1f0a0d1e8 moving textures 2021-12-11 11:55:01 -06:00
thecozies
97eb2ee23a memory.h documentation 2021-12-11 11:51:55 -06:00
thecozies
c33b3e3b69 mario documentation 2021-12-11 11:51:37 -06:00
thecozies
9fdae48a76 mario step: ledge grab fixes and documentation 2021-12-11 11:40:12 -06:00
thecozies
941f4b2f39 mario misc documentation 2021-12-11 11:28:17 -06:00
thecozies
61dc565c07 mario submerged documentation 2021-12-11 11:25:54 -06:00
thecozies
b274fc1afb mario stationary documentation 2021-12-11 11:21:36 -06:00
thecozies
d118f84e71 mario actions object documentation and options 2021-12-11 11:19:12 -06:00
thecozies
56d10de4fd mario actions moving documentation and options 2021-12-11 11:17:53 -06:00
thecozies
6ab783554f mario actions cutscene documentation 2021-12-11 11:03:23 -06:00
thecozies
43eba6e35e mario actions automatic documentation 2021-12-11 10:51:58 -06:00
thecozies
59bb53086f airborne documentation 2021-12-11 10:28:17 -06:00
thecozies
07e8a24d34 map parser documentation & formatting 2021-12-11 10:18:31 -06:00
thecozies
faf6929503 main.h documentation 2021-12-11 10:16:53 -06:00
thecozies
4ac365f34b macro special objects formatting changes 2021-12-11 10:16:06 -06:00
thecozies
7b3ad36cb0 level update defines 2021-12-11 10:14:05 -06:00
thecozies
fb40ca64d0 level geo 2021-12-11 10:06:39 -06:00
thecozies
e067673c51 interaction documentation 2021-12-11 10:05:08 -06:00
thecozies
0398a73f9b insn disasm 2021-12-11 09:52:32 -06:00
thecozies
771fd915af revert goddard to base decomp 2021-12-11 09:51:37 -06:00
thecozies
8f11b9de6a ingame menu 2021-12-11 09:49:52 -06:00
thecozies
13c10a047c only check if VC on render init 2021-12-11 09:49:10 -06:00
thecozies
8946885a22 hud 2021-12-11 09:34:49 -06:00
thecozies
295e535899 geo misc 2021-12-11 09:32:28 -06:00
thecozies
56da90ef85 game init 2021-12-11 09:23:55 -06:00
thecozies
5f8b0209a5 farcall helpers 2021-12-11 09:13:11 -06:00
thecozies
7227eb31fa envfx snow 2021-12-11 09:12:47 -06:00
thecozies
56e29c1dde bubbles 2021-12-11 09:12:10 -06:00
thecozies
6f43aa7032 debug updates 2021-12-11 09:11:14 -06:00
thecozies
679ae324b0 camera 2021-12-11 09:08:57 -06:00
thecozies
0e1a68bb65 behavior actions 2021-12-11 07:27:14 -06:00
thecozies
819c60a717 area 2021-12-11 07:25:22 -06:00
thecozies
76cafa71df _Putfld labeling 2021-12-11 07:22:40 -06:00
thecozies
ee81099336 Ldtob documentation 2021-12-11 07:22:17 -06:00
thecozies
e6d031c4c4 removed behaviors 2021-12-11 07:21:47 -06:00
thecozies
f86fa7fb3b graph node and mathutil 2021-12-11 07:21:09 -06:00
CrashOveride95
ad691a34c6 Fix crash with rumble + custom mario model 2021-12-10 08:34:07 -06:00
CrashOveride95
24687da134 Make ucode load from .o's (and also fix Super3D) 2021-12-10 08:33:21 -06:00
CrashOveride95
e7f6186580 Update UNF to latest master 2021-12-10 08:32:26 -06:00
CrashOveride95
4c779bdfed Fix console (lol) 2021-12-10 08:30:43 -06:00
CrashOveride95
2dc9446d4a Make ROM name smaller and change messages printed on build a bit 2021-12-10 08:30:19 -06:00
CrashOveride95
83ad6aec22 extra 2021-12-10 08:29:24 -06:00
n64
f2a8cf49de Refresh 15 2021-12-10 08:26:59 -06:00
Arceveti
9c6764ba1d Move GRUCODE define to proper location in makefile 2021-12-10 08:04:37 -06:00
CrashOveride95
baf071e527 Add librtc and fix some data declarations 2021-12-10 08:04:34 -06:00
thecozies
eee8af463d behaviors a - beta_fish 2021-12-10 05:41:59 -06:00
thecozies
ded4e11fbd mathutil updates (allow unused funcs) 2021-12-10 05:00:41 -06:00
thecozies
e535b4bdc1 mathutil updates 2021-12-09 12:59:29 -06:00
thecozies
3f5cf00f74 level script 2021-12-09 08:28:17 -06:00
thecozies
8f13447642 graph node 2021-12-09 07:57:58 -06:00
thecozies
719f5afdf9 message panel ucode small 2021-12-09 07:52:44 -06:00
thecozies
df88bb78f1 camera conf improved 2021-12-09 07:52:03 -06:00
thecozies
2df0dcfdde fixed model ids 2021-12-08 09:53:48 -06:00
thecozies
afa381564e egeo_layout 2021-12-08 09:48:33 -06:00
thecozies
d88a5b82b4 extended bounds 2021-12-08 09:39:09 -06:00
thecozies
a9796a7490 color helper functions 2021-12-08 09:38:29 -06:00
thecozies
c5c5d2c79b behavior script 2021-12-08 09:38:01 -06:00
thecozies
cd37e655f3 buffers: refresh 15 and revert to base decomp 2021-12-08 09:35:43 -06:00
thecozies
615d9abca3 book: slidec documentation 2021-12-08 09:34:41 -06:00
thecozies
e840d74b93 boot/memory.c reduced change load and added documentation 2021-12-08 09:34:12 -06:00
thecozies
e49404014d boot/main.c 2021-12-08 09:31:58 -06:00
thecozies
9ee39666d6 audio changes 2021-12-08 09:28:35 -06:00
thecozies
30bcccb686 sound player 2021-12-08 09:28:17 -06:00
thecozies
fd3de66b9f lib updates - rtc and rsp.s 2021-12-08 09:27:35 -06:00
thecozies
487187e3c6 includes: types.h 2021-12-08 09:26:57 -06:00
thecozies
624801a288 includes: surface type enums 2021-12-08 09:24:39 -06:00
thecozies
cefdec7023 includes: special presets 2021-12-08 09:24:10 -06:00
thecozies
d0382cd1be includes: sounds documentation 2021-12-08 09:23:49 -06:00
thecozies
e216b42f53 includes: sm64 types 2021-12-08 09:23:25 -06:00
thecozies
fad3406ab5 includes: segments and seq ids 2021-12-08 09:23:12 -06:00
thecozies
581b0cafc9 includes: rtc 2021-12-08 09:20:30 -06:00
thecozies
b384fb1b7b includes: object fields formatted to base decomp 2021-12-08 09:20:06 -06:00
thecozies
9c0878319f includes: object constants 2021-12-08 09:19:04 -06:00
thecozies
36c7c622e3 includes: movtex macros 2021-12-08 09:18:42 -06:00
thecozies
ac2852ba47 includes: model ids 2021-12-08 09:18:16 -06:00
thecozies
36001f7fd3 includes: mario geo switch case 2021-12-08 09:16:40 -06:00
thecozies
b6e18a95bf includes: mario anims 2021-12-08 09:16:23 -06:00
thecozies
142b79e310 includes level commands - macros 2021-12-08 09:16:00 -06:00
thecozies
d334579ad4 gfx dimensions 2021-12-08 09:14:50 -06:00
thecozies
381a0aed7c geo command enum 2021-12-08 09:12:55 -06:00
thecozies
984b117e77 farcall documentation 2021-12-08 09:12:28 -06:00
thecozies
4467ff1ed1 course table 2021-12-08 09:11:59 -06:00
thecozies
664fe248e1 colors 2021-12-08 09:11:30 -06:00
thecozies
26a064faa1 OS documentation 2021-12-08 09:10:51 -06:00
thecozies
37ca9f03b1 enhancement updates/removals 2021-12-08 09:10:27 -06:00
thecozies
bff61ca5ba separated config.h into multiple files 2021-12-08 09:09:40 -06:00
thecozies
91c169e693 behavior data documentation updates 2021-12-08 09:08:54 -06:00
thecozies
7741e5123e title screen bin id 2021-12-08 09:01:14 -06:00
thecozies
e9b2562694 segment2.c 2021-12-08 09:00:59 -06:00
thecozies
e4e8bc2d9a effect bin id 2021-12-08 08:44:53 -06:00
thecozies
e97695d3d8 vanilla demo data 2021-12-08 08:44:33 -06:00
thecozies
1e8a960a17 actor documentation: group headers 2021-12-08 08:44:10 -06:00
thecozies
455da1c3a8 actor documentation: whomp 2021-12-08 08:43:00 -06:00
thecozies
c24ef6562f actor documentation: water ring 2021-12-08 08:42:44 -06:00
thecozies
4b20d19989 actor documentation: unagi transparent star 2021-12-08 08:41:57 -06:00
thecozies
a091678009 actor documentation: ukiki 2021-12-08 08:41:42 -06:00
thecozies
b9773ffae3 actor documentation: tree + cam dist change 2021-12-08 08:41:18 -06:00
thecozies
80641a82c4 actor documentation: star 2021-12-08 08:40:26 -06:00
thecozies
2a87631629 actor documentation: rename stomp smoke 2021-12-08 08:40:08 -06:00
thecozies
1221e2944b actor documentation: transparent star 2021-12-08 08:39:51 -06:00
thecozies
0c83e15d04 actor documentation: sand 2021-12-08 08:39:24 -06:00
thecozies
63b9e771d7 actor documentation: poundable pole 2021-12-08 08:39:03 -06:00
thecozies
34cf317fc4 actor documentation: penguin 2021-12-08 08:38:48 -06:00
thecozies
e5ee3e89b2 actos DIALOG_INDICATOR 2021-12-08 08:38:02 -06:00
thecozies
aab3b8ecb0 actor documentation: h - m 2021-12-08 08:37:42 -06:00
thecozies
1080fc90e1 floomba 2021-12-08 08:35:47 -06:00
thecozies
1c11bb7ddc actor documentation: exclamation_box_outline 2021-12-08 08:35:29 -06:00
thecozies
2caed65be9 .gitignore + clownfont textures 2021-12-08 08:10:58 -06:00
thecozies
409bce0eca tools reset to base ultrasm64 2021-12-08 08:10:25 -06:00
thecozies
8d6d3ca69a actor documentation: door 2021-12-08 06:41:05 -06:00
thecozies
571388c821 actor documentation: dirt 2021-12-08 06:40:47 -06:00
thecozies
f5e9c0d710 acts: coin updates 2021-12-08 06:40:26 -06:00
thecozies
91b77c05dd actor documentation: checkboard platform 2021-12-08 06:39:52 -06:00
thecozies
8514254fd3 actor documentation: burn smoke 2021-12-08 06:39:08 -06:00
thecozies
4ed3975973 actors: replaced bin ids 2021-12-08 06:38:44 -06:00
thecozies
ddfc2f6609 actor documentation: breakable box 2021-12-08 06:33:24 -06:00
thecozies
5ae11f3bab actor documentation: bowser 2021-12-08 06:32:47 -06:00
thecozies
830e2ea81c actor documentation: boo castle 2021-12-08 06:32:18 -06:00
thecozies
0a5659ed09 actor documentation: boo 2021-12-08 06:32:04 -06:00
thecozies
e607106cd5 level documentation jrb - wf + entry/scripts 2021-12-08 06:30:57 -06:00
thecozies
7a54020fef level documentation hmc and intro 2021-12-08 06:12:32 -06:00
thecozies
72d0d35274 level documentation a - e 2021-12-08 06:03:40 -06:00
thecozies
696a87c9b0 n64_assert.s 2021-12-07 14:03:15 -06:00
thecozies
1e0db61191 Remove unneeded instructions in math.s 2021-12-07 14:02:50 -06:00
thecozies
6a1d1c489b Updated vscode settings 2021-12-07 14:01:47 -06:00
16 changed files with 33 additions and 290 deletions

View File

@@ -4,7 +4,6 @@
# These owners will be the default owners for everything in the repo.
* @Reonu
* @thecozies
* @Mr-Wiseguy
# 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

@@ -33,7 +33,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
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-wip](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine-wip)). Instructions on how to use it are in the readme of that branch.
- 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**

View File

@@ -1 +1 @@
v2.0.1
v2.0.0

View File

@@ -33,10 +33,6 @@
// Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified.
// #define PUPPYCAM
// Enables Reonucam, a custom camera that aims to be a more feature-rich "aglabcam" that also uses less buttons.
// An explanation the features can be seen here: https://www.youtube.com/watch?v=TQNkznX9Z3k (please note that the analog feature shown at the end is no longer present)
// #define REONUCAM
// Note: Reonucam is available, but because we had no time to test it properly, it's included as a patch rather than being in the code by default.
// Run this command to apply the patch if you want to use it:
// tools/apply_patch.sh enhancements/reonucam.patch
@@ -56,22 +52,3 @@
#ifdef ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
#define ENABLE_VANILLA_CAM_PROCESSING
#endif
// Reonucam overrides
#ifdef REONUCAM
// Use course default mode
#ifndef USE_COURSE_DEFAULT_MODE
#define USE_COURSE_DEFAULT_MODE
#endif
// Force camera mode to 8 Dir
#ifdef FORCED_CAMERA_MODE
#undef FORCED_CAMERA_MODE
#endif
#define FORCED_CAMERA_MODE CAMERA_MODE_8_DIRECTIONS
// Disable vanilla cam processing
#ifdef ENABLE_VANILLA_CAM_PROCESSING
#undef ENABLE_VANILLA_CAM_PROCESSING
#endif
#endif

View File

@@ -38,7 +38,7 @@
* importing large custom content.
*/
#define SEG_POOL_START _framebuffersSegmentBssEnd // 0x0165000 in size
#define SEG_POOL_START _engineSegmentBssEnd // 0x0165000 in size
#define POOL_SIZE RAM_END - SEG_POOL_START
#define MAP_PARSER_ADDRESS 0x80345678

View File

@@ -92,15 +92,6 @@
#define TEXT_HUD_PRESS_L _("PRESS L TO SWITCH")
#endif
//Reonucam
#ifdef REONUCAM
#define TEXT_CAM_INFO_SLOWEST _("CAM SPEED: SLOWEST")
#define TEXT_CAM_INFO_SLOW _("CAM SPEED: SLOW")
#define TEXT_CAM_INFO_MEDIUM _("CAM SPEED: MEDIUM")
#define TEXT_CAM_INFO_FAST _("CAM SPEED: FAST")
#define TEXT_CAM_INFO_FASTEST _("CAM SPEED: FASTEST")
#endif
#if defined(VERSION_JP) || defined(VERSION_SH)
/**

26
sm64.ld
View File

@@ -102,13 +102,6 @@ SECTIONS
END_SEG(boot)
. = (RAM_START + 0x400);
BEGIN_NOLOAD(zbuffer)
{
BUILD_DIR/src/buffers/zbuffer.o(.bss*);
}
END_NOLOAD(zbuffer)
. = _zbufferSegmentBssEnd;
BEGIN_NOLOAD(buffers)
{
BUILD_DIR/src/buffers/buffers.o(.bss*);
@@ -286,13 +279,28 @@ SECTIONS
. = ALIGN(0x40);
}
END_NOLOAD(engine)
. = _engineSegmentBssEnd;
#ifndef USE_EXT_RAM
. = 0x80200000;
#else
. = 0x80400000;
#endif
BEGIN_NOLOAD(framebuffers)
{
BUILD_DIR/src/buffers/framebuffers.o(.bss*);
}
END_NOLOAD(framebuffers)
#ifndef USE_EXT_RAM
. = 0x80300000;
#else
. = 0x80500000;
#endif
BEGIN_NOLOAD(zbuffer)
{
BUILD_DIR/src/buffers/zbuffer.o(.bss*);
}
END_NOLOAD(zbuffer)
. = _engineSegmentBssEnd;
__mainPoolStart = .;
__mainPoolSize = (RAM_END - .);

View File

@@ -139,6 +139,11 @@ void main_pool_init(void *start, void *end) {
#endif
}
extern u8 _framebuffersSegmentBssStart[];
extern u8 _framebuffersSegmentBssEnd[];
extern u8 _zbufferSegmentBssStart[];
extern u8 _zbufferSegmentBssEnd[];
/**
* Allocate a block of memory from the pool of given size, and from the
* specified side of the pool (MEMORY_POOL_LEFT or MEMORY_POOL_RIGHT).
@@ -153,6 +158,12 @@ void *main_pool_alloc(u32 size, u32 side) {
sPoolFreeSpace -= size;
if (side == MEMORY_POOL_LEFT) {
newListHead = (struct MainPoolBlock *) ((u8 *) sPoolListHeadL + size);
if ((u32)newListHead >= (u32)&_framebuffersSegmentBssStart && (u32)newListHead <= (u32)&_framebuffersSegmentBssEnd) {
newListHead = (struct MainPoolBlock *)ALIGN16((u32)&_framebuffersSegmentBssEnd + 0x40);
}
if ((u32)newListHead >= (u32)&_zbufferSegmentBssStart && (u32)newListHead <= (u32)&_zbufferSegmentBssEnd) {
newListHead = (struct MainPoolBlock *)ALIGN16((u32)&_zbufferSegmentBssEnd + 0x40);
}
sPoolListHeadL->next = newListHead;
newListHead->prev = sPoolListHeadL;
newListHead->next = NULL;

View File

@@ -74,10 +74,6 @@
*
*/
#ifdef REONUCAM
struct ReonucamState gReonucamState = { 2, FALSE, FALSE, FALSE, 0, 0, };
#endif
// BSS
/**
* Stores Lakitu's position from the last frame, used for transitioning in next_lakitu_state()
@@ -456,25 +452,6 @@ CameraTransition sModeTransitions[] = {
extern u8 sDanceCutsceneIndexTable[][4];
extern u8 sZoomOutAreaMasks[];
#ifdef REONUCAM
// Returns the camera speed based on the user's camera speed setting
f32 set_camera_speed(void) {
switch(gReonucamState.speed) {
case 0:
return 0.5f;
case 1:
return 1;
case 2:
return 1.5f;
case 3:
return 2;
case 4:
return 3.5f;
}
return 0;
}
#endif
/**
* Starts a camera shake triggered by an interaction
*/
@@ -894,30 +871,9 @@ s32 update_8_directions_camera(struct Camera *c, Vec3f focus, Vec3f pos) {
s16 pitch = look_down_slopes(camYaw);
f32 posY;
f32 focusY;
#ifdef REONUCAM
f32 yOff;
#else
f32 yOff = 125.f;
#endif
f32 baseDist = 1000.f;
#ifdef REONUCAM
if (gMarioState->action & ACT_FLAG_SWIMMING) {
yOff = -125.f;
} else {
yOff = 125.f;
}
if ((gPlayer1Controller->buttonDown & R_TRIG) && (gPlayer1Controller->buttonDown & U_CBUTTONS)) {
gReonucamState.keepCliffCam = 1;
pitch = DEGREES(60);
} else if (((gPlayer1Controller->buttonDown & U_CBUTTONS) || (gPlayer1Controller->buttonDown & R_TRIG)) && gReonucamState.keepCliffCam) {
pitch = DEGREES(60);
} else {
gReonucamState.keepCliffCam = 0;
}
#endif
sAreaYaw = camYaw;
calc_y_to_curr_floor(&posY, 1.f, 200.f, &focusY, 0.9f, 200.f);
focus_on_mario(focus, pos, posY + yOff, focusY + yOff, sLakituDist + baseDist, pitch, camYaw);
@@ -1159,60 +1115,13 @@ s32 snap_to_45_degrees(s16 angle) {
return angle;
}
#ifdef REONUCAM
void reonucam_handler(void) {
// Get the camera speed based on the user's setting
f32 cameraSpeed = set_camera_speed();
//45º rotations
if ((gPlayer1Controller->buttonPressed & L_CBUTTONS) && !(gPlayer1Controller->buttonDown & R_TRIG)) {
s8DirModeBaseYaw -= DEGREES(45);
} else if ((gPlayer1Controller->buttonPressed & R_CBUTTONS) && !(gPlayer1Controller->buttonDown & R_TRIG)) {
s8DirModeBaseYaw += DEGREES(45);
}
//Smooth rotation
if (gPlayer1Controller->buttonDown & R_TRIG) {
if (gPlayer1Controller->buttonDown & L_CBUTTONS) {
s8DirModeBaseYaw -= DEGREES(cameraSpeed);
} else if (gPlayer1Controller->buttonDown & R_CBUTTONS) {
s8DirModeBaseYaw += DEGREES(cameraSpeed);
}
gReonucamState.rButtonCounter++; // This increses whenever R is held.
} else {
if (gReonucamState.rButtonCounter > 0 && gReonucamState.rButtonCounter <= 5 && !((gPlayer1Controller->buttonDown & L_CBUTTONS) || (gPlayer1Controller->buttonDown & R_CBUTTONS) || (gMarioState->action & ACT_FLAG_SWIMMING_OR_FLYING))) {
// This centers the camera behind mario. It triggers when you let go of R in less than 5 frames.
s8DirModeYawOffset = 0;
s8DirModeBaseYaw = gMarioState->faceAngle[1]-0x8000;
gMarioState->area->camera->yaw = s8DirModeBaseYaw;
play_sound_rbutton_changed();
}
gReonucamState.rButtonCounter = 0;
}
if (gPlayer1Controller->buttonPressed & R_TRIG) {
if (gReonucamState.rButtonCounter2 <= 5) {
set_cam_angle(CAM_ANGLE_MARIO); // Enter mario cam if R is pressed 2 times in less than 5 frames
gReonucamState.rButtonCounter2 = 6;
} else {
gReonucamState.rButtonCounter2 = 0;
}
} else {
gReonucamState.rButtonCounter2++;
}
if (gPlayer1Controller->buttonPressed & D_JPAD) {
s8DirModeBaseYaw = snap_to_45_degrees(s8DirModeBaseYaw); // Lock the camera to the nearest 45deg axis
}
}
#endif
/**
* A mode that only has 8 camera angles, 45 degrees apart
*/
void mode_8_directions_camera(struct Camera *c) {
Vec3f pos;
s16 oldAreaYaw = sAreaYaw;
#ifdef REONUCAM
reonucam_handler();
radial_camera_input(c);
#else
radial_camera_input(c);
if (gPlayer1Controller->buttonPressed & R_CBUTTONS) {
@@ -1239,18 +1148,13 @@ void mode_8_directions_camera(struct Camera *c) {
s8DirModeYawOffset = snap_to_45_degrees(s8DirModeYawOffset);
}
#endif
#endif
lakitu_zoom(400.f, 0x900);
c->nextYaw = update_8_directions_camera(c, c->focus, pos);
#ifdef REONUCAM
set_camera_height(c, pos[1]);
#endif
c->pos[0] = pos[0];
c->pos[2] = pos[2];
sAreaYawChange = sAreaYaw - oldAreaYaw;
#ifndef REONUCAM
set_camera_height(c, pos[1]);
#endif
}
/**
@@ -2846,9 +2750,6 @@ void set_camera_mode(struct Camera *c, s16 mode, s16 frames) {
#ifndef ENABLE_VANILLA_CAM_PROCESSING
if (mode == CAMERA_MODE_8_DIRECTIONS) {
// Helps transition from any camera mode to 8dir
#ifdef REONUCAM
s8DirModeBaseYaw = 0;
#endif
s8DirModeYawOffset = snap_to_45_degrees(c->yaw);
}
#endif
@@ -2974,7 +2875,6 @@ void update_camera(struct Camera *c) {
OSTime first = osGetTime();
OSTime colTime = collisionTime[perfIteration];
#endif
gCamera = c;
update_camera_hud_status(c);
if (c->cutscene == CUTSCENE_NONE
@@ -2985,23 +2885,14 @@ void update_camera(struct Camera *c) {
// Only process R_TRIG if 'fixed' is not selected in the menu
if (cam_select_alt_mode(CAM_SELECTION_NONE) == CAM_SELECTION_MARIO) {
if (gPlayer1Controller->buttonPressed & R_TRIG) {
#ifdef REONUCAM
if (set_cam_angle(0) == CAM_ANGLE_MARIO) {
s8DirModeBaseYaw = snap_to_45_degrees(s8DirModeBaseYaw);
set_cam_angle(CAM_ANGLE_LAKITU);
}
#else
if (set_cam_angle(0) == CAM_ANGLE_LAKITU) {
set_cam_angle(CAM_ANGLE_MARIO);
} else {
set_cam_angle(CAM_ANGLE_LAKITU);
}
#endif
}
}
#ifndef REONUCAM
play_sound_if_cam_switched_to_lakitu_or_mario();
#endif
}
// Initialize the camera
@@ -4660,21 +4551,15 @@ void play_camera_buzz_if_c_sideways(void) {
}
void play_sound_cbutton_up(void) {
#ifndef REONUCAM
play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
#endif
}
void play_sound_cbutton_down(void) {
#ifndef REONUCAM
play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource);
#endif
}
void play_sound_cbutton_side(void) {
#ifndef REONUCAM
play_sound(SOUND_MENU_CAMERA_TURN, gGlobalSoundSource);
#endif
}
void play_sound_button_change_blocked(void) {
@@ -4773,11 +4658,7 @@ void radial_camera_input(struct Camera *c) {
}
// Zoom in / enter C-Up
#ifdef REONUCAM
if ((gPlayer1Controller->buttonPressed & U_CBUTTONS) && !(gPlayer1Controller->buttonDown & R_TRIG)) {
#else
if (gPlayer1Controller->buttonPressed & U_CBUTTONS) {
#endif
if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) {
gCameraMovementFlags &= ~CAM_MOVE_ZOOMED_OUT;
play_sound_cbutton_up();
@@ -4866,7 +4747,6 @@ void handle_c_button_movement(struct Camera *c) {
}
}
/**
* Zero the 10 cvars.
*/
@@ -5332,11 +5212,7 @@ void set_camera_mode_8_directions(struct Camera *c) {
if (c->mode != CAMERA_MODE_8_DIRECTIONS) {
c->mode = CAMERA_MODE_8_DIRECTIONS;
sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT;
#ifdef REONUCAM
s8DirModeBaseYaw = snap_to_45_degrees(s8DirModeBaseYaw);
#else
s8DirModeBaseYaw = 0;
#endif
s8DirModeYawOffset = 0;
}
}

View File

@@ -90,18 +90,6 @@
#define CAM_MODE_LAKITU_WAS_ZOOMED_OUT 0x02
#define CAM_MODE_MARIO_SELECTED 0x04
#ifdef REONUCAM
struct ReonucamState {
u8 speed;
u8 waterCamOverride;
u8 flyingCamOverride;
u8 keepCliffCam;
u16 rButtonCounter;
u16 rButtonCounter2;
};
extern struct ReonucamState gReonucamState;
#endif
enum CameraSelection {
CAM_SELECTION_NONE,
CAM_SELECTION_MARIO,

View File

@@ -29,9 +29,6 @@
#include "puppycam2.h"
#include "debug_box.h"
#include "vc_check.h"
#ifdef REONUCAM
#include "camera.h"
#endif
// First 3 controller slots
struct Controller gControllers[3];
@@ -754,9 +751,6 @@ void thread5_game_loop(UNUSED void *arg) {
play_music(SEQ_PLAYER_SFX, SEQUENCE_ARGS(0, SEQ_SOUND_PLAYER), 0);
set_sound_mode(save_file_get_sound_mode());
#ifdef REONUCAM
gReonucamState.speed = save_file_get_camera_speed();
#endif
#ifdef WIDE
gConfig.widescreen = save_file_get_widescreen_mode();
#endif

View File

@@ -63,14 +63,6 @@ void *languageTable[][3] = {
#endif
};
#ifdef REONUCAM
u8 textCamInfoSlowest[] = { TEXT_CAM_INFO_SLOWEST };
u8 textCamInfoSlow[] = { TEXT_CAM_INFO_SLOW };
u8 textCamInfoMedium[] = { TEXT_CAM_INFO_MEDIUM };
u8 textCamInfoFast[] = { TEXT_CAM_INFO_FAST};
u8 textCamInfoFastest[] = { TEXT_CAM_INFO_FASTEST };
#endif
extern u8 gLastCompletedCourseNum;
extern u8 gLastCompletedStarNum;
@@ -1463,48 +1455,6 @@ void reset_red_coins_collected(void) {
gRedCoinsCollected = 0;
}
#ifdef REONUCAM
void render_reonucam_speed_setting(void) {
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha);
switch (gReonucamState.speed) {
case 0:
print_generic_string(190, 20, textCamInfoSlowest);
break;
case 1:
print_generic_string(190, 20, textCamInfoSlow);
break;
case 2:
print_generic_string(190, 20, textCamInfoMedium);
break;
case 3:
print_generic_string(190, 20, textCamInfoFast);
break;
case 4:
print_generic_string(190, 20, textCamInfoFastest);
break;
}
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
if (gPlayer1Controller->buttonPressed & R_JPAD) {
if (gReonucamState.speed < 4) {
gReonucamState.speed += 1;
} else {
gReonucamState.speed = 0;
}
save_file_set_camera_speed(gReonucamState.speed);
} else if (gPlayer1Controller->buttonPressed & L_JPAD) {
if (gReonucamState.speed > 0) {
gReonucamState.speed -= 1;
} else {
gReonucamState.speed = 4;
}
save_file_set_camera_speed(gReonucamState.speed);
}
}
#endif
void change_dialog_camera_angle(void) {
if (cam_select_alt_mode(0) == CAM_SELECTION_MARIO) {
gDialogCameraAngleIndex = CAM_SELECTION_MARIO;
@@ -1967,9 +1917,6 @@ s32 render_pause_courses_and_castle(void) {
}
#if defined(WIDE) && !defined(PUPPYCAM)
render_widescreen_setting();
#endif
#ifdef REONUCAM
render_reonucam_speed_setting();
#endif
if (gDialogTextAlpha < 250) {
gDialogTextAlpha += 25;

View File

@@ -1373,22 +1373,8 @@ void update_mario_inputs(struct MarioState *m) {
void set_submerged_cam_preset_and_spawn_bubbles(struct MarioState *m) {
f32 heightBelowWater;
s16 camPreset;
#ifdef REONUCAM
// skip if not submerged
if ((m->action & ACT_GROUP_MASK) != ACT_GROUP_SUBMERGED) return;
// R Trigger toggles camera mode override
if ((gPlayer1Controller->buttonPressed & R_TRIG) && (m->action & ACT_FLAG_SWIMMING)) {
gReonucamState.waterCamOverride ^= 1;
}
// If override, set mode to 8 dir. Otherwise, use normal water processing
if (gReonucamState.waterCamOverride) {
if (m->area->camera->mode != CAMERA_MODE_8_DIRECTIONS) set_camera_mode(m->area->camera, CAMERA_MODE_8_DIRECTIONS, 1);
} else {
#else
if ((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) {
#endif
heightBelowWater = (f32)(m->waterLevel - 80) - m->pos[1];
camPreset = m->area->camera->mode;

View File

@@ -1696,12 +1696,6 @@ s32 act_shot_from_cannon(struct MarioState *m) {
s32 act_flying(struct MarioState *m) {
s16 startPitch = m->faceAngle[0];
#ifdef REONUCAM
if (gPlayer1Controller->buttonPressed & R_TRIG) {
gReonucamState.flyingCamOverride ^= 1;
}
#endif
if (m->input & INPUT_Z_PRESSED) {
if (m->area->camera->mode == FLYING_CAMERA_MODE) {
set_camera_mode(m->area->camera, m->area->camera->defMode, 1);
@@ -1716,17 +1710,9 @@ s32 act_flying(struct MarioState *m) {
return set_mario_action(m, ACT_FREEFALL, 0);
}
#ifdef REONUCAM
if (!gReonucamState.flyingCamOverride && m->area->camera->mode != FLYING_CAMERA_MODE) {
set_camera_mode(m->area->camera, FLYING_CAMERA_MODE, 1);
} else if (gReonucamState.flyingCamOverride && m->area->camera->mode != CAMERA_MODE_8_DIRECTIONS) {
set_camera_mode(m->area->camera, CAMERA_MODE_8_DIRECTIONS, 1);
}
#else
if (m->area->camera->mode != FLYING_CAMERA_MODE) {
set_camera_mode(m->area->camera, FLYING_CAMERA_MODE, 1);
}
#endif
if (m->actionState == ACT_STATE_FLYING_SPIN) {
if (m->actionArg == ACT_ARG_FLYING_FROM_CANNON) {

View File

@@ -715,19 +715,6 @@ u32 save_file_get_sound_mode(void) {
return gSaveBuffer.menuData.soundMode;
}
#ifdef REONUCAM
void save_file_set_camera_speed(u8 speed) {
gSaveBuffer.menuData.cameraSpeedSetting = speed;
gMainMenuDataModified = TRUE;
save_main_menu_data();
}
u8 save_file_get_camera_speed(void) {
return gSaveBuffer.menuData.cameraSpeedSetting;
}
#endif
void save_file_move_cap_to_default_location(void) {
if (save_file_get_flags() & SAVE_FLAG_CAP_ON_GROUND) {
switch (gSaveBuffer.files[gCurrSaveFileNum - 1][0].capLevel) {

View File

@@ -67,9 +67,6 @@ struct MainMenuSaveData {
#ifdef WIDE
u8 wideMode: 1;
#endif
#ifdef REONUCAM
u8 cameraSpeedSetting: 3;
#endif
#if MULTILANG
u8 language: 2;
@@ -203,10 +200,6 @@ u32 save_file_get_sound_mode(void);
u32 save_file_get_widescreen_mode(void);
void save_file_set_widescreen_mode(u8 mode);
#endif
#ifdef REONUCAM
u8 save_file_get_camera_speed(void);
void save_file_set_camera_speed(u8 speed);
#endif
void save_file_move_cap_to_default_location(void);
void disable_warp_checkpoint(void);