OpenTTD Source 20250205-master-gfd85ab1e2c
|
Implementation for converting sprites from another source from 32bpp RGBA to indexed 8bpp. More...
#include "../stdafx.h"
#include "../core/bitmath_func.hpp"
#include "../core/math_func.hpp"
#include "../gfx_func.h"
#include "../palette_func.h"
#include "makeindexed.h"
#include "../safeguards.h"
Go to the source code of this file.
Functions | |
static void | Convert32bppTo8bpp (SpriteLoader::Sprite &sprite) |
Convert in place a 32bpp sprite to 8bpp. | |
Implementation for converting sprites from another source from 32bpp RGBA to indexed 8bpp.
Definition in file makeindexed.cpp.
|
static |
Convert in place a 32bpp sprite to 8bpp.
sprite | Sprite to convert. |
Definition at line 23 of file makeindexed.cpp.
References _cur_palette, SpriteLoader::Sprite::data, GetNearestColourIndex(), GetNearestColourReshadeIndex(), SpriteLoader::Sprite::height, IsInsideMM(), Palette::palette, and SpriteLoader::Sprite::width.
Referenced by SpriteLoaderMakeIndexed::LoadSprite().