diff --git a/Source/Resource/Bitmap/BitmapImage.cpp b/Source/Resource/Bitmap/BitmapImage.cpp index ed9ced54..f65cc3af 100644 --- a/Source/Resource/Bitmap/BitmapImage.cpp +++ b/Source/Resource/Bitmap/BitmapImage.cpp @@ -41,21 +41,6 @@ namespace { BitmapImage::BitmapImage() : alpha(0), pixels(nullptr), auxiliary(nullptr) { } -// INLINED -void BitmapImage::Clear() { - if (this->pixels) { - std::free(this->pixels); - } - - if (this->auxiliary) { - std::free(this->auxiliary); - } - - this->width = this->height = 0; - this->pixels = nullptr; - this->auxiliary = nullptr; -} - // OFFSET: 0x0074A680 // FUNCTION: fn_07866 bool BitmapImage::CreateAuxiliary(int mode) { diff --git a/Source/Resource/Bitmap/BitmapImage.h b/Source/Resource/Bitmap/BitmapImage.h index afba7e2c..bd93ec57 100644 --- a/Source/Resource/Bitmap/BitmapImage.h +++ b/Source/Resource/Bitmap/BitmapImage.h @@ -2,6 +2,7 @@ #define RAGNAROK_SOURCE_RESOURCE_BITMAP_BITMAPIMAGE_H #include +#include struct BitmapImage { @@ -22,6 +23,21 @@ struct BitmapImage { bool DecodeJpeg(const void* data, int bytes); }; +// INLINED +inline void BitmapImage::Clear() { + if (this->pixels) { + std::free(this->pixels); + } + + if (this->auxiliary) { + std::free(this->auxiliary); + } + + this->width = this->height = 0; + this->pixels = nullptr; + this->auxiliary = nullptr; +} + #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(BitmapImage) == 20); #endif