Commit Graph
763 Commits
Author SHA1 Message Date
Anders Jenbo 13c5c09990 Clean up Light related naming
A few are left unchanged as they will be removed in a later commit
2023-04-21 21:25:19 +02:00
obligaron 1a3e72bf17 Unify normal casting and casting from inventory 2023-04-17 03:22:50 +02:00
obligaron b87711bc08 Reintroduce Player::spellFrom to seperate teleport cursor from queued spell 2023-04-17 03:22:50 +02:00
qndel ce2ce86070 inspect players command 2023-04-14 02:40:17 +02:00
obligaron b916c8e428 Introduce Open/Close/ToggleCharPanel 2023-04-14 02:40:17 +02:00
obligaron c4388b0d41 Remove unused pnum from UseInvItem 2023-04-14 02:40:17 +02:00
staphen 60c32abd03 Simulate Shift key for simulated mouse interaction 2023-04-13 20:55:53 +02:00
obligaron 1a150ed193 Multiplayer: Ensure monster hitpoints are calculated reproducable in quest/set-maps (#5958)
* Always use the same seed for generating set/quest maps

* Use setlvltype for loading quest/set-map (instead of leveltype)

* Ensure dungeon flags are reset when loading a quest/set-map
2023-04-09 02:32:52 +02:00
staphen d2bc7c10ba Fix stand ground for gamepad controls 2023-04-02 18:31:16 +02:00
obligaron 2296bf5625 Use StashStruct::EmptyCell instead for empty stash item check 2023-03-21 14:15:00 -04:00
obligaron 4cdd7ff2d9 Replace ReturnLevel/LevelTyp/LvlPosition 2023-03-12 19:30:57 +01:00
obligaron 44de539afb Introduce CronerStoneStruct::isAvailable() 2023-03-02 01:23:59 +01:00
staphen 929544b20f Move initialization of gbIsHellfire back to DiabloInit() 2023-02-20 08:43:41 +01:00
staphen 3c144c7967 Perform some basic initialization before loading game data 2023-02-19 07:40:45 +01:00
obligaron fbdc2d7900 Skip rendering on low-end devices 2023-02-17 22:55:24 +01:00
KPhoenix a1fbf5253f enum talk_id -> enum class TalkID 2023-02-09 13:04:01 +01:00
KPhoenix d813f13700 enum spell_id -> enum class SpellID 2023-02-05 10:24:58 +00:00
Gleb Mazovetskiy 1788d2f8ec Remove miniwin
Event handling code moved to `engine/events.{hpp,cpp}`.
2023-02-01 16:06:57 +00:00
DakkJaniels d683039bdd stop shaking camera if dead diablo loaded from save. (#4149) 2023-01-28 00:06:06 +01:00
Gleb Mazovetskiy 16f7d7e9d6 Support mouse back button in stores/dialogues 2023-01-22 16:52:41 +00:00
obligaron b7e2c649cf Recalculate cursor position after level change 2023-01-22 14:38:27 +01: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
Trihedraf 42e502e108 Add key for using potions from belt
Add key for using potions from belt like controller and virtual controller
2022-12-30 01:33:33 +01:00
qndel efaf334965 typos and code cleanup 2022-12-19 17:34:15 +01:00
Gleb Mazovetskiy 56f94c7471 Add a --lang command line argument
This allows forcing the locale without changing the settings.

The `forceLocale` option also lets us avoid changing the locale in settings if fonts.mpq is missing, fixing the following scenario:
1. System locale is ja
2. Launch the game -- fonts are missing
3. Close the game, download fonts.mpq
4. Launch the game again -- it is now in English because the settings have changed
2022-12-10 02:26:11 +00:00
Anders Jenbo a0ee51183b Correctly initialize the control pannel in headless mode 2022-12-08 05:41:44 +01:00
staphen b66b6c611b Produce multiple controller button events for SDL_JOYHATMOTION events 2022-12-05 05:05:07 +01:00
Gleb Mazovetskiy 4e9bb0e704 Fix gold withdrawal in SDL1
1. Unifies SDL1 and SDL2 text input handling.
2. Moves game-specific text input handling out of misc_msg.
3. Disables Unicode processing when not inputting text in SDL1.

This fixes gold withdrawal in SDL1.
2022-11-27 20:09:54 +00:00
Gleb Mazovetskiy ba56673d55 Only load stash graphics in town
Saves 69 KiB in the dungeon
2022-11-17 14:26:03 +01:00
obligaron c8c3f9366c Play skeleton kings speech only once and also in multiplayer 2022-11-14 06:58:56 +01:00
obligaron 57a3ede76a Introduce UseMultiplayerQuests 2022-11-11 03:27:37 +01:00
Gleb Mazovetskiy e7c0d2943f KeyMapper: Use forward_list instead of vector
Similar to how we do this for Padmapper.
2022-11-02 11:52:07 +00:00
Gleb Mazovetskiy 37ec8d030f Fix loading screen glitches 2022-11-01 14:48:56 +00: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
staphen 4579324726 Ensure that padmapper actions are in the correct order after initialization 2022-10-31 10:29:37 +01:00
staphen 21bd760bfa Bypass CMD_PUTITEM when triggering CMD_OPENHIVE or CMD_OPENGRAVE 2022-10-25 07:14:03 +02:00
obligaron b3be4ab65e TimeoutCursor: Only restore previous cursor when cursor is not already changed 2022-10-23 11:13:42 +02:00
obligaron a0bba9b152 Only color cycle animations if game logic is processed 2022-10-23 11:08:40 +02:00
obligaron ba65d5fbff SyncPutItem: Always use passed coordinates for item position 2022-10-23 10:09:54 +02:00
staphen 0f74370a99 Move gamepad logic from FetchMessage() to GameEventHandler() 2022-10-17 01:01:21 +02:00
staphen e67e4934cc Add padmapper for gamepad customization 2022-10-17 01:01:21 +02:00
Gleb Mazovetskiy 41f43ea3f5 Support unpacked MPQs from devilutionx-mpq-tools
https://github.com/diasurgical/devilutionx-mpq-tools produces an unpacked MPQ
with all the graphics converted to CLX and the unused files removed.
This is primarily useful on RAM-constrained platforms, such as PS2,
because it eliminates the MPQ overhead.

Adds a build option to load from such unpacked directories instead of the MPQ.

These directories are searched for in the same locations
where the MPQs would be searched for otherwise.

Example directory layout:

* /usr/local/share/diasurgical/devilutionx/diabdat/ -- unpacked and converted diabdat.mpq
* /usr/local/share/diasurgical/devilutionx/hellfire/ -- unpacked and converted hellfire MPQs (all of them merged into 1 directory)
* /usr/local/share/diasurgical/devilutionx/fonts/ -- unpacked fonts.mpq
* /usr/local/share/diasurgical/devilutionx/pl/ -- unpacked pl.mpq

These directory structure is produced by calling `unpack_and_minify_mpq`
2022-10-11 18:00:57 +01:00
staphen 8b6db3a678 Get rid of panelstr, pnumlines, and ClearPanel() 2022-10-02 08:51:24 +02:00
qndel c05c4c0f55 fix typos 2022-09-17 20:19:05 +02:00
Anders Jenbo e348fa3b1e Implement town map 2022-09-12 08:09:17 +02:00
Gleb Mazovetskiy 6327e713e0 Lowercase all file paths
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).

This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
2022-08-20 23:49:23 +01:00
Gleb Mazovetskiy 3b357f3936 CMake: An option to disable demomode support
Useful for targets with limited RAM.
Reduces RG99 binary size by 8 KiB.
2022-08-10 21:24:45 +02:00
Gleb Mazovetskiy 580d3cb6ee touch/renderers: Migrate away from Art 2022-08-08 14:29:45 +01:00
Gleb Mazovetskiy c351acbf7e Remove redundant devilutionx.mpq check
We now check it only once in `CheckArchivesUpToDate`.
We then use `LoadClx` instead of `LoadOptionalClx` throughout.
2022-08-04 15:16:00 +02:00
obligaron a410e989bf Remove ScrollInfo 2022-08-03 21:25:21 +02:00