Commit graph

511 commits

Author SHA1 Message Date
Anders Jenbo
9e2206a673 Format code 2021-05-21 14:12:31 +02:00
obligaron
86e1d488e6 Draw Reflect Icon similiar to Manashield 2021-05-21 13:27:57 +02:00
Anders Jenbo
6acb49bea4 Render quest and menu text using common text rendering 2021-05-21 04:23:49 +02:00
obligaron
417a3f124a DrawPlayerHelper: Use correct player offset 2021-05-19 12:17:01 +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
34744c068f ♻️Consitantly use %i and not %d 2021-05-15 14:17:52 +02:00
qndel
89c40eaa7b
inventory items rendering cleanup (#1938) 2021-05-14 12:46:16 +02:00
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`.
2021-05-13 03:17:45 +02:00
Anders Jenbo
8eb9c930fe
🚨 Fix remaning GCC warnings (#1929) 2021-05-11 09:34:45 +02:00
Gleb Mazovetskiy
1181cc68ac 🎉 Remove buffer padding
The padding is no longer needed
2021-05-11 07:57:08 +02:00
Gleb Mazovetskiy
b3c921edac Fix clipping in scrollrt_draw_cursor_item 2021-05-09 05:31:41 +02:00
Anders Jenbo
72598865cc ♻️Replace PrintGameStr with DrawString 2021-05-08 18:48:19 +02:00
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
2021-05-08 18:23:28 +02:00
Gleb Mazovetskiy
9a9941efdd 🚚 Move CL2 rendering to engine/render/cl2_render.cpp 2021-05-07 01:02:03 +02:00
Gleb Mazovetskiy
0edfa3de66 🚚 Move CEL rendering to engine/render/cel_render.cpp 2021-05-07 00:16:40 +02:00
Gleb Mazovetskiy
59dd42692f 🚚 Move render.cpp to engine/render/dun_render.cpp 2021-05-06 21:30:06 +02:00
Anders Jenbo
f579b2f287 Handle cel/cl2 files as byte arrays 2021-05-06 13:17:54 +02:00
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
2021-05-04 06:09:05 +02:00
Anders Jenbo
bfc510fb23 Clean up automap.cpp 2021-05-03 05:44:40 +02:00
Anders Jenbo
654a2b8834 ♻️Clean up automap code
Use Point for x,y pairs. Make helpers for drawing door and squares
2021-05-02 15:27:38 +02:00
Gleb Mazovetskiy
34b4ed759a 🐞 Clean up and fix inventory sprite handling 2021-05-02 04:01:03 +02:00
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.
2021-05-01 20:51:55 +02:00
Anders Jenbo
f884ba5340 🔥 Remove more miniwin dependencies 2021-04-29 23:04:56 +02:00
obligaron
3b87433fc2 Move GetFrameToUseForPlayerRendering to AnimationInfo 2021-04-29 04:33:51 +02:00
obligaron
1de46a8495 Rename member variables 2021-04-29 04:33:51 +02:00
obligaron
0b5183f63e Introduce AnimationInfo
Update AnimationInfo.DelayLen comment
2021-04-29 04:33:51 +02:00
thebigMuh
ad8f342db0 Adding constness 2021-04-26 23:30:02 +02:00
thebigMuh
7ce3957a8a Split of QoL features into separate files 2021-04-26 19:31:25 +02:00
obligaron
239a43cc1c
Remove "AnimWidth2" expect for missiles (#1680) 2021-04-25 13:32:33 +02:00
Jmgr
1b7e0d2cb3 Migrate existing log entries 2021-04-25 02:39:42 +02:00
Anders Jenbo
2bd13451a1 ♻️Apply point positioning to all remaning entities 2021-04-25 01:25:48 +02:00
Anders Jenbo
98cd435fba ♻️ Apply point types to missiles 2021-04-24 21:41:04 +02:00
Anders Jenbo
efbe8a8338 ♻️ add possition points to monsters 2021-04-24 20:29:52 +02:00
Anders Jenbo
275404029e ♻️Cleanup player temp variables 2021-04-24 17:07:07 +02:00
Anders Jenbo
e4cfad3196 ♻️Use points instead of individual fileds for player structure 2021-04-24 04:46:08 +02:00
Anders Jenbo
a32ac83090 🎨 cleanup trivial trype comparisons 2021-04-23 02:48:25 +02:00
Anders Jenbo
cc164985a3 🎨 Correct type checks in src sub-folder 2021-04-22 20:33:24 +02:00
Anders Jenbo
1e3ed903be 🎨 strip redundant else 2021-04-22 00:39:48 +02:00
Anders Jenbo
d024f79b0e 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Jmgr
1d84156509 Simplify bitshift divisions/multiplications 2021-04-21 05:31:17 +02:00
Anders Jenbo
9e307a0d4a 🎨 Rename towner[] to towners[] 2021-04-19 22:42:19 +02:00
Anders Jenbo
373f28736f 🎨 Acceptable parts of modernize-* 2021-04-19 22:42:19 +02:00
Anders Jenbo
bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
thebigMuh
50dcf587f4
Adding fancier XP bar (#1597) 2021-04-19 02:59:20 +02:00
Anders Jenbo
c89bd9c001 🚨 Fix remaning warnings for clang and gcc 2021-04-19 02:44:39 +02:00
Anders Jenbo
946ff5b0fa ♻️Performe static casts when load save game data 2021-04-18 23:27:21 +02:00
Anders Jenbo
61d15e23db 🎨 Apply direction enum to monsters and relations
Missiles _mimfnum is being used for a lot more then just directions and
can also be a 16 degree direction so can't apply enum verbs and
restricitons to it in most cases. This in turns also affects SetMissDir
and some other functions that have to stay int.
2021-04-18 23:13:03 +02:00
Gleb Mazovetskiy
95946e3a7c
🧹 Cleanup unused variables (#1584)
Fixes `unused-variable` and `unused-but-set-variable` compiler warnings.
2021-04-18 18:15:47 +02:00
Gleb Mazovetskiy
b2601a04e0 Zoom: Fix off-by-1 and handle odd dimensions 2021-04-16 04:29:26 +02:00
qndel
d8444ed695
Clean DrawInvBelt + outline colors
* fix right hand items
2021-04-16 02:17:28 +02:00