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).
39 lines
903 B
C++
39 lines
903 B
C++
#ifndef RAGNAROK_SOURCE_RENDER_TEXTURES_BITMAPTEXTURECACHE_H
|
|
#define RAGNAROK_SOURCE_RENDER_TEXTURES_BITMAPTEXTURECACHE_H
|
|
|
|
#include "Render/Textures/Texture.h"
|
|
|
|
#include <cstdint>
|
|
#include <list>
|
|
|
|
struct BitmapPixels;
|
|
class CRenderSystemBase;
|
|
|
|
class BitmapTextureCache {
|
|
public:
|
|
BitmapTextureCache();
|
|
~BitmapTextureCache();
|
|
void Clear();
|
|
void Update(BitmapPixels& bitmap, CRenderSystemBase& system);
|
|
void Draw(BitmapPixels& bitmap, CRenderSystemBase& system, int x, int y, int width, int height, std::uint32_t color);
|
|
|
|
protected:
|
|
friend class CDCBitmap;
|
|
/* 0020 */ std::list<CTexture*> m_textures;
|
|
/* 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
|
|
|
|
#endif
|