Merge pull request #1990 from AsparagusEduardo/BE_debugArrows

Improved battle debug number value changing
This commit is contained in:
ultima-soul 2021-12-17 09:21:04 -08:00 committed by GitHub
commit 84ce9745d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1811,14 +1811,42 @@ static bool32 TryMoveDigit(struct BattleDebugModifyArrows *modArrows, bool32 mov
if (moveUp)
{
if (charDigits[modArrows->currentDigit] == CHAR_9)
{
charDigits[modArrows->currentDigit] = CHAR_0;
for (i = modArrows->currentDigit - 1; i >= 0; i--)
{
if (charDigits[i] == CHAR_9)
{
charDigits[i] = CHAR_0;
}
else
{
charDigits[i]++;
break;
}
}
}
else
charDigits[modArrows->currentDigit]++;
}
else
{
if (charDigits[modArrows->currentDigit] == CHAR_0)
{
charDigits[modArrows->currentDigit] = CHAR_9;
for (i = modArrows->currentDigit - 1; i >= 0; i--)
{
if (charDigits[i] == CHAR_0)
{
charDigits[i] = CHAR_9;
}
else
{
charDigits[i]--;
break;
}
}
}
else
charDigits[modArrows->currentDigit]--;
}