mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-11 10:02:27 +01:00
Rename classes with snakes OpenRCT2/A*-F* (#19215)
* Rename classes with snakes OpenRCT2/A*-F* * Clang format files
This commit is contained in:
@@ -204,7 +204,7 @@ void TextureCache::GeneratePaletteTexture()
|
||||
static_assert(PALETTE_TO_G1_OFFSET_COUNT + 5 < 256, "Height of palette too large!");
|
||||
constexpr int32_t height = 256;
|
||||
constexpr int32_t width = height;
|
||||
rct_drawpixelinfo dpi = CreateDPI(width, height);
|
||||
DrawPixelInfo dpi = CreateDPI(width, height);
|
||||
|
||||
// Init no-op palette
|
||||
for (int i = 0; i < width; ++i)
|
||||
@@ -268,7 +268,7 @@ void TextureCache::EnlargeAtlasesTexture(GLuint newEntries)
|
||||
|
||||
AtlasTextureInfo TextureCache::LoadImageTexture(const ImageId imageId)
|
||||
{
|
||||
rct_drawpixelinfo dpi = GetImageAsDPI(ImageId(imageId.GetIndex()));
|
||||
DrawPixelInfo dpi = GetImageAsDPI(ImageId(imageId.GetIndex()));
|
||||
|
||||
auto cacheInfo = AllocateImage(dpi.width, dpi.height);
|
||||
cacheInfo.image = imageId.GetIndex();
|
||||
@@ -285,7 +285,7 @@ AtlasTextureInfo TextureCache::LoadImageTexture(const ImageId imageId)
|
||||
|
||||
AtlasTextureInfo TextureCache::LoadGlyphTexture(const ImageId imageId, const PaletteMap& paletteMap)
|
||||
{
|
||||
rct_drawpixelinfo dpi = GetGlyphAsDPI(imageId, paletteMap);
|
||||
DrawPixelInfo dpi = GetGlyphAsDPI(imageId, paletteMap);
|
||||
|
||||
auto cacheInfo = AllocateImage(dpi.width, dpi.height);
|
||||
cacheInfo.image = imageId.GetIndex();
|
||||
@@ -347,24 +347,24 @@ AtlasTextureInfo TextureCache::AllocateImage(int32_t imageWidth, int32_t imageHe
|
||||
return _atlases.back().Allocate(imageWidth, imageHeight);
|
||||
}
|
||||
|
||||
rct_drawpixelinfo TextureCache::GetImageAsDPI(const ImageId imageId)
|
||||
DrawPixelInfo TextureCache::GetImageAsDPI(const ImageId imageId)
|
||||
{
|
||||
auto g1Element = GfxGetG1Element(imageId);
|
||||
int32_t width = g1Element->width;
|
||||
int32_t height = g1Element->height;
|
||||
|
||||
rct_drawpixelinfo dpi = CreateDPI(width, height);
|
||||
DrawPixelInfo dpi = CreateDPI(width, height);
|
||||
GfxDrawSpriteSoftware(&dpi, imageId, { -g1Element->x_offset, -g1Element->y_offset });
|
||||
return dpi;
|
||||
}
|
||||
|
||||
rct_drawpixelinfo TextureCache::GetGlyphAsDPI(const ImageId imageId, const PaletteMap& palette)
|
||||
DrawPixelInfo TextureCache::GetGlyphAsDPI(const ImageId imageId, const PaletteMap& palette)
|
||||
{
|
||||
auto g1Element = GfxGetG1Element(imageId);
|
||||
int32_t width = g1Element->width;
|
||||
int32_t height = g1Element->height;
|
||||
|
||||
rct_drawpixelinfo dpi = CreateDPI(width, height);
|
||||
DrawPixelInfo dpi = CreateDPI(width, height);
|
||||
|
||||
const auto glyphCoords = ScreenCoordsXY{ -g1Element->x_offset, -g1Element->y_offset };
|
||||
GfxDrawSpritePaletteSetSoftware(&dpi, imageId, glyphCoords, palette);
|
||||
@@ -379,13 +379,13 @@ void TextureCache::FreeTextures()
|
||||
std::fill(_indexMap.begin(), _indexMap.end(), UNUSED_INDEX);
|
||||
}
|
||||
|
||||
rct_drawpixelinfo TextureCache::CreateDPI(int32_t width, int32_t height)
|
||||
DrawPixelInfo TextureCache::CreateDPI(int32_t width, int32_t height)
|
||||
{
|
||||
size_t numPixels = width * height;
|
||||
auto pixels8 = new uint8_t[numPixels];
|
||||
std::fill_n(pixels8, numPixels, 0);
|
||||
|
||||
rct_drawpixelinfo dpi;
|
||||
DrawPixelInfo dpi;
|
||||
dpi.bits = pixels8;
|
||||
dpi.pitch = 0;
|
||||
dpi.x = 0;
|
||||
@@ -396,7 +396,7 @@ rct_drawpixelinfo TextureCache::CreateDPI(int32_t width, int32_t height)
|
||||
return dpi;
|
||||
}
|
||||
|
||||
void TextureCache::DeleteDPI(rct_drawpixelinfo dpi)
|
||||
void TextureCache::DeleteDPI(DrawPixelInfo dpi)
|
||||
{
|
||||
delete[] dpi.bits;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user