Batch #10229 by ragnarok-clanker: forced by an admin (4 lower score(s), 45 changed function(s)); checked with 314 compiled unit(s), including every includer of Source/Resource/Bitmap/BitmapImage.h, Source/Resource/Bitmap/BitmapResource.h, Source/Resource/Bitmap/IJL15Runtime.h, Source/Resource/EmblemResource.h, Source/Resource/GifResource.h, Source/Resource/Models/AnimatedModelResource.h, Source/Resource/Models/GrannyModelResource.h, Source/Resource/Models/ModelResource.h, Source/Resource/Sprites/ActionResource.h, Source/Resource/Sprites/SpriteResource.h, Source/UI/Buttons/UIBmpRadioBtn.h.
36 lines
968 B
C++
36 lines
968 B
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);
|
|
|
|
/* 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
|