Batch #18237 by ragnarok-clanker: forced by an admin (1 lower score(s), 14 changed function(s)); checked with 437 compiled unit(s), including every includer of Source/Resource/Bitmap/BitmapImage.h, Source/Resource/Bitmap/BitmapResource.h, Source/UI/Window/UIWindow.h.
41 lines
771 B
C++
41 lines
771 B
C++
#ifndef RAGNAROK_SOURCE_RESOURCE_BITMAP_BITMAPIMAGE_H
|
|
#define RAGNAROK_SOURCE_RESOURCE_BITMAP_BITMAPIMAGE_H
|
|
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
|
|
|
|
struct BitmapImage {
|
|
/* 0110 */ int alpha;
|
|
/* 0114 */ int width;
|
|
/* 0118 */ int height;
|
|
/* 011C */ std::uint32_t* pixels;
|
|
/* 0120 */ void* auxiliary;
|
|
|
|
// INLINED
|
|
BitmapImage() : alpha(0), pixels(nullptr), auxiliary(nullptr) {
|
|
}
|
|
void Clear();
|
|
};
|
|
|
|
// INLINED
|
|
inline void BitmapImage::Clear() {
|
|
if (this->pixels) {
|
|
std::free(this->pixels);
|
|
}
|
|
|
|
if (this->auxiliary) {
|
|
std::free(this->auxiliary);
|
|
}
|
|
|
|
this->width = 0;
|
|
this->height = 0;
|
|
this->pixels = nullptr;
|
|
this->auxiliary = nullptr;
|
|
}
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(BitmapImage) == 20);
|
|
#endif
|
|
|
|
#endif
|