Commit graph

75 commits

Author SHA1 Message Date
Anders Jenbo
b0252b3339 Make Gamepad cursor independant of hardware mouse
The gamepad cursor (inventory, spells etc) no longer relies on warping a
real mouse cursor. This should make things work better on platforms that
do not support this, like Wayland.
2022-01-02 11:37:38 +01:00
ephphatha
1abc617e1a Consistently trigger menu/movie transitions on mouse up instead of down
Keypresses still occur on keydown to allow for repetition (e.g. when scrolling)
2021-12-28 04:34:26 +01:00
Siddharth singh chouhan
ba161f623e
Move documentation from implementations to declarations. (#2858) 2021-09-13 15:45:38 +02:00
Anders Jenbo
7cb73a6717 Minimize impact of NOSOUND 2021-08-30 10:57:59 +02:00
obligaron
77f9bded9e Introduce demo namespace 2021-08-19 00:03:58 +02:00
Gleb Mazovetskiy
502b2684c9 🐞 Disable hardware cursor during video playback
Fixes #2448
2021-08-03 19:31:23 +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
Anders Jenbo
74b57558c9 🚚 Move local code to anonymous namespace 2021-07-10 17:30:15 -07:00
Anders Jenbo
bc0d1f7ac0 clang-tidy/Android Stuidio cleanups 3 2021-07-04 16:09:32 -07:00
Anders Jenbo
a7c7fa0030 Fully apply clang-tidy/format to all files 2021-07-03 16:41:43 -07:00
Anders Jenbo
ecea12fc15 Clang-tidy: ParameterCase 2021-07-03 15:46:39 -07:00
Anders Jenbo
8e07ef8fe5 Clang-tidy: misc-unused-parameters 2021-06-27 17:34:32 +02:00
Juliano Leal Goncalves
fd9f2099d0 ♻️ Leverage 'Point' to represent mouse position 2021-06-27 16:37:59 +02:00
Anders Jenbo
f167bd4dfb Clang-tidy: llvm-include-order 2021-06-27 01:45:49 +02:00
Gleb Mazovetskiy
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 <vluchits@gmail.com>
2021-06-19 01:03:40 +02:00
Gleb Mazovetskiy
c770ae676f 🎉 Stream videos on Linux and FreeBSD
Previously, we always loaded entire videos in memory before playing them.

`libsmacker` does not provide a streaming API but it does provide a
`FILE *` file pointer API.

We now take advantage of the `FILE *` API by streaming the videos on
platforms that support `fopencookie`.

This means faster startup and less memory usage on these platforms.
2021-05-02 00:23:05 +02:00
Anders Jenbo
3b04f67194 🔥 Remove a chunk of miniwin types 2021-04-29 23:04:56 +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
Anders Jenbo
a32ac83090 🎨 cleanup trivial trype comparisons 2021-04-23 02:48:25 +02:00
Gleb Mazovetskiy
362f24e9a7 🚚 Move SVid code to its own file 2021-04-19 11:53:44 +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
67a7ff98c5 🚨 Clean up compiler warnings 2021-04-16 01:04:54 +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
Anders Jenbo
12658a0b3d 🐛 Fix console output on Windows and SDL1 targets
Fixes #921
2021-03-12 15:31:09 +01:00
Anders Jenbo
72e2637061 Merge branch 'master' of github.com:diasurgical/devilution 2020-10-25 17:38:06 +01:00
Gleb Mazovetskiy
ec329e645c Fix all "no-write-strings" warnings 2020-10-25 15:37:51 +01:00
Anders Jenbo
893efd51ea Merge branch 'master' of github.com:diasurgical/devilution 2020-09-27 03:34:42 +02:00
Anders Jenbo
31ac716c3d
99 lines of documentation (#2058) 2020-07-07 19:36:18 +02:00
Anders Jenbo
dc8be6c0ab
C++03 compatibility (#736)
* Use C++03 compatible constructors
* Remove conflicting definitions
2020-05-17 01:37:19 +02:00
Anders Jenbo
d008af43b0 Semantic code style cleanups 2020-04-11 15:22:40 +02:00
Manuel Alfayate Corchete
03662be548
Remove atexit() calls and implement a diablo_deinit() function instea… (#694)
* Remove atexit() calls and implement a diablo_deinit() function instead that cleans up every subsystem if it has been init before.
2020-04-08 13:27:02 +02:00
Anders Jenbo
776ab10476 Merge branch 'master' of github.com:diasurgical/devilution 2020-03-29 23:40:05 +02:00
galaxyhaxz
f89204e7dd Fix function/var names (effects/sound) 2020-03-24 00:22:36 -05:00
Anders Jenbo
0383f9abcd Add documentation to more files 2020-03-02 02:29:28 +01:00
Anders Jenbo
3c276a3cd3 Add documentation
- Add file documentation to about 1/4 of the files in Source
- Copy over a lot of the documentation from the sanctuary/notes repo
- Standardise all the existing documentation
- Create a configuration for Doxygen
- Add more documentation (engine.cpp is now fully documented)
2020-03-01 22:18:00 +01:00
Anders Jenbo
25993b4043 Merge branch 'master' of github.com:diasurgical/devilution 2020-02-14 23:03:31 +01:00
Anders Jenbo
20621a0642
add all.h and use in place of diablo.h (#2005)
Now diablo.h is treated in the same way as all other header files of
Source, as it only contains the declarations of global variables and
functions of diablo.cpp.

Besides consistency, this also enables mods to include diablo.h just
like any other header file without having to include every header file
(and without having to include C++ specific aspects of the now all.h).
2020-02-14 13:12:54 +01:00
Anders Jenbo
08aa6a860a Move generic helpers out of miniwin 2020-02-01 13:56:08 +01:00
Anders Jenbo
2c541816e6 Track the mouse through the life of the application 2019-12-31 05:49:18 +01:00
Anders Jenbo
f2133b6e2b Fix exiting movie
- Replaying the intro would translate the exter and then interupt the
movie immediately.
- It was not possible to exit the application while a movie was playing.
2019-12-26 01:40:47 +01:00
Anders Jenbo
e847108b78 Clean up event handeling 2019-12-03 01:59:13 +01:00
Anders Jenbo
448c01a969 Make all movies escapable using ESC
Fixes #175
2019-11-17 01:55:51 +01:00
Anders Jenbo
bc88560b41 Disable rendering when minimized
This recovers the original use of gbActive
2019-11-17 01:55:07 +01:00
Anders Jenbo
8659481d06
Use correct enum for MovieWndProc 2019-11-16 18:02:57 +01:00
Anders Jenbo
c27b90e166 Always indicate the the movie has ended
Fixes #457
2019-11-13 02:37:14 +01:00