From 87763d133fadac8270dab0cba3d964a47b5b0dd2 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 14 Jan 2019 20:57:44 +0100 Subject: bites to bits --- src/trainer_hill.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 7796d25bf..7ec6865fd 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -62,9 +62,9 @@ struct TrHillFloor struct TrainerHillTrainer trainers[2]; u8 data[0x100]; u16 unk3A0[16]; - u8 coords[2]; // x first 4 bits, y last 4 bites - u8 direction; // array of 4 bites for each trainer - u8 range; // array of 4 bites for each trainer + u8 coords[2]; // x first 4 bits, y last 4 bits + u8 direction; // array of 4 bits for each trainer + u8 range; // array of 4 bits for each trainer }; struct TrHillTag @@ -865,7 +865,7 @@ const struct WarpEvent* sub_81D6134(u8 warpEventId) return &gMapHeader.events->warps[1]; id = sub_81D6490(); - if ((u8)(id - 1) >= 4) + if (id == 0 || id >= 5) id = 4; header = Overworld_GetMapHeaderByGroupAndId(MAP_GROUP(TRAINER_HILL_4F), gUnknown_0862A688[id - 1]); @@ -928,7 +928,7 @@ static void sub_81D62CC(u16 trainerId, u8 firstMonId) u8 trId, level; s32 i, floorId, arrId; - if ((u16)(trainerId - 1) > 1) + if (trainerId == 0 || trainerId > 2) return; trId = trainerId - 1; -- cgit v1.2.3