mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-12 02:13:06 +00:00
1. There is no need to store the light table width as it is always 256. 2. Use a fixed-extent `std::span` rather than a pointer for readability. This should optimize to the exact same code.
20 lines
432 B
C++
20 lines
432 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
namespace devilution {
|
|
|
|
#define MAXLIGHTS 32
|
|
#define MAXVISION 4
|
|
#define NO_LIGHT -1
|
|
|
|
constexpr char LightsMax = 15;
|
|
|
|
/** @brief A light table maps palette indices, so its size is the same as the palette size. */
|
|
constexpr size_t LightTableSize = 256;
|
|
|
|
/** @brief Number of supported light levels */
|
|
constexpr size_t NumLightingLevels = LightsMax + 1;
|
|
|
|
} // namespace devilution
|