Commit graph

209 commits

Author SHA1 Message Date
Anders Jenbo
7108145a04 Merge branch 'master' of github.com:diasurgical/devilution 2020-04-14 15:30:49 +02:00
Anders Jenbo
3b8bcf98bf Enable assertions 2020-04-11 15:22:40 +02:00
Anders Jenbo
e7567859ee Remove C fallback code 2020-04-11 15:22:40 +02:00
Anders Jenbo
d008af43b0 Semantic code style cleanups 2020-04-11 15:22:40 +02:00
Anders Jenbo
c384711a5f Backport cleanups from hellfire branch 2020-04-08 20:16:32 +02:00
Anders Jenbo
f1c216e688 Make player struct x/y fields match monster struct 2020-04-07 03:26:38 +02:00
Anders Jenbo
3c5982083f Merge branch 'master' of github.com:diasurgical/devilution 2020-04-06 12:05:13 +02:00
qndel
5191237f42
enums and stuff (#2024) 2020-04-06 08:04:14 +02:00
Anders Jenbo
660405505f Remove C compat
It's unmaintained and clear that we won't be going back since some
functions can only be solved with C++
2020-04-06 05:43:20 +02:00
Anders Jenbo
776ab10476 Merge branch 'master' of github.com:diasurgical/devilution 2020-03-29 23:40:05 +02:00
Anders Jenbo
68e1e618c9 Probe for null tiles and arches when applying anit-eflag rendered fix 2020-03-28 17:44:34 +01:00
Anders Jenbo
af4ef7b19b Fix rendering the ground part of foliage 2020-03-23 14:13:33 +01:00
galaxyhaxz
c632e2d1d0
Names and bug fixes (#1974) 2020-03-12 04:32:53 +01:00
Anders Jenbo
e4df9319b0
Fix render order (#639) 2020-03-10 10:33:59 +01:00
Anders Jenbo
58e3192ef9 Merge branch 'master' of github.com:diasurgical/devilution
Fixes #620
2020-02-29 18:18:45 +01:00
galaxyhaxz
81ff8e6287 Metallic hydrogen neural array 2020-02-28 16:35:57 -06:00
Anders Jenbo
9c06b7f60c Merge branch 'master' of github.com:diasurgical/devilution 2020-02-16 05:08:40 +01:00
Anders Jenbo
ab453a5bb0 Correct some documentation 2020-02-16 05:00:36 +01:00
Anders Jenbo
e7e51abd13 Document remaning functions in render related files 2020-02-16 04:01:52 +01:00
Anders Jenbo
f1616060e5 Document CL2 render functions 2020-02-15 17:06:31 +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
edeca6574d Replace tagRECT with SDL_Rect 2020-02-01 15:43:51 +01:00
Anders Jenbo
40ba1e7a6f Merge branch 'master' of github.com:diasurgical/devilution 2020-02-01 14:48:39 +01:00
Anders Jenbo
08aa6a860a Move generic helpers out of miniwin 2020-02-01 13:56:08 +01:00
Anders Jenbo
baf2d14440 Remove unused parts of miniwin 2020-01-31 01:20:10 +01:00
Gleb Mazovetskiy
ce5c1007a2 Controller improvements: START modifier and hints
1. Makes START a modifier key.
2. Main modifier actions are now displayed as hints while the modifier is pressed.
3. Mouse simulation now available on all controllers:
   SELECT + D-Pad to move mouse
   SELECT + Left/Right should button to click

 START +    | Action
 ---------- | ------
 SELECT     | Menu
 UP         | Menu
 DOWN       | Map
 LEFT       | Character info
 RIGHT      | Inventory
 B (Bottom) | Spell book
 Y (Left)   | Quest log

This makes all actions available on controllers without sticks and ZL/ZR.
2020-01-25 16:37:50 +01:00
qndel
6214779459 DrawZoom cleanup 2020-01-19 14:26:43 +01:00
Anders Jenbo
c3f283429b Fix high CPU load when game is minimized 2019-12-31 04:15:38 +01:00
Anders Jenbo
da03bae69d Merge branch 'master' of github.com:diasurgical/devilution 2019-12-25 20:38:25 +01:00
Anders Jenbo
0c90ad0527 Set bool values TRUE/FALSE 2019-12-22 23:57:10 +01:00
Anders Jenbo
7273e6a32d Fix mouse clicks not registering on 0x* and *x0
Fixes #507
2019-12-22 19:35:45 +01:00
Anders Jenbo
9a704ff2f0 Merge branch 'master' of github.com:diasurgical/devilution 2019-12-19 01:05:01 +01:00
Anders Jenbo
5fa0c5781b Backport cleanups from Hellfire branch 2019-12-15 06:14:57 +01:00
Anders Jenbo
0c75636db3 [controller] Automatically apply heal-other, resurect and disarm 2019-11-20 10:49:16 +01:00
Anders Jenbo
9e37eddfd0 Uncap FPS counter 2019-11-12 18:14:57 +01:00
Anders Jenbo
af0a7c0653 Apply SPANEL_WIDTH 2019-11-10 22:35:17 +01:00
Anders Jenbo
34a6615fed Only show level up icon when there is space for it
Thanks to @de4me for pointing this out and figuring out the height
2019-11-10 22:25:54 +01:00
Anders Jenbo
45844b71ae Make controls more responsive
- Fix double events
- Fix ignored events
- Allow moving diagonal in the inventory
- Fix mouse wobbling in inventory when scalling
- Make controler actions cursor independants
- Make sure secoundery and primery key doesn't fire each others events
- Highlight both primary and secondary target
- Automatic switch between controller and keyboard+mouse
- Allow the user to change facing direction when blocked
- Make code event based instead of relying on time outs
2019-11-06 02:13:07 +01:00
Anders Jenbo
e590e6995a Implement recharge and fix cursor for repair 2019-11-06 02:13:07 +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
215ff59e65 Merge branch 'master' of github.com:diasurgical/devilution 2019-11-01 00:06:53 +01:00
galaxyhaxz
67fedd9e99 Fix unknown struct field and drawpanflag 2019-10-31 22:57:15 +01:00
Anders Jenbo
5a65eec646 Merge branch 'master' of github.com:diasurgical/devilution 2019-10-28 04:31:30 +01:00
Anders Jenbo
048429b4cd Apply more constants 2019-10-28 04:29:39 +01:00
Anders Jenbo
8976e4fd39 Check if panels conver the screen before affecting the viewport 2019-10-28 03:31:26 +01:00
Anders Jenbo
d46ae517d0 Merge remote-tracking branch 'refs/remotes/devilution/master' 2019-10-28 03:14:06 +01:00
Anders Jenbo
71adfe509e Document more attributes 2019-10-28 03:05:40 +01:00
Anders Jenbo
9146e3ea35 Enable FPS meter for releases 2019-10-28 02:01:43 +01:00
Anders Jenbo
4e8a8d2157 Merge remote-tracking branch 'refs/remotes/devilution/master' 2019-10-26 13:43:28 +02:00