Merge pull request #1659 from cbt6/step-functions

Use ARRAY_COUNT in sStepTimes for step functions
This commit is contained in:
GriffinR 2022-05-15 10:19:06 -04:00 committed by GitHub
commit 8a921bb680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8251,11 +8251,11 @@ static const SpriteStepFunc *const sNpcStepFuncTables[] = {
};
static const s16 sStepTimes[] = {
[MOVE_SPEED_NORMAL] = 16,
[MOVE_SPEED_FAST_1] = 8,
[MOVE_SPEED_FAST_2] = 6,
[MOVE_SPEED_FASTER] = 4,
[MOVE_SPEED_FASTEST] = 2,
[MOVE_SPEED_NORMAL] = ARRAY_COUNT(sStep1Funcs),
[MOVE_SPEED_FAST_1] = ARRAY_COUNT(sStep2Funcs),
[MOVE_SPEED_FAST_2] = ARRAY_COUNT(sStep3Funcs),
[MOVE_SPEED_FASTER] = ARRAY_COUNT(sStep4Funcs),
[MOVE_SPEED_FASTEST] = ARRAY_COUNT(sStep8Funcs),
};
static bool8 NpcTakeStep(struct Sprite *sprite)