From 783db5ccb4f953a6f02a5ebc3884bc48a272c966 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 06:52:10 +0000 Subject: [PATCH] Confirm fn_01845 (CDCBitmap::Create) Batch #14168 by StrawberrysherbetIX: 0 byte-identical, 1 confirmed by peer review. - fn_01845 CDCBitmap::Create: logic confirmed by peer review (already on main) Peer-reviewed-by: Yommy, secret, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Render/Textures/BitmapTextureCache.cpp | 9 --------- Source/Render/Textures/BitmapTextureCache.h | 12 +++++++++++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Source/Render/Textures/BitmapTextureCache.cpp b/Source/Render/Textures/BitmapTextureCache.cpp index 9f4fdbaf3..7a858fa68 100644 --- a/Source/Render/Textures/BitmapTextureCache.cpp +++ b/Source/Render/Textures/BitmapTextureCache.cpp @@ -14,15 +14,6 @@ BitmapTextureCache::~BitmapTextureCache() { this->Clear(); } -// INLINED -void BitmapTextureCache::Clear() { - for (CTexture* texture : this->m_textures) { - delete texture; - } - - this->m_textures.clear(); -} - // OFFSET: 0x00548380 // FUNCTION: fn_01854 void BitmapTextureCache::Update(BitmapPixels& bitmap, CRenderSystemBase& system) { diff --git a/Source/Render/Textures/BitmapTextureCache.h b/Source/Render/Textures/BitmapTextureCache.h index 4d758dd35..80cd4d1d1 100644 --- a/Source/Render/Textures/BitmapTextureCache.h +++ b/Source/Render/Textures/BitmapTextureCache.h @@ -1,11 +1,12 @@ #ifndef RAGNAROK_SOURCE_RENDER_TEXTURES_BITMAPTEXTURECACHE_H #define RAGNAROK_SOURCE_RENDER_TEXTURES_BITMAPTEXTURECACHE_H +#include "Render/Textures/Texture.h" + #include #include struct BitmapPixels; -class CTexture; class CRenderSystemBase; class BitmapTextureCache { @@ -22,6 +23,15 @@ protected: /* 0028 */ bool m_alpha; }; +// INLINED +inline void BitmapTextureCache::Clear() { + for (CTexture* texture : this->m_textures) { + delete texture; + } + + this->m_textures.clear(); +} + #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(BitmapTextureCache) == 12); #endif