Commit Graph
151 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 1788d2f8ec Remove miniwin
Event handling code moved to `engine/events.{hpp,cpp}`.
2023-02-01 16:06:57 +00:00
c99f7cf644 Floating numbers (#5639)
Co-authored-by: qndel <[email protected]>
Co-authored-by: Stephen C. Wills <[email protected]>
2023-01-22 07:20:10 +01:00
Gleb Mazovetskiy 680ab5ec40 Overhaul backbuffer state handling
When rendering directly to the output buffer, we need to maintain the
state of what has been drawn and what needs redrawing per-buffer.

We previously tried to do it implicitly by checking `SDL_DOUBLEBUF` and
other flags. The previous implementation was broken in several
ways, resulting in rendering issues on devices that support 8-bit output
directly.

Changes this mechanism to explicitly maintain buffer state per output
buffer. The new mechanism doesn't require knowledge of the number of
buffers, and thus also works correctly with triple-buffering.

Fixes #5447
2022-11-01 02:43:24 +00:00
Gleb Mazovetskiy 890295b6d3 In-game menu: Fix slider click handling
Previously, clicking on the slider close to the end
or near the start did nothing -- you'd have to actually
drag it to set the value to min or max.

Also cleans up the in-game menu code overall.
2022-10-03 05:42:15 +01:00
obligaron ebfb519ee0 Rename gbQuietMode to HeadlessMode 2022-07-13 18:54:36 +02:00
obligaron bab9baa42a Handle gbQuietMode for paths in StartGame 2022-07-13 18:54:36 +02:00
Anders Jenbo a7be622aa3 Clean up naming of event handler 2022-07-10 21:13:39 +02:00
Anders Jenbo 99181fd709 Move more files to the engine folder 2022-06-24 11:08:15 +02:00
Gleb Mazovetskiy 779ccaca17 Overhaul translation fetching
1. Do not modify the map after loading. Instead, return string views
   (guaranteed to be null-terminated) from look up functions and return
   the key directly if not found.
2. Use an `unorded_map` instead of `map` where available (C++20).
   Saves a bit of RAM (~50 KiB) and improves lookup performance.
2022-06-14 12:46:36 +01:00
Gleb Mazovetskiy 99d490180c Settings: Add Resampler
Makes the resampler algorithm configurable from the settings menu.
2022-05-31 05:21:42 +01:00
qndel 354e329644 Players[MyPlayerId] -> MyPlayer 2022-05-31 05:35:52 +02:00
Anders Jenbo 9d082389d8 Clean up music track selection 2022-05-10 15:16:38 +02:00
Anders Jenbo 0645d9b2a1 Correct missing hellfire level mapping in leveltype
Hellfire never added the 2 new dungion types, instead it makes
additional checks on currlevel. This is confusing and mess, so cleaned
it up.
2022-05-10 15:16:38 +02:00
Anders Jenbo 2575f76bbd Make 'quit game' return to the main menu when NOEXIT is set 2022-04-03 22:08:03 +02:00
Anders Jenbo 1409e604f5 Reduce string conversions 2022-03-20 11:04:15 +01:00
obligaron 79b926c375 Move more options to OptionEntryBase 2022-02-05 20:51:54 +01:00
staphen 3546b41be0 Introduce NOEXIT build option to disable Quit Game options in menus 2022-01-23 05:25:48 +01:00
staphen df830f6495 Save settings before leaving the settings menu 2022-01-23 05:25:48 +01:00
Anders Jenbo 7cb73a6717 Minimize impact of NOSOUND 2021-08-30 10:57:59 +02:00
Anders Jenbo b168773cc4 🚨 Fix clang warnings 2021-07-17 16:57:21 +02:00
Anders Jenbo 96bf75b502 Rename player globals 2021-07-08 02:01:14 -07:00
Anders Jenbo ecea12fc15 Clang-tidy: ParameterCase 2021-07-03 15:46:39 -07:00
Anders Jenbo a350fb0b15 Clang-tidy: FunctionCase part 1 2021-07-03 03:45:33 +02:00
Anders Jenbo c63a420e12 Clang-tidy: apply base naming to merged src 2021-07-03 02:38:47 +02:00
Anders Jenbo 7e737cfa96 Merge remote-tracking branch 'refs/remotes/devilution/master' 2021-07-03 01:44:45 +02:00
Anders Jenbo 129342d07a Clang-tidy: GlobalConstantCase 2021-07-02 22:56:56 +02:00
Anders Jenbo 8e07ef8fe5 Clang-tidy: misc-unused-parameters 2021-06-27 17:34:32 +02:00
Anders Jenbo 19d980582f Clang-tidy: readability-static-definition-in-anonymous-namespace 2021-06-27 00:44:37 +02:00
Gleb MazovetskiyandVictor Luchits f9d20b44d6 🎉 Hardware cursor (SDL2-only)
Disabled by default because of these known issues:

1. When clicking on inventory item, it briefly appears a bit shifted (in the wrong coordinates).

   This issue can happen with software cursor as well, but is a lot more
   obvious with the hardware cursor.

2. Cursor is scaled with nearest-neighbour scaling, which may look a bit different from
   how the rest of the graphics are scaled.

See also previous attempt: https://github.com/diasurgical/devilutionX/pull/955 by @viciious

Co-authored-by: Victor Luchits <[email protected]>
2021-06-19 01:03:40 +02:00
Anders Jenbo 8a7ec56d3a Player by reference part 2
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
2021-05-24 21:00:32 +02:00
Jmgr 994c5e7cfe Add a keymapper
Rename the config entry for changing the quick messages texts
Other small improvements and simplifications
Set the quick spell hotkey text to be white with a black shadow
Add QuitGame action, unbound by default
Set the ItemInfo and QuestDebug keys to be unbound by default
2021-05-03 17:51:40 +02:00
thebigMuh 24f32a1d53 Fix sound volume/panning attenuation (#1789)
* Fixing volume adjustment and scaling
2021-05-03 02:11:22 +02:00
Gleb Mazovetskiy 57172e48ed 🔨 ⚙️ CMake: Add NOSOUND option
This option completely disables all audio handling, including audio
loading code and dependencies.

Dialog text length is estimated to be somewhere between
Cain and Griswold speed.
2021-04-29 19:43:45 +02:00
Mathieu Maret 8d8711a966 Apply static menu translations (#1728) 2021-04-27 14:20:31 +02:00
obligaron a3229741d1 🖌️ Refurbish tables in source code (clang-format off) 2021-04-25 23:48:25 +02:00
Anders Jenbo dbfa9c27a5 ✨ Enable translation for all menus 2021-04-25 06:55:11 +02:00
Anders Jenbo f004c78824 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Anders Jenbo bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Anders Jenbo c89bd9c001 🚨 Fix remaning warnings for clang and gcc 2021-04-19 02:44:39 +02:00
Gleb Mazovetskiy 4068559462 gamenu.cpp: Move most functions to an anonymous namespace 2021-04-17 03:25:42 +02:00
Anders Jenbo 997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo f450d6a125 🚚 Move defines to there proper files 2021-04-16 01:04:54 +02:00
Anders Jenbo 2732aea1b2 ♻️ Use GameInfo instead of individual globals 2021-04-10 07:30:12 +02:00
Anders Jenbo 61244c4d93 ♻️ Rearange and apply more enums 2021-04-10 05:24:01 +02:00
Anders Jenbo 20186e0370 🎨 Replace TRUE/FALSE with true/false
fix


Fix


fix
2021-04-09 15:13:02 +02:00
Anders Jenbo 93d42b62b8 ♻️ Change BOOL to bool 2021-04-09 15:13:02 +02:00
Anders Jenbo bfb3c11c2b 🎨 Change namespace to devilution 2021-04-06 15:21:25 +02:00
Anders Jenbo 630e507f63 🚚 Apply namespace 2021-04-06 15:21:25 +02:00
Gleb Mazovetskiy 0f3951744f diablo.ini: Rename "Fast Walk" to "Run in Town" (#1326) 2021-04-03 02:37:33 +02:00
Anders Jenbo cee6029da0 🔥 Rely less on storm.h 2021-03-27 17:46:09 +01:00