Misc missing constant use

This commit is contained in:
GriffinR
2023-08-10 01:21:38 -04:00
parent da238562f0
commit 18319e8da3
22 changed files with 254 additions and 218 deletions

View File

@@ -7812,9 +7812,18 @@ static void Cmd_metronome(void)
{
s32 i;
#if MOVES_COUNT < 512
// Original GF method of move selection is to pick a random
// number between 1-511. 355-511 are not valid moves, so if it
// picks in this range it retries. If MOVES_COUNT exceeds 511 we
// instead use a simpler solution.
gCurrentMove = (Random() & 0x1FF) + 1;
if (gCurrentMove >= MOVES_COUNT)
continue;
#else
// Just pick a valid move value (between 1 and MOVES_COUNT-1)
gCurrentMove = (Random() % (MOVES_COUNT - 1)) + 1;
#endif
for (i = 0; i < MAX_MON_MOVES; i++); // ?