Commit graph

89 commits

Author SHA1 Message Date
Anders Jenbo
dce78dde62 Rename lighting globals 2021-07-08 02:01:14 -07:00
Gleb Mazovetskiy
cb0dae8590 🚚 Rename CelOutputBuf to Surface and extract 2021-07-03 05:33:32 -07:00
Juliano Leal Goncalves
cbb84199c2 ♻️ Replace Point addition with 'Point + Displacement' 2021-06-28 20:37:44 -07:00
Gleb Mazovetskiy
f9f301b054 🚚 engine.h: Extract Point, Direction, clamp
`engine.h` is getting quite bloated. Moves this code to their own files.
2021-06-21 01:36:20 -07: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
Juliano Leal Goncalves
d55cd99dd5 🚚 Rename 'direction' enum to 'Direction' 2021-05-24 04:46:08 +02:00
obligaron
4d2ac0502a Add new GetOffsetForWalking helper and use it for player drawing and camera 2021-05-16 21:24:36 +02:00
Anders Jenbo
bfc510fb23 Clean up automap.cpp 2021-05-03 05:44:40 +02:00
Anders Jenbo
f884ba5340 🔥 Remove more miniwin dependencies 2021-04-29 23:04:56 +02:00
Jmgr
c33182d6de Modernize deprecated headers 2021-04-25 02:50:31 +02:00
Anders Jenbo
a32ac83090 🎨 cleanup trivial trype comparisons 2021-04-23 02:48:25 +02:00
Anders Jenbo
d024f79b0e 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Anders Jenbo
5fdb9ce459 🎨 Format code 2021-04-19 00:37:33 +02:00
Anders Jenbo
8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00
Anders Jenbo
6e1a106a38 🚚 Move header we implement into the project 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
e7ae8ddd04 🚚 Move all enums to there respective headers 2021-04-10 16:30:00 +02:00
Anders Jenbo
61244c4d93 ♻️ Rearange and apply more enums 2021-04-10 05:24:01 +02:00
Anders Jenbo
93d42b62b8 ♻️ Change BOOL to bool 2021-04-09 15:13:02 +02:00
Anders Jenbo
4ee84aea1a ♻️ Change BOOLEAN to bool
fixup BOOLEAN
2021-04-09 15:13:02 +02:00
Anders Jenbo
433edc63ea ♻️ Consistently use pragma once to guard the headers 2021-04-06 15:21:25 +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
cd59a1c323 Completely replace gpBuffer with CelOutputBuffer
`CelOutputBuffer` now contains an `SDL_Surface` and an `SDL_Rect`.

We now have access to SDL surface manipulation functions.

`gpBuffer` and `gpBufEnd` are completely gone 🧹

This results in some FPS loss (250 -> 195) recovered in a subsequent
commit.
2021-03-13 05:13:26 +01:00
Gleb Mazovetskiy
b43325028f Migrate CelDraw to CelDrawTo 2021-03-06 09:55:14 +01:00
Gleb Mazovetskiy
588458d500 Remove gpBufStart
Was only set once and used in one place since #964
2021-03-01 02:20:21 +01:00
pionere
f5c1079d6f eliminate unused code 2021-02-19 22:04:11 +01:00
Anders Jenbo
61b2d0de95 Merge branch 'master' of github.com:diasurgical/devilution 2020-12-16 02:24:39 +01:00
Gleb Mazovetskiy
01401a16c7 Fix various controller issues
* Fixes Right Stick cursor movement
* Fixes cursor flicker when moving the cursor while moving the character
* Fixes START + SELECT menu
* Makes SELECT act as Escape in the in-game menu

Fixes #930
2020-11-28 15:02:53 +00:00
Anders Jenbo
d4976f70ac Merge branch 'master' of github.com:diasurgical/devilution 2020-11-09 06:36:10 +01:00
Anders Jenbo
2ad9225469 Clean up scrollrt.h 2020-11-09 03:40:10 +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
2d6c1efeab Merge branch 'master' of github.com:diasurgical/devilution 2020-10-12 10:46:28 +02:00
Anders Jenbo
7e04c63977 Merge branch 'hellfire' of github.com:diasurgical/devilution 2020-10-11 23:53:07 +02:00
Anders Jenbo
32778cdbb9 Perfectly align all resolutions 2020-10-06 06:28:51 +02:00
Anders Jenbo
893efd51ea Merge branch 'master' of github.com:diasurgical/devilution 2020-09-27 03:34:42 +02:00
Anders Jenbo
1ba96a6777 Add doxygen description to remaining engine files 2020-07-06 05:43:25 +02:00
Anders Jenbo
9acbcc69f9 Width independant vertical alignment, optimize zoom 2020-05-15 19:12:03 +02:00
Joel Falcou
c4223d4c29 Per file basis use of extern C 2020-04-22 13:15:29 +02:00
Joel Falcou
64d26a7934 Sanitize use of namespace
Wrap individual headers in dvl namespace to prevent
including standard header in another namespace.
2020-04-22 13:15:29 +02:00
Anders Jenbo
3c5982083f Merge branch 'master' of github.com:diasurgical/devilution 2020-04-06 12:05:13 +02:00
Anders Jenbo
b040c04a18 Merge branch 'master' of github.com:diasurgical/devilution into hellfire 2020-04-04 07:56:06 +02:00
Anders Jenbo
187a021b30
More documentation from sanctuary/notes (#2026) 2020-03-30 11:31:36 +02:00
Anders Jenbo
af4ef7b19b Fix rendering the ground part of foliage 2020-03-23 14:13:33 +01:00
Anders Jenbo
85ab626437 Merge branch 'master' of github.com:diasurgical/devilution into hellfire 2019-12-15 02:22:17 +01:00
Gleb Mazovetskiy
a2e821d241 Game controller support
Initial game controller support.

Actions are based on the Switch branch but the controller code itself is
implemented differently, allowing for easy remapping and minimizing
changes to the Source/ directory.

Many subtle and not so subtle controller bugs have been fixed
in this implementation, including:

1. Smoother & more responsive movement with the joysticks.
2. Consistent controls for all the menus in the game (stores, quest log,
etc).
3. Cursor appearance / disappearance at appropriate times.

Low-level controls are abstracted and 3 SDL interfaces are supported:
game controller, joystick, and keyboard. See SourceX/controls/ for more
details on this.

Wishlist for the future:

1. Primary button and use button should attack continously.
   This is hard as it requires checking the cooldowns / attack speed.
2. Quick spell menu navigation is very buggy. It is also buggy in the
   switch branch. I haven't had a change to investigate.
2019-11-06 02:13:07 +01:00
Anders Jenbo
9146e3ea35 Enable FPS meter for releases 2019-10-28 02:01:43 +01:00
Anders Jenbo
2348c3a8fd Documentations, enums and clean ups 2019-10-21 19:33:14 +02:00
Anders Jenbo
7d1b0f24f7 Eliminate overdraw in cell functions 2019-10-20 15:59:47 +02:00