1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-30 15:44:31 +01:00
Files
OpenTTD/src/spriteloader/makeindexed.h
2025-05-03 23:21:09 +02:00

24 lines
1.3 KiB
C++

/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file makeindexed.h Base for converting sprites from another source from 32bpp RGBA to indexed 8bpp. */
#ifndef SPRITELOADER_MAKEINDEXED_H
#define SPRITELOADER_MAKEINDEXED_H
#include "spriteloader.hpp"
/** Sprite loader for converting graphics coming from another source. */
class SpriteLoaderMakeIndexed : public SpriteLoader {
SpriteLoader &baseloader;
public:
SpriteLoaderMakeIndexed(SpriteLoader &baseloader) : baseloader(baseloader) {}
ZoomLevels LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint8_t control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp) override;
};
#endif /* SPRITELOADER_MAKEINDEXED_H */