From fca863244b9097c79dba14154eaeb3719c91bfbe Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 23:07:05 +0800 Subject: Index sStepTimes and sNpcStepFuncTables --- src/event_object_movement.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 6c84f0eba..593200893 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -8349,15 +8349,19 @@ static const SpriteStepFunc sStep8Funcs[] = { }; static const SpriteStepFunc *const sNpcStepFuncTables[] = { - sStep1Funcs, - sStep2Funcs, - sStep3Funcs, - sStep4Funcs, - sStep8Funcs, + [MOVE_SPEED_NORMAL] = sStep1Funcs, + [MOVE_SPEED_FAST_1] = sStep2Funcs, + [MOVE_SPEED_FAST_2] = sStep3Funcs, + [MOVE_SPEED_FASTER] = sStep4Funcs, + [MOVE_SPEED_FASTEST] = sStep8Funcs, }; static const s16 sStepTimes[] = { - 16, 8, 6, 4, 2 + [MOVE_SPEED_NORMAL] = 16, + [MOVE_SPEED_FAST_1] = 8, + [MOVE_SPEED_FAST_2] = 6, + [MOVE_SPEED_FASTER] = 4, + [MOVE_SPEED_FASTEST] = 2, }; static bool8 NpcTakeStep(struct Sprite *sprite) -- cgit v1.2.3