mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #4619 from marijnvdwerf/duncanspumpkin-mini_rail
Paint miniature railway
This commit is contained in:
commit
8f8677aa83
|
@ -370,7 +370,7 @@ if (UNIX AND (NOT USE_MMAP) AND (NOT DISABLE_RCT2) AND (NOT FORCE64))
|
|||
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})
|
||||
set_target_properties(testpaint PROPERTIES COMPILE_FLAGS "-DNO_VEHICLES -D__TESTPAINT__")
|
||||
set_target_properties(testpaint PROPERTIES COMPILE_FLAGS "-DNO_VEHICLES -D__TESTPAINT__ -Wno-unused")
|
||||
add_dependencies(testpaint segfiles)
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
C64FDAA11D6D9A2100F259B9 /* twist.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FB1CDBC3B7009F9BFC /* twist.c */; };
|
||||
C64FDAA21D6D9A2100F259B9 /* chairlift.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FD1CDBC3B7009F9BFC /* chairlift.c */; };
|
||||
C64FDAA31D6D9A2100F259B9 /* lift.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FE1CDBC3B7009F9BFC /* lift.c */; };
|
||||
C64FDAA41D6D9A2100F259B9 /* minature_railway.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FF1CDBC3B7009F9BFC /* minature_railway.c */; };
|
||||
C64FDAA41D6D9A2100F259B9 /* miniature_railway.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FF1CDBC3B7009F9BFC /* miniature_railway.c */; };
|
||||
C64FDAA51D6D9A2100F259B9 /* monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9001CDBC3B7009F9BFC /* monorail.c */; };
|
||||
C64FDAA61D6D9A2100F259B9 /* suspended_monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9011CDBC3B7009F9BFC /* suspended_monorail.c */; };
|
||||
C64FDAA71D6D9A2100F259B9 /* boat_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9031CDBC3B7009F9BFC /* boat_ride.c */; };
|
||||
|
@ -194,7 +194,7 @@
|
|||
C686F9481CDBC3B7009F9BFC /* twist.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FB1CDBC3B7009F9BFC /* twist.c */; };
|
||||
C686F9491CDBC3B7009F9BFC /* chairlift.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FD1CDBC3B7009F9BFC /* chairlift.c */; };
|
||||
C686F94A1CDBC3B7009F9BFC /* lift.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FE1CDBC3B7009F9BFC /* lift.c */; };
|
||||
C686F94B1CDBC3B7009F9BFC /* minature_railway.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FF1CDBC3B7009F9BFC /* minature_railway.c */; };
|
||||
C686F94B1CDBC3B7009F9BFC /* miniature_railway.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FF1CDBC3B7009F9BFC /* miniature_railway.c */; };
|
||||
C686F94C1CDBC3B7009F9BFC /* monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9001CDBC3B7009F9BFC /* monorail.c */; };
|
||||
C686F94D1CDBC3B7009F9BFC /* suspended_monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9011CDBC3B7009F9BFC /* suspended_monorail.c */; };
|
||||
C686F94E1CDBC3B7009F9BFC /* boat_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9031CDBC3B7009F9BFC /* boat_ride.c */; };
|
||||
|
@ -600,7 +600,7 @@
|
|||
C686F8FB1CDBC3B7009F9BFC /* twist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = twist.c; sourceTree = "<group>"; };
|
||||
C686F8FD1CDBC3B7009F9BFC /* chairlift.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = chairlift.c; sourceTree = "<group>"; };
|
||||
C686F8FE1CDBC3B7009F9BFC /* lift.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lift.c; sourceTree = "<group>"; };
|
||||
C686F8FF1CDBC3B7009F9BFC /* minature_railway.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = minature_railway.c; sourceTree = "<group>"; };
|
||||
C686F8FF1CDBC3B7009F9BFC /* miniature_railway.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = miniature_railway.c; sourceTree = "<group>"; };
|
||||
C686F9001CDBC3B7009F9BFC /* monorail.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = monorail.c; sourceTree = "<group>"; };
|
||||
C686F9011CDBC3B7009F9BFC /* suspended_monorail.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = suspended_monorail.c; sourceTree = "<group>"; };
|
||||
C686F9031CDBC3B7009F9BFC /* boat_ride.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = boat_ride.c; sourceTree = "<group>"; };
|
||||
|
@ -1334,7 +1334,7 @@
|
|||
children = (
|
||||
C686F8FD1CDBC3B7009F9BFC /* chairlift.c */,
|
||||
C686F8FE1CDBC3B7009F9BFC /* lift.c */,
|
||||
C686F8FF1CDBC3B7009F9BFC /* minature_railway.c */,
|
||||
C686F8FF1CDBC3B7009F9BFC /* miniature_railway.c */,
|
||||
C686F9001CDBC3B7009F9BFC /* monorail.c */,
|
||||
C686F9011CDBC3B7009F9BFC /* suspended_monorail.c */,
|
||||
);
|
||||
|
@ -2456,7 +2456,7 @@
|
|||
C64FDAA11D6D9A2100F259B9 /* twist.c in Sources */,
|
||||
C64FDAA21D6D9A2100F259B9 /* chairlift.c in Sources */,
|
||||
C64FDAA31D6D9A2100F259B9 /* lift.c in Sources */,
|
||||
C64FDAA41D6D9A2100F259B9 /* minature_railway.c in Sources */,
|
||||
C64FDAA41D6D9A2100F259B9 /* miniature_railway.c in Sources */,
|
||||
C64FDAA51D6D9A2100F259B9 /* monorail.c in Sources */,
|
||||
C64FDAA61D6D9A2100F259B9 /* suspended_monorail.c in Sources */,
|
||||
85B468FD1D96822F000F1DB5 /* paint_helpers.c in Sources */,
|
||||
|
@ -2731,7 +2731,7 @@
|
|||
D44271FB1CC81B3200D84D28 /* ScreenshotCommands.cpp in Sources */,
|
||||
D464FEBB1D31A65300CBABAC /* IStream.cpp in Sources */,
|
||||
D442729E1CC81B3200D84D28 /* fountain.c in Sources */,
|
||||
C686F94B1CDBC3B7009F9BFC /* minature_railway.c in Sources */,
|
||||
C686F94B1CDBC3B7009F9BFC /* miniature_railway.c in Sources */,
|
||||
C686F94D1CDBC3B7009F9BFC /* suspended_monorail.c in Sources */,
|
||||
D44272131CC81B3200D84D28 /* editor.c in Sources */,
|
||||
D442729F1CC81B3200D84D28 /* map.c in Sources */,
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
<ClCompile Include="src\ride\track_paint.c" />
|
||||
<ClCompile Include="src\ride\transport\chairlift.c" />
|
||||
<ClCompile Include="src\ride\transport\lift.c" />
|
||||
<ClCompile Include="src\ride\transport\minature_railway.c" />
|
||||
<ClCompile Include="src\ride\transport\miniature_railway.c" />
|
||||
<ClCompile Include="src\ride\transport\monorail.c" />
|
||||
<ClCompile Include="src\ride\transport\suspended_monorail.c" />
|
||||
<ClCompile Include="src\ride\vehicle.c" />
|
||||
|
|
|
@ -6246,7 +6246,7 @@ const TRACK_PAINT_FUNCTION_GETTER RideTypeTrackPaintFunctions[91] = {
|
|||
get_track_paint_function_suspended_swinging_rc, // RIDE_TYPE_SUSPENDED_SWINGING_COASTER
|
||||
get_track_paint_function_inverted_rc, // RIDE_TYPE_INVERTED_ROLLER_COASTER
|
||||
get_track_paint_function_junior_rc, // RIDE_TYPE_JUNIOR_ROLLER_COASTER
|
||||
0, // RIDE_TYPE_MINIATURE_RAILWAY
|
||||
get_track_paint_function_miniature_railway, // RIDE_TYPE_MINIATURE_RAILWAY
|
||||
get_track_paint_function_monorail, // RIDE_TYPE_MONORAIL
|
||||
get_track_paint_function_mini_suspended_rc, // RIDE_TYPE_MINI_SUSPENDED_COASTER
|
||||
get_track_paint_function_boat_ride, // RIDE_TYPE_BOAT_RIDE
|
||||
|
|
|
@ -38,7 +38,14 @@ extern const uint8 track_map_1x4[][4];
|
|||
enum {
|
||||
SPR_FLOOR_PLANKS = 3395,
|
||||
SPR_FLOOR_PLANKS_90_DEG = 3396,
|
||||
|
||||
SPR_FLOOR_PLANKS_SLOPE_NE_SW = 3397,
|
||||
SPR_FLOOR_PLANKS_SLOPE_SE_NW = 3398,
|
||||
SPR_FLOOR_PLANKS_SLOPE_SW_NE = 3399,
|
||||
SPR_FLOOR_PLANKS_SLOPE_NW_SE = 3400,
|
||||
SPR_FLOOR_PLANKS_N_SEGMENT = 3401,
|
||||
SPR_FLOOR_PLANKS_E_SEGMENT = 3402,
|
||||
SPR_FLOOR_PLANKS_S_SEGMENT = 3403,
|
||||
SPR_FLOOR_PLANKS_W_SEGMENT = 3404,
|
||||
SPR_FLOOR_METAL = 14567,
|
||||
SPR_FENCE_METAL_NE = 14568,
|
||||
SPR_FENCE_METAL_SE = 14569,
|
||||
|
@ -304,6 +311,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_inverted_rc(int trackType, int dir
|
|||
TRACK_PAINT_FUNCTION get_track_paint_function_junior_rc(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_monorail(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_mini_suspended_rc(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_miniature_railway(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_boat_ride(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_wooden_wild_mouse(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_steeplechase(int trackType, int direction);
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers
|
||||
/*****************************************************************************
|
||||
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
||||
*
|
||||
* OpenRCT2 is the work of many authors, a full list can be found in contributors.md
|
||||
* For more information, visit https://github.com/OpenRCT2/OpenRCT2
|
||||
*
|
||||
* OpenRCT2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* A full copy of the GNU General Public License can be found in licence.txt
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
File diff suppressed because it is too large
Load Diff
|
@ -37,6 +37,7 @@ extern const utf8string RideNames[91];
|
|||
extern const utf8string TrackNames[256];
|
||||
extern const utf8string FlatTrackNames[256];
|
||||
|
||||
static bool _woodenSupports;
|
||||
static uint8 callCount;
|
||||
static function_call calls[256];
|
||||
|
||||
|
@ -172,7 +173,7 @@ bool wooden_a_supports_paint_setup(int supportType, int special, int height, uin
|
|||
|
||||
calls[callCount] = call;
|
||||
callCount++;
|
||||
return false;
|
||||
return _woodenSupports;
|
||||
}
|
||||
|
||||
bool wooden_b_supports_paint_setup(int supportType, int special, int height, uint32 imageColourFlags, bool *underground) {
|
||||
|
@ -189,7 +190,7 @@ bool wooden_b_supports_paint_setup(int supportType, int special, int height, uin
|
|||
|
||||
calls[callCount] = call;
|
||||
callCount++;
|
||||
return false;
|
||||
return _woodenSupports;
|
||||
}
|
||||
|
||||
static void check_support_height()
|
||||
|
@ -570,6 +571,12 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string error,
|
|||
TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType];
|
||||
int sequenceCount = getTrackSequenceCount(rideType, trackType);
|
||||
|
||||
for (int supports = 0; supports < 2; supports++) {
|
||||
if (supports == 0) {
|
||||
_woodenSupports = false;
|
||||
} else {
|
||||
_woodenSupports = true;
|
||||
}
|
||||
for (int inverted = 0; inverted < 2; inverted++) {
|
||||
if (inverted == 0) {
|
||||
mapElement.properties.track.colour &= ~TRACK_ELEMENT_COLOUR_FLAG_INVERTED;
|
||||
|
@ -674,6 +681,7 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string error,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool segmentSuccess = testSupportSegments(rideType, trackType);
|
||||
if (!segmentSuccess) {
|
||||
|
@ -761,16 +769,16 @@ static int intercept_draw_9c(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uin
|
|||
|
||||
static uint32 intercept_wooden_a_supports(uint32 eax, uint32 ebx, uint32 edx, uint32 edi, uint32 ebp) {
|
||||
registers regs = {.eax =eax, .ebx = ebx, .edx = edx, .edi = edi, .ebp = ebp};
|
||||
wooden_a_supports_paint_setup(regs.edi, (sint16) regs.ax, regs.dx, (uint32) regs.ebp, NULL);
|
||||
bool output = wooden_a_supports_paint_setup(regs.edi, (sint16) regs.ax, regs.dx, (uint32) regs.ebp, NULL);
|
||||
|
||||
return 0;
|
||||
return output ? 1 : 0;
|
||||
}
|
||||
|
||||
static uint32 intercept_wooden_b_supports(uint32 eax, uint32 ebx, uint32 edx, uint32 edi, uint32 ebp) {
|
||||
registers regs = {.eax =eax, .ebx = ebx, .edx = edx, .edi = edi, .ebp = ebp};
|
||||
wooden_b_supports_paint_setup(regs.edi, (sint16) regs.ax, regs.dx, (uint32) regs.ebp, NULL);
|
||||
bool output = wooden_b_supports_paint_setup(regs.edi, (sint16) regs.ax, regs.dx, (uint32) regs.ebp, NULL);
|
||||
|
||||
return 0;
|
||||
return output ? 1 : 0;
|
||||
}
|
||||
|
||||
static uint32 intercept_metal_a_supports(uint32 eax, uint32 ebx, uint32 edx, uint32 edi, uint32 ebp) {
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
<ClCompile Include="..\..\src\ride\track_paint.c" />
|
||||
<ClCompile Include="..\..\src\ride\transport\chairlift.c" />
|
||||
<ClCompile Include="..\..\src\ride\transport\lift.c" />
|
||||
<ClCompile Include="..\..\src\ride\transport\minature_railway.c" />
|
||||
<ClCompile Include="..\..\src\ride\transport\miniature_railway.c" />
|
||||
<ClCompile Include="..\..\src\ride\transport\monorail.c" />
|
||||
<ClCompile Include="..\..\src\ride\transport\suspended_monorail.c" />
|
||||
<ClCompile Include="..\..\src\ride\water\boat_ride.c" />
|
||||
|
|
Loading…
Reference in New Issue