Commit graph

12 commits

Author SHA1 Message Date
Gleb Mazovetskiy
1d48dd095d Scale hardware cursor bilinearly
Make the hardware cursor blurry like the rest of the screen.
2021-08-27 15:32:53 +02:00
Vladimir Olteanu
bfcc57783c Remove Surface::{Alloc,Free}, introduce OwnedSurface 2021-08-19 08:51:59 +02:00
Vladimir Olteanu
2d4a205fef Introduce SDL::CreateRGBSurfaceWithFormat 2021-08-19 08:51:59 +02:00
ephphatha
949cb713d3 Add explicit casts to conversions from double/float to int 2021-07-08 07:53:40 -07:00
Gleb Mazovetskiy
65906f8332 🎉 Hardware cursor: Enable safe parts by default
Enables safe parts of the hardware cursor by default:

1. Disabled for items due to the jumping glitch.
2. Limited to 128px size due to buggy large cursors on some systems.
2021-07-08 09:06:35 +01:00
ephphatha
08ae390643 Add explicit casts for some implicit conversions
Some of these were triggering multiple warnings due to casts applied at times which forced potentially truncating operations.
2021-07-05 08:52:05 -07:00
Anders Jenbo
4eabc6024b Apply various cleanups via Android Studio 2021-07-03 18:27:17 -07:00
Gleb Mazovetskiy
cb0dae8590 🚚 Rename CelOutputBuf to Surface and extract 2021-07-03 05:33:32 -07:00
Juliano Leal Goncalves
a983792880 ♻️ Replace 'pair<int, int>' with 'Size' in 'GetItemSizeOnSlot' and 'GetInvItemSize' 2021-06-20 18:27:45 -07:00
Gleb Mazovetskiy
43bc08bd63 Hardware Cursor: Fall back to software on failure 2021-06-19 12:36:39 +01:00
Gleb Mazovetskiy
523d838bd4 Hardware Cursor: Use item hotpoint
For a hardware item cursor, set the hotpoint to the center
instead of manually setting the cursor position.
2021-06-19 12:36:39 +01: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