1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Update testpaint

This commit is contained in:
Marijn van der Werf
2016-12-28 14:16:15 +01:00
committed by Ted John
parent 93f1eb7166
commit 24a0405345
23 changed files with 76 additions and 68 deletions

View File

@@ -429,11 +429,13 @@ if (WITH_TESTS)
endif ()
if (UNIX AND (NOT USE_MMAP) AND (NOT DISABLE_RCT2) AND (FORCE32))
file(GLOB_RECURSE ORCT2_RIDE_SOURCES "src/ride/*/*.c")
file(GLOB_RECURSE ORCT2_RIDE_DEP_SOURCES "src/ride/ride_data.c" "src/ride/track_data.c" "src/ride/track_data_old.c" "src/ride/track_paint.c" "src/addresses.c" "src/diagnostic.c" "src/hook.c" "src/paint/map_element/map_element.c" "src/paint/paint_helpers.c")
set(OPENRCT2_SRCPATH "src/openrct2")
file(GLOB_RECURSE ORCT2_RIDE_SOURCES "${OPENRCT2_SRCPATH}/ride/*/*.c")
file(GLOB_RECURSE ORCT2_RIDE_DEP_SOURCES "${OPENRCT2_SRCPATH}/ride/ride_data.c" "${OPENRCT2_SRCPATH}/ride/track_data.c" "${OPENRCT2_SRCPATH}/ride/track_data_old.c" "${OPENRCT2_SRCPATH}/ride/track_paint.c" "${OPENRCT2_SRCPATH}/rct2/addresses.c" "${OPENRCT2_SRCPATH}/diagnostic.c" "${OPENRCT2_SRCPATH}/rct2/hook.c" "${OPENRCT2_SRCPATH}/paint/map_element/map_element.c" "${OPENRCT2_SRCPATH}/paint/paint_helpers.c")
file(GLOB_RECURSE ORCT2_TESTPAINT_SOURCES "test/testpaint/*.c" "test/testpaint/*.cpp" "test/testpaint/*.h")
add_executable(testpaint EXCLUDE_FROM_ALL ${ORCT2_RIDE_SOURCES} ${ORCT2_RIDE_DEP_SOURCES} ${ORCT2_TESTPAINT_SOURCES} ${RCT2_SECTIONS})
target_include_directories(testpaint PRIVATE "src/")
set_target_properties(testpaint PROPERTIES COMPILE_FLAGS "-DNO_VEHICLES -D__TESTPAINT__ -Wno-unused")
add_dependencies(testpaint segfiles)
endif ()

View File

@@ -222,6 +222,8 @@
C6B5A7D41CDFE4CB00C9C006 /* S6Exporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6B5A7D01CDFE4CB00C9C006 /* S6Exporter.cpp */; };
C6B5A7D51CDFE4CB00C9C006 /* S6Importer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6B5A7D21CDFE4CB00C9C006 /* S6Importer.cpp */; };
C6CABA821E1466D600D33A6B /* FileClassifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6CABA801E1466D600D33A6B /* FileClassifier.cpp */; };
C6CABA7E1E13F11C00D33A6B /* hook.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E181E0406F00076A04F /* hook.c */; };
C6CABA7F1E13F14F00D33A6B /* addresses.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E161E0406F00076A04F /* addresses.c */; };
C6E96E121E04067A0076A04F /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E101E04067A0076A04F /* File.cpp */; };
C6E96E151E04069A0076A04F /* Zip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E131E04069A0076A04F /* Zip.cpp */; };
C6E96E1A1E0406F00076A04F /* addresses.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E161E0406F00076A04F /* addresses.c */; };
@@ -518,14 +520,14 @@
791166FA1D7486EF005912EA /* NetworkServerAdvertiser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkServerAdvertiser.h; sourceTree = "<group>"; };
8594C05F1D885CF600235E93 /* track_data_old.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_data_old.c; sourceTree = "<group>"; };
85B468FB1D96822F000F1DB5 /* paint_helpers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = paint_helpers.c; sourceTree = "<group>"; };
C606CCAB1DB4054000FE4015 /* compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compat.c; sourceTree = "<group>"; };
C606CCAC1DB4054000FE4015 /* data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = data.c; sourceTree = "<group>"; };
C606CCAD1DB4054000FE4015 /* data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = data.h; sourceTree = "<group>"; };
C606CCAE1DB4054000FE4015 /* FunctionCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionCall.cpp; sourceTree = "<group>"; };
C606CCAF1DB4054000FE4015 /* FunctionCall.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = FunctionCall.hpp; sourceTree = "<group>"; };
C606CCB01DB4054000FE4015 /* generate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = generate.cpp; sourceTree = "<group>"; };
C606CCB41DB4054000FE4015 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
C606CCB51DB4054000FE4015 /* PaintIntercept.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PaintIntercept.cpp; sourceTree = "<group>"; };
C606CCAB1DB4054000FE4015 /* compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = compat.c; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.c; };
C606CCAC1DB4054000FE4015 /* data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = data.c; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.c; };
C606CCAD1DB4054000FE4015 /* data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = data.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
C606CCAE1DB4054000FE4015 /* FunctionCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = FunctionCall.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
C606CCAF1DB4054000FE4015 /* FunctionCall.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = FunctionCall.hpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
C606CCB01DB4054000FE4015 /* generate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = generate.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
C606CCB41DB4054000FE4015 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = main.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
C606CCB51DB4054000FE4015 /* PaintIntercept.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = PaintIntercept.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
C606CCB61DB4054000FE4015 /* Printer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Printer.cpp; sourceTree = "<group>"; };
C606CCB71DB4054000FE4015 /* Printer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Printer.hpp; sourceTree = "<group>"; };
C606CCB81DB4054000FE4015 /* String.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = String.cpp; sourceTree = "<group>"; };
@@ -535,14 +537,14 @@
C606CCBC1DB4054000FE4015 /* Utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Utils.cpp; sourceTree = "<group>"; };
C606CCBD1DB4054000FE4015 /* Utils.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Utils.hpp; sourceTree = "<group>"; };
C606CCCA1DB427A000FE4015 /* GeneralSupportHeightCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneralSupportHeightCall.cpp; sourceTree = "<group>"; };
C606CCCB1DB427A000FE4015 /* GeneralSupportHeightCall.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GeneralSupportHeightCall.hpp; sourceTree = "<group>"; };
C606CCCB1DB427A000FE4015 /* GeneralSupportHeightCall.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = GeneralSupportHeightCall.hpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
C606CCCC1DB427A000FE4015 /* SegmentSupportHeightCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SegmentSupportHeightCall.cpp; sourceTree = "<group>"; };
C606CCCD1DB427A000FE4015 /* SegmentSupportHeightCall.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = SegmentSupportHeightCall.hpp; sourceTree = "<group>"; };
C606CCD01DB4D7C800FE4015 /* SideTunnelCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SideTunnelCall.cpp; sourceTree = "<group>"; };
C606CCD11DB4D7C800FE4015 /* SideTunnelCall.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = SideTunnelCall.hpp; sourceTree = "<group>"; };
C606CCD31DB4DD6C00FE4015 /* VerticalTunnelCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VerticalTunnelCall.cpp; sourceTree = "<group>"; };
C606CCD41DB4DD6C00FE4015 /* VerticalTunnelCall.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = VerticalTunnelCall.hpp; sourceTree = "<group>"; };
C606CCD61DB4E1CD00FE4015 /* PaintIntercept.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = PaintIntercept.hpp; sourceTree = "<group>"; };
C606CCD61DB4E1CD00FE4015 /* PaintIntercept.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = PaintIntercept.hpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
C606CD231DB5120900FE4015 /* TestPaint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestPaint.cpp; sourceTree = "<group>"; };
C606CD241DB5120900FE4015 /* TestPaint.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TestPaint.hpp; sourceTree = "<group>"; };
C612A8971D64825300B634CA /* vehicle_data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vehicle_data.c; sourceTree = "<group>"; };
@@ -2510,6 +2512,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C6CABA7F1E13F14F00D33A6B /* addresses.c in Sources */,
C6CABA7E1E13F11C00D33A6B /* hook.c in Sources */,
C64FDAC31D6DA41000F259B9 /* track_paint.c in Sources */,
C64FDAC21D6DA0B800F259B9 /* diagnostic.c in Sources */,
C64FDAC01D6D9E3B00F259B9 /* track_data.c in Sources */,
@@ -2972,6 +2976,7 @@
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/libxc/include",
"$(SRCROOT)/libxc/include/SDL2",
"$(SRCROOT)/src",
);
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/libxc/lib";
OTHER_LDFLAGS = (
@@ -3020,6 +3025,7 @@
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/libxc/include",
"$(SRCROOT)/libxc/include/SDL2",
"$(SRCROOT)/src",
);
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/libxc/lib";
OTHER_LDFLAGS = (

View File

@@ -17,7 +17,7 @@
#include "FunctionCall.hpp"
extern "C" {
#include "../../src/sprites.h"
#include <openrct2/sprites.h>
}
enum SpriteGroup {

View File

@@ -16,7 +16,7 @@
#pragma once
#include "../../src/common.h"
#include <openrct2/common.h>
#include "TestPaint.hpp"
enum

View File

@@ -16,7 +16,7 @@
#pragma once
#include "../../src/common.h"
#include <openrct2/common.h>
struct SupportCall {
sint32 height;

View File

@@ -19,11 +19,11 @@
#include "FunctionCall.hpp"
extern "C" {
#include "../../src/common.h"
#include "../../src/rct2/hook.h"
#include "../../src/interface/viewport.h"
#include "../../src/paint/supports.h"
#include "../../src/sprites.h"
#include <openrct2/common.h>
#include <openrct2/rct2/hook.h>
#include <openrct2/interface/viewport.h>
#include <openrct2/paint/supports.h>
#include <openrct2/sprites.h>
}
static bool _woodenSupports = false;

View File

@@ -16,7 +16,7 @@
#pragma once
#include "../../src/common.h"
#include <openrct2/common.h>
#include "FunctionCall.hpp"
namespace PaintIntercept {

View File

@@ -16,11 +16,11 @@
#include "Printer.hpp"
#include "String.hpp"
#include "../../src/core/Util.hpp"
#include <openrct2/core/Util.hpp>
#include "FunctionCall.hpp"
extern "C" {
#include "../../src/sprites.h"
#include <openrct2/sprites.h>
}
namespace Printer {

View File

@@ -20,7 +20,7 @@
#include "SegmentSupportHeightCall.hpp"
extern "C" {
#include "../../src/paint/map_element/map_element.h"
#include <openrct2/paint/map_element/map_element.h>
}
static bool SortSegmentSupportCalls(SegmentSupportCall lhs, SegmentSupportCall rhs)

View File

@@ -18,10 +18,10 @@
#include <vector>
#include "../../src/common.h"
#include <openrct2/common.h>
extern "C" {
#include "../../src/paint/paint.h"
#include <openrct2/paint/paint.h>
}
struct SegmentSupportCall

View File

@@ -16,10 +16,10 @@
#pragma once
#include "../../src/common.h"
#include <openrct2/common.h>
extern "C" {
#include "../../src/paint/map_element/map_element.h"
#include <openrct2/paint/map_element/map_element.h>
}
enum {

View File

@@ -24,11 +24,11 @@
#include "Utils.hpp"
extern "C" {
#include "../../src/interface/viewport.h"
#include "../../src/paint/paint.h"
#include "../../src/paint/supports.h"
#include "../../src/rct2/hook.h"
#include "../../src/ride/track_data.h"
#include <openrct2/paint/paint.h>
#include <openrct2/paint/supports.h>
#include <openrct2/ride/track_data.h>
#include <openrct2/interface/viewport.h>
#include <openrct2/rct2/hook.h>
}
namespace TestPaint

View File

@@ -18,13 +18,13 @@
#include <vector>
#include "../../src/common.h"
#include <openrct2/common.h>
extern "C"
{
#include "../../src/interface/colour.h"
#include "../../src/paint/paint.h"
#include "../../src/paint/map_element/map_element.h"
#include <openrct2/interface/colour.h>
#include <openrct2/paint/paint.h>
#include <openrct2/paint/map_element/map_element.h>
}
#define gRideEntries RCT2_ADDRESS(RCT2_ADDRESS_RIDE_ENTRIES, rct_ride_entry*)

View File

@@ -30,10 +30,10 @@
#include "VerticalTunnelCall.hpp"
extern "C" {
#include "../../src/paint/supports.h"
#include "../../src/ride/ride.h"
#include "../../src/ride/track.h"
#include "../../src/ride/track_data.h"
#include <openrct2/paint/supports.h>
#include <openrct2/ride/ride.h>
#include <openrct2/ride/track.h>
#include <openrct2/ride/track_data.h>
}
interface ITestTrackFilter {

View File

@@ -18,7 +18,7 @@
#include <string>
#include "../../src/common.h"
#include <openrct2/common.h>
class TestTrack {
public:

View File

@@ -17,9 +17,9 @@
#include "Utils.hpp"
extern "C" {
#include "../../src/ride/ride.h"
#include "../../src/ride/track.h"
#include "../../src/ride/track_data.h"
#include <openrct2/ride/ride.h>
#include <openrct2/ride/track.h>
#include <openrct2/ride/track_data.h>
}
namespace Utils {

View File

@@ -16,7 +16,7 @@
#pragma once
#include "../../src/common.h"
#include <openrct2/common.h>
namespace Utils {
int getTrackSequenceCount(uint8 rideType, uint8 trackType);

View File

@@ -16,7 +16,7 @@
#pragma once
#include "../../src/common.h"
#include <openrct2/common.h>
namespace VerticalTunnelCall {
bool HeightIsConsistent(uint8 heights[4]);

View File

@@ -14,14 +14,14 @@
*****************************************************************************/
#pragma endregion
#include "../../src/config.h"
#include "../../src/object.h"
#include "../../src/interface/colour.h"
#include "../../src/interface/viewport.h"
#include "../../src/ride/ride.h"
#include "../../src/ride/track.h"
#include "../../src/world/sprite.h"
#include "../../src/paint/map_element/map_element.h"
#include <openrct2/config.h>
#include <openrct2/object.h>
#include <openrct2/interface/colour.h>
#include <openrct2/interface/viewport.h>
#include <openrct2/ride/ride.h>
#include <openrct2/ride/track.h>
#include <openrct2/world/sprite.h>
#include <openrct2/paint/map_element/map_element.h>
#define RCT2_ADDRESS_SPRITE_LIST 0x010E63BC

View File

@@ -14,7 +14,7 @@
*****************************************************************************/
#pragma endregion
#include "../../src/common.h"
#include <openrct2/common.h>
const utf8string RideNames[91] = {
"SpiralRollerCoaster",

View File

@@ -17,7 +17,7 @@
#ifndef _TEST_PAINT_DATA_H_
#define _TEST_PAINT_DATA_H_
#include "../../src/common.h"
#include <openrct2/common.h>
extern const utf8string RideNames[91];
extern const utf8string TrackNames[256];

View File

@@ -28,12 +28,12 @@
extern "C"
{
#include "data.h"
#include "../../src/interface/viewport.h"
#include "../../src/rct2.h"
#include "../../src/ride/ride.h"
#include "../../src/ride/ride_data.h"
#include "../../src/ride/track.h"
#include "../../src/ride/track_data.h"
#include <openrct2/interface/viewport.h>
#include <openrct2/rct2.h>
#include <openrct2/ride/ride.h>
#include <openrct2/ride/ride_data.h>
#include <openrct2/ride/track.h>
#include <openrct2/ride/track_data.h>
}
class PaintCodeGenerator

View File

@@ -29,11 +29,11 @@
extern "C" {
#include "data.h"
#include "../../src/rct2.h"
#include "../../src/ride/ride.h"
#include "../../src/ride/ride_data.h"
#include "../../src/ride/track.h"
#include "../../src/ride/track_data.h"
#include <openrct2/rct2.h>
#include <openrct2/ride/ride.h>
#include <openrct2/ride/ride_data.h>
#include <openrct2/ride/track.h>
#include <openrct2/ride/track_data.h>
}
typedef struct {