Commit Graph

3453 Commits

Author SHA1 Message Date
Tamás Bálint Misius
608f037e68
Explain platform clipboard external dependencies in OptionsView 2024-01-10 07:41:22 +01:00
Tamás Bálint Misius
d05b0093b9
Attempt to show and demangle symbols in bluescreen stack traces 2024-01-10 07:41:11 +01:00
Saveliy Skresanov
9a05e56f15 Restore old SOAP foam behaviour and make it work with nonstandard gravity. 2024-01-09 23:59:31 +07:00
jacob1
1dc641d13f
Fix signs loading in wrong position in PSv saves 2024-01-07 17:13:19 -05:00
jacob1
99566c8003
LogoutRequest - set checkStatus to true 2024-01-06 23:31:28 -05:00
Saveliy Skresanov
c352b08d86 More resist-related comments. 2024-01-02 18:23:19 +07:00
Tamás Bálint Misius
5411269fb2
Fix bluescreen stack trace not showing exception frames 2024-01-02 10:02:03 +01:00
Tamás Bálint Misius
4a99004327
Fix requests not being marked done when they fail early
They were marked done as far as Libcurl.cpp semantics went, but they weren't noticed by the Worker loop and thus weren't actually marked done with MarkDone.

Broken by 0cc179ae4e where I quietly (i.e. no mention of this in the commit message >_>) replaced curl_multi_wait with curl_multi_poll, the former of which would return after some time even if nothing happened and the latter of which doesn't. Thus, the request manager loop kept iterating, if slowly, and masked this issue: these half-baked requests ended up being noticed in the iteration of the Worker loop that came after the one during which they were marked done.

Also fix the MotD being finalized improperly in Client.
2024-01-01 17:17:43 +01:00
Tamás Bálint Misius
70f6b68fc5
Add platform clipboard option to settings 2024-01-01 12:29:03 +01:00
Tamás Bálint Misius
6160a6b7d5
Add stack trace to bluescreen on some systems
This is still complete nonsense on posix systems where bluescreen runs in a signal handler, but what can you do.
2024-01-01 09:34:44 +01:00
Saveliy Skresanov
929b7ee525 Resist and bcoal now make fuse powder. 2023-12-31 22:53:56 +07:00
jacob1
c60e87870a
Add includePressure to saveStamp as well
Also removed in a407aba087, as part of cleanup. Restoring it now that loadStamp also has this same parameter.
2023-12-30 21:10:28 -05:00
jacob1
cdc3eb8663
Fix "does not exist" showing up when loading stamps by id or filepath in console
SetLastError will always cause the error to show up in the console. Use tempfile->GetError() instead, which will return the same error message anyway unless the stamp doesn't exist.
2023-12-30 20:34:22 -05:00
jacob1
2619050824
sim.loadStamp: default includePressure to 1
It doesn't make much sense for a Lua function to vary depending on whether the user holds shift or not.

This restores the original behavior of includePressure in 6931f35520, which was accidentally removed later in a407aba087. Since I doubt anyone used this parameter, I'll just keep it at position 6 instead of moving it back to 4.
2023-12-30 19:46:12 -05:00
jacob1
a471a0de1f
Fix http.post using wrong argument as POST data 2023-12-30 16:03:45 -05:00
jacob1
5a762524b8
Fix header return value from HTTPRequest:finish, now returns both name and value again 2023-12-30 15:40:46 -05:00
Tamás Bálint Misius
25c65310bd
Clear stamp browser selection when page contents change 2023-12-29 14:35:59 +01:00
git4rker
7623f45e6e Implement stamp renaming 2023-12-29 10:20:55 +01:00
Tamás Bálint Misius
d84e0a0c3e
Sample properties when shift is held
Rather than when the active tool is the property tool. Solves the problem of not being able to sample "away" from the property tool when it's already selected. Also bring up the property window after each such sampling of properties.
2023-12-26 13:17:21 +01:00
Tamás Bálint Misius
c5b72b213b
Add beforesimdraw and aftersimdraw events
These fire just after RenderBegin (read: really early) and just before RenderEnd (read: really late, but before the zoom window is drawn), respectively.

Lua graphics calls now also decide whether they should draw using simulation graphics or user interface graphics based on which event is being handled. This fixes element graphics functions being unable to draw with graphics calls.
2023-12-24 13:37:54 +01:00
Tamás Bálint Misius
eececdbc83
Fix label sizes in PreviewView
Enabling clipping in 151bc4c9cd made the ill-sized nature of these labels visible.
2023-12-23 21:31:52 +01:00
Tamás Bálint Misius
24fb11aed6
Add tpt.version.beta 2023-12-23 19:33:48 +01:00
Tamás Bálint Misius
bbe84e3505
Add sim.listStamps 2023-12-23 19:26:19 +01:00
Tamás Bálint Misius
62b116cb8f
Fix link region detection in RichLabels 2023-12-23 14:20:48 +01:00
jacob1
d2655fa195
PHOT reflection now works as it did prior to 920f7646e4
This fixes many saves that use 1-px mirrors, for example, id:1077513 id:828603 id:2845200 id:30082

PHOT refraction, which was wildly broken in 97.0, is unchanged, and still works. In Simulation::get_normal, I simply check if REFRACT is set, and if it is, apply the new logic
2023-12-22 22:28:35 -05:00
Tamás Bálint Misius
3ecc1c6c6f
Retire tpt.beginGetScript in favour of tpt.installScriptManager
There had never been a legit use of tpt.beginGetScript (or indeed, tpt.getscript) that didn't involve the exact parameters 1, "autorun.lua", 1. The most infamous alternative parametrization was 2, "autorun.lua", 1, which would install TPTMP where you'd normally install the script manager. Absolute madness.

The callback parameter also goes away with this change, because no other script needs to know when the script manager is done being installed. I also fixed a problem where the function might be called from the wrong context and thus get delayed in handling the completion of the HTTP request. With the earlier removal of checking for existing destination files and bailing out if found, this function is now bullet-proof(tm).

This restores the tpt.getscript(1, "autorun.lua", 1) usage pattern, albeit only from the console.
2023-12-20 20:03:57 +01:00
Tamás Bálint Misius
95b83ffd61
Allow tpt.beginGetScript to overwrite existing files unconditionally
It's not worth the trouble to ask questions (this was the old behaviour), the next best thing (in terms of preserving old behaviour) is to overwrite unconditionally. There is no situation in which the file name would be specified but the user wouldn't want the file to be written to.
2023-12-20 19:13:37 +01:00
Tamás Bálint Misius
e20312a672
Make marking events as "sim events" slightly harder to mess up
A sim event being an event that takes place in the context of the simulation. Currently, this simply means that the RNG math.random uses is the sim's rather than the UI's.
2023-12-20 19:11:33 +01:00
Tamás Bálint Misius
0143a0a41f
Add link to the registration form to LoginView
It's meant to show up when you're not logged in and also haven't yet gotten any response from the server.
2023-12-16 11:06:26 +01:00
Tamás Bálint Misius
4ab2a032af
Clean up RichLabel 2023-12-16 11:05:45 +01:00
Tamás Bálint Misius
151bc4c9cd
Fix Textbox width limiting content length 2023-12-15 22:36:41 +01:00
Tamás Bálint Misius
7083f67979
Add includePressure parameter to sim.loadStamp
Defaults to what it's always been doing, that is, checking shift state.
2023-12-15 22:36:40 +01:00
Tamás Bálint Misius
c75451b34c
Fix pasting sometimes getting interrupted by the particle limit
More precisely, fix reaching the particle limit while pasting onto a sim with no stacking, which shouldn't be possible at all, because pasting removes stacking at any position that has particles, and if the sim doesn't already have stacking, in the worst case we should end up filling the screen, which would use exactly as many particles as the limit allows.

The problem was that the removal of stacking happened after all particles were done being pasted, which meant that the particle limit could be reached halfway into the process. The solution is to remove on demand the particles wherever we're pasting one.

This works because assuming there is no stacking in the sim (this is the only case we care about) and that pmap is up to date (it is, we call RecalcFreeParticles early), then a spot that is being pasted over is either free (and therefore there are also slots free in Simulation::parts) or has exactly one particle, which we remove before creating the one we're pasting.
2023-12-15 22:36:37 +01:00
Tamás Bálint Misius
c6c4b1de76
Fix some pasted particles not getting cut off at the edges of the simulation
The problem is that .x and .y may get rounded toward 0 when being converted to an int, the fix is to floor first.
2023-12-15 19:26:12 +01:00
Tamás Bálint Misius
b4d7d276a2
Complain when pasting save data with missing elements 2023-12-15 19:06:19 +01:00
Tamás Bálint Misius
324745f24d
Mark saves as being from the next version in dev builds
That is, undo the decoupling of the effective save version from what is today the upstream display version done in 7fc3fb4c15. This enables taking advantage of new features, for example the comprehensive palette, in saves that do come with a comprehensive palette, which is a 98.0-and-above feature.

Also fully populate GameSave::version before making checks against it and fix GameSave::fromNewerVersion reflecting the relationship between only the major components of version numbers.
2023-12-15 18:58:37 +01:00
Tamás Bálint Misius
9f431c6393
Handle return value from signal in the External clipboard driver
Absolutely zero chance of signal ever failing, but still.
2023-12-15 18:26:02 +01:00
Tamás Bálint Misius
fb9cba0d01
Some native clipboard support for some platforms
I was hoping SDL2 would get this functionality eventually, but nope, proper clipboard support is staged for SDL3, which we're not going to see much of for at least a few more months. This will have to do for 98.0. The feature can be disabled at runtime from powder.pref.

Implementation status:

 - windows (via winapi): has the most friendly api so of course the implementation is flawless and uses every available optimization >_>
 - macos (via cocoa): I'm bad at cocoa so this is only as good as absolutely necessary; TODO: on-demand rendering
 - x11 (via xclip): I am NOT implementing icccm2; TODO: remove reliance on external tools
 - wayland (via wl-clipboard): oh god wayland oh why, you're almost as bad as x11; TODO: remove reliance on external tools
 - android: TODO; is there even a point?
 - emscripten: TODO; the tricky bit is that in a browser we can only get clipboard data when the user is giving it to us, so this will require some JS hackery that I'm not mentally prepared for right now; also I think the supported content types are very limited and you can't just define your own

x11 and wayland support are handled by a common backend which delegates clipboard management to xclip-like external programs, such as xclip itself or wl-clipboard, and can load custom command line templates from powder.pref for use with other such programs.
2023-12-13 21:49:35 +01:00
Tamás Bálint Misius
2eee738a9f
Fix another extremely rare pmap corruption
The real fix was made in Simulation::kill_part, where photons[y][x] wasn't cleared when i = 0 because the pmap branch triggered instead. Broken since ff7428fc70, which only partially fixed some related bug. I decided to also fix every other case, even if they are not strictly necessary because they write 0 to pmap/photons anyway.

Reproduce with

	sim.loadSave(3062273, 1)
	sim.ensureDeterminism(true)
	tpt.setfpscap(2)
	local function F()
		print(sim.framerender(), sim.randomseed())
		if sim.framerender() == 0 then
			local a = 3498763327
			print(sim.hash(), a)
			sim.framerender(1200)
			sim.reloadSave()
			sim.randomseed(a, a + 1, a + 2, a + 3)
			tpt.set_pause(0)
		end
	end
	event.register(event.tick, F)
2023-12-12 22:19:13 +01:00
Tamás Bálint Misius
6433eb04f2
Fix extremely rare pmap corruption
c4dcb37de4 added a kill_part without a return 1.

Reproduce with

	sim.loadSave(3062273, 1)
	sim.ensureDeterminism(true)
	tpt.setfpscap(2)
	local function F()
		print(sim.framerender(), sim.randomseed())
		if sim.framerender() == 0 then
			local a = 2247503365
			print(sim.hash(), a)
			sim.framerender(1200)
			sim.reloadSave()
			sim.randomseed(a, a + 1, a + 2, a + 3)
			tpt.set_pause(0)
		end
	end
	event.register(event.tick, F)
2023-12-12 19:52:09 +01:00
Tamás Bálint Misius
986de1066d
Fix uninitialized read of Engine::dt early after startup again
As once done in a2c7242c7c. Broken in c725894abd.
2023-12-12 15:28:15 +01:00
Tamás Bálint Misius
d4784b2516
Fix line debug tool showing up when placing stamps 2023-12-12 08:41:53 +01:00
Tamás Bálint Misius
ef86110516
Fix can_move being set up too early
As in, before element properties were populated. This broke everything that depended on can_move, probably most notably particle displacement based on the Weight property. It didn't help that once element properties were populated, any secondary call to init_can_move would fix the symptoms, such as when any custom element is added with Lua.
2023-12-11 22:50:52 +01:00
Tamás Bálint Misius
a38e1c48bb
Default to identity mapping elements not in the palette for pre-98.0 saves
Newer saves include an element palette which maps save-space element numbers to element identifier strings, see 29189693b3. This is useful because the numbers of custom elements can change, while their identifiers are expected to not change. Not all elements make it into the palette, only the ones that are in use in the save.

98.0 is staged to extend this feature in two ways. First, it'll warn the user of missing custom elements when loading a save that uses such elements, see 36800a76cd. Second, it'll do a better job of deciding what to put in the element palette, see a13c29875f.

In order for detection of missing elements to work, a save's palette has to account for every element number used in the save, including built-in elements. To dispel a misunderstanding regarding that last part: yes, including built-in elements is not crucial if the set of built-in elements only ever grows, but this is not guaranteed.

98.0 creates such palettes, but older code didn't, for various reasons. One reason is that the palette at some point wasn't meant to include built-in elements, see e0d982367b, although this was rectified later in 67b87b1dab. Another reason is that not all cases of element numbers encoded in particle properties were considered, see for example f45d0d1683 and 1f1062408c.

Palettes in existing saves being thus incomplete didn't use to be a problem because older code would just assume that whatever element number wasn't listed in the palette referred to a built-in element and would just map such save-space element numbers to the same simulation-space element number, hence identity mapping.

However, this approach doesn't cover custom elements whose numbers can change, nor does it cover extra built-in elements added by a mod. Worse, a different mod with different extra built-in elements may map save-space element numbers not listed in the palette to its own extra elements.

As a solution to these problems and making use of the fact that palettes are now complete and comprehensive, 98.0 no longer does this default identity mapping, see 73be29aa61. Removing this identity mapping in itself would have broken older saves that use the old identifiers of some elements; that commit works around that by remapping these early in the loading process. By the way, these changes in identifiers are perfect examples of the set of built-in elements changing in ways other than growing.

This still doesn't address the problem in the case of pre-98.0 saves though. Such saves have seemingly valid element numbers (although it's impossible to tell whether these refer to built-in elements from vanilla or extra built-in elements from a mod) but no corresponding entry in their palettes. The user is warned about such elements also, see 9f8449357f. Lacking a better solution, this commit assumes that these elements are indeed vanilla elements and re-enables the default identity mapping for such saves.

In summary, this commit fixes the loading process for saves that were made in 97.0 or some older version and use built-in vanilla elements in ways that didn't trigger their inclusion in the element palette.

For example, until a13c29875f, CONV's tmp was not considered by the palette code, so any CONV with tmp set to an element that wasn't a built-in vanilla element, and which also wasn't used anywhere else in the save, would have been potentially corrupted by the loading process. An example a save that demonstrates this behaviour is id:2633868, which has CRAY particles on the right with ctype set to LIGH, but until this commit, these ctypes would have been set to 0 and the user would have been warned about element number 87 (LIGH) missing from the palette.
2023-12-10 13:38:33 +01:00
Tamás Bálint Misius
cc27126f27
Move palette code to GameSave
Because Simulation shouldn't need to know about palettes.
2023-12-09 16:37:50 +01:00
Tamás Bálint Misius
2d7b40b9e5
Prevent Lua callbacks from being called from secondary SaveRenderers
SaveRenderers populate their own Simulation with Simulation::Load, which may call various callbacks now that these SaveRenderers know about custom elements. Make sure these callbacks don't try to call into the main thread's Lua state.

Seeing as these callbacks now need to be protected from races too, the scopes of some of the exclusive locks of the graphics property mutex needed to be extended.
2023-12-09 16:37:50 +01:00
Tamás Bálint Misius
ca6c67c16c
Factor functions shared between elements into headers
The signature duplication was getting out of hand; too easy to get wrong.
2023-12-09 16:37:49 +01:00
Tamás Bálint Misius
0f1218df0c
Sort out constness of Simulation and Renderer in graphics functions
Mostly. They are now const but only in graphics functions called from secondary Renderers. The primary (main thread) Renderer still allows graphics functions to mutate Simulation; this is required for correct in-PIPE rendering of custom elements.
2023-12-09 16:37:45 +01:00
Tamás Bálint Misius
cfa9fe568d
Move graphics cache to SimulationData 2023-12-09 09:51:41 +01:00
Tamás Bálint Misius
e64c23d50d
Limit access to the LatentHeat property to LATENTHEAT builds 2023-12-09 00:38:12 +01:00
Tamás Bálint Misius
78314a8f7d
Move Simulation::platent to Element::LatentHeat
Also put the feature gated by the macro REALISTIC behind the constexpr LATENTHEAT in SimulationConfig.h.
2023-12-08 23:36:34 +01:00
Tamás Bálint Misius
f8ee7aa0f7
Sort out constness of Simulation::PlanMove
And a bunch of other member functions. This got rid of some nasty assumptions documented only in the form of comments, in exchange for some nasty template nonsense.
2023-12-08 22:40:46 +01:00
Tamás Bálint Misius
dd875987b9
Enable basic rendering of custom elements in secondary Renderers
By factoring element and other static-ish data out of Simulation and protecting basic graphical element properties (i.e. everything that contributes to graphics other than the Graphics callback) with an std::shared_mutex. This is taken exclusively (std::unique_lock) by the main thread when it changes these properties, and inclusively (std::shared_lock) by non-main-thread code that uses Renderer.
2023-12-08 22:40:44 +01:00
Tamás Bálint Misius
9f8449357f
List element IDs that don't have an identifier associated in a save
36800a76cd lists missing element identifiers but neglects to handle IDs that don't even have one associated.
2023-12-05 10:19:13 +01:00
Saveliy Skresanov
2f25c3fe32 Merge branch 'resist' of https://github.com/The-Powder-Toy/The-Powder-Toy into resist 2023-11-26 22:11:32 +07:00
Saveliy Skresanov
bc5fad1500 Redo resist reactions. 2023-11-26 20:59:51 +07:00
Tamás Bálint Misius
eb29915243
Use a proper ProgressBar in UpdateActivity
Can't have the update window not use my fancy clip rect progress bars, see 04455ada1c.
2023-10-25 22:20:13 +02:00
Tamás Bálint Misius
e2743a2be1
Fix the casing of the new upstream tpt.version keys 2023-10-25 20:12:48 +02:00
Tamás Bálint Misius
d56510b1ac
Use method indices as LuaLuna thunk upvalues
Rather than member function pointers, which are not necessarily simple pointers and are not necessarily convertible to void * sensibly. This also gets rid of the last instance of lua_pushlightuserdata, which apparently isn't super well-supported by luajit, and which thus often crash on android.
2023-10-25 15:25:54 +02:00
Tamás Bálint Misius
b5d40a49f8
Remove luajit ffi particle access
No point to having it sit around effectively commented out.
2023-10-25 15:20:06 +02:00
jacob1
d5681d8ed9
Remove unnecessary lua_pushlightuserdata usage, use commandInterface global instead
This causes a crash when using luajit on aarch64 Android builds. I didn't remove the lua_pushlightuserdata usage in LuaLuna.h because that's external code and beyond my understanding
2023-10-24 22:12:16 -04:00
Tamás Bálint Misius
01728fe1f4
Make curl_multi_wakeup/curl_multi_poll usage optional
Thus dropping the minimum required libcurl version to at least 7.64, possibly further. We have compatibility macros all the way to 7.55 so yeah.

Also fix RequestManagerImpl::~RequestManagerImpl not doing a wakeup after setting running = false. This meant that in the worst case the worker would wake up 1000ms later and only then notice running = false and exit, making the game take overall longer to exit.
2023-10-24 06:50:52 +02:00
Tamás Bálint Misius
ba5883ff84
Fix changelog spam in the update window
That is, in some cases (read: starcatcher, which uses the very last component of the user agent to determine the build ID), you'd get all changelog entries ever, not only the ones between the current version and the one the update server has.
2023-10-22 20:15:37 +02:00
Tamás Bálint Misius
8c2a7e4312
Add surface normal debug tool 2023-10-22 17:57:23 +02:00
Tamás Bálint Misius
dda3e8a9c7
Expose debug constants to lua
Also clean up related resource management code a bit.
2023-10-22 10:57:49 +02:00
Tamás Bálint Misius
ac99fb8a11
Factor PlanMove out of Simulation::UpdateParticles
This will be useful later for a debug feature I'm planning to add.
2023-10-22 10:57:46 +02:00
Tamás Bálint Misius
edcbeaca56
Sort out scopes in Simulation::UpdateParticles 2023-10-22 10:28:17 +02:00
Tamás Bálint Misius
1c1ef12761
Fix prop tool not remembering settings in some cases
Namely, it would not write its settings to powder.pref if the property dropdown was changed with the up/down arrows.
2023-10-21 22:43:09 +02:00
Tamás Bálint Misius
a9cbd784f7
Remove snapshot_id
It is now consistently replaced by build_num. The next snapshot will be snapshot-353.
2023-10-19 12:51:11 +02:00
Tamás Bálint Misius
7fc3fb4c15
Sort out version info
The idea is to have the following version information included:

 - 1-component save version
   - 2-component under the hood but the minor component shouldn't ever change again
   - see currentVersionMajor in GameSave.cpp
 - 1-component website API version
   - again, currently 2-component because that's what the website code expects
   - see apiVersion in requestmanager/Common.cpp
 - 2-component display version, entirely cosmetic
   - exposed as meson options display_version_major and display_version_minor
   - see APP_VERSION in Config.template.h
 - 1-component business logic version aka build number
   - exposed as meson option build_num
   - see APP_VERSION in Config.template.h
 - variant id aka mod id, tightly coupled with the build number
   - exposed as meson option mod_id
   - see MOD_ID in Config.template.h
 - display and business logic versions repeated for the upstream
   - exposed as meson options upstream_version_major, upstream_version_minor, and upstream_build_num
   - we'll have to update these alongside display_version_major, display_version_minor, and build_num, but mod owners can just merge our changes
   - see UPSTREAM_VERSION in Config.template.h
 - update channel, makes sense in the context of the variant (and yes, this would later enable mod snapshots)
   - currently not exposed as a meson option but derived from meson options snapshot and mod_id
   - see IDENT_RELTYPE in Config.template.h
 - vcs tag aka git commit hash
   - set by build.sh in ghactions workflows
   - see VCS_TAG in VcsTag.tempalte.h

Rather importantly, the save and website API versions are now allowed to change independently of the display version.

These changes also allowed me to remove the ugly sed hacks in build.sh used to provision some manifest files; they are now provisioned by meson.

Also add version info for windows and android.
2023-10-19 12:51:03 +02:00
Tamás Bálint Misius
7f0f9ad132
Auto-focus the input field in the tag list 2023-10-17 09:55:47 +02:00
Tamás Bálint Misius
9f50249ca8
Handle back button on android 2023-10-16 23:41:57 +02:00
Tamás Bálint Misius
73be29aa61
Make the previous commit work with mod elements too
For this to work, loading code needed to stop trusting DEFAULT_PT_ identifiers, which it trusted because there have been some identifier changes between vanilla releases. I dug these up and listed them explicitly; they are now taken into account as needed when loading old enough saves.
2023-10-15 19:23:39 +02:00
Tamás Bálint Misius
36800a76cd
Complain about missing custom elements when opening online saves
The complaint manifests as a button in the bottom right corner of the half-size preview.

Also convert the loading error popup to such a button.
2023-10-15 13:30:28 +02:00
Tamás Bálint Misius
374209eebe
Remove a few outdated windows-only preprocessor hacks 2023-10-15 12:04:22 +02:00
Tamás Bálint Misius
9605e0fcb9
Fix spurious timeout errors from some callbacks
Mainly the new ones I added >_> Don't use lua_pcall, kids. tpt_lua_pcall records when control flow was "last seen" on the C++ side, so you have to call it rather than just lua_pcall if you want to avoid timeout ("script not responding") errors.

For the record, I had a really hard time reproducing these errors. I had to tune the timeout to such a low value that the errors might as well have not been spurious, i.e. not much could have been done in such a short period of time anyway, bugs or no bugs.
2023-10-15 11:32:00 +02:00
Tamás Bálint Misius
8534be2bf9
Fix guess best scale prompt showing up even when it guesses the default
Also fix a few warnings.
2023-10-14 15:38:37 +02:00
Tamás Bálint Misius
04b8378de4
Add bound checking to Simulation::clear_area
Fixes a crash easily reproducible with sim.clearRect(-10000000, -10000000, 20000000, 20000000)
2023-10-09 23:48:57 +02:00
jacob1
b2045c067e
Make save history icon not so hard to find, and show up on all saves (not just your own)
The icon is now shown whenever you hover over the save, not just when you hover over where the icon is supposed to be
2023-10-08 19:08:03 -04:00
Saveliy Skresanov
f5f275e657
Add descriptions for RSST and RSSS. 2023-10-08 19:33:01 +02:00
Saveliy Skresanov
15a22c6906
Add ctype mechanics. 2023-10-08 19:33:01 +02:00
Saveliy Skresanov
c4db637887
Add reactions of resist with other elements. 2023-10-08 19:33:01 +02:00
Saveliy Skresanov
4377f83184
Add liquid resist (RSST) and solid resist (RSSS). 2023-10-08 19:33:01 +02:00
Saveliy Skresanov
84b790ceaf Add descriptions for RSST and RSSS. 2023-10-09 00:20:15 +07:00
Saveliy Skresanov
0165a9b121
Fix a bug in the font editor where the last row of a symbol is cleared
when shifting the whole symbol up.
2023-10-08 12:25:14 -04:00
jacob1
dd5e5b1f3a
misc: Fix sim.partNeighbors table being 0-indexed, rename SIM_MAXVELOCITY to MAX_VELOCITY 2023-10-08 12:19:06 -04:00
Tamás Bálint Misius
7541273640
Add blurry scaling option
This looks slightly nicer on very pixel-dense screens (scale factors 5 and up) than nearest neighbour fractional upscaling does.

Also fix window icon disappearing at times and the window being resized after configuration changes.

We should maybe start preserving window size also at some point, the way we do position now.
2023-10-06 15:04:29 +02:00
jacob1
814b73a5ed
Change sim.walls to use real wall identifiers, and also have reverse lookup 2023-10-05 23:59:09 -04:00
jacob1
fde1211cd9
Add ctrl+e shortcut to cycle through edge modes 2023-10-05 21:34:09 -04:00
jacob1
29ea811642
Add enums for gravity/air/edge modes, add more constants to Lua
Constants for the new enums were added, along with walls (in the sim.walls table), x/y center, and a few movement constants
2023-10-05 21:34:09 -04:00
Tamás Bálint Misius
bc51bdf634
Add shortcut to toggle fullscreen 2023-10-05 23:19:59 +02:00
Tamás Bálint Misius
7bb8344d3b
Fix the Maximized property of windows shortcuts not being respected
By not resizing the window if it's resizeable and is somehow already maximized.
2023-10-05 21:23:20 +02:00
Tamás Bálint Misius
bb8605fa3b
Fix ubuntu 20.04 pipelines
By not using SDL_RenderLogicalToWindow if it's not available.

Because of course ubuntu 20.04 has sdl 2.0.10, which of course doesn't yet have SDL_RenderLogicalToWindow which was added in 2.0.18, which is of course needed because of course SDL_SetTextInputRect takes window coordinates rather than logical coordinates. At least official static linux builds are not affected because tpt-libs uses much newer sdl.
2023-10-05 21:23:04 +02:00
Tamás Bálint Misius
79760f5c89
Fix input method candidates being aligned wrong in some cases
Namely when the main window is resizeable and its size isn't the same as it would be with the active scale mode with resizing disabled.

Also fix window position not being restored when the main window is resizeable.
2023-10-05 20:10:50 +02:00
Tamás Bálint Misius
0fb36012a2
Clean up window creation somewhat
Fixes most of the rat's nest situation mentioned in 8cfe7cdd93.
2023-10-05 19:47:29 +02:00
Tamás Bálint Misius
1a8ebd0981
Fix occasional crashes upon opening settings
By zero-initializing pointers in OptionsView so they don't crash when they don't get initialized, which up until very recently they always had. In the cases of the emscripten and android ports, certain components are never created.
2023-10-04 19:32:08 +02:00
Tamás Bálint Misius
8cfe7cdd93
Clean up window frame settings somewhat
Another rat's nest; I'm still not entirely satisfied.

This introduces "frame personalities": one for embedded frames (emscripten), one for handheld devices and everything else that doesn't really work with windows (android), and one for everything else. For now these affect which frame options are configurable by the user and what values they are forced to take if they are not configurable, and whether optimal scale is guessed based on screen size.

Also introduce a future TouchUI config node to allow switching between normal and touch-optimized UI on android. Again, because chromebooks and other android devices with mouse and keyboard support are a thing.

Also enable debugging of debug builds of android. It took me hours to attach a stupid debugger to the process; see:

 - https://www.sh-zam.com/2019/05/debugging-krita-on-android.html
 - https://source.android.com/docs/core/tests/debug/gdb#app-startup

I also had to adb forward the port that lldb was supposedly talking to lldb-server over because otherwise it wouldn't attach; I don't get it either.
2023-10-04 16:01:00 +02:00
Tamás Bálint Misius
b6680a03b2
Fix a few warnings 2023-10-03 18:25:35 +02:00
Tamás Bálint Misius
e635a45251
Make Lua hook timeout configurable 2023-10-03 18:25:34 +02:00
Tamás Bálint Misius
b89d29b744
Enable libcurl on android 2023-10-03 18:25:34 +02:00