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.
This commit is contained in:
ragnarok-clanker 2026-11-03 09:38:10 +00:00
commit 85414e2012
21 changed files with 104 additions and 181 deletions

View file

@ -5,9 +5,9 @@
// OFFSET: 0x0074BCC0
// FUNCTION: fn_07871
bool BitmapImage::DecodeJpeg(const void* data, int bytes, IJL15Runtime& runtime) {
bool BitmapImage::DecodeJpeg(const void* data, int bytes) {
IJL15Properties properties = {};
if (runtime.initialize(&properties) != 0) {
if (ijlInit(&properties) != 0) {
return false;
}
@ -15,7 +15,7 @@ bool BitmapImage::DecodeJpeg(const void* data, int bytes, IJL15Runtime& runtime)
properties.jpegSize = bytes;
unsigned char* source;
if (runtime.read(&properties, 1) == 0) {
if (ijlRead(&properties, 1) == 0) {
this->width = properties.jpegWidth;
this->height = properties.jpegHeight;
const std::uint32_t count = static_cast<std::uint32_t>(this->width) * static_cast<std::uint32_t>(this->height);
@ -28,7 +28,7 @@ bool BitmapImage::DecodeJpeg(const void* data, int bytes, IJL15Runtime& runtime)
properties.dibChannels = 3;
properties.dibPadding = 0;
if (runtime.read(&properties, 3) != 0) {
if (ijlRead(&properties, 3) != 0) {
std::free(source);
std::free(this->pixels);
this->pixels = nullptr;
@ -39,7 +39,7 @@ bool BitmapImage::DecodeJpeg(const void* data, int bytes, IJL15Runtime& runtime)
source = reinterpret_cast<unsigned char*>(this);
}
runtime.release(&properties);
ijlFree(&properties);
for (int y = 0; y < this->height; ++y) {
const unsigned char* input = source + 3u * (static_cast<std::uint32_t>(y) * this->width);