diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 4d3aff2c87..45fcaa252d 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -22,6 +22,90 @@ C61FB7201CF6180C004CE991 /* libssl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38BA1CF3006400659A24 /* libssl.dylib */; }; C61FB7211CF618BA004CE991 /* libssl.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38BA1CF3006400659A24 /* libssl.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; C61FB7241CF86356004CE991 /* NetworkUser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C61FB7221CF86356004CE991 /* NetworkUser.cpp */; }; + C64FDA641D6D9A2100F259B9 /* air_powered_vertical_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BB1CDBC3B7009F9BFC /* air_powered_vertical_coaster.c */; }; + C64FDA651D6D9A2100F259B9 /* bobsleigh_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BC1CDBC3B7009F9BFC /* bobsleigh_coaster.c */; }; + C64FDA661D6D9A2100F259B9 /* compact_inverted_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BD1CDBC3B7009F9BFC /* compact_inverted_coaster.c */; }; + C64FDA671D6D9A2100F259B9 /* corkscrew_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BE1CDBC3B7009F9BFC /* corkscrew_roller_coaster.c */; }; + C64FDA681D6D9A2100F259B9 /* flying_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BF1CDBC3B7009F9BFC /* flying_roller_coaster.c */; }; + C64FDA691D6D9A2100F259B9 /* giga_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C01CDBC3B7009F9BFC /* giga_coaster.c */; }; + C64FDA6A1D6D9A2100F259B9 /* heartline_twister_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C11CDBC3B7009F9BFC /* heartline_twister_coaster.c */; }; + C64FDA6B1D6D9A2100F259B9 /* inverted_hairpin_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C21CDBC3B7009F9BFC /* inverted_hairpin_coaster.c */; }; + C64FDA6C1D6D9A2100F259B9 /* inverted_impulse_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C31CDBC3B7009F9BFC /* inverted_impulse_coaster.c */; }; + C64FDA6D1D6D9A2100F259B9 /* inverted_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C41CDBC3B7009F9BFC /* inverted_roller_coaster.c */; }; + C64FDA6E1D6D9A2100F259B9 /* junior_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C51CDBC3B7009F9BFC /* junior_roller_coaster.c */; }; + C64FDA6F1D6D9A2100F259B9 /* lay_down_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C61CDBC3B7009F9BFC /* lay_down_roller_coaster.c */; }; + C64FDA701D6D9A2100F259B9 /* lim_launched_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C71CDBC3B7009F9BFC /* lim_launched_roller_coaster.c */; }; + C64FDA711D6D9A2100F259B9 /* looping_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C81CDBC3B7009F9BFC /* looping_roller_coaster.c */; }; + C64FDA721D6D9A2100F259B9 /* mine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C91CDBC3B7009F9BFC /* mine_ride.c */; }; + C64FDA731D6D9A2100F259B9 /* mine_train_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CA1CDBC3B7009F9BFC /* mine_train_coaster.c */; }; + C64FDA741D6D9A2100F259B9 /* mini_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CB1CDBC3B7009F9BFC /* mini_roller_coaster.c */; }; + C64FDA751D6D9A2100F259B9 /* mini_suspended_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CC1CDBC3B7009F9BFC /* mini_suspended_coaster.c */; }; + C64FDA761D6D9A2100F259B9 /* multi_dimension_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CD1CDBC3B7009F9BFC /* multi_dimension_roller_coaster.c */; }; + C64FDA771D6D9A2100F259B9 /* reverse_freefall_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */; }; + C64FDA781D6D9A2100F259B9 /* reverser_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */; }; + C64FDA791D6D9A2100F259B9 /* side_friction_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */; }; + C64FDA7A1D6D9A2100F259B9 /* spiral_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D11CDBC3B7009F9BFC /* spiral_roller_coaster.c */; }; + C64FDA7B1D6D9A2100F259B9 /* stand_up_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */; }; + C64FDA7C1D6D9A2100F259B9 /* steeplechase.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D31CDBC3B7009F9BFC /* steeplechase.c */; }; + C64FDA7D1D6D9A2100F259B9 /* suspended_swinging_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */; }; + C64FDA7E1D6D9A2100F259B9 /* twister_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D51CDBC3B7009F9BFC /* twister_roller_coaster.c */; }; + C64FDA7F1D6D9A2100F259B9 /* vertical_drop_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D61CDBC3B7009F9BFC /* vertical_drop_roller_coaster.c */; }; + C64FDA801D6D9A2100F259B9 /* virginia_reel.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D71CDBC3B7009F9BFC /* virginia_reel.c */; }; + C64FDA811D6D9A2100F259B9 /* wild_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D81CDBC3B7009F9BFC /* wild_mouse.c */; }; + C64FDA821D6D9A2100F259B9 /* wooden_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D91CDBC3B7009F9BFC /* wooden_roller_coaster.c */; }; + C64FDA831D6D9A2100F259B9 /* wooden_wild_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DA1CDBC3B7009F9BFC /* wooden_wild_mouse.c */; }; + C64FDA841D6D9A2100F259B9 /* car_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DC1CDBC3B7009F9BFC /* car_ride.c */; }; + C64FDA851D6D9A2100F259B9 /* circus_show.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DD1CDBC3B7009F9BFC /* circus_show.c */; }; + C64FDA861D6D9A2100F259B9 /* crooked_house.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DE1CDBC3B7009F9BFC /* crooked_house.c */; }; + C64FDA871D6D9A2100F259B9 /* dodgems.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DF1CDBC3B7009F9BFC /* dodgems.c */; }; + C64FDA881D6D9A2100F259B9 /* ferris_wheel.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E01CDBC3B7009F9BFC /* ferris_wheel.c */; }; + C64FDA891D6D9A2100F259B9 /* flying_saucers.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E11CDBC3B7009F9BFC /* flying_saucers.c */; }; + C64FDA8A1D6D9A2100F259B9 /* ghost_train.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E21CDBC3B7009F9BFC /* ghost_train.c */; }; + C64FDA8B1D6D9A2100F259B9 /* haunted_house.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E31CDBC3B7009F9BFC /* haunted_house.c */; }; + C64FDA8C1D6D9A2100F259B9 /* maze.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E41CDBC3B7009F9BFC /* maze.c */; }; + C64FDA8D1D6D9A2100F259B9 /* merry_go_round.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E51CDBC3B7009F9BFC /* merry_go_round.c */; }; + C64FDA8E1D6D9A2100F259B9 /* mini_golf.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E61CDBC3B7009F9BFC /* mini_golf.c */; }; + C64FDA8F1D6D9A2100F259B9 /* mini_helicopters.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E71CDBC3B7009F9BFC /* mini_helicopters.c */; }; + C64FDA901D6D9A2100F259B9 /* monorail_cycles.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E81CDBC3B7009F9BFC /* monorail_cycles.c */; }; + C64FDA911D6D9A2100F259B9 /* observation_tower.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E91CDBC3B7009F9BFC /* observation_tower.c */; }; + C64FDA921D6D9A2100F259B9 /* space_rings.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EA1CDBC3B7009F9BFC /* space_rings.c */; }; + C64FDA931D6D9A2100F259B9 /* spiral_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EB1CDBC3B7009F9BFC /* spiral_slide.c */; }; + C64FDA941D6D9A2100F259B9 /* facility.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8ED1CDBC3B7009F9BFC /* facility.c */; }; + C64FDA951D6D9A2100F259B9 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EE1CDBC3B7009F9BFC /* misc.c */; }; + C64FDA961D6D9A2100F259B9 /* shop.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EF1CDBC3B7009F9BFC /* shop.c */; }; + C64FDA971D6D9A2100F259B9 /* 3d_cinema.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F11CDBC3B7009F9BFC /* 3d_cinema.c */; }; + C64FDA981D6D9A2100F259B9 /* enterprise.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F21CDBC3B7009F9BFC /* enterprise.c */; }; + C64FDA991D6D9A2100F259B9 /* go_karts.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F31CDBC3B7009F9BFC /* go_karts.c */; }; + C64FDA9A1D6D9A2100F259B9 /* launched_freefall.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F41CDBC3B7009F9BFC /* launched_freefall.c */; }; + C64FDA9B1D6D9A2100F259B9 /* magic_carpet.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F51CDBC3B7009F9BFC /* magic_carpet.c */; }; + C64FDA9C1D6D9A2100F259B9 /* motion_simulator.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F61CDBC3B7009F9BFC /* motion_simulator.c */; }; + C64FDA9D1D6D9A2100F259B9 /* pirate_ship.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F71CDBC3B7009F9BFC /* pirate_ship.c */; }; + C64FDA9E1D6D9A2100F259B9 /* roto_drop.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F81CDBC3B7009F9BFC /* roto_drop.c */; }; + C64FDA9F1D6D9A2100F259B9 /* swinging_inverter_ship.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F91CDBC3B7009F9BFC /* swinging_inverter_ship.c */; }; + C64FDAA01D6D9A2100F259B9 /* top_spin.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FA1CDBC3B7009F9BFC /* top_spin.c */; }; + 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 */; }; + 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 */; }; + C64FDAA81D6D9A2100F259B9 /* dingy_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9041CDBC3B7009F9BFC /* dingy_slide.c */; }; + C64FDAA91D6D9A2100F259B9 /* log_flume.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9051CDBC3B7009F9BFC /* log_flume.c */; }; + C64FDAAA1D6D9A2100F259B9 /* river_rafts.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9061CDBC3B7009F9BFC /* river_rafts.c */; }; + C64FDAAB1D6D9A2100F259B9 /* river_rapids.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9071CDBC3B7009F9BFC /* river_rapids.c */; }; + C64FDAAC1D6D9A2100F259B9 /* splash_boats.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9081CDBC3B7009F9BFC /* splash_boats.c */; }; + C64FDAAD1D6D9A2100F259B9 /* submarine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9091CDBC3B7009F9BFC /* submarine_ride.c */; }; + C64FDAAE1D6D9A2100F259B9 /* water_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F90A1CDBC3B7009F9BFC /* water_coaster.c */; }; + C64FDABC1D6D9C8800F259B9 /* addresses.c in Sources */ = {isa = PBXBuildFile; fileRef = D44270CD1CC81B3200D84D28 /* addresses.c */; }; + C64FDABE1D6D9CD900F259B9 /* ride_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271731CC81B3200D84D28 /* ride_data.c */; }; + C64FDABF1D6D9CEA00F259B9 /* map_element.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F89B1CDBC37E009F9BFC /* map_element.c */; }; + C64FDAC01D6D9E3B00F259B9 /* track_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D442717B1CC81B3200D84D28 /* track_data.c */; }; + C64FDAC21D6DA0B800F259B9 /* diagnostic.c in Sources */ = {isa = PBXBuildFile; fileRef = D44270FE1CC81B3200D84D28 /* diagnostic.c */; }; + C64FDAC31D6DA41000F259B9 /* track_paint.c in Sources */ = {isa = PBXBuildFile; fileRef = D442717D1CC81B3200D84D28 /* track_paint.c */; }; + C64FDAC51D6DA55E00F259B9 /* compat.c in Sources */ = {isa = PBXBuildFile; fileRef = C64FDAC41D6DA55E00F259B9 /* compat.c */; }; + C64FDAC81D6DA72400F259B9 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = C64FDAC71D6DA72400F259B9 /* main.c */; }; + C64FDACA1D6DA92D00F259B9 /* data.c in Sources */ = {isa = PBXBuildFile; fileRef = C64FDAC91D6DA92D00F259B9 /* data.c */; }; C650B2191CCABBDD00B4D91C /* S4Importer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C650B2151CCABBDD00B4D91C /* S4Importer.cpp */; }; C650B21A1CCABBDD00B4D91C /* tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C650B2171CCABBDD00B4D91C /* tables.cpp */; }; C650B21C1CCABC4400B4D91C /* ConvertCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C650B21B1CCABC4400B4D91C /* ConvertCommand.cpp */; }; @@ -356,6 +440,15 @@ /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ + C64FDA5B1D6D99F400F259B9 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; D41B74201C210B190080A7B9 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -401,6 +494,10 @@ C612A8981D64825300B634CA /* vehicle_data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vehicle_data.h; sourceTree = ""; }; C61FB7221CF86356004CE991 /* NetworkUser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkUser.cpp; sourceTree = ""; usesTabs = 0; }; C61FB7231CF86356004CE991 /* NetworkUser.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkUser.h; sourceTree = ""; usesTabs = 0; }; + C64FDA5D1D6D99F400F259B9 /* PaintTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PaintTest; sourceTree = BUILT_PRODUCTS_DIR; }; + C64FDAC41D6DA55E00F259B9 /* compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compat.c; sourceTree = ""; }; + C64FDAC71D6DA72400F259B9 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + C64FDAC91D6DA92D00F259B9 /* data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = data.c; sourceTree = ""; }; C650B2151CCABBDD00B4D91C /* S4Importer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = S4Importer.cpp; sourceTree = ""; usesTabs = 0; }; C650B2161CCABBDD00B4D91C /* S4Importer.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = S4Importer.h; sourceTree = ""; usesTabs = 0; }; C650B2171CCABBDD00B4D91C /* tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tables.cpp; sourceTree = ""; usesTabs = 0; }; @@ -1022,6 +1119,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + C64FDA5A1D6D99F400F259B9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; D497D0751C20FD52002BF46A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1042,6 +1146,16 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + C64FDA5E1D6D99F400F259B9 /* PaintTest */ = { + isa = PBXGroup; + children = ( + C64FDAC41D6DA55E00F259B9 /* compat.c */, + C64FDAC71D6DA72400F259B9 /* main.c */, + C64FDAC91D6DA92D00F259B9 /* data.c */, + ); + path = PaintTest; + sourceTree = ""; + }; C650B2141CCABBDD00B4D91C /* rct1 */ = { isa = PBXGroup; children = ( @@ -1941,6 +2055,7 @@ D41B72431C21015A0080A7B9 /* Sources */, D497D07A1C20FD52002BF46A /* Resources */, D41B73ED1C21017D0080A7B9 /* Libraries */, + C64FDA5E1D6D99F400F259B9 /* PaintTest */, D497D0791C20FD52002BF46A /* Products */, ); sourceTree = ""; @@ -1950,6 +2065,7 @@ isa = PBXGroup; children = ( D497D0781C20FD52002BF46A /* OpenRCT2.app */, + C64FDA5D1D6D99F400F259B9 /* PaintTest */, ); name = Products; sourceTree = ""; @@ -2018,6 +2134,24 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + C64FDA5C1D6D99F400F259B9 /* PaintTest */ = { + isa = PBXNativeTarget; + buildConfigurationList = C64FDA631D6D99F400F259B9 /* Build configuration list for PBXNativeTarget "PaintTest" */; + buildPhases = ( + C64FDAC61D6DA64A00F259B9 /* Create Segment Files */, + C64FDA591D6D99F400F259B9 /* Sources */, + C64FDA5A1D6D99F400F259B9 /* Frameworks */, + C64FDA5B1D6D99F400F259B9 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PaintTest; + productName = PaintTest; + productReference = C64FDA5D1D6D99F400F259B9 /* PaintTest */; + productType = "com.apple.product-type.tool"; + }; D497D0771C20FD52002BF46A /* OpenRCT2 */ = { isa = PBXNativeTarget; buildConfigurationList = D497D0891C20FD53002BF46A /* Build configuration list for PBXNativeTarget "OpenRCT2" */; @@ -2050,6 +2184,9 @@ LastUpgradeCheck = 0800; ORGANIZATIONNAME = OpenRCT2; TargetAttributes = { + C64FDA5C1D6D99F400F259B9 = { + CreatedOnToolsVersion = 7.3.1; + }; D497D0771C20FD52002BF46A = { CreatedOnToolsVersion = 7.2; }; @@ -2069,6 +2206,7 @@ projectRoot = ""; targets = ( D497D0771C20FD52002BF46A /* OpenRCT2 */, + C64FDA5C1D6D99F400F259B9 /* PaintTest */, ); }; /* End PBXProject section */ @@ -2090,6 +2228,23 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + C64FDAC61D6DA64A00F259B9 /* Create Segment Files */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/openrct2.exe", + ); + name = "Create Segment Files"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/openrct2_text", + "$(DERIVED_FILE_DIR)/openrct2_data", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "dd if=\"${SRCROOT}/openrct2.exe\" of=\"${DERIVED_FILE_DIR}/openrct2_text\" bs=4096 skip=1 count=1187\ndd if=\"${SRCROOT}/openrct2.exe\" of=\"${DERIVED_FILE_DIR}/openrct2_data\" bs=4096 skip=1188 count=318\ndd if=/dev/zero of=\"${DERIVED_FILE_DIR}/openrct2_data\" bs=4096 seek=318 count=2630 conv=notrunc\ndd if=\"${SRCROOT}/openrct2.exe\" of=\"${DERIVED_FILE_DIR}/openrct2_data\" bs=4096 skip=1506 seek=2948 count=1 conv=notrunc"; + }; D40F4E1D1C2528D5009582C9 /* Create Segment Files */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -2186,6 +2341,97 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + C64FDA591D6D99F400F259B9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C64FDAC31D6DA41000F259B9 /* track_paint.c in Sources */, + C64FDAC21D6DA0B800F259B9 /* diagnostic.c in Sources */, + C64FDAC01D6D9E3B00F259B9 /* track_data.c in Sources */, + C64FDABF1D6D9CEA00F259B9 /* map_element.c in Sources */, + C64FDABE1D6D9CD900F259B9 /* ride_data.c in Sources */, + C64FDABC1D6D9C8800F259B9 /* addresses.c in Sources */, + C64FDA641D6D9A2100F259B9 /* air_powered_vertical_coaster.c in Sources */, + C64FDA651D6D9A2100F259B9 /* bobsleigh_coaster.c in Sources */, + C64FDA661D6D9A2100F259B9 /* compact_inverted_coaster.c in Sources */, + C64FDA671D6D9A2100F259B9 /* corkscrew_roller_coaster.c in Sources */, + C64FDA681D6D9A2100F259B9 /* flying_roller_coaster.c in Sources */, + C64FDA691D6D9A2100F259B9 /* giga_coaster.c in Sources */, + C64FDA6A1D6D9A2100F259B9 /* heartline_twister_coaster.c in Sources */, + C64FDA6B1D6D9A2100F259B9 /* inverted_hairpin_coaster.c in Sources */, + C64FDA6C1D6D9A2100F259B9 /* inverted_impulse_coaster.c in Sources */, + C64FDA6D1D6D9A2100F259B9 /* inverted_roller_coaster.c in Sources */, + C64FDA6E1D6D9A2100F259B9 /* junior_roller_coaster.c in Sources */, + C64FDA6F1D6D9A2100F259B9 /* lay_down_roller_coaster.c in Sources */, + C64FDA701D6D9A2100F259B9 /* lim_launched_roller_coaster.c in Sources */, + C64FDA711D6D9A2100F259B9 /* looping_roller_coaster.c in Sources */, + C64FDAC81D6DA72400F259B9 /* main.c in Sources */, + C64FDA721D6D9A2100F259B9 /* mine_ride.c in Sources */, + C64FDA731D6D9A2100F259B9 /* mine_train_coaster.c in Sources */, + C64FDA741D6D9A2100F259B9 /* mini_roller_coaster.c in Sources */, + C64FDA751D6D9A2100F259B9 /* mini_suspended_coaster.c in Sources */, + C64FDA761D6D9A2100F259B9 /* multi_dimension_roller_coaster.c in Sources */, + C64FDA771D6D9A2100F259B9 /* reverse_freefall_coaster.c in Sources */, + C64FDA781D6D9A2100F259B9 /* reverser_roller_coaster.c in Sources */, + C64FDA791D6D9A2100F259B9 /* side_friction_roller_coaster.c in Sources */, + C64FDACA1D6DA92D00F259B9 /* data.c in Sources */, + C64FDA7A1D6D9A2100F259B9 /* spiral_roller_coaster.c in Sources */, + C64FDA7B1D6D9A2100F259B9 /* stand_up_roller_coaster.c in Sources */, + C64FDA7C1D6D9A2100F259B9 /* steeplechase.c in Sources */, + C64FDA7D1D6D9A2100F259B9 /* suspended_swinging_coaster.c in Sources */, + C64FDA7E1D6D9A2100F259B9 /* twister_roller_coaster.c in Sources */, + C64FDA7F1D6D9A2100F259B9 /* vertical_drop_roller_coaster.c in Sources */, + C64FDA801D6D9A2100F259B9 /* virginia_reel.c in Sources */, + C64FDA811D6D9A2100F259B9 /* wild_mouse.c in Sources */, + C64FDA821D6D9A2100F259B9 /* wooden_roller_coaster.c in Sources */, + C64FDA831D6D9A2100F259B9 /* wooden_wild_mouse.c in Sources */, + C64FDA841D6D9A2100F259B9 /* car_ride.c in Sources */, + C64FDA851D6D9A2100F259B9 /* circus_show.c in Sources */, + C64FDA861D6D9A2100F259B9 /* crooked_house.c in Sources */, + C64FDA871D6D9A2100F259B9 /* dodgems.c in Sources */, + C64FDA881D6D9A2100F259B9 /* ferris_wheel.c in Sources */, + C64FDA891D6D9A2100F259B9 /* flying_saucers.c in Sources */, + C64FDA8A1D6D9A2100F259B9 /* ghost_train.c in Sources */, + C64FDA8B1D6D9A2100F259B9 /* haunted_house.c in Sources */, + C64FDA8C1D6D9A2100F259B9 /* maze.c in Sources */, + C64FDA8D1D6D9A2100F259B9 /* merry_go_round.c in Sources */, + C64FDA8E1D6D9A2100F259B9 /* mini_golf.c in Sources */, + C64FDA8F1D6D9A2100F259B9 /* mini_helicopters.c in Sources */, + C64FDA901D6D9A2100F259B9 /* monorail_cycles.c in Sources */, + C64FDA911D6D9A2100F259B9 /* observation_tower.c in Sources */, + C64FDA921D6D9A2100F259B9 /* space_rings.c in Sources */, + C64FDA931D6D9A2100F259B9 /* spiral_slide.c in Sources */, + C64FDA941D6D9A2100F259B9 /* facility.c in Sources */, + C64FDAC51D6DA55E00F259B9 /* compat.c in Sources */, + C64FDA951D6D9A2100F259B9 /* misc.c in Sources */, + C64FDA961D6D9A2100F259B9 /* shop.c in Sources */, + C64FDA971D6D9A2100F259B9 /* 3d_cinema.c in Sources */, + C64FDA981D6D9A2100F259B9 /* enterprise.c in Sources */, + C64FDA991D6D9A2100F259B9 /* go_karts.c in Sources */, + C64FDA9A1D6D9A2100F259B9 /* launched_freefall.c in Sources */, + C64FDA9B1D6D9A2100F259B9 /* magic_carpet.c in Sources */, + C64FDA9C1D6D9A2100F259B9 /* motion_simulator.c in Sources */, + C64FDA9D1D6D9A2100F259B9 /* pirate_ship.c in Sources */, + C64FDA9E1D6D9A2100F259B9 /* roto_drop.c in Sources */, + C64FDA9F1D6D9A2100F259B9 /* swinging_inverter_ship.c in Sources */, + C64FDAA01D6D9A2100F259B9 /* top_spin.c in Sources */, + C64FDAA11D6D9A2100F259B9 /* twist.c in Sources */, + C64FDAA21D6D9A2100F259B9 /* chairlift.c in Sources */, + C64FDAA31D6D9A2100F259B9 /* lift.c in Sources */, + C64FDAA41D6D9A2100F259B9 /* minature_railway.c in Sources */, + C64FDAA51D6D9A2100F259B9 /* monorail.c in Sources */, + C64FDAA61D6D9A2100F259B9 /* suspended_monorail.c in Sources */, + C64FDAA71D6D9A2100F259B9 /* boat_ride.c in Sources */, + C64FDAA81D6D9A2100F259B9 /* dingy_slide.c in Sources */, + C64FDAA91D6D9A2100F259B9 /* log_flume.c in Sources */, + C64FDAAA1D6D9A2100F259B9 /* river_rafts.c in Sources */, + C64FDAAB1D6D9A2100F259B9 /* river_rapids.c in Sources */, + C64FDAAC1D6D9A2100F259B9 /* splash_boats.c in Sources */, + C64FDAAD1D6D9A2100F259B9 /* submarine_ride.c in Sources */, + C64FDAAE1D6D9A2100F259B9 /* water_coaster.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D497D0741C20FD52002BF46A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2518,6 +2764,112 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + C64FDA611D6D99F400F259B9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "-"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "NO_VEHICLES=1", + ); + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/libxc/include", + "$(SRCROOT)/libxc/include/SDL2", + ); + LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/libxc/lib"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = ( + "-sectcreate", + rct2_text, + __text, + "$(DERIVED_FILE_DIR)/openrct2_text", + "-segaddr", + rct2_text, + 0x401000, + "-segprot", + rct2_text, + rwx, + rx, + "-sectcreate", + rct2_data, + __data, + "$(DERIVED_FILE_DIR)/openrct2_data", + "-segaddr", + rct2_data, + 0x8a4000, + "-segprot", + rct2_data, + rw, + rw, + "-segaddr", + __TEXT, + 0x2000000, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + C64FDA621D6D99F400F259B9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "-"; + GCC_PREPROCESSOR_DEFINITIONS = ( + OPENGL_NO_LINK, + "OPENRCT2_BUILD_INFO_HEADER=\"\\\"$(DERIVED_FILE_DIR)/gitversion.h\\\"\"", + "NO_VEHICLES=1", + ); + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/libxc/include", + "$(SRCROOT)/libxc/include/SDL2", + ); + LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/libxc/lib"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = ( + "-sectcreate", + rct2_text, + __text, + "$(DERIVED_FILE_DIR)/openrct2_text", + "-segaddr", + rct2_text, + 0x401000, + "-segprot", + rct2_text, + rwx, + rx, + "-sectcreate", + rct2_data, + __data, + "$(DERIVED_FILE_DIR)/openrct2_data", + "-segaddr", + rct2_data, + 0x8a4000, + "-segprot", + rct2_data, + rw, + rw, + "-segaddr", + __TEXT, + 0x2000000, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; D497D0871C20FD53002BF46A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2716,6 +3068,14 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + C64FDA631D6D99F400F259B9 /* Build configuration list for PBXNativeTarget "PaintTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C64FDA611D6D99F400F259B9 /* Debug */, + C64FDA621D6D99F400F259B9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; D497D0731C20FD52002BF46A /* Build configuration list for PBXProject "OpenRCT2" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/PaintTest/compat.c b/PaintTest/compat.c new file mode 100644 index 0000000000..faf2f3e069 --- /dev/null +++ b/PaintTest/compat.c @@ -0,0 +1,141 @@ +#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 + +#include "../src/config.h" +#include "../src/object.h" +#include "../src/interface/colour.h" +#include "../src/ride/ride.h" +#include "../src/ride/track.h" +#include "../src/world/sprite.h" + +#define gRideEntries RCT2_ADDRESS(RCT2_ADDRESS_RIDE_ENTRIES, rct_ride_entry*) +#define gCurrentRotation RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8) + +rct_map_element *gMapElements = (rct_map_element *) RCT2_ADDRESS_MAP_ELEMENTS; +rct_map_element **gMapElementTilePointers = (rct_map_element **) RCT2_ADDRESS_TILE_MAP_ELEMENT_POINTERS; +rct_ride *gRideList = RCT2_ADDRESS(RCT2_ADDRESS_RIDE_LIST, rct_ride); +rct_sprite *sprite_list = RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite); + + +const rct_xy16 TileDirectionDelta[] = { + {-32, 0}, + {0, +32}, + {+32, 0}, + {0, -32}, + {-32, +32}, + {+32, +32}, + {+32, -32}, + {-32, -32} +}; + +uint8 get_current_rotation() { + return gCurrentRotation & 3; +} + +const uint32 construction_markers[] = { + COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_USE_PALETTE << 28, // White + 2 << 19 | 0b110000 << 19 | IMAGE_TYPE_MIX_BACKGROUND << 28, // Translucent +}; + +int object_entry_group_counts[] = { + 128, // rides + 252, // small scenery + 128, // large scenery + 128, // walls + 32, // banners + 16, // paths + 15, // path bits + 19, // scenery sets + 1, // park entrance + 1, // water + 1 // scenario text +}; + + +general_configuration gConfigGeneral; +uint32 gCurrentViewportFlags = 0; +uint16 gMapSelectFlags; +uint16 gMapSelectType; +rct_xy16 gMapSelectPositionA; +rct_xy16 gMapSelectPositionB; +rct_xyz16 gMapSelectArrowPosition; +uint8 gMapSelectArrowDirection; + +void entrance_paint(uint8 direction, int height, rct_map_element *map_element) { } +void banner_paint(uint8 direction, int height, rct_map_element *map_element) { } +void surface_paint(uint8 direction, uint16 height, rct_map_element *mapElement) { } +void path_paint(uint8 direction, uint16 height, rct_map_element *mapElement) { } +void scenery_paint(uint8 direction, int height, rct_map_element *mapElement) { } +void fence_paint(uint8 direction, int height, rct_map_element *mapElement) { } +void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *mapElement) { } + +rct_ride *get_ride(int index) { + if (index < 0 || index >= MAX_RIDES) { + log_error("invalid index %d for ride", index); + return NULL; + } + return &gRideList[index]; +} + +rct_ride_entry *get_ride_entry(int index) { + if (index < 0 || index >= object_entry_group_counts[OBJECT_TYPE_RIDE]) { + log_error("invalid index %d for ride type", index); + return NULL; + } + return gRideEntries[index]; +} + +rct_ride_entry *get_ride_entry_by_ride(rct_ride *ride) { + rct_ride_entry *type = get_ride_entry(ride->subtype); + if (type == NULL) { + log_error("Invalid ride subtype for ride"); + } + return type; +} + +rct_sprite *get_sprite(size_t sprite_idx) { + assert(sprite_idx < MAX_SPRITES); + return &sprite_list[sprite_idx]; +} + +int map_element_is_last_for_tile(const rct_map_element *element) { + return element->flags & MAP_ELEMENT_FLAG_LAST_TILE; +} + +int map_element_get_type(const rct_map_element *element) { + return element->type & MAP_ELEMENT_TYPE_MASK; +} + +int map_element_get_direction(const rct_map_element *element) { + return element->type & MAP_ELEMENT_DIRECTION_MASK; +} + +rct_map_element *map_get_first_element_at(int x, int y) { + if (x < 0 || y < 0 || x > 255 || y > 255) { + log_error("Trying to access element outside of range"); + return NULL; + } + return gMapElementTilePointers[x + y * 256]; +} + +int map_get_station(rct_map_element *mapElement) { + return (mapElement->properties.track.sequence & 0x70) >> 4; +} + +bool ride_type_has_flag(int rideType, int flag) +{ + return (RideProperties[rideType].flags & flag) != 0; +} diff --git a/PaintTest/data.c b/PaintTest/data.c new file mode 100644 index 0000000000..bfb6047f76 --- /dev/null +++ b/PaintTest/data.c @@ -0,0 +1,628 @@ +#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 + +#include "../src/common.h" + +const utf8string RideNames[91] = { + "Spiral Roller Coaster", + "Stand-up Roller Coaster", + "Suspended Swinging Coaster", + "Inverted Roller Coaster", + "Junior Roller Coaster", + "Miniature Railway", + "Monorail", + "Mini Suspended Coaster", + "Boat Ride", + "Wooden Wild Mouse", + "Steeplechase", + "Car Ride", + "Launched Freefall", + "Bobsleigh Coaster", + "Observation Tower", + "Looping Roller Coaster", + "Dinghy Slide", + "Mine Train Coaster", + "Chairlift", + "Corkscrew Roller Coaster", + "Maze", + "Spiral Slide", + "Go Karts", + "Log Flume", + "River Rapids", + "Dodgems", + "Pirate Ship", + "Swinging Inverter Ship", + "Food Stall", + "Unknown Stall", + "Drink Stall", + "Unknown Stall", + "Shop", + "Merry-Go-Round", + "Unknown Stall", + "Information Kiosk", + "Toilets", + "Ferris Wheel", + "Motion Simulator", + "3D Cinema", + "Top Spin", + "Space Rings", + "Reverse Freefall Coaster", + "Lift", + "Vertical Drop Roller Coaster", + "Cash Machine", + "Twist", + "Haunted House", + "First Aid Room", + "Circus Show", + "Ghost Train", + "Steel Twister Roller Coaster", + "Wooden Roller Coaster", + "Side-Friction Roller Coaster", + "Wild Mouse", + "Multi-Dimension Roller Coaster", + "Unknown Ride", + "Flying Roller Coaster", + "Unknown Ride", + "Virginia Reel", + "Splash Boats", + "Mini Helicopters", + "Lay-down Roller Coaster", + "Suspended Monorail", + "Unknown Ride", + "Reverser Roller Coaster", + "Heartline Twister Coaster", + "Mini Golf", + "Giga Coaster", + "Roto-Drop", + "Flying Saucers", + "Crooked House", + "Monorail Cycles", + "Compact Inverted Coaster", + "Water Coaster", + "Air Powered Vertical Coaster", + "Inverted Hairpin Coaster", + "Magic Carpet", + "Submarine Ride", + "River Rafts", + "Unknown Ride", + "Enterprise", + "Unknown Ride", + "Unknown Ride", + "Unknown Ride", + "Unknown Ride", + "Inverted Impulse Coaster", + "Mini Roller Coaster", + "Mine Ride", + "Unknown Ride", + "LIM Launched Roller Coaster", +}; + +const utf8string TrackNames[256] = { + "Flat", + "End Station", + "Begin Station", + "Middle Station", + "25 Deg Up", + "60 Deg Up", + "Flat to 25 deg Up", + "25 Deg up to 60 deg Up", + "60 Deg up to 25 deg Up", + "25 Deg up to Flat", + "25 Deg Down", + "60 Deg Down", + "Flat to 25 deg Down", + "25 Deg Down to 60 deg Down", + "60 Deg Down to 25 deg Down", + "25 Deg Down to Flat", + "Left Quarter Turn 5 Tiles", + "Right Quarter Turn 5 Tiles", + "Flat to Left Bank", + "Flat to Right Bank", + "Left Bank to Flat", + "Right Bank to Flat", + "Banked Left Quarter Turn 5 Tiles", + "Banked Right Quarter Turn 5 Tiles", + "Left Bank to 25 deg Up", + "Right Bank to 25 deg Up", + "25 Deg up to Left Bank", + "25 Deg up to Right Bank", + "Left Bank to 25 deg Down", + "Right Bank to 25 deg Down", + "25 Deg Down to Left Bank", + "25 Deg Down to Right Bank", + "Left Bank", + "Right Bank", + "Left Quarter Turn 5 Tiles 25 deg Up", + "Right Quarter Turn 5 Tiles 25 deg Up", + "Left Quarter Turn 5 Tiles 25 deg Down", + "Right Quarter Turn 5 Tiles 25 deg Down", + "S Bend Left", + "S Bend Right", + "Left Vertical Loop", + "Right Vertical Loop", + "Left Quarter Turn 3 Tiles", + "Right Quarter Turn 3 Tiles", + "Left Quarter Turn 3 Tiles Bank", + "Right Quarter Turn 3 Tiles Bank", + "Left Quarter Turn 3 Tiles 25 deg Up", + "Right Quarter Turn 3 Tiles 25 deg Up", + "Left Quarter Turn 3 Tiles 25 deg Down", + "Right Quarter Turn 3 Tiles 25 deg Down", + "Left Quarter Turn 1 Tile", + "Right Quarter Turn 1 Tile", + "Left Twist Down to Up", + "Right Twist Down to Up", + "Left Twist up to Down", + "Right Twist up to Down", + "Half Loop Up", + "Half Loop Down", + "Left Corkscrew Up", + "Right Corkscrew Up", + "Left Corkscrew Down", + "Right Corkscrew Down", + "Flat to 60 deg Up", + "60 Deg up to Flat", + "Flat to 60 deg Down", + "60 Deg Down to Flat", + "Tower Base", + "Tower Section", + "Flat Covered", + "25 Deg up Covered", + "60 Deg up Covered", + "Flat to 25 deg up Covered", + "25 Deg up to 60 deg up Covered", + "60 Deg up to 25 deg up Covered", + "25 Deg up to Flat Covered", + "25 Deg Down Covered", + "60 Deg Down Covered", + "Flat to 25 deg Down Covered", + "25 Deg Down to 60 deg Down Covered", + "60 Deg Down to 25 deg Down Covered", + "25 Deg Down to Flat Covered", + "Left Quarter Turn 5 Tiles Covered", + "Right Quarter Turn 5 Tiles Covered", + "S Bend Left Covered", + "S Bend Right Covered", + "Left Quarter Turn 3 Tiles Covered", + "Right Quarter Turn 3 Tiles Covered", + "Left Half Banked Helix up Small", + "Right Half Banked Helix up Small", + "Left Half Banked Helix Down Small", + "Right Half Banked Helix Down Small", + "Left Half Banked Helix up Large", + "Right Half Banked Helix up Large", + "Left Half Banked Helix Down Large", + "Right Half Banked Helix Down Large", + "Left Quarter Turn 1 Tile 60 deg Up", + "Right Quarter Turn 1 Tile 60 deg Up", + "Left Quarter Turn 1 Tile 60 deg Down", + "Right Quarter Turn 1 Tile 60 deg Down", + "Brakes", + "Rotation Control Toggle", + "Inverted 90 deg up to Flat Quarter Loop/Maze", + "Left Quarter Banked Helix Large Up", + "Right Quarter Banked Helix Large Up", + "Left Quarter Banked Helix Large Down", + "Right Quarter Banked Helix Large Down", + "Left Quarter Helix Large Up", + "Right Quarter Helix Large Up", + "Left Quarter Helix Large Down", + "Right Quarter Helix Large Down", + "25 Deg up Left Banked", + "25 Deg up Right Banked", + "Waterfall", + "Rapids", + "On Ride Photo", + "25 Deg Down Left Banked", + "25 Deg Down Right Banked", + "Water Splash", + "Flat to 60 deg up Long Base", + "60 Deg up to Flat Long Base", + "Whirlpool", + "Flat to 60 deg Down Long Base", + "60 Deg up to Flat Long Base 122", + "Cable Lift Hill", + "Reverse Whoa Belly Slope", + "Reverse Whoa Belly Vertical", + "90 Deg Up", + "90 Deg Down", + "60 Deg up to 90 deg Up", + "90 Deg Down to 60 deg Down", + "90 Deg up to 60 deg Up", + "60 Deg Down to 90 deg Down", + "Brake for Drop", + "Left Eighth to Diag", + "Right Eighth to Diag", + "Left Eighth to Orthogonal", + "Right Eighth to Orthogonal", + "Left Eighth Bank to Diag", + "Right Eighth Bank to Diag", + "Left Eighth Bank to Orthogonal", + "Right Eighth Bank to Orthogonal", + "Diag Flat", + "Diag 25 deg Up", + "Diag 60 deg Up", + "Diag Flat to 25 deg Up", + "Diag 25 deg up to 60 deg Up", + "Diag 60 deg up to 25 deg Up", + "Diag 25 deg up to Flat", + "Diag 25 deg Down", + "Diag 60 deg Down", + "Diag Flat to 25 deg Down", + "Diag 25 deg Down to 60 deg Down", + "Diag 60 deg Down to 25 deg Down", + "Diag 25 deg Down to Flat", + "Diag Flat to 60 deg Up", + "Diag 60 deg up to Flat", + "Diag Flat to 60 deg Down", + "Diag 60 deg Down to Flat", + "Diag Flat to Left Bank", + "Diag Flat to Right Bank", + "Diag Left Bank to Flat", + "Diag Right Bank to Flat", + "Diag Left Bank to 25 deg Up", + "Diag Right Bank to 25 deg Up", + "Diag 25 deg up to Left Bank", + "Diag 25 deg up to Right Bank", + "Diag Left Bank to 25 deg Down", + "Diag Right Bank to 25 deg Down", + "Diag 25 deg Down to Left Bank", + "Diag 25 deg Down to Right Bank", + "Diag Left Bank", + "Diag Right Bank", + "Log Flume Reverser", + "Spinning Tunnel", + "Left Barrel Roll up to Down", + "Right Barrel Roll up to Down", + "Left Barrel Roll Down to Up", + "Right Barrel Roll Down to Up", + "Left Bank to Left Quarter Turn 3 Tiles 25 deg Up", + "Right Bank to Right Quarter Turn 3 Tiles 25 deg Up", + "Left Quarter Turn 3 Tiles 25 deg Down to Left Bank", + "Right Quarter Turn 3 Tiles 25 deg Down to Right Bank", + "Powered Lift", + "Left Large Half Loop Up", + "Right Large Half Loop Up", + "Right Large Half Loop Down", + "Left Large Half Loop Down", + "Left Flyer Twist Up", + "Right Flyer Twist Up", + "Left Flyer Twist Down", + "Right Flyer Twist Down", + "Flyer Half Loop Up", + "Flyer Half Loop Down", + "Left Flyer Corkscrew Up", + "Right Flyer Corkscrew Up", + "Left Flyer Corkscrew Down", + "Right Flyer Corkscrew Down", + "Heartline Transfer Up", + "Heartline Transfer Down", + "Left Heartline Roll", + "Right Heartline Roll", + "Mini Golf Hole A", + "Mini Golf Hole B", + "Mini Golf Hole C", + "Mini Golf Hole D", + "Mini Golf Hole E", + "Multidim Inverted Flat to 90 deg Quarter Loop Down", + "90 Deg to Inverted Flat Quarter Loop Up", + "Inverted Flat to 90 deg Quarter Loop Down", + "Left Curved Lift Hill", + "Right Curved Lift Hill", + "Left Reverser", + "Right Reverser", + "Air Thrust top Cap", + "Air Thrust Vertical Down", + "Air Thrust Vertical Down to Level", + "Block Brakes", + "Left Banked Quarter Turn 3 Tile 25 deg Up", + "Right Banked Quarter Turn 3 Tile 25 deg Up", + "Left Banked Quarter Turn 3 Tile 25 deg Down", + "Right Banked Quarter Turn 3 Tile 25 deg Down", + "Left Banked Quarter Turn 5 Tile 25 deg Up", + "Right Banked Quarter Turn 5 Tile 25 deg Up", + "Left Banked Quarter Turn 5 Tile 25 deg Down", + "Right Banked Quarter Turn 5 Tile 25 deg Down", + "25 Deg up to Left Banked 25 deg Up", + "25 Deg up to Right Banked 25 deg Up", + "Left Banked 25 deg up to 25 deg Up", + "Right Banked 25 deg up to 25 deg Up", + "25 Deg Down to Left Banked 25 deg Down", + "25 Deg Down to Right Banked 25 deg Down", + "Left Banked 25 deg Down to 25 deg Down", + "Right Banked 25 deg Down to 25 deg Down", + "Left Banked Flat to Left Banked 25 deg Up", + "Right Banked Flat to Right Banked 25 deg Up", + "Left Banked 25 deg up to Left Banked Flat", + "Right Banked 25 deg up to Right Banked Flat", + "Left Banked Flat to Left Banked 25 deg Down", + "Right Banked Flat to Right Banked 25 deg Down", + "Left Banked 25 deg Down to Left Banked Flat", + "Right Banked 25 deg Down to Right Banked Flat", + "Flat to Left Banked 25 deg Up", + "Flat to Right Banked 25 deg Up", + "Left Banked 25 deg up to Flat", + "Right Banked 25 deg up to Flat", + "Flat to Left Banked 25 deg Down", + "Flat to Right Banked 25 deg Down", + "Left Banked 25 deg Down to Flat", + "Right Banked 25 deg Down to Flat", + "Left Quarter Turn 1 Tile 90 deg Up", + "Right Quarter Turn 1 Tile 90 deg Up", + "Left Quarter Turn 1 Tile 90 deg Down", + "Right Quarter Turn 1 Tile 90 deg Down", + "Multidim 90 deg up to Inverted Flat Quarter Loop", + "Multidim Flat to 90 deg Down Quarter Loop", +}; + +const utf8string FlatTrackNames[256] = { + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "FLAT_TRACK_ELEM_1_X_4_A = 95,", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "FLAT_TRACK_ELEM_2_X_2 = 110,", + "FLAT_TRACK_ELEM_4_X_4 = 111,", + "", + "", + "", + "", + "FLAT_TRACK_ELEM_1_X_5 = 116,", + "", + "FLAT_TRACK_ELEM_1_X_1_A = 118,", + "FLAT_TRACK_ELEM_1_X_4_B = 119,", + "", + "FLAT_TRACK_ELEM_1_X_1_B = 121,", + "FLAT_TRACK_ELEM_1_X_4_C = 122,", + "FLAT_TRACK_ELEM_3_X_3 = 123,", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", +}; diff --git a/PaintTest/main.c b/PaintTest/main.c new file mode 100644 index 0000000000..c1a17dfa24 --- /dev/null +++ b/PaintTest/main.c @@ -0,0 +1,189 @@ +#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 + +#include "../src/paint/paint.h" +#include "../src/ride/track_data.h" +#include "../src/ride/track_paint.h" +#include "../src/interface/viewport.h" + + + +#define gRideEntries RCT2_ADDRESS(RCT2_ADDRESS_RIDE_ENTRIES, rct_ride_entry*) +#define gCurrentRotation RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8) + +extern const utf8string RideNames[91]; +extern const utf8string TrackNames[256]; +extern const utf8string FlatTrackNames[256]; + +bool paint_attach_to_previous_ps(uint32 image_id, uint16 x, uint16 y) { + return false; +} + +paint_struct *sub_98196C( + uint32 image_id, + sint8 x_offset, sint8 y_offset, + sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, + sint16 z_offset, + uint32 rotation +) { + printf("sub_98196C(%d)\n", image_id & 0x7FFFF); + return NULL; +} + +paint_struct *sub_98197C( + uint32 image_id, + sint8 x_offset, sint8 y_offset, + sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, + sint16 z_offset, + sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z, + uint32 rotation + ) { + printf("sub_98197C(%d)\n", image_id & 0x7FFFF); + return NULL; +} + +paint_struct *sub_98198C( + uint32 image_id, + sint8 x_offset, sint8 y_offset, + sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, + sint16 z_offset, + sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z, + uint32 rotation + ) { + printf("sub_98198C(%d)\n", image_id & 0x7FFFF); + return NULL; +} + +paint_struct *sub_98199C( + uint32 image_id, + sint8 x_offset, sint8 y_offset, + sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, + sint16 z_offset, + sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z, + uint32 rotation + ) { + printf("sub_98199C(%d)\n", image_id & 0x7FFFF); + return NULL; +} + +bool wooden_a_supports_paint_setup(int supportType, int special, int height, uint32 imageColourFlags, bool *underground) { + return false; +} + +bool wooden_b_supports_paint_setup(int supportType, int special, int height, uint32 imageColourFlags) { + return false; +} + +bool metal_a_supports_paint_setup(int supportType, int segment, int special, int height, uint32 imageColourFlags) { + return false; +} + +bool metal_b_supports_paint_setup(int supportType, uint8 segment, int special, int height, uint32 imageColourFlags) { + return false; +} + +int getTrackSequenceCount(uint8 rideType, uint8 trackType) { + int sequenceCount = 0; + const rct_preview_track **trackBlocks; + + if (ride_type_has_flag(rideType, RIDE_TYPE_FLAG_FLAT_RIDE)) { + trackBlocks = FlatRideTrackBlocks; + } else { + trackBlocks = TrackBlocks; + } + + for (int i = 0; i < 256; i++) { + if (trackBlocks[trackType][i].index == 0xFF) { + break; + } + + sequenceCount++; + } + + return sequenceCount; +} + +bool testTrackElement(uint8 rideType, uint8 trackType) { + uint8 rideIndex = 0; + rct_map_element mapElement = {}; + rct_map_element_track_properties trackProperties = { .type = trackType, .ride_index = 0}; + mapElement.properties.track = trackProperties; + + g_currently_drawn_item = &mapElement; + + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; + RCT2_GLOBAL(0x00F44198, uint32) = COLOUR_GREY << 19 | COLOUR_WHITE << 24 | 0xA0000000; + RCT2_GLOBAL(0x00F441A0, uint32) = COLOUR_DARK_PURPLE << 19 | COLOUR_LIGHT_PURPLE << 24 | 0xA0000000; + RCT2_GLOBAL(0x00F441A4, uint32) = COLOUR_BRIGHT_PURPLE << 19 | COLOUR_DARK_BLUE << 24 | 0xA0000000; + RCT2_GLOBAL(0x00F4419C, uint32) = COLOUR_LIGHT_BLUE << 19 | COLOUR_ICY_BLUE << 24 | 0xA0000000; + + rct_drawpixelinfo dpi = { .zoom_level = 1 }; + unk_140E9A8 = &dpi; + + rct_vehicle vehicle = { }; + + rct_ride ride = { }; + + rct_ride_entry rideEntry = { }; + + gRideList[0] = ride; + gRideEntries[0] = &rideEntry; + + TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType]; + int sequenceCount = getTrackSequenceCount(rideType, trackType); + for (int currentRotation = 0; currentRotation < 4; currentRotation++) { + gCurrentRotation = currentRotation; + for (int direction = 0; direction < 4; direction++) { + TRACK_PAINT_FUNCTION newPaintFunction = newPaintGetter(trackType, direction); + for (int trackSequence = 0; trackSequence < sequenceCount; trackSequence++) { + newPaintFunction(rideIndex, trackSequence, direction, 48, &mapElement); + } + } + } + + return true; +} + +void testRide(int rideType) { + TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType]; + if (newPaintGetter == 0) { + return; + } + + printf("- %s (%d)\n", RideNames[rideType], rideType); + for (int trackType = 0; trackType < 256; trackType++) { + if (newPaintGetter(trackType, 0) == NULL) { + continue; + } + + bool success = testTrackElement(rideType, trackType); + + int sequenceCount = getTrackSequenceCount(rideType, trackType); + if (ride_type_has_flag(rideType, RIDE_TYPE_FLAG_FLAT_RIDE)) { + printf(" - %s (%d)\n", FlatTrackNames[trackType], sequenceCount); + } else { + printf(" - %s (%d)\n", TrackNames[trackType], sequenceCount); + } + + } +} + +int main(int argc, const char *argv[]) { + for (int i = 0; i < 91; i++) { + testRide(i); + } + return 0; +} \ No newline at end of file diff --git a/src/ride/coaster/reverser_roller_coaster.c b/src/ride/coaster/reverser_roller_coaster.c index 4644c323de..fbcfd0ca7e 100644 --- a/src/ride/coaster/reverser_roller_coaster.c +++ b/src/ride/coaster/reverser_roller_coaster.c @@ -21,6 +21,7 @@ #include "../../paint/paint.h" #include "../vehicle_paint.h" +#ifndef NO_VEHICLES /** * * rct2: 0x006D4453 @@ -36,3 +37,4 @@ void vehicle_visual_reverser(int x, int imageDirection, int y, int z, rct_vehicl gUnk9DE56C = y; vehicle_visual_default(x, imageDirection, y, z, vehicle, vehicleEntry); } +#endif diff --git a/src/ride/water/river_rapids.c b/src/ride/water/river_rapids.c index fb7d67c7fd..8faa3da43e 100644 --- a/src/ride/water/river_rapids.c +++ b/src/ride/water/river_rapids.c @@ -183,6 +183,7 @@ static const uint32 river_rapids_track_pieces_25_deg_down_to_flat[][2] = { {SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_SE_NW, SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_SE_NW}, }; +#ifndef NO_VEHICLES /** * * rct2: 0x006D5889 @@ -248,6 +249,7 @@ void vehicle_visual_river_rapids(int x, int imageDirection, int y, int z, rct_ve vehicle_visual_splash_effect(z, vehicle, vehicleEntry); } +#endif /** rct2: 0x00757650 */ static void paint_river_rapids_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) diff --git a/src/ride/water/splash_boats.c b/src/ride/water/splash_boats.c index 9bb7eb7877..f73c941482 100644 --- a/src/ride/water/splash_boats.c +++ b/src/ride/water/splash_boats.c @@ -21,6 +21,7 @@ #include "../../paint/paint.h" #include "../vehicle_paint.h" +#ifndef NO_VEHICLES /** * * rct2: 0x006D4295 @@ -38,3 +39,4 @@ void vehicle_visual_splash_boats_or_water_coaster(int x, int imageDirection, int gUnk9DE56C = vehicle->y; vehicle_paint(vehicle, imageDirection); } +#endif diff --git a/src/ride/water/submarine_ride.c b/src/ride/water/submarine_ride.c index 6284169b99..f1e4f95f4e 100644 --- a/src/ride/water/submarine_ride.c +++ b/src/ride/water/submarine_ride.c @@ -23,6 +23,7 @@ #include "../../paint/supports.h" #include "../ride_data.h" +#ifndef NO_VEHICLES /** * * rct2: 0x006D44D5 @@ -66,6 +67,7 @@ void vehicle_visual_submarine(int x, int imageDirection, int y, int z, rct_vehic assert(vehicleEntry->effect_visual == 1); } +#endif static void submarine_ride_paint_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) {