Decompile fn_07856 (CGifRes::Slot02)
Batch #14562 by Yommy: 1 byte-identical, 0 confirmed by peer review. - fn_07856 CGifRes::Slot02: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
70b8dbbc85
commit
9b24ae0fcd
2 changed files with 17 additions and 14 deletions
|
|
@ -153,30 +153,32 @@ void CGifRes::Unload() {
|
|||
this->image.auxiliary = nullptr;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00749D20
|
||||
// FUNCTION: fn_07856
|
||||
void CGifRes::Slot02() {
|
||||
// INLINED
|
||||
bool CGifRes::AdvanceFrame() {
|
||||
const std::size_t count = this->frames.size();
|
||||
if (count <= 1) {
|
||||
this->frameChanged = false;
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->currentFrame >= count) {
|
||||
this->frameChanged = false;
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
const DWORD now = timeGetTime();
|
||||
if (now < this->lastFrameTime + 10 * this->frames[this->currentFrame].first) {
|
||||
this->frameChanged = false;
|
||||
return;
|
||||
if (now >= this->lastFrameTime + 10 * this->frames[this->currentFrame].first) {
|
||||
this->lastFrameTime = now;
|
||||
this->currentFrame = this->currentFrame + 1 < this->frames.size() ? this->currentFrame + 1 : 0;
|
||||
this->image.pixels = this->frames[this->currentFrame].second;
|
||||
return true;
|
||||
}
|
||||
|
||||
this->lastFrameTime = now;
|
||||
this->currentFrame = this->currentFrame + 1 < this->frames.size() ? this->currentFrame + 1 : 0;
|
||||
this->image.pixels = this->frames[this->currentFrame].second;
|
||||
this->frameChanged = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00749D20
|
||||
// FUNCTION: fn_07856
|
||||
void CGifRes::Slot02() {
|
||||
this->frameChanged = this->AdvanceFrame();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00749DD0
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public:
|
|||
|
||||
void CreateBlank(int width, int height);
|
||||
bool DecodeGif(const void* data, int bytes, bool iconOnly);
|
||||
bool AdvanceFrame();
|
||||
|
||||
/* 0124 */ std::vector<Frame> frames;
|
||||
/* 0130 */ std::uint16_t loopCount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue