rodecomp/Source/Resource/Bitmap/BitmapResource.h
ragnarok-clanker aa8d6d2427 Decompile 8 functions in Source/Resource/GifResource.cpp, Source/Resource/GifResource.h, ...
Batch #1132 by eAthena: 0 byte-identical, 8 confirmed by peer review.

- fn_07852 CGifRes::Create: logic confirmed by peer review
- fn_07853 CGifRes::Load: logic confirmed by peer review
- fn_07854 CGifRes::Decode: logic confirmed by peer review
- fn_07855 CGifRes::Unload: logic confirmed by peer review
- fn_07856 CGifRes::Slot02: logic confirmed by peer review
- fn_07857 CGifRes::IsTransient: logic confirmed by peer review
- fn_07865 CGifRes::CreateBlank: logic confirmed by peer review
- fn_07870 CGifRes::DecodeGif: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker
Reviewed-by: ragnarok-clanker
Adds to the build: Source/Resource/GifResource.cpp
2026-10-27 21:05:50 +00:00

48 lines
1.1 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);
/* 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