6163 Commits

Author SHA1 Message Date
Tamás Bálint Misius
fa8237218d
Snapshot 379 snapshot-379 2025-01-16 12:59:23 +01:00
Tamás Bálint Misius
165ea90d6a
Give visual indication of vote/fav requests being in progress 2025-01-16 12:58:24 +01:00
Tamás Bálint Misius
09ba266165
Fix some cases of bogus missing element warnings
Namely, the ones caused by element numbers already invalid at the time of saving. This makes it impossible to intentionally have invalid element numbers in the low bits of properties listed in CarriesTypeIn, but these bits are considered to be under TPT's control anyway, so this is ok.
2025-01-15 19:08:57 +01:00
Tamás Bálint Misius
2b0ee9392c
Make a copy of particles before saving them and work off that
This is a minor refactor before the next commit; the significance of that commit would get lost in this noise otherwise.
2025-01-15 19:01:27 +01:00
Tamás Bálint Misius
a7d73102d6
Fix ptsave: being handled before autorun.lua
This would leave saves opened this way missing elements, but also not produce a warning in the preview, because by that time that preview is made, autorun.lua has been run.
2025-01-15 00:07:34 +01:00
Saveliy Skresanov
452849df74 Draw air velocity line near cursor when air velocity mode and debug HUD are on. 2025-01-13 22:38:43 +07:00
Saveliy Skresanov
dbfeca5bd0 Make ambient heat drag effects weaker. 2025-01-13 21:54:22 +07:00
Saveliy Skresanov
8b8a6fa0b9 Remove old latent heat code, but leave LATENTHEAT switch and element
property in case if we do a proper implementation later.
2025-01-13 19:00:37 +07:00
Tamás Bálint Misius
9f038416cc
Allow disabling the automatic update check at startup
Some people really don't like when an app immediately phones home the moment they open it. This of course means losing automatic notification and motds but oh well.
2025-01-12 16:38:51 +01:00
Tamás Bálint Misius
6848c3542f
Snapshot 378 snapshot-378 2025-01-10 16:18:47 +01:00
Tamás Bálint Misius
4c2c95c72b
Fix more missing elements in some older saves not showing up as such
This implements some the TODO from the previous commit, efd3a80611d5.
2025-01-10 16:12:45 +01:00
Tamás Bálint Misius
efd3a80611
Fix missing elements in some older saves not showing up as such
Broken since a38e1c48bbf0, where older saves were allowed to work off the legacy identity mapping of save numbers to element numbers. The problem was that this could leave even those element numbers mapped that were associated by the palette with unknown element identifiers. These elements would then fail to spawn but would not show up as missing in the save preview.

Still not perfect, see the TODO in the diff.
2025-01-09 16:14:49 +01:00
Tamás Bálint Misius
d83b49a1ed
Update tpt-libs
Like 5103db82887f, this addresses the upload issues experienced on windows, but this time with the official fix from libcurl developers; see the relevant tpt-libs commit.
2025-01-07 21:34:47 +01:00
Tamás Bálint Misius
30942137c7
Fix SPRK sometimes being impossible to paste
Broken since 462460b6b3f0, where Load started using create_part with p == -3, running all sorts of checks against SPRK and sometimes failing.
2025-01-07 16:34:52 +01:00
Tamás Bálint Misius
59f34a1526
Fix pasting bailing early when any particle fails to spawn
Broken since 462460b6b3f0, where the break in the old code was thoughtlessly moved to the new code, the issue being that create_part failing doesn't necessarily mean that we're out of particle IDs. I don't think pasting is a hot enough operation for such optimizations to be necessary, so continue should be fine.
2025-01-07 16:32:42 +01:00
Tamás Bálint Misius
4701766ec3
Fix some particles flickering when SRT is enabled
Broken since c645269c8625, where we started giving the renderer thread only the live part of Simulation::parts. Or at least intended to, but ended up copying whatever amount we should have copied the previous time around. The flickering was hard to notice because the number of particles rarely changes much between frames.
2025-01-07 14:55:51 +01:00
Tamás Bálint Misius
462460b6b3
Manage particle lifetime with create/kill_part only
This should fix the long-standing issue of Create/ChangeType callbacks not being called in all cases when particles were created or changed type.

I'm eagerly awaiting reports of the horrendous crashes this will inevitably cause.
2025-01-05 20:40:58 +01:00
Tamás Bálint Misius
3fe5dcc447
Fix crash on exit while there are Lua components visible
Broken since 02b679aec37f and extremely similar to 74386631e0b6, which makes sure that both LSI and GameView are alive when destroying Lua windows: in this case, they both need to be alive when destroying components attached to the main window. Also, the main window has to exist still.
2025-01-05 10:38:09 +01:00
Tamás Bálint Misius
f7753ff76f
Fix create_gain/cherenkov_photon leaving particles partially initialized 2025-01-03 20:04:09 +01:00
Tamás Bálint Misius
afe4a26299
Make SRT work with event.AFTERSIMDRAW
AFTERSIMDRAW can be composited on the main thread on top of the frame that got rendered in parallel, so there is no reason to have it hinder SRT. This cannot be done with BEFORESIMDRAW, which is applied to the frame before the rest of the sim is rendered. If we had proper associative compositing with pre-multiplied alpha, it could be, but this doesn't really work well with the colour space we're using right now (sRGB, with u8 components).
2025-01-01 21:55:37 +01:00
Tamás Bálint Misius
87cf63dbcc
Disable steam builds for mods and ordinary official workflows
Ordinary i.e. not stables, betas, or snapshots.
2025-01-01 16:51:49 +01:00
Tamás Bálint Misius
6dd0e9533f
Fix Rect::operator & (intersection)
Completely neglected to normalize the Rect's size. Somehow completely asymptomatic unless looking at the favourites menu if it's too long to fit on the screen, on MacOS. Yeah.

Another in the series of fixes for easily avoidable problems introduced in c2bb77721208 by my infinite wisdom >_>. The previous (and thankfully, first) commit in the series is 8cab4ab73819.
2024-12-30 15:22:54 +01:00
jacob1
a32f0fe178
Version 99.0 (Build 377) v99.0.377 2024-12-24 22:50:36 -05:00
jacob1
64af43eccd
Build number 375 -> 376 (new beta) v99.0.376b 2024-12-22 23:36:20 -05:00
jacob1
8b2d354043
Turn Separate Rendering Thread on by default 2024-12-22 23:26:18 -05:00
Tamás Bálint Misius
5103db8288
Update tpt-libs
This fixes upload issues (mainly on windows, though I've found no reason why it wouldn't manifest elsewhere also) and enables querying display refresh rate when using xorg.
2024-12-22 20:55:39 +01:00
Tamás Bálint Misius
2286440b46
Update refresh rate when the window is moved to another display 2024-12-21 23:55:50 +01:00
Tamás Bálint Misius
5ff963a40d
Add debug levels for simulation and rendering info 2024-12-21 11:52:10 +01:00
Tamás Bálint Misius
86fd919699
Add draw limit variant that mirrors the display's refresh rate 2024-12-21 11:52:10 +01:00
Tamás Bálint Misius
3b70324b78
Fix draw cap math
Floating point nonsense made the common case of draw cap = fps cap sometimes skip frames. This commit essentially duplicates the tick scheduling logic over to draw scheduling, with the exception that the draw schedule's "how much time to sleep" output goes nowhere; instead, we explicitly check whether we should be drawing a frame every tick.
2024-12-21 11:52:10 +01:00
Tamás Bálint Misius
c645269c86
Only copy the live portion of parts when SRT is enabled
One major downside of SRT is that a RenderableSimulation has to be copied between the main thread and the rendering thread, which may actually take more time than to render on the main thread. This commit reduces the impact of this copy by copying only the subset of RenderableSimulation::parts that actually matters.
2024-12-21 11:52:10 +01:00
Tamás Bálint Misius
2f2d24b838
Add a config option for standard stream redirection to log files
Equivalent to the redirect command line option.
2024-12-19 22:41:56 +01:00
Tamás Bálint Misius
f580a0b9d4
Fix gravity wall being intermittently broken when drawn while paused
In fact, even when it was drawn while unpaused, there would be two different gravity masks being swapped between, and only one of them was what the user wanted. However, there wasn't as much difference between them, because one was just one frame more out of date than the other, so this was hard to notice.

Broken since 6b5bbb177dd5, where I forgot that the gravity mask exists at all. The gravity mass input is thrown away every frame in Simulation, and so that commit applies to it well, but the gravity mask isn't.
2024-12-19 12:53:51 +01:00
Tamás Bálint Misius
a01a075551
Fix the "fake" newer version number being actually older 2024-12-18 19:26:57 +01:00
JJ Marr
7394a1c081
Add clang-tidy support and fix modernize-use-nullptr (#966)
C++11 standardizes the "nullptr" keyword, which replaces the
implementation-defined macro null pointer "NULL" or a hardcoded 0.

---------

Co-authored-by: Tamás Bálint Misius <lbphacker@gmail.com>
2024-12-18 18:11:06 +00:00
jacob1
0506bc4f89
Update version numbers (99.0) and readme v99.0.375b 2024-12-17 16:43:46 -05:00
Tamás Bálint Misius
7de0bb8506
Fix some warnings 2024-12-17 20:39:51 +01:00
Project_HSI
6762744afa
Untemplate RGB(A) (fixes #968) (#969)
We were never going to use any instance other than the uint8_t ones anyway.
2024-12-17 19:18:18 +00:00
Tamás Bálint Misius
1ef78c019a
Migrate embedded files to custom targets
Meson generators seem to be a dying feature, evidenced by the fact that they have been in a state of isolation from the rest of the language for several years at this point:

 - very few things accept generator outputs as inputs, not even generators themselves do
 - unlike configured files, their outputs aren't guaranteed to be always synthesized, and yet they can't be passed as dependencies to other targets
 - they accept strictly one input and can't depend on other files

This makes them really hard to work with in a context that would require either a project resource or a target. Custom targets don't have any of these shortcomings, so this commit migrates embedded files over to those. A real shame, considering that generators can be used anywhere and are generally less messy than custom targets.
2024-12-17 16:15:27 +01:00
Tamás Bálint Misius
c62f105c85
Propagate python3 program to the android build's meson config
This should have been done in 9a785dc3890c.
2024-12-17 14:33:17 +01:00
jacob1
653d43699e
Fixes to scrollbar mouse tracking
Click inside the scroll panel area would sometimes scroll even if you weren't clicking the scrollbar
2024-12-16 22:42:47 -05:00
jacob1
57593fb212
Add credits UI
Lists all GitHub contributors and moderators, alongside the original credits (which were moved from the intro text to here)

The UI itself is controlled with credits.json. This can be regenerated with resources/gencredits.py.
2024-12-16 22:42:41 -05:00
Tamás Bálint Misius
9fa0fc45bc
Use std::span where possible without much effort 2024-12-16 17:11:50 +01:00
Tamás Bálint Misius
5739170f20
Fix oversize thumbnails
Broken since f52e04703731, where Renderer::DumpFrame was removed in favour of constructing VideoBuffers directly from pixel data, but Renderer::video's exact width wasn't taken into account. This was chosen to be WINDOW.X, rather than the intuitive RES.X, in order to enable blitting the sim framebuffer onto the window framebuffer with a single memcpy.
2024-12-16 16:22:21 +01:00
Tamás Bálint Misius
43c92f5c8f
Fix NUM_PARTS being wrong almost all the time
This was really annoying to deal with on the Lua side.
2024-12-14 22:00:40 +01:00
ChromicQuanta
049d5d8b37
Make BGLA PROP_DEADLY (#964) 2024-12-13 23:55:41 -05:00
jm211
68a8b055e3
STOR can absorb radiation particles (#978) 2024-12-13 23:55:23 -05:00
jm211
f3c73c8658
Fire and Plsm create wtrv, not dstw (#979) 2024-12-13 23:55:06 -05:00
jm211
0ad91f74f2
VIBR explosion bound fixing (#980) 2024-12-13 23:49:16 -05:00
jacob1
6e43882a0e
Prevent creating two tools with the same identifier in tools.allocate 2024-12-12 23:56:25 -05:00