Batch #1826 by Yommy: 3 byte-identical, 0 confirmed by peer review. - fn_07882 CEmblemRes::Unload: byte-identical - fn_07883 CEmblemRes::Slot02: byte-identical - fn_07884 CEmblemRes::IsTransient: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Resource/EmblemResource.cpp
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#ifndef RAGNAROK_SOURCE_RESOURCE_BITMAP_BITMAPRESOURCE_H
|
|
#define RAGNAROK_SOURCE_RESOURCE_BITMAP_BITMAPRESOURCE_H
|
|
|
|
#include "Resource/Bitmap/BitmapImage.h"
|
|
#include "Resource/Resource.h"
|
|
|
|
#include <cstddef>
|
|
|
|
class IJL15Runtime;
|
|
|
|
class ResourceBytes {
|
|
public:
|
|
virtual bool Open(const char* name) = 0;
|
|
virtual const void* Data() const = 0;
|
|
virtual int Size() const = 0;
|
|
virtual void Close() = 0;
|
|
|
|
protected:
|
|
~ResourceBytes() = default;
|
|
};
|
|
|
|
struct BitmapResourceContext {
|
|
ResourceBytes& file;
|
|
IJL15Runtime& jpeg;
|
|
CRenderSystemBase* renderSystem;
|
|
};
|
|
|
|
class CBitmapRes : public CRes {
|
|
public:
|
|
explicit CBitmapRes(BitmapResourceContext& context);
|
|
~CBitmapRes() override;
|
|
CBitmapRes* Create() override;
|
|
bool Load(const char* name) override;
|
|
void Unload() override;
|
|
virtual bool Decode(const char* name, const void* data, int bytes, bool iconOnly);
|
|
// INLINED
|
|
BitmapResourceContext& Context() const {
|
|
return *this->m_context;
|
|
}
|
|
|
|
/* 0110 */ BitmapImage image;
|
|
|
|
protected:
|
|
BitmapResourceContext* m_context;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CBitmapRes) == 296);
|
|
static_assert(offsetof(CBitmapRes, image) == 0x0110);
|
|
#endif
|
|
|
|
#endif
|