rodecomp/Source/Resource/GifResource.h
ragnarok-clanker 327967cc1e Decompile fn_07870 (CGifRes::DecodeGif)
Batch #12438 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_07870 CGifRes::DecodeGif: logic confirmed by peer review

Peer-reviewed-by: KWDev, SapitoSucio, dori, cremane
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-05 15:15:26 +00:00

37 lines
1.1 KiB
C++

#ifndef RAGNAROK_SOURCE_RESOURCE_GIFRESOURCE_H
#define RAGNAROK_SOURCE_RESOURCE_GIFRESOURCE_H
#include "Resource/Bitmap/BitmapResource.h"
#include <cstdint>
#include <utility>
#include <vector>
#include <windows.h>
class CGifRes : public CBitmapRes {
public:
using Frame = std::pair<std::uint16_t, std::uint32_t*>;
CGifRes();
~CGifRes() override;
void Slot02() override;
bool IsTransient() override;
CGifRes* Create() override;
bool Load(const char* name) override;
void Unload() override;
bool Decode(const char* name, const void* data, int bytes, bool iconOnly) override;
void CreateBlank(int width, int height);
bool DecodeGif(const void* data, int bytes, bool iconOnly);
int DecodeGifLzw(int minimumCodeSize, const unsigned char* input, int inputBytes, unsigned char* output);
/* 0124 */ std::vector<Frame> frames;
/* 0130 */ std::uint16_t loopCount;
/* 0132 */ std::uint16_t unknown_0132;
/* 0134 */ std::uint16_t currentFrame;
/* 0138 */ DWORD lastFrameTime;
/* 013C */ bool animated;
/* 013D */ bool frameChanged;
};
#endif