Decompile fn_02081 (CRenderer::DrawBattleFieldIcon)

Batch #10708 by Toshiro: 0 byte-identical, 1 confirmed by peer review.

- fn_02081 CRenderer::DrawBattleFieldIcon: logic confirmed by peer review

Peer-reviewed-by: Tanke, cremane, StrawberrysherbetIX
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-04 16:54:04 +00:00
commit 05fc11d35d

View file

@ -73,22 +73,40 @@ void CRenderer::DrawBattleFieldIcon(CRenderSystemBase& system) {
int count = (score > 9) + 1;
digits[0] = score % 10;
digits[1] = score / 10 % 10;
int x = this->viewport.width - (width > 1 ? 175 : 207);
for (int i = 0; i < count; ++i) {
g_modeMgr.GetGameMode();
DrawActionSprite(system, x, 50, action, sprite, digits[i], 0, 1.0f, 0.0f, 0xFFFFFFFF, 0x201);
x -= 32;
if (width < 2) {
int x = this->viewport.width - 207;
for (int i = 0; i < count; ++i) {
g_modeMgr.GetGameMode();
DrawActionSprite(system, x, 50, action, sprite, digits[i], 0, 1.0f, 0.0f, 0xFFFFFFFF, 0x201);
x -= 32;
}
} else {
int x = this->viewport.width - 175;
for (int i = 0; i < count; ++i) {
g_modeMgr.GetGameMode();
DrawActionSprite(system, x, 50, action, sprite, digits[i], 0, 1.0f, 0.0f, 0xFFFFFFFF, 0x201);
x -= 32;
}
}
score = g_session.m_score2 < 0 ? 0 : g_session.m_score2;
count = (score > 9) + 1;
digits[0] = score % 10;
digits[1] = score / 10 % 10;
x = this->viewport.width - (width > 1 ? 175 : 207);
for (int i = 0; i < count; ++i) {
g_modeMgr.GetGameMode();
DrawActionSprite(system, x, 108, action, sprite, digits[i], 0, 1.0f, 0.0f, 0xFFFFFFFF, 0x201);
x -= 32;
if (width > 1) {
int x = this->viewport.width - 175;
for (int i = 0; i < count; ++i) {
g_modeMgr.GetGameMode();
DrawActionSprite(system, x, 108, action, sprite, digits[i], 0, 1.0f, 0.0f, 0xFFFFFFFF, 0x201);
x -= 32;
}
} else {
int x = this->viewport.width - 207;
for (int i = 0; i < count; ++i) {
g_modeMgr.GetGameMode();
DrawActionSprite(system, x, 108, action, sprite, digits[i], 0, 1.0f, 0.0f, 0xFFFFFFFF, 0x201);
x -= 32;
}
}
}