Merge pull request #1910 from GriffinRichards/misc-constants
Use miscellaneous missing constants
This commit is contained in:
@@ -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++); // ?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user