Maintenance: [forced, admin decision] Resubmission of returned batch 10026 rebased on c246e79d: also renames the CMode+0x10 write in

Batch #10033 by ragnarok-clanker: forced by an admin (0 lower score(s), 6 changed function(s)); checked with 479 compiled unit(s), including every includer of Source/Client/Application/ApplicationMessages.h, Source/Client/Application/Launcher.h, Source/Client/Mode/CMode.h, Source/Client/ModeFade.h, Source/UI/Window/UIWindowMgr.h.
This commit is contained in:
ragnarok-clanker 2026-11-02 14:34:46 +00:00
commit 30cdd441a1
12 changed files with 43 additions and 71 deletions

View file

@ -1,6 +1,9 @@
#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>
@ -9,18 +12,18 @@ std::uint32_t g_modeFadeTick = 0;
// OFFSET: 0x00AD6740
// FUNCTION: fn_17842
void ModeFade::Draw() {
if (this->requested != 0) {
void CMode::DrawFadeIn() {
if (this->fadeInRequested != 0) {
g_modeFadeTick = timeGetTime();
g_soundMgr->FadeIn();
this->requested = 0;
this->fadeInRequested = 0;
}
const std::uint32_t elapsed = timeGetTime() - g_modeFadeTick;
if (elapsed < 255) {
DrawAlphaRectangle(
this->primitives, this->queues, 0, 0, this->screenWidth, this->screenHeight, (255 - elapsed) << 24, this->depthAlpha, this->depthStart,
this->depthEnd
g_renderer->primitives, g_renderer->queues, 0, 0, g_renderer->viewport.width, g_renderer->viewport.height, (255 - elapsed) << 24,
g_renderer->fog.supported != 0, g_depthStart, g_depthEnd
);
}
}