Commit Graph

1225 Commits

Author SHA1 Message Date
coco875 08dca164d4 fix nightly link (#734)
Updated playtesting links to specify architecture for Windows and Linux.
2026-08-01 12:25:06 -06:00
quarrel07 f9cf0fc9a3 docs: fix broken links and missing assets on the GitHub Pages site (#726)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2026-07-28 23:47:53 -06:00
MegaMech b1eefb7361 Update SkySnow.cpp (#728) 2026-07-28 23:05:44 -06:00
quarrel07 5b28472d47 Fix garbage frame flash on cinematic camera cuts (#720)
* Fix garbage frame flash on cinematic camera cuts

Frame interpolation blended matrices across instant camera teleports in
attract/demo and post-race cameras, flashing 1-2 frames of sheared
geometry. Complete the existing camera-epoch mechanism: flag a cut in
func_80019890 when the camera moves >100 units, and have the
interpolator snap that frame to the new view instead of blending.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Retrigger CI (transient 502 downloading libogg from gitlab.xiph.org)

* Name the cinematic shot dispatcher

Review feedback on #720: func_80019890 -> camera_start_cinematic_shot.
It starts whichever shot D_80164680 has selected for a camera, dispatching
to the per-shot setup that teleports the camera to the shot's opening
position, which is why the cut detection lives there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Apply fix to freecam

Added FrameInterpolation_DontInterpolateCamera calls to improve camera behavior when changing target players.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2026-07-26 23:00:47 -06:00
quarrel07 24ac81951e Sky: paint the full window width (#717)
The gradient quad's projection path does not preserve the outward
rounding of the Rect edge getters, which can leave the last window
column unpainted at some aspect ratios (visible as a black strip at the
screen edge that only sky sprites drew into). Overshoot the quad a few
virtual pixels past both edges; the excess clips at the window.

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2026-07-26 22:29:12 -06:00
quarrel07 9ffdb83423 Don't let the attract timer hijack an in-flight menu fade (#723)
Pressing start on the splash screen in the last moments before the demo
timeout could play the enter chime and then drop into the demo reel with
no music: the attract timer (gMenuTimingCounter >= 0x12D) fired while the
press-start fade was in flight and overwrote gMenuFadeType to the demo
value, so the fade completed as a demo entry. Vanilla bug; roughly a
0.7-second window every attract cycle.

Only arm the demo when no fade is in flight. A natural timeout (idle, no
fade running) behaves exactly as before.

Play-verified: start pressed repeatedly around the timeout boundary always
lands in the main menu with music; the demo reel still plays when idle.
2026-07-26 22:18:15 -06:00
quarrel07 322cd52c16 Exit cleanly after teardown instead of racing static destructors (#718)
Normal quits ran the full static-destructor chain, where destruction order is
unspecified and something logs through spdlog after its statics are destroyed,
intermittently segfaulting on exit (same class as upstream issue #689). All
user-visible state (config, saves) is already persisted by GameEngine::Destroy,
so end the process with _Exit like the extraction error paths already do.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2026-07-23 12:23:53 -06:00
quarrel07 78a012ce06 Fix the reset button doing nothing or looping the start screen when pressed repeatedly (#719)
* Make the reset button reliable from any screen

Pressing reset repeatedly near app start could do nothing, fade the music
with no reset, or bounce the press-start screen back to itself. Three
defects in the old handler:

- It ran from the ImGui widget, racing the menu state machine; a press
  landing mid-fade was re-advanced by the in-flight transition (the
  press-start loop).
- It always wrote gGamestateNext = MAIN_MENU_FROM_QUIT; once the game was
  already in that state a repeat write is swallowed by the != guard in
  main.c, so nothing happened.
- CM_ResetAudio ran unconditionally, so the music faded even when the
  reset was swallowed.

The widget now only sets an atomic request flag; ApplyPendingReset (top of
push_frame, on the game loop) performs the reset. It alternates between
the two identical FROM_QUIT gamestates so every press trips the gamestate
switch, and re-enters the menus through the intro's own transition
protocol (FADE_MODE_LOGO -> setup_menus rebuild + fresh fade-in), which
replaces any in-flight transition. Audio only fades when a reset actually
executes. The dead gSkipIntro switch in the old handler (an unconditional
override below it always won) is gone; behavior is unchanged: reset lands
on the logo intro, or the start menu in debug mode.

Play-verified: hammering reset during the splash screens restarts the
logo every press; reset mid-fade after press-start no longer loops back;
resets from the main menu and mid-race work as before.

* Honor gSkipIntro when picking the post-reset screen

Review feedback on #719: restore the gSkipIntro switch from the old
handler instead of hard-coding the logo intro, keeping the debug-mode
override on top (no else), matching the boot-time logic in main().

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2026-07-23 12:21:36 -06:00
coco875 4c24ae2bc2 Refactor cmake (#721)
* some start of refactor

* Update SetFlags.cmake

* Update SetCmakeVar.cmake

* Update SetFlags.cmake

* Fix error int-convertion

* more refactor

* clean up include and source file

* fix link of lib

* fix a warning

* fix include in src/actors

* fix include in src/debug

* fix include in src/ending

* fix include in src/engine/actors

* fix include in src/engine/cameras

* fix include in src/engine/editor

* fix include in src/engine/objects

* fix include in src/engine/tracks

* fix include in src/port/ui

* fix include in src/racing

* fix include in src/engine/vehicles

* fix include in subfolder of src/engine

* fix include in src/engine

* fix include in src/enhancements

* fix include in src

* fix switch

* invert common and findlib

* Update SetFlags.cmake

* clean up some workflow

* some splification

* Update build.sh

* Update Game.h

* add header back

* Delete test_check.cmake

* continue

* Update common.cmake
2026-07-22 18:02:58 -06:00
quarrel07 022e0737d5 macOS: disable press-and-hold accent popup while moving (#713) 2026-07-22 12:27:50 +02:00
quarrel07 aedcf9ada6 CI: run the x86 PR build natively instead of under QEMU (#716)
The PR-validation build-docker-x86 job registers a QEMU binfmt handler
for linux/386 before building. i386 containers run natively on the
amd64 runners, but the explicit registration routes every binary in the
container through the qemu-i386 emulator, turning a ~15 minute build
into ~170 minutes. main.yml's build-linux-x86-docker job is identical
except it never installs QEMU, and it completes in 13-18 minutes.

Dropping the setup-qemu step makes the PR job match main.yml; the
--platform linux/386 image and build steps are unchanged.
2026-07-20 12:15:20 +02:00
Lucas 4c03712561 Fix warnings regarding ambigious typings (#715)
* Fix warnings regarding ambigious typings

* Revert struct Collision name change
2026-07-20 12:14:56 +02:00
quarrel07 b3e0fe248d Fix widescreen letterbox/divider left-edge clipping on ARM64 (#709)
* Fix widescreen letterbox/divider left-edge clipping on ARM64

The race-intro letterbox bars (draw_box_fill_wide) and the splitscreen
divider lines fed the float OTRGetDimensionFromLeftEdge result into
gDPFillWideRectangle, whose _SHIFTL packing casts float->unsigned.
Converting a negative float to unsigned is UB: x86 wraps (and the
wide-rect handler's sign extension recovers the value, so the bug is
invisible there), but ARM64 fcvtzu saturates negatives to zero — so on
Apple Silicon the fills started at the 4:3 left edge instead of the
true left edge, leaving a strip of sky visible left of the intro bars
in widescreen. Use the integer OTRGetRectDimensionFrom*Edge getters,
matching the sibling draw_box_wide helpers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Shorten the fix comment

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 12:14:36 +02:00
quarrel07 582900a1b9 macOS: sharp ImGui menu text on Retina at every menu scale (#714)
* macOS: sharp ImGui menu text on Retina at every menu scale

On a HiDPI display the ImGui overlay renders into a 2x framebuffer, but
the glyph atlas is rasterized at the logical point size and stretched up
by DisplayFramebufferScale, so all menu text looks fuzzy.

Set ImFontConfig::RasterizerDensity on the game fonts and the merged
FontAwesome icons: glyphs rasterize at higher resolution without
changing logical size or layout. Baked at retinaScale (2.0) times the
Menu Scale slider's maximum (2.0) so the runtime FontGlobalScale only
ever downsamples a high-res atlas instead of stretching a low-res one,
keeping text crisp at every Menu Scale setting. Standard-DPI displays
just get a supersampled atlas (identical layout, slightly sharper).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Shorten the RasterizerDensity comment

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 16:12:17 +02:00
quarrel07 6ed9a8ad28 Fix macOS arm64 build: fmt consteval error in the TorchExternal sub-build (#712)
* Fix macOS arm64 build: fmt consteval error in the TorchExternal sub-build

Torch's pinned spdlog bundles an fmt whose consteval format-string
checking fails to compile under newer AppleClang (Xcode 16+), breaking
the build-macos-arm64 CI job (the intel runner's older Xcode doesn't hit
it):

  error: call to consteval function 'fmt::basic_format_string<...>' is
  not a constant expression

Define FMT_CONSTEVAL as empty inside the Torch sub-build, falling back to
fmt's pre-C++20 constexpr checking. Injected via CMAKE_PROJECT_INCLUDE
because Torch's CMakeLists overwrites CMAKE_CXX_FLAGS, so plain flag
injection through CMAKE_ARGS is discarded. Scoped to AppleClang; no other
platform or compiler is affected, and the Torch pin is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Also neutralize FMT_CONSTEVAL for the game build (vcpkg spdlog/fmt)

With the TorchExternal fix in place, CI reaches the game build and hits
the same consteval error again, this time from the vcpkg-provided
spdlog/fmt headers (SPDLOG_FMT_EXTERNAL) under the runner's Xcode 26.5.
Apply the same AppleClang-scoped FMT_CONSTEVAL= define at the project
level so both layers compile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Pin vcpkg fmt to 10.2.1 (+ spdlog 1.14.1): fmt 11.0.2 can't compile on new AppleClang

The baseline's fmt 11.0.2 both fails to compile under newer AppleClang
(consteval format-string checking) and removed the #ifndef guard around
FMT_CONSTEVAL, so the AppleClang-scoped define from the previous commit
lands on the compile line but gets clobbered by fmt's own definition
(FMT_USE_CONSTEVAL is likewise unguarded in that version). No newer fmt
exists in the pinned baseline.

Override fmt to 10.2.1, which keeps the #ifndef guard, making the
existing define effective; spdlog moves to the matching 1.14.1 (1.15.x
requires fmt >= 11 headers).

Verified locally against the exact CI setup (vcpkg at baseline
2e58bb35ff, vcpkg toolchain file, Ninja): the previous failure reproduces
without this change and the full game builds cleanly with it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Add TODO markers for removing the fmt consteval workarounds

Requested in PR #712 review: mark all three workaround sites (project-level
define, Torch sub-build include, vcpkg fmt/spdlog pins) so they can be found
and removed together once the Torch pin is bumped past its spdlog/fmt update.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: siliconports <aguthmann10@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 00:28:29 +02:00
quarrel07 d1dec0f6f4 Fix crash when bailing out of first-run setup before the game inits (#707)
InitModsSystem() runs before the game world is set up. Its bail-out paths (no
O2R + user declines generation, missing mods.toml, cyclic/outdated mod deps,
and GenAssetFile's no-ROM / unsupported-ROM cases) call exit(), which runs the
global `static World sWorldInstance` destructor -> World::CleanWorld() ->
dereferences Sky::Instance and other singletons that are still null this early,
segfaulting. The most visible case: declining the first-run "Generate one now?"
prompt pops a crash report instead of quitting cleanly.

Use _Exit() on these pre-initialization bail-outs so no static destructors run.

Co-authored-by: quarrel07 <paeans-toggle-2e@icloud.com>
Co-authored-by: coco875 <59367621+coco875@users.noreply.github.com>
2026-06-29 02:41:26 +02:00
Tim Schneeberger dfee19f91e Add spaghetti.o2r to CI build artifact and remove unneccessary files (#708) 2026-06-25 17:41:07 +02:00
quarrel07 57a550d33a Fix stale macOS Info.plist version (0.1.0 -> 1.0.0) (#706)
The bundle version strings were left at 0.1.0 while the project is at 1.0.0
(project(Spaghettify VERSION 1.0.0)), so the macOS .app and cpack bundle report
the wrong version in Finder/Get Info. Match them to the project version.

Co-authored-by: quarrel07 <paeans-toggle-2e@icloud.com>
2026-06-25 17:40:50 +02:00
Tim Schneeberger 458613f2d9 Fix Switch build (#705)
* Remove duplicate Switch::Init(PostInit) call.

It was called multiple times, causing multiple applet hooks (that all point to the same callback address) to be registered. For some reason, the OS started spamming us with FocusUpdate events via that hook because of that.

* Hide fullscreen and app data directory button on Switch
2026-06-10 23:42:07 +02:00
coco875 efdaf9d8fd Fix switch and windows CI (#700)
* merge upstream commit to fix some bug

* fix merge

* add a local user for the merge

* Update main.yml

* revert main.yml

* fix windows CI

* fix switch build

* fix windows and try a fix for switch

* fix windows build
2026-05-04 20:00:43 +02:00
Alessio Tosto 76d19f7e43 Force proper wrapping on fov angles. (#699)
Co-authored-by: coco875 <59367621+coco875@users.noreply.github.com>
2026-05-03 04:08:05 +02:00
coco875 e2cf6ecbb4 Fix 32 bit (#697)
* try x86

* ci: uniform build-linux-release-docker and their x86

* Update main.yml

* fix animation

Co-Authored-By: Alessio Tosto <rinnegatamante@gmail.com>

* add explanation

* add windows 32 in release

* Update windows-compile.yml

* fix windows compilation

* fix win32 windows

* Update libultraship

---------

Co-authored-by: Alessio Tosto <rinnegatamante@gmail.com>
2026-05-03 02:13:30 +02:00
Alessio Tosto 40d4f12580 Fix missing texture size initialization for clouds. (#698) 2026-05-02 15:14:46 +02:00
Alessio Tosto 7b28790290 Force type correctness when calculating collision hashes (#696)
* Force type correctness when calculating collision hashes

* Fix more incorrect hash calculations.

* fix an error

---------

Co-authored-by: coco875 <59367621+coco875@users.noreply.github.com>
2026-05-01 23:20:21 +02:00
Jeod 10f10f17e6 Fix compiling for linux arm64 (#650)
* Enable MK64 build option for torch

* Fix HMAS type error (present on arm64)

* Align memory pool and fix empty macro

* Experimental: Add 4096 memory alignment

* Add alignment for ALIGNED8 macro

* Use memset over deprecated bzero

* Ensure OPENGLES flag can be used in CMakeLists.txt

* Diagnostic: align ship2_window_i8 to rule out odd-alignment crash

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2026-04-22 17:38:48 -06:00
coco875 3a5af8ff76 Update CMakeLists.txt (#695) 2026-04-22 17:29:29 -06:00
mkoterski d2febf4603 Add CoreAudio to audio backend combobox map (#686)
macOS uses COREAUDIO as the default audio backend, but the
combobox display map in MenuTypes.h only contained SDL and
WASAPI. This causes an unordered_map::at crash on first
frame draw when the Audio API dropdown tries to render.
Fixes the menu crash portion of #681.
2026-04-21 13:33:11 +02:00
briaguya 90f0e3a199 Combine OpenGL shaders into single .glsl file (#687)
Kenix3/libultraship#972 changed the OpenGL backend to load a single
combined default.shader.glsl instead of separate .fs and .vs files.
The assets were never updated to match, breaking the OpenGL renderer.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 13:32:49 +02:00
coco875 f93dce2bef Update libultraship (#685)
* Update libultraship

* Update libultraship

* Update .gitignore
2026-04-07 13:10:53 -06:00
EJStaats 7dba3c3c81 Allowing user-set internal resolution in menu (#682) 2026-03-29 13:34:19 -06:00
Gabriel Morazan a161aa7c3f Fix Windows Build (#680) 2026-03-24 12:34:15 -06:00
MegaMech f7aab65da4 Fix Item Window (#677)
* Update render_objects.c

* Update render_objects.c
2026-03-09 18:50:13 -06:00
MegaMech d16bdd75b1 Fix Palm Tree Interp (#675)
* Update actors.c

* Update actors.c

* Update SkyCloud.cpp

* Update render_objects.c
2026-03-09 18:43:17 -06:00
MegaMech 132357d9fb Big Interpolation Overhaul (#674)
* Fix FI

* FI statue

* Intepr fixes

* Improve

* More interp

* Fix compile

* More interp

* Fix text
2026-03-06 20:10:07 -07:00
MegaMech 25d49df90f More Interp Fixes (#673)
* Update render_player.c

* Update render.inc.c

* Update render.inc.c

* Fix kart interp

* Remove feature

* Fix error
2026-03-06 01:14:44 -07:00
MegaMech 89cd738955 Fix mistakes (#672) 2026-03-05 23:45:11 -07:00
MegaMech ba0a24e28f Fix editor loading and finishline duplication (#653)
* Fix editor loading and finishline duplication

* Update SceneManager.cpp
2026-03-05 21:15:59 -07:00
MegaMech 2564e0b7a3 update lus (#670) 2026-03-05 20:54:11 -07:00
MegaMech 376087be69 Fix Thwomp Collision and Better Interp Tagging for Actors (#665)
* Update actors.c

* Update actors.c

* actor

* Fix bounding box

* More interp fix

* Update KoopaTroopaBeach.cpp

* Update Thwomp.cpp

* Update actors.c

* Update render.inc.c

* Update render.inc.c
2026-03-05 16:52:14 -07:00
MegaMech 000c47e610 Fix retry issue with actors (#669)
* Update World.h

* Update World.cpp

* Update Game.cpp
2026-03-05 13:51:59 -07:00
MegaMech 55419843ad Update SkyActor.h (#666)
* Update SkyActor.h

* Update menu_items.c
2026-03-02 17:29:03 -07:00
MegaMech 55175baecd Possible Fix for SkySnow Crash (#664)
* Update SkySnow.cpp

* Update SkySnow.cpp
2026-03-02 13:04:51 -07:00
coco875 5c93004e38 clarify modding section (#656)
* clarify modding

* add the mention of gamebanana page

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2026-02-26 12:36:21 -07:00
MegaMech cb3b447b53 Fix Lakitu in Time Trials (#657)
* Update Game.cpp

* Add functions for various quit transitions
2026-02-26 12:22:29 -07:00
coco875 1732542a6a Name (#655)
* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update .gitignore

* Update CMakeLists.txt

* Update main.yml
1.0.0
2026-02-24 19:23:44 -07:00
MegaMech a33c66ee31 Frame Interp changes (#654) 2026-02-24 16:23:17 -07:00
MegaMech 548ccf0063 Impl Sky and SkyActors (#630)
* Create Cloud.cpp

* Create Cloud.h

* Fix the cloud

* Cleanup

* More cleanup

* Update Track.h

* Refactor SkyboxCloud position calculations

* Update SkyboxStar.cpp

* Update SkyboxStar.cpp

* Refactor SkyboxStar.cpp by removing redundant code

* Update SkyboxCloud.cpp

* Refactor SkyboxSnow.cpp by reordering includes

* Update SkyboxCloud.h

* Refactor SkyboxStar.h for improved formatting

* Impl skyboxcloud

* Update comment

* update comment

* Work now

* Fully impl Sky

* Fix define

* Fix args
2026-02-24 14:51:25 -07:00
MegaMech 321d440089 Update Thwomp.cpp (#645) 2026-02-20 14:45:41 -07:00
D++ 75c8d7dc9f Fixed Typo (#652)
Changed from Starship to SpaghettiKart
2026-02-12 21:31:25 -07:00
MegaMech 3aa2c9662a Attempt At Fixing Clang (#647)
* Update Game.h

* Update Game.h

* Update macros.h
2026-02-08 13:50:22 -07:00