mirror of https://github.com/OpenRCT2/OpenRCT2.git
Draw flat track
This commit is contained in:
parent
c43e3ee471
commit
790966d928
|
@ -5475,7 +5475,7 @@ const uint32 RideTypeTrackPaintFunctionsOld[91] = {
|
|||
0x008ACE48, // RIDE_TYPE_MINIATURE_RAILWAY
|
||||
0x008ADF34, // RIDE_TYPE_MONORAIL
|
||||
0x008AFC24, // RIDE_TYPE_MINI_SUSPENDED_COASTER
|
||||
0x008B0D60, // RIDE_TYPE_BOAT_RIDE
|
||||
0, // RIDE_TYPE_BOAT_RIDE
|
||||
0x008A534C, // RIDE_TYPE_WOODEN_WILD_MOUSE
|
||||
0x008A5634, // RIDE_TYPE_STEEPLECHASE
|
||||
0x006F7000, // RIDE_TYPE_CAR_RIDE
|
||||
|
@ -5570,7 +5570,7 @@ const TRACK_PAINT_FUNCTION_GETTER RideTypeTrackPaintFunctions[91] = {
|
|||
0, // RIDE_TYPE_MINIATURE_RAILWAY
|
||||
0, // RIDE_TYPE_MONORAIL
|
||||
0, // RIDE_TYPE_MINI_SUSPENDED_COASTER
|
||||
0, // RIDE_TYPE_BOAT_RIDE
|
||||
get_track_paint_function_boat_ride, // RIDE_TYPE_BOAT_RIDE
|
||||
0, // RIDE_TYPE_WOODEN_WILD_MOUSE
|
||||
0, // RIDE_TYPE_STEEPLECHASE
|
||||
0, // RIDE_TYPE_CAR_RIDE
|
||||
|
|
|
@ -168,6 +168,7 @@ void track_paint_util_left_quarter_turn_1_tile_tunnel(sint16 height, uint8 direc
|
|||
typedef void (*TRACK_PAINT_FUNCTION)(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element* mapElement);
|
||||
typedef TRACK_PAINT_FUNCTION (*TRACK_PAINT_FUNCTION_GETTER)(int trackType, int direction);
|
||||
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_boat_ride(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_launched_freefall(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_observation_tower(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_chairlift(int trackType, int direction);
|
||||
|
|
|
@ -13,3 +13,78 @@
|
|||
* A full copy of the GNU General Public License can be found in licence.txt
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#include "../../common.h"
|
||||
#include "../../interface/viewport.h"
|
||||
#include "../track_paint.h"
|
||||
#include "../track.h"
|
||||
#include "../../paint/paint.h"
|
||||
|
||||
enum
|
||||
{
|
||||
SPR_BOAT_RIDE_FLAT_BACK_SW_NE = 28523,
|
||||
SPR_BOAT_RIDE_FLAT_FRONT_SW_NE = 28524,
|
||||
SPR_BOAT_RIDE_FLAT_BACK_NW_SE = 28525,
|
||||
SPR_BOAT_RIDE_FLAT_FRONT_NW_SE = 28526,
|
||||
};
|
||||
|
||||
/** rct2: 0x008B0E40 */
|
||||
static void paint_boat_ride_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
uint32 imageId;
|
||||
|
||||
if (direction & 1) {
|
||||
imageId = SPR_BOAT_RIDE_FLAT_BACK_NW_SE | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 1, 32, 3, height, 4, 0, height, get_current_rotation());
|
||||
|
||||
imageId = SPR_BOAT_RIDE_FLAT_FRONT_NW_SE | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 1, 32, 3, height, 28, 0, height, get_current_rotation());
|
||||
} else {
|
||||
imageId = SPR_BOAT_RIDE_FLAT_BACK_SW_NE | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 32, 1, 3, height, 0, 4, height, get_current_rotation());
|
||||
|
||||
imageId = SPR_BOAT_RIDE_FLAT_FRONT_SW_NE | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 32, 1, 3, height, 0, 28, height, get_current_rotation());
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(height + 16, 0x20);
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
static void paint_boat_ride_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
static void paint_boat_ride_track_left_quarter_turn_1_tile(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
static void paint_boat_ride_track_right_quarter_turn_1_tile(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* rct2: 0x008B0D60
|
||||
*/
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_boat_ride(int trackType, int direction)
|
||||
{
|
||||
switch (trackType) {
|
||||
case TRACK_ELEM_FLAT:
|
||||
return paint_boat_ride_track_flat;
|
||||
|
||||
case TRACK_ELEM_END_STATION:
|
||||
case TRACK_ELEM_BEGIN_STATION:
|
||||
case TRACK_ELEM_MIDDLE_STATION:
|
||||
return paint_boat_ride_station;
|
||||
|
||||
case TRACK_ELEM_LEFT_QUARTER_TURN_1_TILE:
|
||||
return paint_boat_ride_track_left_quarter_turn_1_tile;
|
||||
case TRACK_ELEM_RIGHT_QUARTER_TURN_1_TILE:
|
||||
return paint_boat_ride_track_right_quarter_turn_1_tile;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
Loading…
Reference in New Issue