Revert "dun_render: Add DunTileColorMap for baked light"

This reverts commit 827eb9705d.
This commit is contained in:
Anders Jenbo
2023-09-21 07:07:26 +02:00
parent 31bd9790d8
commit dbfd1fc91f
2 changed files with 0 additions and 37 deletions
-25
View File
@@ -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
-12
View File
@@ -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