mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-12 02:13:06 +00:00
Revert "dun_render: Add DunTileColorMap for baked light"
This reverts commit 827eb9705d.
This commit is contained in:
@@ -1197,29 +1197,4 @@ void world_draw_black_tile(const Surface &out, int sx, int sy)
|
||||
}
|
||||
}
|
||||
|
||||
void DunTileColorMap(std::span<const uint8_t> src, TileType tileType,
|
||||
const uint8_t *tbl, uint8_t *dst)
|
||||
{
|
||||
if (tileType == TileType::TransparentSquare) {
|
||||
const uint8_t *srcPtr = src.data();
|
||||
for (auto i = 0; i < Height; ++i) {
|
||||
for (uint_fast8_t drawWidth = Width; drawWidth > 0;) {
|
||||
auto v = static_cast<int8_t>(*srcPtr++);
|
||||
if (v > 0) {
|
||||
drawWidth -= v;
|
||||
while (v-- > 0) {
|
||||
*dst++ = tbl[*srcPtr++];
|
||||
}
|
||||
} else {
|
||||
drawWidth += v;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (const uint8_t pix : src) {
|
||||
*dst++ = tbl[pix];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace devilution
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <span>
|
||||
|
||||
#include <SDL_endian.h>
|
||||
|
||||
@@ -276,15 +275,4 @@ void RenderTile(const Surface &out, Point position,
|
||||
*/
|
||||
void world_draw_black_tile(const Surface &out, int sx, int sy);
|
||||
|
||||
/**
|
||||
* @brief Applies a color map to a dungeon tile.
|
||||
*
|
||||
* @param src Dungeon CEL data.
|
||||
* @param tileType Dungeon CEL type.
|
||||
* @param tbl Palette mapping.
|
||||
* @param dst Output dungeon CEL data.
|
||||
*/
|
||||
void DunTileColorMap(std::span<const uint8_t> src, TileType tileType,
|
||||
const uint8_t *tbl, uint8_t *dst);
|
||||
|
||||
} // namespace devilution
|
||||
|
||||
Reference in New Issue
Block a user