From ea26ae98666372ce200cb56018cb205d4cb73f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 24 Apr 2017 21:46:58 +0200 Subject: [PATCH] Explicitly initialise globals in entrance.cpp --- src/openrct2/windows/map.c | 4 ++-- src/openrct2/world/entrance.cpp | 11 +++++------ src/openrct2/world/entrance.h | 3 +-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/openrct2/windows/map.c b/src/openrct2/windows/map.c index e47dfc47b6..88f48f6989 100644 --- a/src/openrct2/windows/map.c +++ b/src/openrct2/windows/map.c @@ -1,4 +1,4 @@ -#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers /***************************************************************************** * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. * @@ -1270,7 +1270,7 @@ static void window_map_place_park_entrance_tool_update(sint32 x, sint32 y) } park_entrance_remove_ghost(); - gParkEntranceGhostPrice = park_entrance_place_ghost(mapX, mapY, mapZ, direction); + park_entrance_place_ghost(mapX, mapY, mapZ, direction); } /** diff --git a/src/openrct2/world/entrance.cpp b/src/openrct2/world/entrance.cpp index fbfdd079b7..aefa794735 100644 --- a/src/openrct2/world/entrance.cpp +++ b/src/openrct2/world/entrance.cpp @@ -1,4 +1,4 @@ -#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers /***************************************************************************** * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. * @@ -30,10 +30,9 @@ extern "C" #include "../ride/track.h" } -bool gParkEntranceGhostExists; -rct_xyz16 gParkEntranceGhostPosition; -uint8 gParkEntranceGhostDirection; -money32 gParkEntranceGhostPrice; +bool gParkEntranceGhostExists = false; +rct_xyz16 gParkEntranceGhostPosition = { 0, 0, 0 }; +uint8 gParkEntranceGhostDirection = 0; rct_xyzd16 gParkEntrances[MAX_PARK_ENTRANCES]; rct_xyzd16 gRideEntranceExitGhostPosition; @@ -865,4 +864,4 @@ extern "C" return; } while (!map_element_is_last_for_tile(mapElement++)); } -} \ No newline at end of file +} diff --git a/src/openrct2/world/entrance.h b/src/openrct2/world/entrance.h index 5b6029ff06..aceca0676f 100644 --- a/src/openrct2/world/entrance.h +++ b/src/openrct2/world/entrance.h @@ -1,4 +1,4 @@ -#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers /***************************************************************************** * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. * @@ -38,7 +38,6 @@ typedef struct rct_map_element rct_map_element; extern bool gParkEntranceGhostExists; extern rct_xyz16 gParkEntranceGhostPosition; extern uint8 gParkEntranceGhostDirection; -extern money32 gParkEntranceGhostPrice; #define MAX_PARK_ENTRANCES 4