343 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Fazana
5764ae0ece Puppy Camera for 2.1 (#554) 2023-06-09 11:13:57 -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
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
daf53f85aa fixed nitpicks and dialog trigger number 2023-06-05 10:59:44 -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
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
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
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
Arceveti
397e687a6c Add MAX_NUM_PLAYERS 2023-03-09 16:02:48 -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