Commit Graph
16 Commits
Author SHA1 Message Date
Gleb Mazovetskiy a66ca44695 Zero-based frame indexing
Index frames starting at 0 instead of 1.
2022-04-14 04:39:26 +01:00
Gleb Mazovetskiy 12de70550b Fix an OOB in CEL/CL2 outline rendering
This OOB happened when rendering a sprite so that it is exactly
off-screen (touching the border but not visible) on top/bottom
while also being only partly off-screen on the left or right.
2022-04-12 01:52:53 +02:00
Gleb Mazovetskiy 7fede6c4cb Clean up owned/unowned CelSprite ambiguity
Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.

This clarifies ownership and makes the code cleaner in a number of
places.

Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
2022-03-06 04:49:13 +01:00
qndel 9ba64ad08b TRN rewrite + bugfix (#4056)
* working new TRN system
* apply TRNs to all unique missiles
2022-02-20 14:28:51 +01:00
Anders Jenbo dce78dde62 Rename lighting globals 2021-07-08 02:01:14 -07:00
Gleb Mazovetskiy cb0dae8590 🚚 Rename CelOutputBuf to Surface and extract 2021-07-03 05:33:32 -07:00
Gleb Mazovetskiy 14218080b6 🚚 engine.h: Extract CelGetFrame and friends 2021-06-21 02:34:28 -07:00
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
Gleb Mazovetskiy 8ac9047b4f 🧹 Clean up CEL outline clipping
A simpler structure based on the CL2 implementation.
2021-05-13 23:41:50 +02:00
Gleb Mazovetskiy 29a488738e 🔥 Mark core CL2 and CEL functions as inline hot 2021-05-13 02:22:38 +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 64ad9aeacf 🎉 cl2_render.cpp: Clip the outline 2021-05-11 07:57:08 +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
Anders Jenbo bcbaeba2f0 📝 Correct file header 2021-05-08 18:48:19 +02:00
Gleb Mazovetskiy 9a9941efdd 🚚 Move CL2 rendering to engine/render/cl2_render.cpp 2021-05-07 01:02:03 +02:00