Kalebe Alves
118efe8e6d
Use Point/SDL_Rect for control functions coordinate system
5 years ago
Kalebe Alves
0461529176
Move byte from engine.h
5 years ago
qndel
b1d74d2791
alt highlighting ( #2060 )
5 years ago
obligaron
61ba5009ac
Convert to CelSprite
5 years ago
Anders Jenbo
6ce8f13751
Apply clang-tidy to more code and do some related cleanups
5 years ago
Gleb Mazovetskiy
b76f7656f3
🧹 LoadArt: BYTE -> uint8_t
...
The change in include order necessitated a couple of other minor
cleanups, one in stubs.h and one in sdl2_to_1_2_backports.h
5 years ago
qndel
69b903743a
fix typos
5 years ago
qndel
faae9a65c7
fix typos ( #2038 )
5 years ago
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.
5 years ago
Anders Jenbo
6acb49bea4
Render quest and menu text using common text rendering
5 years ago
obligaron
a295586636
Support changing animation data on-the-fly even if the number of frames differ
5 years ago
Anders Jenbo
4c6ddc79a1
Clean up text render
5 years ago
Anders Jenbo
a03a2c2634
Render chat panel using common text rendering
5 years ago
Anders Jenbo
d723ebce1a
Render help text using common text rendering
5 years ago
obligaron
19615c6976
AnimationInfo: Add GetAnimationProgress()
5 years ago
thebigMuh
7fbcfeb35c
Adding text rendering flag to adjust spacing to fit horizontally
...
Now also works for multiline strings
5 years ago
Anders Jenbo
18aa04fa4f
♻️ Use common text rendering for store menus
5 years ago
qndel
610d5319bd
swap if in drawing inventory items ( #1968 )
5 years ago
qndel
89c40eaa7b
inventory items rendering cleanup ( #1938 )
5 years ago
Gleb Mazovetskiy
8ac9047b4f
🧹 Clean up CEL outline clipping
...
A simpler structure based on the CL2 implementation.
5 years ago
Anders Jenbo
7667880de4
🐛 Implement letter spacing in new font rendering
...
Fixes #1950
5 years ago
Gleb Mazovetskiy
29a488738e
🔥 Mark core CL2 and CEL functions as inline hot
5 years ago
Gleb Mazovetskiy
f624b9788c
🔥 Mark `dun_render` functions as `hot`
5 years ago
Gleb Mazovetskiy
4d10642b3d
🧹 Add and use a DVL_ALWAYS_INLINE macro
...
Also moves attribute macros out of miniwin into a new header.
5 years ago
Gleb Mazovetskiy
e53a79259d
🐞 CL2 outline: Fix left clip
5 years ago
Gleb Mazovetskiy
537e056111
🐞 CL2 outline: Skip color index 0
...
Fixes a regression introduced in #1934
5 years ago
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).
5 years ago
Gleb Mazovetskiy
64ad9aeacf
🎉 cl2_render.cpp: Clip the outline
5 years ago
Anders Jenbo
e3c0c0a216
Fix some compiler warnings
5 years ago
Gleb Mazovetskiy
99dc016ec1
🧹 cel_render: Move internal functions to anon ns
5 years ago
obligaron
b94e599f5e
ADL: Advance skipped Frames in SetNewAnimation and remove logic from PM_XYZ
5 years ago
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
5 years ago
Gleb Mazovetskiy
ad18ecc21b
🎉 cel_render.cpp: Clip stippled transparency
...
Example FPS change: 1336 -> 1424
5 years ago
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.
5 years ago
Anders Jenbo
0b3d1c68fa
✨ Precompute font color tables
5 years ago
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
5 years ago
Anders Jenbo
bcbaeba2f0
📝 Correct file header
5 years ago
Anders Jenbo
c11945e62b
🎨 Fix line endings
5 years ago
obligaron
e3e3d02da7
Correct Doxygen comments
5 years ago
Gleb Mazovetskiy
710ddb9af6
♻️ Make SetPixel a method
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
Gleb Mazovetskiy
6474dea0a9
♻️ Move automap_render to engine/, rename 2->Steep
...
Also adds header file documentation.
5 years ago
obligaron
cb7819a75c
Introduce AnimationDistributionFlags::RepeatedAction
5 years ago
obligaron
b5954eb34b
Change AnimationDistributionParams to AnimationDistributionFlags
5 years ago
obligaron
b08e0c20dc
In repeated Animations show skipped Frames from previous Animation (repeated Attack/RangeAttack/Spell)
5 years ago
obligaron
401a820998
Rename GameTick to Tick (for variables)
5 years ago
obligaron
26601c98dc
Simplify GetFrameToUseForRendering (remove local variables and use member variables)
5 years ago