Commit Graph

5953 Commits

Author SHA1 Message Date
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
Tamás Bálint Misius
16e1ca74f2
Mark Platform::WinNarrow/WinWiden as to-be-eventually-deprecated 2023-05-27 20:07:52 +02:00
Tamás Bálint Misius
920f7646e4
Fix more reflection issues
Since b393050e55, surface normals were calculated incorrectly because blocking cells were detected as blocking only if they were within the heading of the scout process (see that commit for terminology). This had been true even before that commit but it had had less visible effects because both processes would traverse their neighbours in the same order, which the initial heading approximation code (direction_to_map, removed in this commit) had worked better with.

This commit fixes this by separating information about blocking entirely from information about current heading, as it should be. This fixes a few prism-type saves such as id:1188302, but is also not entirely backwards-compatible, for all saves that are considered broken as far as normal calculation code is concerned (e.g. the surfaces are not long enough or are wobbly) will now be broken differently from before. This affects for example many coalescing laser-type saves such as id:482187 that rely on very specific arrangements of very few particles of reflective material behaving as perfect 45deg mirrors.
2023-05-17 17:21:41 +02:00
Tamás Bálint Misius
c0a2370c77
Fix paste previews being positioned incorrectly
Recent changes made to multiple instances of paste placement code caused inconsistencies between what paste previews suggested would happen and what actually happened during pasting. Relevant code factored out.
2023-05-14 20:44:13 +02:00
Tamás Bálint Misius
18084d5aa0
Request UTF-8 code page at startup on windows
This makes the *A Win32 API variants work correctly with UTF-8 parameters, which is nice because standard C/C++ facilities use those (because microsoft's libc is a steaming pile of microsoft code). OF COURSE this only works on win10 1903 and above. See https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
2023-05-13 14:54:50 +02:00
Tamás Bálint Misius
7ef02a6c0b
Remove return value from Simulation::Load
Not useful anymore, it can only fail if the GameSave passed in is nullptr, which this commit guards against.

Also make Simulation::Load and Simulation::Save take block-oriented positions and rects.
2023-05-13 13:21:05 +02:00
Tamás Bálint Misius
ee87f0a0a7
Fix vote bars in previews touching the enclosing rects 2023-05-13 13:21:05 +02:00
Tamás Bálint Misius
a9d231587c
Show save button thumbnail in the preview if it's available
This is good enough for now but also more limited than I'd like because if the thumbnail arrives (gets rendered or downloaded) later than the preview is opened, it's never shown.
2023-05-13 13:21:05 +02:00
Tamás Bálint Misius
843f414291
Fix scary mutant spiders (many-headed stickmen)
They would sometimes show up in intentionally or otherwise corrupted saves.
2023-05-13 13:20:58 +02:00
Tamás Bálint Misius
d8acdfb576
Fix various warnings that had piled up 2023-05-12 19:25:41 +02:00
Tamás Bálint Misius
9bd8bd2274
Fix some deprecation warnings
Namely:

 - [[deprecated("Use Mat2")]]
 - [[deprecated("Use Vec2")]]
 - [[deprecated("Use Mat2::operator*(Vec2)")]]
 - [[deprecated("Use Vec2<float>::operator*(float)")]]
 - [[deprecated("Use Vec2::operator+")]]
 - [[deprecated("Use Vec2::operator-")]]
 - [[deprecated("Use Vec2::Zero")]]
 - [[deprecated("Use Mat2::Identity")]]
2023-05-12 18:53:48 +02:00
Tamás Bálint Misius
c8bc8a7285
Fix some deprecation warnings (#920)
Namely:

 - [[deprecated("Use PlaneAdapter<std::vector>")]]
 - [[deprecated("Use operator[](Vec2)")]]
2023-05-12 09:00:06 +02:00
Tamás Bálint Misius
0f95ce82f8
Sanitize GameSave/SaveInfo/SaveFile ownership 2023-05-11 12:40:23 +02:00
Tamás Bálint Misius
5c5354655c
Fix progress bars drawing their borders in the wrong place
Same problem as with textboxes solved in 3eb3481fda.
2023-05-09 22:54:57 +02:00
Tamás Bálint Misius
0e3968af0b
Add fs.isLink 2023-05-09 22:31:12 +02:00
mniip
65cf8021c9 Reorganize the constructors of non-owning PlaneAdapter 2023-05-04 19:41:47 +02:00
jacob1
03e7826080
Merge pull request #918 from triclops200/patch-1
Update README.md to reflect name change
2023-05-03 23:51:16 -04:00
Victoria Hoyle
29655db976
Update IntroText.h
Name change here as well
2023-05-03 23:34:53 -04:00
Victoria Hoyle
23fca18f51
Update README.md
I've changed my name :)
2023-05-03 23:30:35 -04:00
Tamás Bálint Misius
3eb3481fda
Fix local save browser crashing in some cases
This also fixes local save thumbnails being resized such that they are just short of filling the space they are supposed to.

Also fix textboxes drawing their borders in the wrong place.
2023-05-01 22:32:31 +02:00
Tamás Bálint Misius
60a7ce1aae
Use _rgb literals where possible 2023-04-30 14:22:56 +02:00
Tamás Bálint Misius
410dc71f42
Fix some deprecation warnings
Namely:

 - [[deprecated("Use DrawPixel/BlendPixel")]]
 - [[deprecated("Use DrawLine/BlendLine")]]
 - [[deprecated("Use DrawRect/BlendRect")]]
 - [[deprecated("Use DrawFilledRect/BlendFilledRect")]]
2023-04-30 14:06:54 +02:00
Tamás Bálint Misius
9fbb780728
Fix some deprecation warnings
Namely:

 - [[deprecated("Use BlendChar")]]
 - [[deprecated("Use AddChar")]]
 - [[deprecated("Use XorPixel")]]
 - [[deprecated("Use AddPixel")]]
 - [[deprecated("Use XorLine")]]
 - [[deprecated("Use XorDottedRect")]]
 - [[deprecated("Use XorImage")]]
 - [[deprecated("Use BlendEllipse")]]
 - [[deprecated("Use BlendFilledEllipse")]]
 - [[deprecated("Use DrawFilledRect (beware off by 1)")]]
2023-04-30 11:27:58 +02:00
Tamás Bálint Misius
f5cbc30d85
Fix some deprecation warnings
Namely:

 - [[deprecated("Use BlendTextOutline")]]
 - [[deprecated("Use BlendText")]]
 - [[deprecated("Use BlendImage")]]
 - [[deprecated("Use BlendImage")]]
 - [[deprecated("Use TextSize().X - 1 (yes this is very bad code eww)")]]
2023-04-29 15:50:34 +02:00
Tamás Bálint Misius
2960e0f58f
Fix some deprecation warnings
Namely:

 - [[deprecated("Use operator+(Vec2)")]]
 - [[deprecated("Use operator-(Vec2)")]]
 - [[deprecated("Use video")]]
 - [[deprecated("Use persistentVideo")]]
 - [[deprecated("Use wrapVideo")]]
2023-04-29 14:44:27 +02:00
Tamás Bálint Misius
8f10210c77
Fix various unintended layout changes since 97.0
Also fix a few unused variable warnings.
2023-04-29 13:18:32 +02:00
jacob1
ad1420152c
Fix delete key not functioning correctly in textboxes when text is selected 2023-04-25 00:30:07 -04:00