Commit Graph

5605 Commits

Author SHA1 Message Date
Tamás Bálint Misius
159d0eb4b7
Group platform files into their own directory 2023-01-27 17:31:40 +01:00
Tamás Bálint Misius
694bc8eb0f
Fix exit behaviour
We can't rely on atexit, handlers registered with it are in a hard to establish ordering relationship with destructors of static and thread-local objects.
2023-01-27 14:55:58 +01:00
Tamás Bálint Misius
11945ba620
Factor out game stuff from PowderToySDL.cpp 2023-01-27 09:29:19 +01:00
Tamás Bálint Misius
2566506e4b
Provide three levels of install support
Namely: no, yes, and yes and ask at startup.

The install_check option is thus replaced by the can_install option. -Dinstall_check=true maps to -Dcan_install=yes_check, while -Dinstall_check=false maps to -Dcan_install=yes. -Dcan_install=no is new and is recommended for downstream packaging, where -Dinstall_check=false was historically used.

Also improve error messages about bad configuration here and there and scatter configuration code in subdirectories, where they can be closer to their areas of effect.
2023-01-27 09:27:33 +01:00
Tamás Bálint Misius
416f84a1c4
Read stamps from stamps.json
... while retaining all the functionality of stamps.def.

Also fix stamp names encoding only 32 bits of the timestamp, migrate from stamps.def to stamps.json if the latter doesn't exist, delete both on migration to the shared data directory, rescan stamps at startup, and make rescanning a painless process in general by removing invalid entries and adding missing entires at the beginning of the list.
2023-01-27 09:27:33 +01:00
Tamás Bálint Misius
9034736708
Move more stuff to Editing.cpp 2023-01-27 09:27:32 +01:00
Tamás Bálint Misius
75191e7ac5
Skip loading authorship info in render 2023-01-27 09:27:32 +01:00
Tamás Bálint Misius
a438584871
Only save custom GOL data if it changed 2023-01-27 09:27:32 +01:00
Tamás Bálint Misius
4f0c365e05
Preprocessor purge round 19: Split and minimize usage of Config.h
Also mostly banish it from other headers, and shuffle standard header includes to minimize cross-contamination between headers.
2023-01-27 09:27:32 +01:00
Tamás Bálint Misius
6ea66f02de
Include "1" in the list of "true-strings" on the command line 2023-01-27 09:27:32 +01:00
Tamás Bálint Misius
3cb6b26d1d
Migrate Singletons to ExplicitSingleton 2023-01-27 09:27:30 +01:00
Tamás Bálint Misius
8680f0d4a7
Remove PATH_SEP, set PATH_SEP_CHAR in meson.build 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
36d6f1d67e
Preprocessor purge round 18: difficult parts of WIN, LIN, MACOSX, AND 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
49102e395c
Move platform-specific code out of entrypoint TUs 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
c8ca016494
Move update code to Platform 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
a7d8ecc6e3
Make WriteFile replace rather than overwrite
This preserves old file if writing the new one fails for some reason.
2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
163203b321
Preprocessor purge round 17: easy parts of WIN, LIN, MACOSX, AND 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
746dbb0cba
Manage search model requests in SearchModel
Also make Client an ExplicitSingleton, and thus fix all known instances of Requests outliving RequestManager.
2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
afda2826bf
Refactor preferences 2023-01-27 09:26:41 +01:00
Tamás Bálint Misius
220844521a
Merge hdiutil calls in build.sh
Because for some reason the hdiutil convert step would sometimes fail with "image corrupt" when given an image the hdiutil create step had just previously created. Too cursed for my pay grade; I took the easy way out.
2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
f7478422a4
Preprocessor purge round 16: DEBUG 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
f0ffa2eeb1
Preprocessor purge round 15: FONTEDITOR, RENDERER 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
b5f6ec0f6c
Build nolua, nohttp, nogravfft variants on ghactions 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
a2a079356a
Preprocessor purge round 14: NOHTTP 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
7ea839feb8
Move Lua HTTP out of LSI 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
91a9973bfd
Refactor HTTP
Request ownership is no longer flaky. Requests are now owned by the code that makes requests, and Requests and the RequestManager co-own RequestHandles. RequestManager disowns a RequestHandle if it's done with it or if Request code reports that it's no longer needed.

All libcurl code has been moved to RequestManager. This is nice because once NOHTTP is removed, we can add any number of RequestManager implementations, for example one for Android.

Client outliving RequestManager is still a problem, this will have to be addressed later.
2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
29d4d4e91c
Preprocessor purge round 13: X86 2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
b16cbf86fc
Preprocessor purge round 12: BETA, SNAPSHOT, MOD 2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
9068920de3
Preprocessor purge round 11: GRAVFFT
By splitting gravity implementations into separate translation units.
2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
dc8d63fb15
Preprocessor purge round 10: LUACONSOLE 2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
7fca2433cd
Derive LuaScriptInterface from TPTScriptInterface
Also convert stray references to LSI to stray references to CommandInterface. Not a lot better as it's still a global >_> but it's easier to follow.
2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
1f22e209f1
Localize Simulation::Before/AfterSim control to GameModel 2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
169aa47685
Hide CommandInterface creation behind a factory
Which is then provided by either a Lua-ful or a Lua-less translation unit.
2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
33edb2e0e4
Refactor GameController events
More precisely, refactor the code responsible for routing these GameController events to the Lua side. The issue with the previous solution was it relied on preprocessor macros to switch between Lua-ful and Lua-less builds.
2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
27ddf78e0c
Preprocessor purge round 9: XCELLS and YCELLS 2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
1efafb8d30
Preprocessor purge round 8: trivial binary macros 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
9542f98b82
Preprocessor purge round 7: Config.template.h 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
e97fd74503
Preprocessor purge round 6: intro text and user agent 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
fdfa206a3c
Preprocessor purge round 5: M_PI 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
3eb1609934
Preprocessor purge round 4: misc function macros 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
b2b06bf009
Preprocessor purge round 3: spaghetti headers 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
e4c2ec5a00
Preprocessor purge round 2: #pragma once 2023-01-27 09:26:38 +01:00
Tamás Bálint Misius
3a591b8539
Preprocessor purge round 1: simulation constants 2023-01-27 09:26:36 +01:00
jacob1
44d53082eb
Fix memory leak in SaveRenderer (not cleaned up on exit) 2023-01-26 22:41:38 -05:00
jacob1
4c74d25840
Fix graphical artifacts sometimes showing up with ptsave startup arg 2023-01-26 22:40:58 -05:00
jacob1
e824e023f1
Fix WIND tool not reacting to zoom window properly, fixes #899 2023-01-23 20:32:37 -05:00
suve
8ce7a37070 Add missing cstdint includes
Some files have been using various fixed-size types (uint32_t etc.),
which are defined in stdint.h / cstdint, without including said header
file. While this code worked with GCC12 (likely a transitive include),
under GCC13 it fails to build due to "unknown type" errors.
2023-01-21 19:50:55 -05:00
Ksawi
62129e3d34 Add BIZR/BIZG/BIZS ctype serialization 2023-01-17 13:10:10 -05:00
jacob1
4c8cbf49be
Fix Gravity.cpp permission bits, fixes #893 2023-01-16 23:58:50 -05:00
Tamás Bálint Misius
d02242714e
Fix particle maps sometimes being stale when pasting
This restrict effects of paste-time de-stacking to positions under particles being pasted. If this is not done, particles beyond the paste area can be wrongfully killed, see #889.
2023-01-10 08:06:47 +01:00