Gleb Mazovetskiy
bb95e0c337
cl2_render: Use memset when rendering outline
...
A minor cleanup that replaces the for-loop rendering for a fill run
with memsets.
2021-05-22 15:55:51 +02:00
Anders Jenbo
6acb49bea4
Render quest and menu text using common text rendering
2021-05-21 04:23:49 +02:00
Anders Jenbo
4c6ddc79a1
Clean up text render
2021-05-19 14:09:33 +02:00
Anders Jenbo
a03a2c2634
Render chat panel using common text rendering
2021-05-19 14:09:33 +02:00
Anders Jenbo
d723ebce1a
Render help text using common text rendering
2021-05-19 14:09:33 +02:00
thebigMuh
7fbcfeb35c
Adding text rendering flag to adjust spacing to fit horizontally
...
Now also works for multiline strings
2021-05-16 00:55:20 +02:00
Anders Jenbo
18aa04fa4f
♻️ Use common text rendering for store menus
2021-05-14 19:11:43 +02:00
qndel
610d5319bd
swap if in drawing inventory items ( #1968 )
2021-05-14 12:50:32 +02:00
qndel
89c40eaa7b
inventory items rendering cleanup ( #1938 )
2021-05-14 12:46:16 +02:00
Gleb Mazovetskiy
8ac9047b4f
🧹 Clean up CEL outline clipping
...
A simpler structure based on the CL2 implementation.
2021-05-13 23:41:50 +02:00
Anders Jenbo
7667880de4
🐛 Implement letter spacing in new font rendering
...
Fixes #1950
2021-05-13 21:52:44 +02:00
Gleb Mazovetskiy
29a488738e
🔥 Mark core CL2 and CEL functions as inline hot
2021-05-13 02:22:38 +02:00
Gleb Mazovetskiy
f624b9788c
🔥 Mark dun_render functions as hot
2021-05-13 01:54:27 +02:00
Gleb Mazovetskiy
4d10642b3d
🧹 Add and use a DVL_ALWAYS_INLINE macro
...
Also moves attribute macros out of miniwin into a new header.
2021-05-13 01:54:27 +02:00
Gleb Mazovetskiy
e53a79259d
🐞 CL2 outline: Fix left clip
2021-05-13 01:01:45 +02:00
Gleb Mazovetskiy
537e056111
🐞 CL2 outline: Skip color index 0
...
Fixes a regression introduced in #1934
2021-05-12 08:19:19 +02:00
Gleb Mazovetskiy
fb27ee3907
💨 dun_render.cpp: Faster RenderLine
...
Turns RenderLine line branches into template parameters, allowing the
compiler to eliminate the branches and also fully inline it.
Example FPS change
* In dungeon: 1450 -> 1530
* In town: 1655 -> 1700
Also splits RenderLine into 3 functions
Easier to read and also gives more useful profiling.
Apparently the most time is spent in `RenderLineOpaque`.
Also, mark them `inline` because that apparently hints GCC to inline
the function (in a later refactoring we can introduce attribute
always_inline instead where supported).
2021-05-12 08:17:14 +02:00
Gleb Mazovetskiy
64ad9aeacf
🎉 cl2_render.cpp: Clip the outline
2021-05-11 07:57:08 +02:00
Anders Jenbo
e3c0c0a216
Fix some compiler warnings
2021-05-10 23:17:43 +02:00
Gleb Mazovetskiy
99dc016ec1
🧹 cel_render: Move internal functions to anon ns
2021-05-10 12:35:55 +02:00
Gleb Mazovetskiy
1838eb43f2
🎉 cl2_render.cpp: Clip the drawing functions
...
Clips all the drawing functions except the outline one.
Example FPS gain in a dungeon: 1454 -> 1488
2021-05-09 05:48:48 +02:00
Gleb Mazovetskiy
ad18ecc21b
🎉 cel_render.cpp: Clip stippled transparency
...
Example FPS change: 1336 -> 1424
2021-05-09 05:31:41 +02:00
Gleb Mazovetskiy
be7880c4db
🎉 cel_render.cpp: Clip outline
...
Clips `CelBlitOutlineTo` to the output buffer.
The templated implementation means that this compiles to many
case-specific functions with near-branchless inner loops.
Increases binary size by 92 KiB.
2021-05-09 05:31:41 +02:00
Anders Jenbo
0b3d1c68fa
✨ Precompute font color tables
2021-05-08 18:48:19 +02:00
Anders Jenbo
68923c6c33
✨ Generic game text render function
...
This should gradually replace all the direct rendering of game texts
throughout the code. The interface is made to closly mirror that of the
art fonts as that is what will eventually be used for rendering Unicode
fonts both in the menus and ingame.
fixup! ✨ Generic game text render function
2021-05-08 18:48:19 +02:00
Anders Jenbo
bcbaeba2f0
📝 Correct file header
2021-05-08 18:48:19 +02:00
Gleb Mazovetskiy
710ddb9af6
♻️ Make SetPixel a method
2021-05-07 01:02:03 +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
Gleb Mazovetskiy
6474dea0a9
♻️ Move automap_render to engine/, rename 2->Steep
...
Also adds header file documentation.
2021-05-06 12:58:06 +02:00