RCT1 import: fix for Junior Roller Coaster

This commit is contained in:
IntelOrca 2015-07-17 17:51:16 +01:00 committed by Ted John
parent e319df533e
commit 3e9d56a284
1 changed files with 23 additions and 3 deletions

View File

@ -1601,9 +1601,29 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
RCT2_GLOBAL(0x00F441A4, uint32) = ghost_id;
}
TRACK_PAINT_FUNCTION **trackTypeList = (TRACK_PAINT_FUNCTION**)RideTypeTrackPaintFunctionsOld[ride->type];
int rideType = ride->type;
if (rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER) {
switch (trackType) {
case TRACK_ELEM_60_DEG_UP:
case TRACK_ELEM_25_DEG_UP_TO_60_DEG_UP:
case TRACK_ELEM_60_DEG_UP_TO_25_DEG_UP:
case TRACK_ELEM_60_DEG_DOWN:
case TRACK_ELEM_25_DEG_DOWN_TO_60_DEG_DOWN:
case TRACK_ELEM_60_DEG_DOWN_TO_25_DEG_DOWN:
rideType = RIDE_TYPE_WATER_COASTER;
break;
case TRACK_ELEM_FLAT_TO_60_DEG_UP:
case TRACK_ELEM_60_DEG_UP_TO_FLAT:
case TRACK_ELEM_FLAT_TO_60_DEG_DOWN:
case TRACK_ELEM_60_DEG_DOWN_TO_FLAT:
return;
}
}
TRACK_PAINT_FUNCTION **trackTypeList = (TRACK_PAINT_FUNCTION**)RideTypeTrackPaintFunctionsOld[rideType];
if (trackTypeList == NULL) {
TRACK_PAINT_FUNCTION_GETTER paintFunctionGetter = RideTypeTrackPaintFunctions[ride->type];
TRACK_PAINT_FUNCTION_GETTER paintFunctionGetter = RideTypeTrackPaintFunctions[rideType];
TRACK_PAINT_FUNCTION paintFunction = paintFunctionGetter(trackType, direction);
if (paintFunction != NULL) {
paintFunction(rideIndex, trackSequence, direction, height, mapElement);
@ -1615,7 +1635,7 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
// Have to call from this point as it pushes esi and expects callee to pop it
RCT2_CALLPROC_X(
0x006C4934,
ride->type,
rideType,
(int)trackDirectionList,
direction,
height,