From 44021fdb0a710bb73a480bfb748b9ed34453adca Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 13 May 2016 12:20:36 +0100 Subject: [PATCH] Rename flag --- src/object.c | 2 +- src/paint/map_element/fence.c | 4 ++-- src/windows/scenery.c | 2 +- src/world/map.c | 2 +- src/world/scenery.h | 6 +++++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/object.c b/src/object.c index 5303610926..05c1b6084f 100644 --- a/src/object.c +++ b/src/object.c @@ -1116,7 +1116,7 @@ static void object_type_wall_paint(void *objectEntry, rct_drawpixelinfo *dpi, si if (sceneryEntry->wall.flags & WALL_SCENERY_FLAG2){ imageId = sceneryEntry->image + 0x44500006; gfx_draw_sprite(&clipDPI, imageId, x, y, 0); - } else if (sceneryEntry->wall.flags & WALL_SCENERY_FLAG5){ + } else if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOOR){ imageId++; gfx_draw_sprite(&clipDPI, imageId, x, y, 0); } diff --git a/src/paint/map_element/fence.c b/src/paint/map_element/fence.c index 6cb3edfee4..20248f458f 100644 --- a/src/paint/map_element/fence.c +++ b/src/paint/map_element/fence.c @@ -143,7 +143,7 @@ void fence_paint(uint8 direction, int height, rct_map_element * map_element) rct_scenery_entry * sceneryEntry = g_wallSceneryEntries[map_element->properties.fence.type]; uint32 frameNum = 0; - if (sceneryEntry->wall.flags2 & WALL_SCENERY_FLAG5) { + if (sceneryEntry->wall.flags2 & WALL_SCENERY_2_FLAG_5) { // animation? frameNum = (gCurrentTicks & 7) * 2; } @@ -186,7 +186,7 @@ void fence_paint(uint8 direction, int height, rct_map_element * map_element) uint8 ah = sceneryEntry->wall.height * 8 - 2; - if (sceneryEntry->wall.flags & WALL_SCENERY_FLAG5) { + if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOOR) { rct_xyz16 offset, boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_; uint32 ebx = (map_element->properties.fence.item[2] >> 3) & 0x1F; switch (direction) { diff --git a/src/windows/scenery.c b/src/windows/scenery.c index a92ae6215d..dcc3b93c81 100644 --- a/src/windows/scenery.c +++ b/src/windows/scenery.c @@ -1169,7 +1169,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrol gfx_draw_sprite(&clipdpi, imageId, 0x2F, (sceneryEntry->wall.height * 2) + 0x32, tertiaryColour); - if (sceneryEntry->wall.flags & WALL_SCENERY_FLAG5){ + if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOOR){ gfx_draw_sprite(&clipdpi, imageId + 1, 0x2F, (sceneryEntry->wall.height * 2) + 0x32, tertiaryColour); } diff --git a/src/world/map.c b/src/world/map.c index 965ca56c71..0ffad0af77 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -3130,7 +3130,7 @@ static bool map_place_fence_check_obstruction_with_track(rct_scenery_entry *wall } } - if (!(wall->wall.flags & WALL_SCENERY_FLAG5)) { + if (!(wall->wall.flags & WALL_SCENERY_IS_DOOR)) { return false; } diff --git a/src/world/scenery.h b/src/world/scenery.h index 5a51b86347..06b750ba0a 100644 --- a/src/world/scenery.h +++ b/src/world/scenery.h @@ -97,12 +97,16 @@ typedef enum { WALL_SCENERY_FLAG2 = (1 << 1), // 0x2 WALL_SCENERY_FLAG3 = (1 << 2), // 0x4 WALL_SCENERY_FLAG4 = (1 << 3), // 0x8 // Probably indicates translucency - WALL_SCENERY_FLAG5 = (1 << 4), // 0x10 + WALL_SCENERY_IS_DOOR = (1 << 4), // 0x10 WALL_SCENERY_FLAG6 = (1 << 5), // 0x20 WALL_SCENERY_HAS_SECONDARY_COLOUR = (1 << 6), // 0x40 WALL_SCENERY_HAS_TERNARY_COLOUR = (1 << 7), // 0x80 } WALL_SCENERY_FLAGS; +typedef enum { + WALL_SCENERY_2_FLAG_5 = (1 << 4), // 0x10 +} WALL_SCENERY_2_FLAGS; + typedef struct rct_path_bit_scenery_entry { uint16 var_06; uint8 pad_08;