From 87667b78d416e16d1586b2d51302153a4f82ff9f Mon Sep 17 00:00:00 2001 From: Tom van der Kleij Date: Sat, 6 Sep 2014 09:11:04 +0200 Subject: [PATCH] Implemented suggestions from comments on pull request --- src/sprite.c | 4 ++-- src/sprite.h | 2 +- src/staff.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sprite.c b/src/sprite.c index c7836cda65..45e3989038 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -112,7 +112,7 @@ void reset_0x69EBE4(){ */ rct_sprite *create_sprite(uint8 bl) { - int linkedListTypeOffset = SPRITE_LINKEDLIST_OFFSET_FLOATING_UNKNOWN; // cl + enum SPRITE_LINKEDLIST_OFFSET linkedListTypeOffset = SPRITE_LINKEDLIST_OFFSET_FLOATING_UNKNOWN; // cl if ((bl & 2) != 0) { @@ -132,7 +132,7 @@ rct_sprite *create_sprite(uint8 bl) rct_unk_sprite *sprite = &(g_sprite_list[RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_NEXT_INDEX, uint16)]).unknown; - move_sprite_to_list((rct_sprite *)sprite, linkedListTypeOffset); + move_sprite_to_list((rct_sprite *)sprite, (uint8)linkedListTypeOffset); sprite->x = SPRITE_LOCATION_NULL; sprite->y = SPRITE_LOCATION_NULL; diff --git a/src/sprite.h b/src/sprite.h index 3bd33e641b..957e97360c 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -36,7 +36,7 @@ enum SPRITE_IDENTIFIER{ SPRITE_IDENTIFIER_LITTER = 3, }; -enum { +enum SPRITE_LINKEDLIST_OFFSET { SPRITE_LINKEDLIST_OFFSET_VEHICLE = 2, SPRITE_LINKEDLIST_OFFSET_PEEP = 4, SPRITE_LINKEDLIST_OFFSET_FLOATING_TEXT = 6, diff --git a/src/staff.c b/src/staff.c index 099148b4a2..65290986a9 100644 --- a/src/staff.c +++ b/src/staff.c @@ -127,7 +127,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx, RCT2_CALLPROC_X(0x0069EDB6, 0, 0, _ecx, 0, (int)newPeep, 0, 0); } else { - move_sprite_to_list(newPeep, 4); + move_sprite_to_list(newPeep, SPRITE_LINKEDLIST_OFFSET_PEEP); newPeep->sprite_identifier = 1; newPeep->var_09 = 0x0F;