mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename PALETTE_TOTAL_OFFSETS to kPaletteTotalOffsets
This commit is contained in:
parent
8ce6ba7606
commit
ef7d7575de
|
@ -216,7 +216,7 @@ void TextureCache::CreateTextures()
|
||||||
|
|
||||||
void TextureCache::GeneratePaletteTexture()
|
void TextureCache::GeneratePaletteTexture()
|
||||||
{
|
{
|
||||||
static_assert(PALETTE_TOTAL_OFFSETS + 5 < 256, "Height of palette too large!");
|
static_assert(kPaletteTotalOffsets + 5 < 256, "Height of palette too large!");
|
||||||
constexpr int32_t height = 256;
|
constexpr int32_t height = 256;
|
||||||
constexpr int32_t width = height;
|
constexpr int32_t width = height;
|
||||||
DrawPixelInfo dpi = CreateDPI(width, height);
|
DrawPixelInfo dpi = CreateDPI(width, height);
|
||||||
|
@ -227,7 +227,7 @@ void TextureCache::GeneratePaletteTexture()
|
||||||
dpi.bits[i] = i;
|
dpi.bits[i] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < PALETTE_TOTAL_OFFSETS; ++i)
|
for (int i = 0; i < kPaletteTotalOffsets; ++i)
|
||||||
{
|
{
|
||||||
GLint y = PaletteToY(static_cast<FilterPaletteID>(i));
|
GLint y = PaletteToY(static_cast<FilterPaletteID>(i));
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,7 @@ const FilterPaletteID GlassPaletteIds[COLOUR_COUNT] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Previously 0x97FCBC use it to get the correct palette from g1_elements
|
// Previously 0x97FCBC use it to get the correct palette from g1_elements
|
||||||
static constexpr uint16_t palette_to_g1_offset[PALETTE_TOTAL_OFFSETS] = {
|
static constexpr uint16_t palette_to_g1_offset[kPaletteTotalOffsets] = {
|
||||||
SPR_PALETTE_BLACK,
|
SPR_PALETTE_BLACK,
|
||||||
SPR_PALETTE_GREY,
|
SPR_PALETTE_GREY,
|
||||||
SPR_PALETTE_WHITE,
|
SPR_PALETTE_WHITE,
|
||||||
|
@ -904,7 +904,7 @@ void GfxDrawPickedUpPeep(DrawPixelInfo& dpi)
|
||||||
|
|
||||||
std::optional<uint32_t> GetPaletteG1Index(colour_t paletteId)
|
std::optional<uint32_t> GetPaletteG1Index(colour_t paletteId)
|
||||||
{
|
{
|
||||||
if (paletteId < PALETTE_TOTAL_OFFSETS)
|
if (paletteId < kPaletteTotalOffsets)
|
||||||
{
|
{
|
||||||
return palette_to_g1_offset[paletteId];
|
return palette_to_g1_offset[paletteId];
|
||||||
}
|
}
|
||||||
|
|
|
@ -504,8 +504,7 @@ void FASTCALL BlitPixels(const uint8_t* src, uint8_t* dst, const PaletteMap& pal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PALETTE_TO_G1_OFFSET_COUNT 144
|
constexpr uint8_t kPaletteTotalOffsets = 192;
|
||||||
constexpr uint8_t PALETTE_TOTAL_OFFSETS = 192;
|
|
||||||
|
|
||||||
#define INSET_RECT_F_30 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_NONE)
|
#define INSET_RECT_F_30 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_NONE)
|
||||||
#define INSET_RECT_F_60 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_DONT_LIGHTEN)
|
#define INSET_RECT_F_60 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_DONT_LIGHTEN)
|
||||||
|
|
Loading…
Reference in New Issue