rodecomp/Source/Client/ModeFade.cpp
ragnarok-clanker 0e99481335 Decompile 6 functions in Source/Client/ModeFade.cpp, Source/Client/ModeFadeOut.cpp, ...
Batch #13893 by eAthena: 4 byte-identical, 2 confirmed by peer review.

- fn_09334 UIBroadcastBalloon::Slot43: byte-identical
- fn_12091 UIWhisperWnd::Slot43: byte-identical
- fn_12591 UIRoMapWnd::DrawRecordAreas: byte-identical
- fn_12592 UINewChatWnd::Slot43: logic confirmed by peer review
- fn_12593 UISubChatHisWnd::Slot43: byte-identical
- fn_12604 UIRoMapWnd::DrawRecordFaces: logic confirmed by peer review

Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-06 23:24:54 +00:00

26 lines
690 B
C++

#include "Client/ModeFade.h"
#include "Client/Mode/CMode.h"
#include "Contents/Sound/SoundMgr.h"
#include "Render/Primitives/AlphaRectangle.h"
#include "Render/Renderer.h"
#include "Render/TextureQuad.h"
#include <timeapi.h>
// GLOBAL: gl_24680
std::uint32_t g_modeFadeTick = 0;
// OFFSET: 0x00AD6740
// FUNCTION: fn_17842
void CMode::DrawFadeIn() {
if (this->fadeInRequested != 0) {
g_modeFadeTick = timeGetTime();
g_soundMgr->FadeIn();
this->fadeInRequested = 0;
}
const std::uint32_t elapsed = timeGetTime() - g_modeFadeTick;
if (elapsed < 255) {
DrawAlphaRectangle(0, 0, g_renderer->viewport.width, g_renderer->viewport.height, (255 - elapsed) << 24);
}
}