Batch #10229 by ragnarok-clanker: forced by an admin (4 lower score(s), 45 changed function(s)); checked with 314 compiled unit(s), including every includer of Source/Resource/Bitmap/BitmapImage.h, Source/Resource/Bitmap/BitmapResource.h, Source/Resource/Bitmap/IJL15Runtime.h, Source/Resource/EmblemResource.h, Source/Resource/GifResource.h, Source/Resource/Models/AnimatedModelResource.h, Source/Resource/Models/GrannyModelResource.h, Source/Resource/Models/ModelResource.h, Source/Resource/Sprites/ActionResource.h, Source/Resource/Sprites/SpriteResource.h, Source/UI/Buttons/UIBmpRadioBtn.h.
34 lines
977 B
C++
34 lines
977 B
C++
#ifndef RAGNAROK_SOURCE_RESOURCE_SPRITES_SPRITERESOURCE_H
|
|
#define RAGNAROK_SOURCE_RESOURCE_SPRITES_SPRITERESOURCE_H
|
|
|
|
#include "Render/Textures/SpritePixels.h"
|
|
#include "Resource/Resource.h"
|
|
|
|
#include <vector>
|
|
|
|
class ResourceBytes;
|
|
|
|
class CSprRes : public CRes {
|
|
public:
|
|
CSprRes();
|
|
~CSprRes() override;
|
|
CSprRes* Create() override;
|
|
bool Load(const char* name) override;
|
|
void Unload() override;
|
|
|
|
/* 0110 */ std::uint32_t palette[256];
|
|
/* 0510 */ std::vector<SpriteRleImage*> images[2];
|
|
/* 0528 */ int indexedCount;
|
|
|
|
};
|
|
|
|
std::uint8_t* EncodeSpriteRuns(const std::uint8_t* pixels, int width, int height, std::uint16_t& bytes);
|
|
std::uint8_t* ReduceSprite(const std::uint8_t* pixels, int width, int height, int halfWidth, int halfHeight);
|
|
void ConvertSpritePalette(std::uint32_t* output, const std::uint8_t* input, int count);
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CSprRes) == 1324);
|
|
static_assert(sizeof(SpriteRleImage) == 16);
|
|
#endif
|
|
|
|
#endif
|