From 49affa9c751d0d2bae86be1d7d46f39ff1c805e5 Mon Sep 17 00:00:00 2001 From: Maciek Baron Date: Sat, 3 May 2014 16:04:14 +0100 Subject: [PATCH] Adding enum with trigger flags for peeps --- src/park.c | 2 +- src/peep.h | 31 ++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/park.c b/src/park.c index 7a80e0356d..d6aa967b2e 100644 --- a/src/park.c +++ b/src/park.c @@ -110,7 +110,7 @@ int calculate_park_rating() continue; if (peep->happiness > 128) num_happy_peeps++; - if (!(peep->var_C8 & 0x01)) + if (!(peep->flags & PEEP_FLAGS_LEAVING_PARK)) continue; if (peep->var_C6 <= 89) _bp++; diff --git a/src/peep.h b/src/peep.h index 67c1d65654..1ed4423fe0 100644 --- a/src/peep.h +++ b/src/peep.h @@ -37,10 +37,6 @@ enum STAFF_TYPE { STAFF_TYPE_ENTERTAINER }; -enum { - PEEP_FLAGS_TRACKING = 8 -}; - enum PEEP_THOUGHT_TYPE { PEEP_THOUGHT_TYPE_NONE = 255 }; @@ -71,6 +67,31 @@ enum PEEP_STATE { PEEP_STATE_INSPECTING = 23 }; +enum PEEP_FLAGS { + PEEP_FLAGS_LEAVING_PARK = 1, + PEEP_FLAGS_SLOW_WALK = (1 << 1), + PEEP_FLAGS_TRACKING = (1 << 3), + PEEP_FLAGS_WAVING = (1 << 4), // Makes the peep wave + + PEEP_FLAGS_PHOTO = (1 << 6), // Makes the peep take a picture + PEEP_FLAGS_PAINTING = (1 << 7), + + PEEP_FLAGS_LITTER = (1 << 9), // Makes the peep throw litter + PEEP_FLAGS_LOST = (1 << 10), // Makes the peep feel lost (animation trigerred) + PEEP_FLAGS_HUNGER = (1 << 11), // Makes the peep become hungry quicker + PEEP_FLAGS_BATHROOM = (1 << 12), // Makes the peep want to go to the bathroom + PEEP_FLAGS_CROWDED = (1 << 13), // The peep will start feeling crowded + + PEEP_FLAGS_NAUSEA = (1 << 15), // Makes the peep feel sick (e.g. after an extreme ride) + + PEEP_FLAGS_EATING = (1 << 17), // Reduces hunger + PEEP_FLAGS_EXPLODE = (1 << 18), + + PEEP_FLAGS_JOY = (1 << 23), // Makes the peep jump in joy + PEEP_FLAGS_ANGRY = (1 << 24), + PEEP_FLAGS_ICE_CREAM = (1 << 25) // Unconfirmed +}; + typedef struct { uint8 type; uint8 item; @@ -132,7 +153,7 @@ typedef struct { uint16 pad_C4; uint8 var_C6; uint8 pad_C7; - uint32 var_C8; // Bit 25 Ice Cream, Bit 24 mad, Bit 3 tracking, Bit 0 leaving the park + uint32 flags; // 0xC8 uint8 var_CC; uint8 pad_CD[0x17]; uint16 paid_to_enter; // 0xE4