Commit graph

105 commits

Author SHA1 Message Date
Anders Jenbo
6b2481a76c Touch support on all SDL2 platforms 2022-01-02 11:37:38 +01:00
Anders Jenbo
cf9b5ae79d Split up graphics settings initializers 2021-12-21 12:55:30 +01:00
staphen
f897f5fd92 Resize PalSurface when resizing the game window 2021-12-07 10:11:15 +00:00
obligaron
2e5a488d5f Add OptionEntry for graphics 2021-12-05 02:00:27 +01:00
obligaron
b5aab383d9 Introduce ReinitializeRenderer() and GetPreferedWindowSize() 2021-12-05 02:00:27 +01:00
obligaron
6273f700fa
Add some Graphic Settings to Settingsmenu (#3617) 2021-11-27 00:25:48 +01:00
Gleb Mazovetskiy
7e1fea6f76 clang-format all files in {Source,test}/
Also includes a few manual tweaks to comments and newlines for better results.

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
2021-11-24 23:44:12 +01:00
Gleb Mazovetskiy
3d308983a8 Migrate to libmpq
libmpq is a much simpler alternative to StormLib for reading MPQ archives.

We use our own fork of libmpq: https://github.com/diasurgical/libmpq

Impact:

* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
  needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
staphen
1142d2ee7b Hardware rendering for the virtual gamepad 2021-09-22 00:32:17 +02:00
qndel
0ffef697b0 fix destroying renderer 2021-09-17 13:53:13 +01:00
Vladimir Olteanu
bcd7f89319 Have SDLWrap::AllocPalette allocate space for 256 colors by default 2021-09-13 23:07:04 +02:00
Vladimir Olteanu
b87058a717 Error checking for GetOutputSurface 2021-09-13 23:07:04 +02:00
Vladimir Olteanu
d4d89077cd Don't free PalSurface when it was obtained from SDL_GetVideoSurface 2021-09-13 23:07:04 +02:00
Vladimir Olteanu
4edafd2e37 Make RendererTextureSurface a SDLSurfaceUniquePtr 2021-09-13 23:07:04 +02:00
Vladimir Olteanu
aab7bf6e91 Make Palette a unique ptr 2021-09-13 23:07:04 +02:00
Vladimir Olteanu
4a9ebf1460 Use SDLUniquePtr 2021-09-13 23:07:04 +02:00
Vladimir Olteanu
cc9ea97e0f Introduce SDLWrap::CreateTexture 2021-09-13 23:07:04 +02:00
Vladimir Olteanu
5d54f8d322 Introduce SDLWrap::CreateRGBSurface 2021-08-19 08:51:59 +02:00
obligaron
26e61b363b demo: Centralize options override 2021-08-19 00:04:57 +02:00
obligaron
77f9bded9e Introduce demo namespace 2021-08-19 00:03:58 +02:00
Anders Jenbo
d523fc1e81 Cleanups 2021-08-02 10:12:40 +02:00
Anders Jenbo
eda4a5061e Implement demo recording and playback
This records all keyboard and mouse events to a file and lets you play
it back at a later point with a differen game speed.
2021-07-31 20:12:31 +02:00
Vladimir Olteanu
fae1e4eee5 Replace CCritSect with SdlMutex 2021-07-21 08:10:46 +02:00
Anders Jenbo
a19e7b2a3b Remove some more use of miniwin 2021-07-17 23:54:13 +02:00
Anders Jenbo
730c0750e7 Apply clang-tidy to code 2021-07-09 16:54:01 -07:00
Anders Jenbo
352a0ca510 Place local symbols in an anonymous namespace 2021-07-09 16:54:01 -07:00
Anders Jenbo
4eabc6024b Apply various cleanups via Android Studio 2021-07-03 18:27:17 -07:00
Anders Jenbo
ecea12fc15 Clang-tidy: ParameterCase 2021-07-03 15:46:39 -07:00
Gleb Mazovetskiy
cb0dae8590 🚚 Rename CelOutputBuf to Surface and extract 2021-07-03 05:33:32 -07:00
Anders Jenbo
a350fb0b15 Clang-tidy: FunctionCase part 1 2021-07-03 03:45:33 +02:00
Anders Jenbo
0f2ad469ea ♻️Clean up variable initialization 2021-06-27 14:58:51 -07:00
Anders Jenbo
f0e5bd819b 💚 Fix debug builds
This the change from 8e07ef8fe5.
2021-06-27 20:48:39 +02:00
Anders Jenbo
8e07ef8fe5 Clang-tidy: misc-unused-parameters 2021-06-27 17:34:32 +02:00
Anders Jenbo
f4f8f22699 Clang-tidy: readability-redundant-control-flow 2021-06-27 00:56:08 +02:00
Epifanov Ivan
b16d3e8b54
Re-enable graphical settings on PSVita (#2175) 2021-06-15 20:11:09 +02:00
Gleb Mazovetskiy
b76f7656f3 🧹 LoadArt: BYTE -> uint8_t
The change in include order necessitated a couple of other minor
cleanups, one in stubs.h and one in sdl2_to_1_2_backports.h
2021-05-23 18:45:01 +02:00
Gleb Mazovetskiy
cb9da2cadc 🎉 SDL1: An option to render directly to video mem
Now that we no longer have a buffer border, we can render directly to
the video memory if the output surface is 8-bit and double buffering is
enabled.

Also adds a flag to force this even when double buffering is disabled,
because some systems emulate 8-bit mode with something else, so the
output is always buffered.

This required a tweak to the cursor to make sure that we clear it after
`SDL_Flip`.
2021-05-13 03:17:45 +02:00
Gleb Mazovetskiy
1181cc68ac 🎉 Remove buffer padding
The padding is no longer needed
2021-05-11 07:57:08 +02:00
staphen
eaa5188776 Remove call to gspWaitForVBlank(). 2021-05-07 09:05:37 +02:00
Gleb Mazovetskiy
59dd42692f 🚚 Move render.cpp to engine/render/dun_render.cpp 2021-05-06 21:30:06 +02:00
Jmgr
1b7e0d2cb3 Migrate existing log entries 2021-04-25 02:39:42 +02:00
Anders Jenbo
cc164985a3 🎨 Correct type checks in src sub-folder 2021-04-22 20:33:24 +02:00
Anders Jenbo
bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Gleb Mazovetskiy
64f5e374ff RenderPresent: Remove the !SDL_MUSTLOCK assert
Allows using a hardware surface
2021-04-19 02:29:47 +02:00
Gleb Mazovetskiy
91f8267db9 🧹 SDL1.2: Remove unimplemented SDL_*Window backports
Guard around SDL version at call site instead.
2021-04-18 20:07:37 +02:00
Anders Jenbo
8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00
Anders Jenbo
997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo
6e1a106a38 🚚 Move header we implement into the project 2021-04-16 01:04:54 +02:00
Anders Jenbo
52401c9677 💚 Correct include headers 2021-04-10 14:31:05 +02:00
Anders Jenbo
dc84643fe6 🚚 Move dx.cpp and sound.cpp back in to Source now that the name space is clean 2021-04-10 14:30:22 +02:00
Renamed from SourceX/dx.cpp (Browse further)