rodecomp/Source/Resource/Bitmap/BitmapImage.h
ragnarok-clanker 85414e2012 Maintenance: [forced, user-approved] R1 (resubmit of 10219 on 4cf7a69f): remove invented resource contexts ActionResourceContext, Spr
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.
2026-11-03 09:38:10 +00:00

29 lines
752 B
C++

#ifndef RAGNAROK_SOURCE_RESOURCE_BITMAP_BITMAPIMAGE_H
#define RAGNAROK_SOURCE_RESOURCE_BITMAP_BITMAPIMAGE_H
#include <cstdint>
struct BitmapImage {
/* 0110 */ int alpha;
/* 0114 */ int width;
/* 0118 */ int height;
/* 011C */ std::uint32_t* pixels;
/* 0120 */ void* auxiliary;
BitmapImage();
void Clear();
bool CreateAuxiliary(int mode);
std::uint32_t Pixel(int x, int y) const;
void ClearAuxiliary();
bool DecodeBitmap(const void* data, int bytes, bool iconOnly);
bool DecodeTga(const void* data, int bytes);
bool DecodePng(const void* data, int bytes, const char* name);
bool DecodeJpeg(const void* data, int bytes);
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(BitmapImage) == 20);
#endif
#endif