Anders Jenbo
ee7b32d8f6
Player by reference part 3
5 years ago
Gleb Mazovetskiy
4ea7ba0f5f
🚚 engine.h: Extract `LoadLE32` and `LoadBE32`
5 years ago
Gleb Mazovetskiy
43bc08bd63
Hardware Cursor: Fall back to software on failure
5 years ago
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>
5 years ago
obligaron
b5ad92eb2c
Convert _mAnimData to CelSprite
5 years ago
Gleb Mazovetskiy
e9544c2fdc
♻️ Cleanup `DrawCursor`
...
1. Only copy the outline if the cursor is an item.
2. Deduplicate clipping math.
5 years ago
Gleb Mazovetskiy
e7b105b6ed
🐞 Fix off-by-one in `DrawCursor`
...
The correct size is +2px for the outline, because the outline is on both
sides.
Fixes #2179
5 years ago
obligaron
6d5291b17d
Enable ADL for Items
5 years ago
obligaron
ccc1ccf9c3
Introduce ItemStruct.AnimInfo
5 years ago
qndel
15a4ac8e42
fix magic rock highlight
5 years ago
Kalebe Alves
118efe8e6d
Use Point/SDL_Rect for control functions coordinate system
5 years ago
qndel
b1d74d2791
alt highlighting ( #2060 )
5 years ago
Anders Jenbo
8a7ec56d3a
Player by reference part 2
...
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
5 years ago
obligaron
61ba5009ac
Convert to CelSprite
5 years ago
Juliano Leal Goncalves
d55cd99dd5
🚚 Rename 'direction' enum to 'Direction'
5 years ago
qndel
69b903743a
fix typos
5 years ago
Anders Jenbo
9e2206a673
Format code
5 years ago
obligaron
86e1d488e6
Draw Reflect Icon similiar to Manashield
5 years ago
Anders Jenbo
6acb49bea4
Render quest and menu text using common text rendering
5 years ago
obligaron
417a3f124a
DrawPlayerHelper: Use correct player offset
5 years ago
obligaron
4d2ac0502a
Add new GetOffsetForWalking helper and use it for player drawing and camera
5 years ago
Anders Jenbo
34744c068f
♻️ Consitantly use %i and not %d
5 years ago
qndel
89c40eaa7b
inventory items rendering cleanup ( #1938 )
5 years ago
Gleb Mazovetskiy
cb9da2cadc
🎉 SDL1: An option to render directly to video mem
...
Now that we no longer have a buffer border, we can render directly to
the video memory if the output surface is 8-bit and double buffering is
enabled.
Also adds a flag to force this even when double buffering is disabled,
because some systems emulate 8-bit mode with something else, so the
output is always buffered.
This required a tweak to the cursor to make sure that we clear it after
`SDL_Flip`.
5 years ago
Anders Jenbo
8eb9c930fe
🚨 Fix remaning GCC warnings ( #1929 )
5 years ago
Gleb Mazovetskiy
1181cc68ac
🎉 Remove buffer padding
...
The padding is no longer needed
5 years ago
Gleb Mazovetskiy
b3c921edac
Fix clipping in `scrollrt_draw_cursor_item`
5 years ago
Anders Jenbo
72598865cc
♻️ Replace PrintGameStr with DrawString
5 years ago
Gleb Mazovetskiy
f025d5c910
Remove clipping from `scrollrt_draw_cursor_item`
...
There was no reason for this clipping from what I can tell
Now that we actually have working clipping, this just looks odd
5 years ago
Gleb Mazovetskiy
9a9941efdd
🚚 Move CL2 rendering to engine/render/cl2_render.cpp
5 years ago
Gleb Mazovetskiy
0edfa3de66
🚚 Move CEL rendering to engine/render/cel_render.cpp
5 years ago
Gleb Mazovetskiy
59dd42692f
🚚 Move render.cpp to engine/render/dun_render.cpp
5 years ago
Anders Jenbo
f579b2f287
Handle cel/cl2 files as byte arrays
5 years ago
thebigMuh
8e19ef5460
- Fixed outline drawing for item on cursor to match rest of game
...
- Made GetOutlineColor const
- Made gold outline golden again... because the white outline made me sad
5 years ago
Anders Jenbo
bfc510fb23
Clean up automap.cpp
5 years ago
Anders Jenbo
654a2b8834
♻️ Clean up automap code
...
Use Point for x,y pairs. Make helpers for drawing door and squares
5 years ago
Gleb Mazovetskiy
34b4ed759a
🐞 Clean up and fix inventory sprite handling
5 years ago
Gleb Mazovetskiy
1b8b62a8c2
♻️ Store CEL width with the sprite itself
...
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
5 years ago
Anders Jenbo
f884ba5340
🔥 Remove more miniwin dependencies
5 years ago
obligaron
3b87433fc2
Move GetFrameToUseForPlayerRendering to AnimationInfo
5 years ago
obligaron
1de46a8495
Rename member variables
5 years ago
obligaron
0b5183f63e
Introduce AnimationInfo
...
Update AnimationInfo.DelayLen comment
5 years ago
thebigMuh
ad8f342db0
Adding constness
5 years ago
thebigMuh
7ce3957a8a
Split of QoL features into separate files
5 years ago
obligaron
239a43cc1c
Remove "AnimWidth2" expect for missiles ( #1680 )
5 years ago
Jmgr
1b7e0d2cb3
Migrate existing log entries
5 years ago
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
5 years ago
Anders Jenbo
98cd435fba
♻️ Apply point types to missiles
5 years ago
Anders Jenbo
efbe8a8338
♻️ add possition points to monsters
5 years ago
Anders Jenbo
275404029e
♻️ Cleanup player temp variables
5 years ago