From 4db876c184786b684d20eefa81feeb780d1ac937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 17 Jul 2016 18:47:22 +0200 Subject: [PATCH] Add missing data to SpriteTypeToSlowWalkMap * Add missing data to SpriteTypeToSlowWalkMap --- src/peep/peep.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/peep/peep.c b/src/peep/peep.c index cbefb4527a..4d20571b77 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -332,8 +332,13 @@ static uint8 unk_981D8F[] = { 34, 35, 36, 0, 0 }; -static uint8 unk_982134[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, +static const bool SpriteTypeToSlowWalkMap[] = { + false, false, false, false, false, false, false, false, + false, false, false, true, false, false, true, true, + true, true, true, false, true, false, true, true, + true, false, false, true, true, false, false, true, + true, true, true, true, true, true, false, true, + false, true, true, true, true, true, true, true, }; // These arrays contain the base minimum and maximum nausea ratings for peeps, based on their nausea tolerance level. @@ -590,7 +595,7 @@ static void sub_68F41A(rct_peep *peep, int index) peep->action = PEEP_ACTION_NONE_2; peep->peep_flags &= ~PEEP_FLAGS_SLOW_WALK; - if (unk_982134[sprite_type] & 1) { + if (SpriteTypeToSlowWalkMap[sprite_type]) { peep->peep_flags |= PEEP_FLAGS_SLOW_WALK; } @@ -1291,7 +1296,8 @@ static void set_sprite_type(rct_peep* peep, uint8 type){ peep->action = PEEP_ACTION_NONE_2; peep->peep_flags &= ~PEEP_FLAGS_SLOW_WALK; - if (unk_982134[type] & 1) { + assert(type < countof(SpriteTypeToSlowWalkMap)); + if (SpriteTypeToSlowWalkMap[type]) { peep->peep_flags |= PEEP_FLAGS_SLOW_WALK; }