Commit graph

631 commits

Author SHA1 Message Date
ROllerozxa
462369618e Turn TMS_USE_GLES compile-time option into a runtime use_gles setting
This of course requires support from the SDL library Principia is linked to, but should still make it more accessible to switch between the two on Linux
2026-06-23 23:38:23 +02:00
ROllerozxa
5865ce72ac Remove unused GUI sprite textures cache code
Never has been used and it doesn't seem like it really needs to be cached either
2026-06-23 00:26:40 +02:00
ROllerozxa
ac9f350134 Make user data storage persistent on Emscripten 2026-06-23 00:23:33 +02:00
ROllerozxa
e36bf6a9bc [ci skip] Add a CONTRIBUTING.md that just links to the wiki page 2026-06-22 20:20:51 +02:00
ROllerozxa
1b5dd42b4e [ci skip] Tell issue reporters not to use LLMs to write or "improve" the report 2026-06-22 20:14:12 +02:00
ROllerozxa
ff2e8252de occured -> occurred 2026-06-22 19:31:19 +02:00
ROllerozxa
ec68f7ca47 Some TMS header cleanups
Remove mostly redundant backend.h header, move print.h into core
2026-06-22 19:30:37 +02:00
ROllerozxa
b0cded7e5f Dehardcode some touchscreen-specific codepaths and put them behind touch_controls setting 2026-06-22 00:06:36 +02:00
ROllerozxa
21942f4c0e Fix the "Browse community levels" button glitching when resizing 2026-06-21 23:28:52 +02:00
ROllerozxa
b19e8106dc Fix Android CI 2026-06-21 21:59:53 +02:00
ROllerozxa
e7ddb1a19b Cleanup and hopefully improve the package level select menu
Unfortunately it doesn't entirely adapt to window resizing, but it's slightly better now... ;)
2026-06-21 21:56:36 +02:00
ROllerozxa
40928c047e Remove Luasocket library
This was never really used by anyone and considering it hasn't been updated ever since it was checked into the source tree in 2014 it's a bit of a security issue. It has been hidden behind a level flag for some time, no levels on the community site have the level flag set, and new levels with the flag are blocked from being uploaded.
2026-06-21 17:06:37 +02:00
ROllerozxa
7f87a48538 Add program for portable Windows builds to register a per-user protocol handler
Replaces the old play_community_level.bat Batch script that was bundled with portable
2026-06-21 16:13:53 +02:00
ROllerozxa
713331fe0e Installer: Properly scale and center logo based on display scaling 2026-06-21 00:23:12 +02:00
ROllerozxa
90fd1d87b9 Fix Windows CI 2026-06-20 21:35:41 +02:00
ROllerozxa
c209ca04ce Redesign Windows installer 2026-06-20 21:16:45 +02:00
ROllerozxa
068524c0a1 Call SDL_SetAppMetadata with metadata instead of just setting SDL_HINT_APP_NAME 2026-06-20 21:15:52 +02:00
ROllerozxa
0f0ee6a9aa Fix main menu background not adapting to window resize
Replace hardcoded shader global with uniform
2026-06-20 21:14:07 +02:00
ROllerozxa
99e16dc5a3 Merge branch 'backport-2026-06-19' 2026-06-19 20:00:25 +02:00
ROllerozxa
1596df98f6 Principia 2026.06.19 2026.06.19 2026-06-19 19:21:18 +02:00
ROllerozxa
2be3199384 Make network header comparisons case insensitive 2026-06-19 19:06:38 +02:00
ROllerozxa
dc4d71e3e7 Make network header comparisons case insensitive 2026-06-19 19:00:48 +02:00
ROllerozxa
5b209b5e62 Uncomment sound thing in GTK dialogs
Was commented out during the SDL3 migration while sound was disabled
2026-06-19 17:27:25 +02:00
ROllerozxa
9422867597 Refactor Android Java code
Move everything Principia-specific from SDLActivity into PrincipiaActivity and update any references in the dialog code
2026-06-19 17:03:15 +02:00
ROllerozxa
6fb9160601 Rework main entrypoint to use SDL's callbacks instead
Means no special workaround needed on Emscripten to manage the main loop, among other things...
2026-06-19 16:35:33 +02:00
ROllerozxa
1e4dfe80e1 Replace custom UTF-8 step function with SDL_StepUTF8 2026-06-19 16:20:55 +02:00
ROllerozxa
55b1506b0d Fix black level background when doing unity build 2026-06-19 16:12:02 +02:00
ROllerozxa
303b9d2a2f Fix building utils 2026-06-19 00:31:59 +02:00
ROllerozxa
d623a95857 Use filename extensions for determining image format rather than magic 2026-06-19 00:13:04 +02:00
ROllerozxa
22c192b6d2 Remove unused main menu contest stuff
This was never used and didn't really work all that great when I tried implementing it in the featured list creator. Just clean up all references of it.
2026-06-18 22:09:35 +02:00
ROllerozxa
e9d944afa8 Turn some stray C source files in the main src directory into C++ 2026-06-18 21:58:57 +02:00
ROllerozxa
494de12927 Fix zoom and Apparatus grid salute gestures on Android 2026-06-18 20:10:52 +02:00
ROllerozxa
1add6eff33 Hopefully fix Linux CI 2026-06-18 19:30:43 +02:00
ROllerozxa
e1c948f166 Clean up Win32 API usage, explicitly use -W functions rather than defining UNICODE
Also fixes linkage issues with SDL's main wrapper
2026-06-18 19:30:18 +02:00
ROllerozxa
1968f347d2 Try to fix failing CI builds 2026-06-18 00:48:41 +02:00
ROllerozxa
d631ca3d55 Fix SDL3 Android build
Pinch to zoom no longer works which seems to be due to SDL finger IDs changing. There is a new pinch event specifically for this which should be used instead.
2026-06-18 00:28:38 +02:00
ROllerozxa
8dccfb17a4 Use SDL_SetWindowFillDocument on Emscripten to fill browser window 2026-06-18 00:05:25 +02:00
ROllerozxa
c07486f02f Fix SDL3 Windows build 2026-06-18 00:04:19 +02:00
ROllerozxa
73f0dd1195 Fix up CI builds to build with SDL3
Adds a new CMake option to build with a vendored copy of the latest version of SDL3, which gets downloaded during configuration.
2026-06-18 00:04:03 +02:00
ROllerozxa
e00585b9fe Make audio work again on SDL3
Currently using the legacy `sdl2-api-on-sdl3` branch of SDL_mixer, which isn't recommended to be used but works for now as the real SDL3_mixer has a completely different API.
2026-06-17 21:19:16 +02:00
ROllerozxa
15600f1682 Update SDL_image to latest in upstream
There were two indexed images with transparency that became messed up with the new SDL_image. I'm not sure why but I resaved them as non-indexed in GIMP, they grew a bit but now look fine.

Also replace savepng with SDL_image's IMG_SavePNG.
2026-06-17 20:10:28 +02:00
ROllerozxa
641b449286 Another round of SDL3 migration 2026-06-17 19:53:41 +02:00
ROllerozxa
74c7cdb517 Incomplete SDL3 port
WIP, Some things have been stubbed out for now.
2026-06-17 14:53:45 +02:00
ROllerozxa
f75299ee8d Add fallback for Windows cache dir if LOCALAPPDATA is undefined 2026-06-10 00:02:15 +02:00
ROllerozxa
0922b84a69 Fix building Dear Imgui backend on Windows 2026-06-09 23:45:23 +02:00
ROllerozxa
b55735c2a0 Fix unity build on Windows 2026-06-09 23:43:23 +02:00
ROllerozxa
4c395f09af Build TMS as a unity build too
The C portion of TMS is its own unity build chunk while the portions of TMS in C++ are lumped into the main chunk
2026-06-07 21:13:52 +02:00
ROllerozxa
1505be8191 Use #pragma once in TMS sources 2026-06-07 20:55:02 +02:00
ROllerozxa
a2b7870842 Clean up TMS includes in Principia code
Always only `#include <tms/cpp.hh>` in C++ source files to make sure everything gets included with the correct declarations (i.e. `extern "C"` for TMS C stuff)
2026-06-07 20:50:17 +02:00
ROllerozxa
9ffb133da5 Add experimental unity build support behind UNITY_BUILD compile option
It will build most of the main C++ codebase in one chunk, as well as build the entirety of Box2D in its own chunk. This should significantly improve build times for full builds.
2026-06-07 19:20:21 +02:00