Compile map.c as C++

This commit is contained in:
Michael Steenbeek 2018-01-03 14:56:08 +01:00
parent 3ab3003e7b
commit 91589f57c6
104 changed files with 196 additions and 189 deletions

View File

@ -43,10 +43,9 @@
4C6A66B61FE278C900694CB6 /* Painter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6A66B01FE278C900694CB6 /* Painter.cpp */; };
4C6A66B71FE278C900694CB6 /* PaintHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6A66B21FE278C900694CB6 /* PaintHelpers.cpp */; };
4C6A66B81FE278C900694CB6 /* Supports.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6A66B31FE278C900694CB6 /* Supports.cpp */; };
4C6A66BC1FED04EE00694CB6 /* SSE41Drawing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6A66BB1FED04EE00694CB6 /* SSE41Drawing.cpp */; settings = {COMPILER_FLAGS = "-msse4.1"; }; };
4C6A66C11FF9322A00694CB6 /* music_list.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C6A66BD1FF9322A00694CB6 /* music_list.c */; };
4C6A66C21FF9322A00694CB6 /* Ride.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6A66BF1FF9322A00694CB6 /* Ride.cpp */; };
4C6A66BC1FED04EE00694CB6 /* SSE41Drawing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6A66BB1FED04EE00694CB6 /* SSE41Drawing.cpp */; };
4C6A66BC1FED04EE00694CB6 /* SSE41Drawing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6A66BB1FED04EE00694CB6 /* SSE41Drawing.cpp */; settings = {COMPILER_FLAGS = "-msse4.1"; }; };
4C6AC20F1F9E1693004324AA /* Station.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6AC20D1F9E1693004324AA /* Station.cpp */; };
4C6AC2121F9E1CB3004324AA /* CableLift.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6AC2101F9E1CB3004324AA /* CableLift.cpp */; };
4C729BC01FC2E1BE001DFF2F /* LargeScenery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C729BBE1FC2E1BE001DFF2F /* LargeScenery.cpp */; };
@ -54,6 +53,7 @@
4C729BC71FC2E6AB001DFF2F /* Particle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C729BC61FC2E6AB001DFF2F /* Particle.cpp */; };
4C729BC91FC2E6E9001DFF2F /* MoneyEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C729BC81FC2E6E9001DFF2F /* MoneyEffect.cpp */; };
4C7B53A51FFC180400A52E21 /* ObjectList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7B53A31FFC180400A52E21 /* ObjectList.cpp */; };
4C7B53A81FFD15B200A52E21 /* Map.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7B53A61FFD15B200A52E21 /* Map.cpp */; };
4C8667821EEFDCDF0024AAB8 /* RideGroupManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C8667801EEFDCDF0024AAB8 /* RideGroupManager.cpp */; };
4C8B42701EEB1ABD00F015CA /* X8DrawingEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C8B426E1EEB1ABD00F015CA /* X8DrawingEngine.cpp */; };
4C8B42721EEB1AE400F015CA /* HardwareDisplayDrawingEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C8B42711EEB1AE400F015CA /* HardwareDisplayDrawingEngine.cpp */; };
@ -445,7 +445,6 @@
F76C879A1EC4E88400FA49E2 /* Entrance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85621EC4E7CD00FA49E2 /* Entrance.cpp */; };
F76C879C1EC4E88400FA49E2 /* footpath.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85641EC4E7CD00FA49E2 /* footpath.c */; };
F76C879E1EC4E88400FA49E2 /* Fountain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85661EC4E7CD00FA49E2 /* Fountain.cpp */; };
F76C87A01EC4E88400FA49E2 /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85681EC4E7CD00FA49E2 /* map.c */; };
F76C87A21EC4E88400FA49E2 /* map_animation.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C856A1EC4E7CD00FA49E2 /* map_animation.c */; };
F76C87A41EC4E88500FA49E2 /* map_helpers.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C856C1EC4E7CD00FA49E2 /* map_helpers.c */; };
F76C87AC1EC4E88500FA49E2 /* scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85741EC4E7CD00FA49E2 /* scenery.c */; };
@ -637,11 +636,11 @@
4C6A66B21FE278C900694CB6 /* PaintHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PaintHelpers.cpp; sourceTree = "<group>"; };
4C6A66B31FE278C900694CB6 /* Supports.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Supports.cpp; sourceTree = "<group>"; };
4C6A66B41FE278C900694CB6 /* Supports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Supports.h; sourceTree = "<group>"; };
4C6A66BB1FED04EE00694CB6 /* SSE41Drawing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SSE41Drawing.cpp; sourceTree = "<group>"; };
4C6A66BD1FF9322A00694CB6 /* music_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = music_list.c; sourceTree = "<group>"; };
4C6A66BE1FF9322A00694CB6 /* music_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = music_list.h; sourceTree = "<group>"; };
4C6A66BF1FF9322A00694CB6 /* Ride.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Ride.cpp; sourceTree = "<group>"; };
4C6A66C01FF9322A00694CB6 /* Ride.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Ride.h; sourceTree = "<group>"; };
4C6A66BB1FED04EE00694CB6 /* SSE41Drawing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SSE41Drawing.cpp; sourceTree = "<group>"; };
4C6AC20D1F9E1693004324AA /* Station.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Station.cpp; sourceTree = "<group>"; };
4C6AC20E1F9E1693004324AA /* Station.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Station.h; sourceTree = "<group>"; };
4C6AC2101F9E1CB3004324AA /* CableLift.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CableLift.cpp; sourceTree = "<group>"; };
@ -657,6 +656,9 @@
4C7B53A21FFC15ED00A52E21 /* ObjectLimits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectLimits.h; sourceTree = "<group>"; };
4C7B53A31FFC180400A52E21 /* ObjectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectList.cpp; sourceTree = "<group>"; };
4C7B53A41FFC180400A52E21 /* ObjectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectList.h; sourceTree = "<group>"; };
4C7B53A61FFD15B200A52E21 /* Map.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Map.cpp; sourceTree = "<group>"; };
4C7B53A71FFD15B200A52E21 /* Map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Map.h; sourceTree = "<group>"; };
4C7B53A91FFD15BB00A52E21 /* Park.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Park.h; sourceTree = "<group>"; };
4C8667801EEFDCDF0024AAB8 /* RideGroupManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RideGroupManager.cpp; sourceTree = "<group>"; };
4C8667811EEFDCDF0024AAB8 /* RideGroupManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RideGroupManager.h; sourceTree = "<group>"; };
4C8B426E1EEB1ABD00F015CA /* X8DrawingEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X8DrawingEngine.cpp; sourceTree = "<group>"; };
@ -1345,8 +1347,6 @@
F76C85651EC4E7CD00FA49E2 /* footpath.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = footpath.h; sourceTree = "<group>"; };
F76C85661EC4E7CD00FA49E2 /* Fountain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Fountain.cpp; sourceTree = "<group>"; };
F76C85671EC4E7CD00FA49E2 /* Fountain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Fountain.h; sourceTree = "<group>"; };
F76C85681EC4E7CD00FA49E2 /* map.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map.c; sourceTree = "<group>"; };
F76C85691EC4E7CD00FA49E2 /* map.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = map.h; sourceTree = "<group>"; };
F76C856A1EC4E7CD00FA49E2 /* map_animation.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map_animation.c; sourceTree = "<group>"; };
F76C856B1EC4E7CD00FA49E2 /* map_animation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = map_animation.h; sourceTree = "<group>"; };
F76C856C1EC4E7CD00FA49E2 /* map_helpers.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map_helpers.c; sourceTree = "<group>"; };
@ -2515,8 +2515,8 @@
4C729BBE1FC2E1BE001DFF2F /* LargeScenery.cpp */,
4C729BBF1FC2E1BE001DFF2F /* LargeScenery.h */,
4C31B2E51FB6116100F6A38A /* Location.h */,
F76C85681EC4E7CD00FA49E2 /* map.c */,
F76C85691EC4E7CD00FA49E2 /* map.h */,
4C7B53A61FFD15B200A52E21 /* Map.cpp */,
4C7B53A71FFD15B200A52E21 /* Map.h */,
F76C856A1EC4E7CD00FA49E2 /* map_animation.c */,
F76C856B1EC4E7CD00FA49E2 /* map_animation.h */,
F76C856C1EC4E7CD00FA49E2 /* map_helpers.c */,
@ -2525,6 +2525,7 @@
4C31B2E31FB6115600F6A38A /* MapGen.h */,
4C729BC81FC2E6E9001DFF2F /* MoneyEffect.cpp */,
F79F42871F2E07E1009E42F8 /* Park.cpp */,
4C7B53A91FFD15BB00A52E21 /* Park.h */,
4C729BC61FC2E6AB001DFF2F /* Particle.cpp */,
F76C85741EC4E7CD00FA49E2 /* scenery.c */,
F76C85751EC4E7CD00FA49E2 /* scenery.h */,
@ -3193,6 +3194,7 @@
4C93F13E1F8B744400A9330D /* CorkscrewRollerCoaster.cpp in Sources */,
C6D2BEE71F9BAACE008B557C /* MapTooltip.cpp in Sources */,
4C93F1401F8B744400A9330D /* GigaCoaster.cpp in Sources */,
4C7B53A81FFD15B200A52E21 /* Map.cpp in Sources */,
C6415B471FA3B3E400AC4926 /* FontFamilies.cpp in Sources */,
4C93F1541F8B744400A9330D /* TwisterRollerCoaster.cpp in Sources */,
4CC4B8E71FE00C4E00660D62 /* Diagnostic.cpp in Sources */,
@ -3502,7 +3504,6 @@
F76C879A1EC4E88400FA49E2 /* Entrance.cpp in Sources */,
F76C879C1EC4E88400FA49E2 /* footpath.c in Sources */,
F76C879E1EC4E88400FA49E2 /* Fountain.cpp in Sources */,
F76C87A01EC4E88400FA49E2 /* map.c in Sources */,
F76C87A21EC4E88400FA49E2 /* map_animation.c in Sources */,
F76C87A41EC4E88500FA49E2 /* map_helpers.c in Sources */,
F76C87AC1EC4E88500FA49E2 /* scenery.c in Sources */,

View File

@ -35,7 +35,7 @@
#include <openrct2/ride/ride_data.h>
#include <openrct2/scenario/Scenario.h>
#include <openrct2/world/Banner.h>
#include <openrct2/world/map.h>
#include <openrct2/world/Map.h>
#include <openrct2/world/scenery.h>
#include <openrct2/world/sprite.h>

View File

@ -15,7 +15,7 @@
#pragma endregion
#include <openrct2-ui/interface/Dropdown.h>
#include <openrct2/world/map.h>
#include <openrct2/world/Map.h>
#include <openrct2-ui/interface/LandTool.h>
#include <openrct2/interface/widget.h>
#include <openrct2/interface/window.h>

View File

@ -26,7 +26,7 @@
#include "util/Util.h"
#include "world/Climate.h"
#include "world/footpath.h"
#include "world/map.h"
#include "world/Map.h"
#include "world/Park.h"
#include "world/scenery.h"
#include "world/sprite.h"

View File

@ -56,7 +56,7 @@
#include "world/Climate.h"
#include "world/Entrance.h"
#include "world/footpath.h"
#include "world/map.h"
#include "world/Map.h"
#include "world/map_animation.h"
#include "world/Park.h"
#include "world/scenery.h"

View File

@ -25,7 +25,7 @@
#include "../Game.h"
#include "../localisation/string_ids.h"
#include "../world/map.h"
#include "../world/Map.h"
/**
* Common error codes for game actions.

View File

@ -20,7 +20,7 @@
#ifdef __ENABLE_LIGHTFX__
#include "../common.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "drawing.h"
enum LIGHTFX_LIGHT_TYPE {

View File

@ -30,7 +30,7 @@
#include "../world/Climate.h"
#include "../world/Entrance.h"
#include "../world/footpath.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/scenery.h"
#include "../world/sprite.h"
#include "colour.h"

View File

@ -17,7 +17,7 @@
#ifndef _VIEWPORT_H_
#define _VIEWPORT_H_
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/sprite.h"
#include "../paint/Paint.h"
#include "window.h"

View File

@ -27,7 +27,7 @@
#include "../windows/Intent.h"
#include "../world/Banner.h"
#include "../world/footpath.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/scenery.h"
#include "../world/LargeScenery.h"
#include "../world/sprite.h"

View File

@ -28,7 +28,7 @@
#include "../localisation/string_ids.h"
#include "../OpenRCT2.h"
#include "../platform/platform.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/sprite.h"
#include "viewport.h"
#include "widget.h"

View File

@ -22,7 +22,7 @@
#include "../common.h"
#include "../peep/Peep.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/sprite.h"
class NetworkPacket;

View File

@ -29,7 +29,7 @@
#include "../peep/Peep.h"
#include "../platform/platform.h"
#include "../util/Util.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/Park.h"
#include "http.h"

View File

@ -17,7 +17,7 @@
#pragma once
#include "../common.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../interface/colour.h"
#include "../drawing/drawing.h"

View File

@ -22,7 +22,7 @@
#include "../../interface/colour.h"
#include "../../interface/viewport.h"
#include "../../ride/Track.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/scenery.h"
#include "../../world/Wall.h"
#include "../Paint.h"

View File

@ -20,7 +20,7 @@
#include "../../interface/viewport.h"
#include "../../localisation/localisation.h"
#include "../../util/Util.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/LargeScenery.h"
#include "../../world/scenery.h"
#include "../Paint.h"

View File

@ -28,7 +28,7 @@
#include "../Supports.h"
#include "TileElement.h"
#include "Surface.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../drawing/lightfx.h"
const uint8 byte_98D800[] = {

View File

@ -21,7 +21,7 @@
#include "../../localisation/date.h"
#include "../Paint.h"
#include "../Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/scenery.h"
#include "../../world/SmallScenery.h"

View File

@ -19,7 +19,7 @@
#include "../../common.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
enum
{

View File

@ -18,7 +18,7 @@
#define _PAINT_TILE_ELEMENT_H
#include "../../common.h"
#include "../../world/map.h"
#include "../../world/Map.h"
typedef struct paint_session paint_session;

View File

@ -42,7 +42,7 @@
#include "../world/Climate.h"
#include "../world/Entrance.h"
#include "../world/footpath.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/LargeScenery.h"
#include "../world/scenery.h"
#include "../world/SmallScenery.h"

View File

@ -18,7 +18,7 @@
#define _PEEP_H_
#include "../common.h"
#include "../world/map.h"
#include "../world/Map.h"
#define PEEP_MAX_THOUGHTS 5

View File

@ -23,7 +23,7 @@
#include "rct12.h"
#include "ride/Ride.h"
#include "world/Banner.h"
#include "world/map.h"
#include "world/Map.h"
#include "world/sprite.h"
#include "world/map_animation.h"

View File

@ -44,7 +44,7 @@
#include "../world/Banner.h"
#include "../world/Climate.h"
#include "../world/footpath.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/map_animation.h"
#include "../world/scenery.h"
#include "../world/sprite.h"

View File

@ -21,7 +21,7 @@
#include "../peep/Peep.h"
#include "../rct12.h"
#include "../rct2.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "ride_ratings.h"
#include "Vehicle.h"

View File

@ -17,7 +17,7 @@
#pragma once
#include "../common.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "Ride.h"
#ifdef __cplusplus

View File

@ -27,7 +27,7 @@
#include "../util/SawyerCoding.h"
#include "../util/Util.h"
#include "../world/footpath.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/map_animation.h"
#include "../world/Park.h"
#include "../world/scenery.h"

View File

@ -21,7 +21,7 @@
#include "../object/Object.h"
#include "../rct12.h"
#include "../rct2.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "Vehicle.h"
#define TRACK_PREVIEW_IMAGE_SIZE (370 * 217)

View File

@ -18,7 +18,7 @@
#define _VEHICLE_H_
#include "../common.h"
#include "../world/map.h"
#include "../world/Map.h"
typedef struct rct_vehicle_colour {
uint8 body_colour;

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -22,7 +22,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -18,7 +18,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../ride_data.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -17,7 +17,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../ride_data.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -19,7 +19,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -19,7 +19,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../ride_data.h"
#include "../TrackData.h"
#include "../track_paint.h"

View File

@ -17,7 +17,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../ride_data.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -18,7 +18,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../Track.h"
#include "../track_paint.h"
#include "../vehicle_paint.h"

View File

@ -18,7 +18,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../Track.h"
#include "../track_paint.h"
#include "../vehicle_paint.h"

View File

@ -19,7 +19,7 @@
#include "../localisation/date.h"
#include "../OpenRCT2.h"
#include "../world/footpath.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "Ride.h"
#include "ride_data.h"
#include "ride_ratings.h"

View File

@ -18,7 +18,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -18,7 +18,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -18,7 +18,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../Track.h"
#include "../track_paint.h"
#include "../vehicle_paint.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -22,7 +22,7 @@
#include "../interface/window.h"
#include "../localisation/localisation.h"
#include "../sprites.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/sprite.h"
#include "ride_data.h"
#include "TrackData.h"

View File

@ -21,7 +21,7 @@
#include "../common.h"
#include "../paint/tile_element/TileElement.h"
#include "../paint/Paint.h"
#include "../world/map.h"
#include "../world/Map.h"
#ifdef __cplusplus
extern "C" {

View File

@ -17,7 +17,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../Ride.h"
#include "../ride_data.h"
#include "../Track.h"

View File

@ -19,7 +19,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../ride_data.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -18,7 +18,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../ride_data.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -20,7 +20,7 @@
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../ride_data.h"
#include "../TrackData.h"

View File

@ -19,7 +19,7 @@
#include "../../interface/viewport.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../world/map.h"
#include "../../world/Map.h"
#include "../../world/sprite.h"
#include "../Track.h"
#include "../track_paint.h"

View File

@ -39,7 +39,7 @@
#include "../util/SawyerCoding.h"
#include "../util/Util.h"
#include "../world/Climate.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/Park.h"
#include "../world/scenery.h"
#include "../world/sprite.h"

View File

@ -26,7 +26,7 @@
#include "../ride/Ride.h"
#include "../ride/ride_ratings.h"
#include "../world/Banner.h"
#include "../world/map.h"
#include "../world/Map.h"
#include "../world/map_animation.h"
#include "../world/sprite.h"

View File

@ -23,7 +23,7 @@
#include "../network/network.h"
#include "Banner.h"
#include "map.h"
#include "Map.h"
#include "Park.h"
#include "scenery.h"
#include "../Game.h"

View File

@ -18,7 +18,7 @@
#define _BANNER_H_
#include "../common.h"
#include "../world/map.h"
#include "Map.h"
#define BANNER_NULL 255
#define MAX_BANNERS 250

View File

@ -19,7 +19,7 @@
#include "Entrance.h"
#include "footpath.h"
#include "map.h"
#include "Map.h"
#include "Park.h"
#include "../Cheats.h"
#include "../Game.h"

View File

@ -19,7 +19,7 @@
#include "../Game.h"
#include "../scenario/Scenario.h"
#include "footpath.h"
#include "map.h"
#include "Map.h"
#include "scenery.h"
#include "sprite.h"

View File

@ -18,7 +18,7 @@
#include "../common.h"
#include "map.h"
#include "Map.h"
#include "sprite.h"
enum

View File

@ -16,7 +16,7 @@
#include "../common.h"
#include "LargeScenery.h"
#include "map.h"
#include "Map.h"
extern "C"
{

View File

@ -17,7 +17,7 @@
#pragma once
#include "../common.h"
#include "map.h"
#include "Map.h"
#ifdef __cplusplus
extern "C" {

View File

@ -18,6 +18,8 @@
#include "../Cheats.h"
#include "../config/Config.h"
#include "../Context.h"
#include "../core/Math.hpp"
#include "../core/Util.hpp"
#include "../Game.h"
#include "../interface/Cursors.h"
#include "../interface/window.h"
@ -36,7 +38,7 @@
#include "Climate.h"
#include "footpath.h"
#include "LargeScenery.h"
#include "map.h"
#include "Map.h"
#include "map_animation.h"
#include "Park.h"
#include "scenery.h"
@ -934,9 +936,9 @@ void game_command_remove_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, si
rct_scenery_entry* scenery_entry = get_large_scenery_entry(scenery_large_get_type(tile_element));
LocationXYZ16 firstTile = {
.x = scenery_entry->large_scenery.tiles[tileIndex].x_offset,
.y = scenery_entry->large_scenery.tiles[tileIndex].y_offset,
.z = (base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset
scenery_entry->large_scenery.tiles[tileIndex].x_offset,
scenery_entry->large_scenery.tiles[tileIndex].y_offset,
static_cast<sint16>((base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset)
};
rotate_map_coordinates(&firstTile.x, &firstTile.y, tile_element_direction);
@ -948,9 +950,9 @@ void game_command_remove_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, si
for (sint32 i = 0; scenery_entry->large_scenery.tiles[i].x_offset != -1; i++){
LocationXYZ16 currentTile = {
.x = scenery_entry->large_scenery.tiles[i].x_offset,
.y = scenery_entry->large_scenery.tiles[i].y_offset,
.z = scenery_entry->large_scenery.tiles[i].z_offset
scenery_entry->large_scenery.tiles[i].x_offset,
scenery_entry->large_scenery.tiles[i].y_offset,
scenery_entry->large_scenery.tiles[i].z_offset
};
rotate_map_coordinates(&currentTile.x, &currentTile.y, tile_element_direction);
@ -1058,9 +1060,9 @@ void game_command_set_large_scenery_colour(sint32* eax, sint32* ebx, sint32* ecx
// Work out the base tile coordinates (Tile with index 0)
LocationXYZ16 baseTile = {
.x = scenery_entry->large_scenery.tiles[tileIndex].x_offset,
.y = scenery_entry->large_scenery.tiles[tileIndex].y_offset,
.z = (base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset
scenery_entry->large_scenery.tiles[tileIndex].x_offset,
scenery_entry->large_scenery.tiles[tileIndex].y_offset,
static_cast<sint16>((base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset)
};
rotate_map_coordinates(&baseTile.x, &baseTile.y, tile_element_direction);
baseTile.x = x - baseTile.x;
@ -1071,9 +1073,9 @@ void game_command_set_large_scenery_colour(sint32* eax, sint32* ebx, sint32* ecx
// Work out the current tile coordinates
LocationXYZ16 currentTile = {
.x = scenery_entry->large_scenery.tiles[i].x_offset,
.y = scenery_entry->large_scenery.tiles[i].y_offset,
.z = scenery_entry->large_scenery.tiles[i].z_offset
scenery_entry->large_scenery.tiles[i].x_offset,
scenery_entry->large_scenery.tiles[i].y_offset,
scenery_entry->large_scenery.tiles[i].z_offset
};
rotate_map_coordinates(&currentTile.x, &currentTile.y, tile_element_direction);
currentTile.x += baseTile.x;
@ -1232,10 +1234,10 @@ money32 map_clear_scenery(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 cle
gCommandPosition.y = y;
gCommandPosition.z = z;
x0 = max(x0, 32);
y0 = max(y0, 32);
x1 = min(x1, gMapSizeMaxXY);
y1 = min(y1, gMapSizeMaxXY);
x0 = std::max(x0, 32);
y0 = std::max(y0, 32);
x1 = std::min(x1, (sint32)gMapSizeMaxXY);
y1 = std::min(y1, (sint32)gMapSizeMaxXY);
noValidTiles = true;
totalCost = 0;
@ -1292,10 +1294,10 @@ static money32 map_change_surface_style(sint32 x0, sint32 y0, sint32 x1, sint32
{
gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING;
x0 = max(x0, 32);
y0 = max(y0, 32);
x1 = min(x1, gMapSizeMaxXY);
y1 = min(y1, gMapSizeMaxXY);
x0 = std::max(x0, 32);
y0 = std::max(y0, 32);
x1 = std::min(x1, (sint32)gMapSizeMaxXY);
y1 = std::min(y1, (sint32)gMapSizeMaxXY);
sint32 xMid, yMid;
@ -1343,7 +1345,7 @@ static money32 map_change_surface_style(sint32 x0, sint32 y0, sint32 x1, sint32
// Prevent network-originated value of surfaceStyle from causing
// invalid access.
uint8 style = surfaceStyle & 0x1F;
if (style >= countof(TerrainPricing)) {
if (style >= Util::CountOf(TerrainPricing)) {
return MONEY32_UNDEFINED;
}
surfaceCost += TerrainPricing[style];
@ -1738,18 +1740,18 @@ static money32 map_set_land_ownership(uint8 flags, sint16 x1, sint16 y1, sint16
return 0;
// Clamp to maximum addressable element to prevent long loop spamming the log
x1 = clamp(32, x1, gMapSizeUnits - 32);
y1 = clamp(32, y1, gMapSizeUnits - 32);
x2 = clamp(32, x2, gMapSizeUnits - 32);
y2 = clamp(32, y2, gMapSizeUnits - 32);
x1 = Math::Clamp(32, (sint32)x1, gMapSizeUnits - 32);
y1 = Math::Clamp(32, (sint32)y1, gMapSizeUnits - 32);
x2 = Math::Clamp(32, (sint32)x2, gMapSizeUnits - 32);
y2 = Math::Clamp(32, (sint32)y2, gMapSizeUnits - 32);
gMapLandRightsUpdateSuccess = false;
map_buy_land_rights(x1, y1, x2, y2, BUY_LAND_RIGHTS_FLAG_SET_OWNERSHIP_WITH_CHECKS, flags | (newOwnership << 8));
if (!gMapLandRightsUpdateSuccess)
return 0;
sint16 x = clamp(32, x1, gMapSizeUnits - 32);
sint16 y = clamp(32, y1, gMapSizeUnits - 32);
sint16 x = Math::Clamp(32, (sint32)x1, gMapSizeUnits - 32);
sint16 y = Math::Clamp(32, (sint32)y1, gMapSizeUnits - 32);
x += 16;
y += 16;
@ -1783,10 +1785,10 @@ void game_command_set_land_ownership(sint32 *eax, sint32 *ebx, sint32 *ecx, sint
static uint8 map_get_lowest_land_height(sint32 xMin, sint32 xMax, sint32 yMin, sint32 yMax)
{
xMin = max(xMin, 32);
yMin = max(yMin, 32);
xMax = min(xMax, gMapSizeMaxXY);
yMax = min(yMax, gMapSizeMaxXY);
xMin = std::max(xMin, 32);
yMin = std::max(yMin, 32);
xMax = std::min(xMax, (sint32)gMapSizeMaxXY);
yMax = std::min(yMax, (sint32)gMapSizeMaxXY);
uint8 min_height = 0xFF;
for (sint32 yi = yMin; yi <= yMax; yi += 32) {
@ -1802,10 +1804,10 @@ static uint8 map_get_lowest_land_height(sint32 xMin, sint32 xMax, sint32 yMin, s
static uint8 map_get_highest_land_height(sint32 xMin, sint32 xMax, sint32 yMin, sint32 yMax)
{
xMin = max(xMin, 32);
yMin = max(yMin, 32);
xMax = min(xMax, gMapSizeMaxXY);
yMax = min(yMax, gMapSizeMaxXY);
xMin = std::max(xMin, 32);
yMin = std::max(yMin, 32);
xMax = std::min(xMax, (sint32)gMapSizeMaxXY);
yMax = std::min(yMax, (sint32)gMapSizeMaxXY);
uint8 max_height = 0;
for (sint32 yi = yMin; yi <= yMax; yi += 32) {
@ -1829,7 +1831,7 @@ static money32 raise_land(sint32 flags, sint32 x, sint32 y, sint32 z, sint32 ax,
{
money32 cost = 0;
if (selectionType < 0 || selectionType >= countof(tile_element_raise_styles))
if (selectionType < 0 || selectionType >= (sint32)Util::CountOf(tile_element_raise_styles))
{
log_warning("Invalid selection type %d for raising land", selectionType);
return MONEY32_UNDEFINED;
@ -1936,10 +1938,10 @@ money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags)
uint8 max_height = 0xFF;
x0 = max(x0, 32);
y0 = max(y0, 32);
x1 = min(x1, gMapSizeMaxXY);
y1 = min(y1, gMapSizeMaxXY);
x0 = std::max(x0, (sint16)32);
y0 = std::max(y0, (sint16)32);
x1 = std::min(x1, gMapSizeMaxXY);
y1 = std::min(y1, gMapSizeMaxXY);
for (sint32 yi = y0; yi <= y1; yi += 32) {
for (sint32 xi = x0; xi <= x1; xi += 32) {
@ -2017,10 +2019,10 @@ money32 lower_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags)
uint8 min_height = 0;
x0 = max(x0, 32);
y0 = max(y0, 32);
x1 = min(x1, gMapSizeMaxXY);
y1 = min(y1, gMapSizeMaxXY);
x0 = std::max(x0, (sint16)32);
y0 = std::max(y0, (sint16)32);
x1 = std::min(x1, gMapSizeMaxXY);
y1 = std::min(y1, gMapSizeMaxXY);
for (sint32 yi = y0; yi <= y1; yi += 32){
for (sint32 xi = x0; xi <= x1; xi += 32){
@ -2329,10 +2331,10 @@ static money32 smooth_land_row_by_corner(sint32 flags, sint32 x, sint32 y, sint3
static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 mapLeft, sint32 mapTop, sint32 mapRight, sint32 mapBottom, sint32 command)
{
// Cap bounds to map
mapLeft = max(mapLeft, 32);
mapTop = max(mapTop, 32);
mapRight = clamp(0, mapRight, (MAXIMUM_MAP_SIZE_TECHNICAL - 1) * 32);
mapBottom = clamp(0, mapBottom, (MAXIMUM_MAP_SIZE_TECHNICAL - 1) * 32);
mapLeft = std::max(mapLeft, 32);
mapTop = std::max(mapTop, 32);
mapRight = Math::Clamp(0, mapRight, (MAXIMUM_MAP_SIZE_TECHNICAL - 1) * 32);
mapBottom = Math::Clamp(0, mapBottom, (MAXIMUM_MAP_SIZE_TECHNICAL - 1) * 32);
bool raiseLand = command < 0x7FFF;
sint32 commandType = raiseLand ? GAME_COMMAND_RAISE_LAND : GAME_COMMAND_LOWER_LAND;
@ -2408,16 +2410,16 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32
// Then do the smoothing
if (fullTile) {
// Smooth the corners
sint32 z = clamp(minHeight, tile_element_get_corner_height(tileElement, 2), maxHeight);
sint32 z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 2), maxHeight);
totalCost += smooth_land_row_by_corner(flags, mapLeft, mapTop, z, -32, -32, 0, 2, raiseLand);
tileElement = map_get_surface_element_at(mapLeft >> 5, mapBottom >> 5);
z = clamp(minHeight, tile_element_get_corner_height(tileElement, 3), maxHeight);
z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 3), maxHeight);
totalCost += smooth_land_row_by_corner(flags, mapLeft, mapBottom, z, -32, 32, 1, 3, raiseLand);
tileElement = map_get_surface_element_at(mapRight >> 5, mapBottom >> 5);
z = clamp(minHeight, tile_element_get_corner_height(tileElement, 0), maxHeight);
z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 0), maxHeight);
totalCost += smooth_land_row_by_corner(flags, mapRight, mapBottom, z, 32, 32, 2, 0, raiseLand);
tileElement = map_get_surface_element_at(mapRight >> 5, mapTop >> 5);
z = clamp(minHeight, tile_element_get_corner_height(tileElement, 1), maxHeight);
z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 1), maxHeight);
totalCost += smooth_land_row_by_corner(flags, mapRight, mapTop, z, 32, -32, 3, 1, raiseLand);
// Smooth the edges
@ -2426,32 +2428,32 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32
for (y = mapTop; y <= mapBottom; y += 32)
{
tileElement = map_get_surface_element_at(x >> 5, y >> 5);
z = clamp(minHeight, tile_element_get_corner_height(tileElement, 3), maxHeight);
z2 = clamp(minHeight, tile_element_get_corner_height(tileElement, 2), maxHeight);
z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 3), maxHeight);
z2 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 2), maxHeight);
totalCost += smooth_land_row_by_edge(flags, x, y, z, z2, -32, 0, 0, 1, 3, 2, raiseLand);
}
x = mapRight;
for (y = mapTop; y <= mapBottom; y += 32)
{
tileElement = map_get_surface_element_at(x >> 5, y >> 5);
z = clamp(minHeight, tile_element_get_corner_height(tileElement, 1), maxHeight);
z2 = clamp(minHeight, tile_element_get_corner_height(tileElement, 0), maxHeight);
z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 1), maxHeight);
z2 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 0), maxHeight);
totalCost += smooth_land_row_by_edge(flags, x, y, z, z2, 32, 0, 2, 3, 1, 0, raiseLand);
}
y = mapTop;
for (x = mapLeft; x <= mapRight; x += 32)
{
tileElement = map_get_surface_element_at(x >> 5, y >> 5);
z = clamp(minHeight, tile_element_get_corner_height(tileElement, 1), maxHeight);
z2 = clamp(minHeight, tile_element_get_corner_height(tileElement, 2), maxHeight);
z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 1), maxHeight);
z2 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 2), maxHeight);
totalCost += smooth_land_row_by_edge(flags, x, y, z, z2, 0, -32, 0, 3, 1, 2, raiseLand);
}
y = mapBottom;
for (x = mapLeft; x <= mapRight; x += 32)
{
tileElement = map_get_surface_element_at(x >> 5, y >> 5);
z = clamp(minHeight, tile_element_get_corner_height(tileElement, 0), maxHeight);
z2 = clamp(minHeight, tile_element_get_corner_height(tileElement, 3), maxHeight);
z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 0), maxHeight);
z2 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 3), maxHeight);
totalCost += smooth_land_row_by_edge(flags, x, y, z, z2, 0, 32, 1, 2, 0, 3, raiseLand);
}
}
@ -2733,15 +2735,15 @@ void game_command_place_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, sin
}
uint32 num_elements = 0;
sint16 maxHeight = 0xFFFF;
sint16 maxHeight = -1;
for (rct_large_scenery_tile* tile = scenery_entry->large_scenery.tiles;
tile->x_offset != -1;
tile++) {
num_elements++;
LocationXY16 curTile = {
.x = tile->x_offset,
.y = tile->y_offset
tile->x_offset,
tile->y_offset
};
rotate_map_coordinates(&curTile.x, &curTile.y, rotation);
@ -2790,8 +2792,8 @@ void game_command_place_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, sin
tile++, tile_num++) {
LocationXY16 curTile = {
.x = tile->x_offset,
.y = tile->y_offset
tile->x_offset,
tile->y_offset
};
rotate_map_coordinates(&curTile.x, &curTile.y, rotation);
@ -3044,7 +3046,7 @@ void map_reorganise_elements()
{
context_setcurrentcursor(CURSOR_ZZZ);
rct_tile_element* new_tile_elements = malloc(3 * (MAXIMUM_MAP_SIZE_TECHNICAL * MAXIMUM_MAP_SIZE_TECHNICAL) * sizeof(rct_tile_element));
rct_tile_element* new_tile_elements = (rct_tile_element *)malloc(3 * (MAXIMUM_MAP_SIZE_TECHNICAL * MAXIMUM_MAP_SIZE_TECHNICAL) * sizeof(rct_tile_element));
rct_tile_element* new_elements_pointer = new_tile_elements;
if (new_tile_elements == NULL) {
@ -3246,6 +3248,10 @@ void map_obstruction_set_error_text(rct_tile_element *tileElement)
*/
sint32 map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 zHigh, CLEAR_FUNC *clearFunc, uint8 bl, uint8 flags, money32 *price, uint8 crossingMode)
{
sint32 al, ah, bh, cl, ch, water_height;
al = ah = bh = cl = ch = water_height = 0;
uint8 slope = 0;
gMapGroundFlags = ELEMENT_IS_ABOVE_GROUND;
bool canBuildCrossing = false;
if (x >= gMapSizeUnits || y >= gMapSizeUnits || x < 32 || y < 32) {
@ -3262,7 +3268,7 @@ sint32 map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 z
}
continue;
}
sint32 water_height = map_get_water_height(tile_element) * 2;
water_height = map_get_water_height(tile_element) * 2;
if (water_height && water_height > zLow && tile_element->base_height < zHigh && !gCheatsDisableClearanceChecks) {
gMapGroundFlags |= ELEMENT_IS_UNDERWATER;
if (water_height < zHigh) {
@ -3271,7 +3277,7 @@ sint32 map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 z
}
loc_68B9B7:
if (gParkFlags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION) {
sint32 al = zHigh - tile_element->base_height;
al = zHigh - tile_element->base_height;
if (al >= 0) {
if (al > 18) {
gGameCommandErrorText = STR_LOCAL_AUTHORITY_WONT_ALLOW_CONSTRUCTION_ABOVE_TREE_HEIGHT;
@ -3294,11 +3300,11 @@ sint32 map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 z
gMapGroundFlags |= ELEMENT_IS_UNDERGROUND;
gMapGroundFlags &= ~ELEMENT_IS_ABOVE_GROUND;
} else {
sint32 al = tile_element->base_height;
sint32 ah = al;
sint32 cl = al;
sint32 ch = al;
uint8 slope = tile_element->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK;
al = tile_element->base_height;
ah = al;
cl = al;
ch = al;
slope = tile_element->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK;
if (slope & TILE_ELEMENT_SLOPE_N_CORNER_UP) {
al += 2;
if (slope == (TILE_ELEMENT_SLOPE_S_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT))
@ -3319,7 +3325,7 @@ sint32 map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 z
if (slope == (TILE_ELEMENT_SLOPE_E_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT))
ch += 2;
}
sint32 bh = zLow + 4;
bh = zLow + 4;
if ((!(bl & 1) || ((bl & 0x10 || zLow >= al) && bh >= al)) &&
(!(bl & 2) || ((bl & 0x20 || zLow >= ah) && bh >= ah)) &&
(!(bl & 4) || ((bl & 0x40 || zLow >= cl) && bh >= cl)) &&
@ -3780,7 +3786,7 @@ sint32 map_get_highest_z(sint32 tileX, sint32 tileY)
if ((tileElement->properties.surface.slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) != 0)
z += 16;
z = max(z, map_get_water_height(tileElement) * 16);
z = std::max(z, map_get_water_height(tileElement) * 16);
return z;
}
@ -4203,7 +4209,7 @@ void game_command_set_sign_name(sint32* eax, sint32* ebx, sint32* ecx, sint32* e
if (nameChunkOffset < 0)
nameChunkOffset = 2;
nameChunkOffset *= 12;
nameChunkOffset = min(nameChunkOffset, countof(newName) - 12);
nameChunkOffset = std::min(nameChunkOffset, (sint32)Util::CountOf(newName) - 12);
memcpy(newName + nameChunkOffset + 0, edx, 4);
memcpy(newName + nameChunkOffset + 4, ebp, 4);
memcpy(newName + nameChunkOffset + 8, edi, 4);
@ -4254,7 +4260,7 @@ void game_command_set_sign_name(sint32* eax, sint32* ebx, sint32* ecx, sint32* e
void game_command_set_sign_style(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp) {
uint8 bannerId = *ecx & 0xFF;
if (bannerId > countof(gBanners)) {
if (bannerId > Util::CountOf(gBanners)) {
log_warning("Invalid game command for setting sign style, banner id = %d", bannerId);
*ebx = MONEY32_UNDEFINED;
return;
@ -4336,7 +4342,7 @@ void game_command_modify_tile(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx
const sint32 flags = *ebx;
const sint32 x = *ecx & 0xFF;
const sint32 y = (*ecx >> 8) & 0xFF;
const tile_inspector_instruction instruction = *eax;
const tile_inspector_instruction instruction = (const tile_inspector_instruction)*eax;
switch (instruction)
{

View File

@ -29,7 +29,7 @@
#include "../object/Object.h"
#include "../platform/platform.h"
#include "../util/Util.h"
#include "map.h"
#include "Map.h"
#include "map_helpers.h"
#include "MapGen.h"
#include "scenery.h"

View File

@ -34,8 +34,8 @@
#include "../ride/Ride.h"
#include "../ride/ride_data.h"
#include "../scenario/Scenario.h"
#include "../world/map.h"
#include "Entrance.h"
#include "Map.h"
#include "Park.h"
#include "sprite.h"

View File

@ -18,7 +18,7 @@
#define _PARK_H_
#include "../common.h"
#include "map.h"
#include "Map.h"
#define DECRYPT_MONEY(money) ((money32)rol32((money) ^ 0xF4EC9621, 13))
#define ENCRYPT_MONEY(money) ((money32)(ror32((money), 13) ^ 0xF4EC9621))

View File

@ -19,7 +19,7 @@
#include "../OpenRCT2.h"
#include "../ride/TrackDesign.h"
#include "footpath.h"
#include "map.h"
#include "Map.h"
#include "Park.h"
#include "scenery.h"
#include "SmallScenery.h"

View File

@ -17,7 +17,7 @@
#pragma once
#include "../common.h"
#include "map.h"
#include "Map.h"
#include "scenery.h"
#ifdef __cplusplus

View File

@ -23,7 +23,7 @@
#include "../windows/Intent.h"
#include "../windows/tile_inspector.h"
#include "footpath.h"
#include "map.h"
#include "Map.h"
#include "TileInspector.h"
uint32 windowTileInspectorTileX;

View File

@ -17,7 +17,7 @@
#pragma once
#include "../common.h"
#include "map.h"
#include "Map.h"
typedef enum {
TILE_INSPECTOR_ELEMENT_ANY = 0,

View File

@ -24,7 +24,7 @@
#include "../ride/Track.h"
#include "../ride/TrackData.h"
#include "LargeScenery.h"
#include "map.h"
#include "Map.h"
#include "Park.h"
#include "scenery.h"
#include "SmallScenery.h"

View File

@ -17,7 +17,7 @@
#pragma once
#include "../common.h"
#include "map.h"
#include "Map.h"
#ifdef __cplusplus
extern "C" {

View File

@ -24,7 +24,7 @@
#include "../ride/Track.h"
#include "../ride/TrackData.h"
#include "../util/Util.h"
#include "map.h"
#include "Map.h"
void footpath_interrupt_peeps(sint32 x, sint32 y, sint32 z);
void footpath_update_queue_entrance_banner(sint32 x, sint32 y, rct_tile_element *tileElement);

View File

@ -20,7 +20,7 @@
#include "../ride/Track.h"
#include "../interface/viewport.h"
#include "map_animation.h"
#include "map.h"
#include "Map.h"
#include "scenery.h"
#include "SmallScenery.h"
#include "sprite.h"

Some files were not shown because too many files have changed in this diff Show More