Commit Graph

5879 Commits

Author SHA1 Message Date
Tamás Bálint Misius
58229f49b2
Emscripten: Support persistent storage 2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
82bd834e05
Emscripten: Add RequestManager 2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
a860cbeabf
Use name-value pairs for HTTP post data and headers
And fuse them only if needed (e.g. in Libcurl.cpp). Also finally stop specifying the filename for a form item with the : separator hack.
2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
5c816fe1ee
Emscripten: Cosmetics 2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
c725894abd
Emscripten: Add "vsync" FPS limit mode
Would be really useful for native versions too, but it's more complicated to pull off. For now, vsync on native is the same as tpt.setfpscap(2).
2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
9f71eb9d77
Emscripten: Add compatible main loop 2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
bef2fb01d0
Emscripten: Pivot EngineProcess
... such that it ends with a sleep and delegates looping to its caller.
2023-08-22 00:26:32 +02:00
Tamás Bálint Misius
1094cc9dc9
Emscripten: Remove blocking prompt functions 2023-08-22 00:26:31 +02:00
Tamás Bálint Misius
96dea30480
Emscripten: Remove all other blocking prompt calls 2023-08-22 00:26:31 +02:00
Tamás Bálint Misius
4f31f85b6b
Emscripten: Remove direct blocking prompt calls from Lua
Notable changes:

 - tpt.{input,throw_error,message_box,confirm} have been superseded by ui.begin{Input,ThrowError,MessageBox,Confirm}, each with an extra callback argument and no blocking behaviour, but otherwise the same semantics as their predecessors.
 - The "script not responding" error doesn't wait for user confirmation anymore, it fires without asking. Future exercise: maybe let the user configure the timeout.
 - Remove the confirmPrompt argument of tpt.getscript; this also means it unconditionally fails if the destination file exists.
2023-08-22 00:26:31 +02:00
Tamás Bálint Misius
67e41b6705
Emscripten: Add target, update tpt-libs
The code itself is nowhere near being usable in a browser though.
2023-08-22 00:26:31 +02:00
jacob1
7bb2eb9d4d
Update streamline description so that it's more helpful and matches intended description from dd8902b2c33c 2023-08-20 00:29:04 -04:00
Tamás Bálint Misius
98b42d9e71
Prefer luajit's bit module over ours 2023-08-08 08:11:00 +02:00
jacob1
8855a26667
Kill stickman/figh immediately if health goes below zero, fixes #929 2023-08-07 21:39:18 -04:00
Tamás Bálint Misius
2c56adde5a
Work around some input method bug on windows
At least this fixes Hangul input for me. I'm sure nobody else had any problems with it and I'm sure everyone will start having problems with it now :)
2023-08-01 18:41:34 +02:00
Tamás Bálint Misius
a5e179e530
Fix some signed integer UB in RNG and related code 2023-07-20 21:38:30 +02:00
Tamás Bálint Misius
26a17c4e1f
Fix crash in math.random if a max size interval is specified 2023-07-20 21:33:43 +02:00
Tamás Bálint Misius
53d573ad3c
Fix crash if a save thumbnail is missing from the server
Which basically never happens. Except when the server runs out of space :) See 0f418ec195 for a similar fix.
2023-07-19 11:06:13 +02:00
Tamás Bálint Misius
2c04cf510a
Fix sim.neighbours yielding the center particle
The wiki says it shouldn't. Broken in 6a6b14f871.
2023-07-01 16:13:06 +02:00
Tamás Bálint Misius
90004242d6
Fix crash when overwriting a local save 2023-06-24 07:13:43 +02:00
Tamás Bálint Misius
5b708219c0
Fix logouts not actually destroying sessions 2023-06-23 22:00:54 +02:00
Tamás Bálint Misius
56004348c3
Fix negative-size rects being returned by Rect::operator &
Which make some sense in theory but they're prone to mishandling on usage sites, such as RasterDrawMethodsImpl.h:171.
2023-06-22 21:39:09 +02:00
Tamás Bálint Misius
2bc2acc00e
Fix ExecVoteRequest sending AuthHeaders multiple times
Doesn't seem to affect libcurl, somehow.
2023-06-18 20:47:57 +02:00
Tamás Bálint Misius
0f418ec195
Fix crash if an avatar is missing from the server
Which basically never happens.
2023-06-18 15:37:32 +02:00
Tamás Bálint Misius
5b610f0b0e
Make OptionsView somewhat more manageable 2023-06-11 21:04:24 +02:00
Tamás Bálint Misius
958ab1df96
Make Grave (the key under Esc) exiting the console optional
Also fix perfectCirclePressure copypasta.
2023-06-11 20:09:01 +02:00
Tamás Bálint Misius
d296cf5d77
Enable SECURE_CIPHERS_ONLY with mbedTLS 2023-06-11 20:09:00 +02:00
Tamás Bálint Misius
ced2700c34
Wire up SECURE_CIPHERS_ONLY
This has been in the codebase for ages but apparently never enabled or wired up at all. Defaults to false for now.
2023-06-11 20:09:00 +02:00
Tamás Bálint Misius
b6c6cf00d0
Enable installation in the meson config 2023-06-11 20:09:00 +02:00
Tamás Bálint Misius
0b0f40ec94
Eliminate a GameSave copy in Simulation::Load 2023-06-11 20:09:00 +02:00
Tamás Bálint Misius
f805b15ee5
Don't show a blue screen when the window is already closing 2023-06-11 20:09:00 +02:00
Tamás Bálint Misius
04455ada1c
Use clip rects to draw progress bar content 2023-06-11 20:09:00 +02:00
Tamás Bálint Misius
5e15d02eb8
Stop using 32-bit time in SaveInfo 2023-06-11 20:08:58 +02:00
Tamás Bálint Misius
daabe6a116
Use unique_ptr to hold on to SDL_GetPrefPath's result 2023-06-11 07:22:04 +02:00
Tamás Bálint Misius
3991bb0906
Complain on windows if the active code page is not UTF-8
See 18084d5aa0, where we enable requesting this on startup but it may fail on older versions of windows.
2023-06-11 07:13:03 +02:00
Tamás Bálint Misius
ced60439ae
Fix mingw builds
My local mingw handled the previous commit fine, it's just the ghactions 8.1.0 one that didn't. We should update to windows-2022 which brings 11.2.0.
2023-06-10 19:52:55 +02:00
Tamás Bálint Misius
c73fa1bcdd
Prevent almost all HTTP requests from blocking
The ones that remain blocking are the ones that run on different threads; see Task, yet another big mess to clean up.
2023-06-10 19:19:53 +02:00
Tamás Bálint Misius
c2f8a7df25
Fix crash on exit when multiple windows are open
Controllers would delete their Views even if they failed to pop them from the window stack.

Have I mentioned that I really hate our MVC?
2023-06-10 18:56:05 +02:00
Tamás Bálint Misius
eea0c54a36
Fix pastes not being centred on the cursor
This commit hopefully concludes hammering at old pasting code.
2023-06-08 12:21:23 +02:00
Tamás Bálint Misius
6fb893a8de
Fix random particles disappearing when pasting
Because apparently GameSaves can have type = 0 particles.

Also possibly fix other odd phenomena. Background: I moved all spawnability checks to the previous loop over particles in 2e2c3181b5 and removed all of them from this loop. It turns out that I should have at least left the type == 0 check alone, because that's what ultimately prevented particles from being added to the simulation.
2023-06-02 09:16:41 +02:00
Tamás Bálint Misius
28a701a756
Enable out of bounds pasting in GameView 2023-06-02 08:10:57 +02:00
Tamás Bálint Misius
a205612802
Fix crash upon an out of bounds Simulation::Load
Also fix out of bounds signs being allowed to load and a potential out of bounds operator[] on Sign::text.
2023-06-02 07:06:40 +02:00
Tamás Bálint Misius
1a69bbfb51
Add hflip and rotation parameters to sim.loadStamp 2023-06-02 06:44:23 +02:00
Tamás Bálint Misius
7b894a693e
Get rid of pointless virtual dtors in Request derivatives 2023-05-30 15:32:42 +02:00
Tamás Bálint Misius
0cc179ae4e
Factor RequestManager threading into Libcurl impl
Because that's the only impl that needs it and is likely to ever need it. I hope I don't have to factor it back out for Android.
2023-05-30 15:32:42 +02:00
Tamás Bálint Misius
7cd88a094c
Enable non-multipart POST requests 2023-05-30 15:32:41 +02:00
Tamás Bálint Misius
6179071351
Pass particle coordinates to Simulation::Save
Both Save and Load were recently migrated to block coordinates, see 7ef02a6c0b. The expected behaviour for Save is to extend the particle-oriented rect it gets to the smallest enclosing block-oriented rect and save all blocks inside that rect, but exclude the particles that fall outside the original rect. Using block coordinates made this exclusion impossible.
2023-05-30 15:18:54 +02:00
Tamás Bálint Misius
9884b4108e
Tame variable scopes in Air.cpp 2023-05-28 00:17:58 +02:00
JasonS05
86fb18aa08
Fix some air simulation asymmetries (#897) 2023-05-28 00:14:46 +02:00
Tamás Bálint Misius
f23a3dd2f8
Fix unknown HTTP response body size being reported as 0 in some cases
Namely, when libcurl dies or when progress is checked before the request is started, although this should never happen.
2023-05-27 20:22:13 +02:00