Commit Graph

67 Commits

Author SHA1 Message Date
MegaMech dbae0c3aca
Name ScreenContext, Refactor Course class to Track (#583)
* Rename Screen Contexts

* typedef ScreenContext struct

* Fix Compile

* Rename Course.cpp to Track.cpp

* Refactor Course to Track

* A few renames

* General Cleanup

* More Rename

* More names

* Move TrackSections struct to Track.h

---------

Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
2025-12-07 21:00:06 -07:00
coco875 02ad54ca72
Refactor yaml and remove segment (#531)
* move yaml (still need to fix header path)

* fix header

* change kart to karts and add migration

* fix include

* Update migration.py

* fix common_texture_debug_font extraction

* Update torch

* update torch and header

* unduplicate texture for tumble

* Update torch

* Update migration.py

* put the sort by default

* fix replace_segmented_textures_with_o2r_textures

* Update torch

* fix yamls

* add manual_segments in data of course

* comment out replace_segmented_textures_with_o2r_textures and segment 3

* remove segment 5

* (wip) remove segment 6

still plenty of thing to do

* more vtx

* more change

* Update torch

* small fix

* Update BansheeBoardwalk.cpp

* fix blockFort

* Delete test.yaml

* fix bowser castle and simplify track sections

* fix choco mountain

* clean banshee

* fix dk jungle

* fix double deck

* fix macos

* fix error

* fix macos ci

* Update torch

* Update torch

* fix frappe snowland

* fix kalimari desert

* fix koopa troopa beach

* fix luigi raceway

* fix mario raceway and simplify thing

* fix moo moo farm

* fix rainbow road

* Update torch

* Update torch

* hopefully fix windows error

* fix a small error

* fix royal raceway (and podium in theory)

* fix sherbet_land

* fix skyscraper

* fix toads turnpike

* fix wario stadium

* fix yoshi valley

* update torch

* more clang tidy rules

* REMOVE totally SEGMENT (sorry for the PR)

* remove unused field in course and props and unused packed asset

* fix kart texture

* fix particle

* fix track section and transparency

* try fix mode extra

* fix macos build and render

* fix collision in extra

* small change and try fix windows error

* a little of clean

* more cleanup

* forget header and more clean up

* Update Makefile

* fix credits

* fix kart texture offset

* remove LoadTextures and add Unload

* fix definitevely mirror mode

* add unload but it's not perfect

* revert a bad fix

* clean no longer used python script

* fix crash with player

* being able to load the same course twice

* add a comment on DrawWater

* fix render of transparent object

* better hack

* add a proper migration instruction

* fix number

* add basic modsmanager

* add meta/mods.toml

* Update EditorMath.h

* Update ModsManager.cpp

* basic modManager (maybe I should rename it ModLoader)

* use range on dependencies

* add information about mods.toml

* fix coment

* some rename around

* Delete beta-to-v1.md

* Update migrations.md

* Update textures-pack.md

* Update modding.md

* Update modding.md

* clean yamls_old

* move to mods in engine

* rename ModsManger to  ModManager

* move init and unload at the top

* rename ModsMetadata to ModMetadata

* fix header

* Update ModManager.cpp

* put core mods at top
2025-12-07 07:34:53 -07:00
MegaMech de9c5d5101
Implement SpawnParams struct (#536)
* Impl SpawnParams

* Added json submodule

* Update json

* Update

* Works

* Remove comment

* Works refactor

* Snowman and thwomp working

* Impl hot air balloon

* More progress

* All OObjects are done

* cleanup

* Refactor 2Dpath to normal path

* Update nlohmann json & fix compile

* Rest of actors

* MORE CHANGES

* Finish actors

* Done PR, some fix to collision viewer

* Impl falling rocks

* Add const

* wip editor refactor

* Property work

* continue

* Overridable editor properties

* Actor saving/loading works now

* Fix light alignment

* Clarification

* Impl penguin

* params impl signs

* properties impl falling rock

* More property impls

* impl air balloon

* Add spawnParams to OObject Translate

* Snowman translate better

* impl hedgehog properly

* properties impl trophy

* thwomp progress

* Finish impl properties

* Fix compile

* Fix cursor collisions

* Move registered actors

* Rename pathPoint XYZ to xyz

* Fix editor pause bug

* Clean up

* Review comments

* Remove SpawnParams struct from actor classes

* Rename

* Player Label First Iteration

* Work now

* Working 3d text

* Fix boo bug

* Finish AText actor

* Fix spawnparams compile

* Register AText

* Finish Text Actor

* Fix thwomp interpolation

* Fix compile

* Fix crab and hedgehog

* Fix loading flagpole

* Fix Hot Air Balloon

* Turn zbuffer on for AText

* Update

---------

Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
2025-11-09 19:07:44 -07:00
coco875 6f133d2045
Fix ci (#549)
* try fix ci

* use fmt instead

* try another fix for fmt

* fix link and detect for c++ 20

* invert condition on format
2025-09-25 07:16:38 -06:00
AltoXorg db01cf3d6f
Fix non-portable (#532)
* Fix for non-portable builds

* submodule update Torch, [TEMP] libultraship

* submodule update libultraship

* place assets in exe's dir on post build
2025-08-09 11:25:46 -06:00
V10lator 5e8ee8682d
Fix spaghetti version in Docker (#530) 2025-08-07 19:24:49 +02:00
coco875 7c229e3ed0
fix some compilation issue (#511)
* fix some compilation issue

* Update CMakeLists.txt

* remove lto for apple in debug, because apple
2025-07-26 09:17:57 -06:00
Thomas Rohloff 20cba1b5c2 Don't enable obsolete and broken debugging in debug builds
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-07-19 12:49:17 +02:00
Thomas Rohloff 4fdded9dbc Merge remote-tracking branch 'upstream/main' into FLAGS 2025-07-19 11:32:15 +02:00
briaguya 94d9c31583 remove commented out line 2025-07-18 20:07:51 -06:00
briaguya cb9495ec3f try a thing 2025-07-18 20:07:51 -06:00
briaguya 1de14c4481 check if we're getting the correct cmake system name 2025-07-18 20:07:51 -06:00
Thomas Rohloff a3801d4a01 Enable link-time optimization
LTO should help optimizing spaghetti code better. This caused a lot of crashes in the past but looks stable with the latest code fixes in master, so I think it's time to enable it.

Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-07-18 11:58:48 +02:00
V10lator c215623224
Fix version string in case of incomplete git history or other errors (#459)
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2025-07-17 12:28:50 -06:00
V10lator 4c6e68aa8a
Add version and debug state (#437)
* cmake: Correctly set PROJECT_VERSION

This needs CI to adjust

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

* Log version

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

* Show version and debug state

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

* Log debug mode toggling

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

* Finish version string

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

* Update CMakeLists.txt

* Update CMakeLists.txt

* Try to fix execute_process() from within CI

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

* CI: Checkout with tags

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

* Fix PR CIs, too

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

* Add config button for version

Signed-off-by: Thomas Rohloff <v10lator@myway.de>

---------

Signed-off-by: Thomas Rohloff <v10lator@myway.de>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2025-07-13 13:26:50 -06:00
coco875 5277fced87
make replace neon texture (#435)
* make replace neon texture

* cmake are dumb

* fix neon render

* Update render_objects.c

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2025-07-09 16:36:39 -06:00
Thomas Rohloff dc918a936b Add -fomit-frame-pointer to CXX flags
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-06-28 11:01:09 +02:00
Thomas Rohloff dea55cf8c7 Move -fpermissive to CXX flags
To silence a compiler warning about unrecognized command-line options while compiling C files

Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-06-28 10:59:29 +02:00
Thomas Rohloff 08f0592f17 Try to fix MSVC build
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-06-26 11:12:45 +02:00
Thomas Rohloff e008ad6786 Add -pipe to FLAGS
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-06-25 21:29:51 +02:00
Thomas Rohloff 62e6dcadbd Correctly split common and arch specific flags
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
2025-06-25 21:29:51 +02:00
Nikita 8132405bab
Add vcpkg.json, change MacOS CI to use that (#346)
* add vcpkg support for installing dependencies

* Change macos CI to use vcpkg for dependencies

* actually fix CI for macos

* fix SDL_net linking

SDL_net was being linked twice

* update baseline
2025-06-24 10:50:46 -06:00
coco875 0eb0ff49e0
allow to replace img with png or jpg or bmp (#272)
* allow to replace img with png or jpg or bmp

* revert experimental change
2025-06-22 06:49:15 -06:00
TheOliveOli 9a9a18999d
Build macOS release as Universal Binary (#267)
* Update CMakeLists.txt

* Edit output filename to reflect building as Universal binary
2025-06-21 17:37:31 -06:00
coco875 e93633773e
Pr before release (#239)
* Fix match

* Update torch

* fix crash on texture of player

* Copied stuff over for Window icon from Starship.

* Missed comment.

* Corrections.

* Missed a file

* min-max fix

* Update code_80005FD0.c

* Remove interpolation for hm_intro

* look like to remove the crash in menu

* Update menu_items.c

---------

Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2025-06-20 16:54:31 -06:00
MegaMech f6e2f12371
Update CMakeLists.txt (#223) 2025-06-15 22:24:41 -06:00
MegaMech 7cc9894aa1
Fix compile (#199)
* Fixes made so far

* Fixes up until linking

* Moved GetInterpreter() to a single function under the Engine.h

* Updated shader files included with assets, added exception for Linux for including SDL2_net

* Removed osSetTime stub(for now)

* Adjustments to get it to compile + run

* Decoupled GetInterpreter() from the GameEngine Class, corrected a invalid include in SpaghettiGui.cpp

---------

Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com>
2025-05-15 15:25:18 -06:00
MegaMech 0e35858050
Fix build (#197) 2025-05-15 10:26:06 -06:00
MegaMech 32632cacdb
Impl new intro (#193)
* Update menus

* Update CMakeLists.txt

* Add Ship

* Impl hm ship actors

* Update HM course

* Impl new intro

* Finish intro scene

* Rename

* Start Editor Work

* raycast works

* Fix ScreenRayTrace in widescreen

* Basic Actor Picking

* wip

* Editor use vtx collision

* gizmo work

* otr works for object picking

* Impl objects for editor

* actor init

* Update

* Add all axis move (freemove)

* Docking Windows works here

* Setup imgui layout for editor

* Editor Snap to Ground works

* Basic Scene Explorer Works

* Editor get actor names

* Impl editor object names

* impl Editor Play and Pause buttons

* Editor translate works while paused

* Fix freecam lighting

* Added adjustable track properties to editor

* Editor matrix, icons, rotation, impl light

* Setup Track Properties 1

* Editor tooling wip

* Load modded o2rs

* Don't enable hud if editor is enabled

* Updates

* SceneManager nearly working

* Fix mario kart 64 intro logo sizing

* Fix Rotator

* Finish new matrix translation code

* Cleanup headers

* Cleanup

* Cleanup 2

* Cleanup 3

* Prevent divize by zero crash

* Add visible circle for translate in all axis

* Editor scaling/rot works properly now

* Scale All_Axis evenly

* Fixes to includes to work on Linux.

* Removed overfilled arguments in gfx_create_framebuffer()

* Added missing function definitions to Game.h

* Editor sun face the camera

* Add rotation model to gizmo

* Add new handles

* Failed attempt at transforming collision

* Impl water volume

* Import fast64 paths

* water surface

* Scene Setup 1

* Custom Track O2R almost working needs testing

* Custom Track Load path O2r

* Render custom track. Wip collision

* Add missing function

* Debug Spawning Custom O2R Track

* Import courses working now

* Fix memory leak

* Remove New Track Button

* Engine.cpp more consistent with sf64

* Fix Editor Enable Button

* Editor Accurate mouse click drag objects

* Editor selects closest object and cleanup

* Gizmo rot and scale collision working

* Remove constexpr from IRotator

* Impl properties for location/rot/scale

* Better Properties display, swap rot handles

* Fix content browser dock and editor now disabled by default

* Remove GameInfoWindow, Multiplayer Button, and FPS Slider

* Disable Editor when its disabled

* Add new logo to hm intro

* Fix pause menu item box cursor

* Remove minimap from Course::from_json and to_json

* Impl Import Minimap

* Fix custom minimap rendering

* minimap uses extension .png

* Refactor minimap

* Freecam only for player 1

* GrandPrix Balloons work in custom track

* Track Id is now std::string and outside of Props

* Moved editor assets to be included in ship.o2r

* Fixed GenerateO2R to package the correct folder and save to the correct filename

* Linux specific changes.

* Added "#include <stdio.h>" that required them
* Changed how the "ship.o2r" file is loaded to allow it to load the file from within appimages.
* Changed the Linuxdeploy version to avoid errors later when the Github Actions creates appimages(same fix applied to other ports.)

* Revert "Moved editor assets to be included in ship.o2r"

This reverts commit 05704c01f7.

* Added back files(this time without LUS changes)

* Changed workflow file to use correct filename for assets file.

* Missed a few spots in the workflow file.

* Added .desktop file and made corrections to the main workflow.

* Added the rest of upstream CMakeLists.txt

* disabled USE_NETWORKING

* New InverseMatrix

* Renamed both .o2r files to be more accurate to its contents.

* Reverted CmakeList.txt

---------

Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com>
2025-05-14 18:30:32 -06:00
KiritoDv f56a0849b0 Fixed compilation error 2025-03-07 18:42:30 -06:00
KiritoDv d65d58922a Fixed MacOS Build 2025-03-07 18:32:15 -06:00
KiritoDv 9f46fcb26f Fixed some compilation issues 2025-03-07 18:00:41 -06:00
KiritoDv 5f8550790a Fixed compilation 2025-03-07 18:00:41 -06:00
MegaMech a6ecc276e9
Impl Reset button and fix some naming (#190)
* Compile works now

* Update menus

* Update CMakeLists.txt
2025-02-08 13:38:59 -07:00
KiritoDv 91292d3757 Updated cmake again 2025-02-08 10:54:19 -06:00
MegaMech 922b69e504
Compile works now (#189) 2025-02-07 23:49:06 -07:00
MegaMech bb90ff8531
Fix Compile (#188)
* Fix freecam rotation smoothing

* Configure freecam controller

* Fix cont z button and impl freecam on/off events

* Add torch static comp

* Fixed cmake

* Copied yamls

* Fixed cmake

* Added github workflows

* Update CMakeLists.txt

---------

Co-authored-by: KiritoDv <kiritodev01@gmail.com>
2025-02-07 23:48:36 -07:00
MegaMech 008d527ed5
Torch Static Compile (#187)
* Fix freecam rotation smoothing

* Configure freecam controller

* Fix cont z button and impl freecam on/off events

* Add torch static comp

* Fixed cmake

* Copied yamls

---------

Co-authored-by: KiritoDv <kiritodev01@gmail.com>
2025-02-07 22:24:00 -07:00
coco875 8e0e95d7d1
fix a problem with cmake and fix animation in menu (#184) 2025-02-04 15:08:50 -07:00
Malkierian 695879c4cb
Modern Menu (#183)
* Add modern menu.
Add and include LUS cvars .cmake file for macro usage in modern menu.

* Un-ignore new .cmake

* Copy new Resolution Editor stuff from 2ship (incomplete).
Fix fullscreen checkbox.
Finish changes for new UIWidgets.
Cleanup ShipUtils.

* Remove duplicate asm-differ entry from .gitmodules.

* Re-implement Freecam options.

* Cleanup freecam character follow buttons.
Partially re-implement Multiplayer window as enhancement sidebar (needs text input widget to finish).
Cleanup disables.

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2025-02-04 11:43:20 -07:00
coco875 301bbd3cd9
Optimize Sound Mixer (#182)
* Add sse2neon

* Optimize Sound Mixer

* Replace ssize_t with size_t

* Remove a #ifndef NO_SEGMENTED_MEMORY block
2025-02-04 09:49:20 -07:00
MegaMech 1f189dfa80
Game.cpp and World.cpp Cleanup (#159)
* Remove CProperties and delete dup Properties from World.h

* Improvement

* Fix compile

* Cleanup

* Document gRaceState

* wip cleanup

* compile

* Impl PlayerBombKart

* Rename CourseManager_ to CM_

* Finish renames m_ to CM_

* cleanup

* Remove extra printf

---------

Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
2025-01-23 11:22:07 -07:00
inspectredc 058b8e9b19
O2R Support (#158)
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2025-01-18 09:20:38 -07:00
MegaMech 9400f9e9ce Make freecam work on DX and fix controller 2025-01-06 17:38:16 -07:00
MegaMech 517a59fbf4 Impl trophy 2024-12-13 15:18:39 -07:00
MegaMech 19135c9ee8 load course dl textures from otr and move objects 2024-12-05 21:41:58 -07:00
MegaMech 815c11ac4b Fix jumbotron 2024-11-15 23:27:18 -07:00
MegaMech af81bad1f3
[modding] Add Actors (#113)
* fix

* Add Actors

* Refactor

* Update Game.cpp
2024-10-15 18:54:38 -06:00
coco875 f93590691a
fix wamr windows normally (#107) 2024-10-05 17:12:15 -06:00
coco875 9cf1f9e1d7
[Modding] start add wasm integration (#84)
* start add wasm integration

* some test

* some improvement

* try more language

* expend try with python

* update

* half working python

* improve and extend test

* get py2wasm work but not so well

* convert to use in cpp

* start prepare multimodule

* improve a little by using cpp (but still not great)

* Update wasm.cpp

* try ocaml

* add a working example of python with a not complete function

* remove type to be even more curse

* start add a proper mod loader

* allow mod to communicate between

* example of hook

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
2024-10-05 15:49:07 -06:00