OpenRCT2/src/ride/track_paint.h

84 lines
3.0 KiB
C
Raw Normal View History

#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
#ifndef _TRACK_PAINT_H
#define _TRACK_PAINT_H
#include "../common.h"
#include "../world/map.h"
#include "../paint/map_element/map_element.h"
2016-05-17 19:48:28 +02:00
static const uint8 track_map_3x3[][9] = {
{0, 1, 2, 3, 4, 5, 6, 7, 8},
{0, 3, 5, 7, 2, 8, 1, 6, 4},
{0, 7, 8, 6, 5, 4, 3, 1, 2},
{0, 6, 4, 1, 8, 2, 7, 3, 5}
};
static const uint8 edges_3x3[] = {
0,
EDGE_NE | EDGE_NW,
EDGE_NE,
EDGE_NE | EDGE_SE,
EDGE_NW,
EDGE_SE,
EDGE_SW | EDGE_NW,
EDGE_SW | EDGE_SE,
EDGE_SW,
};
enum {
SPR_FLOOR_CORK_SE_SW = 22134,
SPR_FLOOR_CORK_SW = 22135,
SPR_FLOOR_CORK_SE = 22136,
SPR_FLOOR_CORK = 22137,
SPR_FENCE_ROPE_NE = 22138,
SPR_FENCE_ROPE_SE = 22139,
SPR_FENCE_ROPE_SW = 22140,
SPR_FENCE_ROPE_NW = 22141,
};
static const uint floorSpritesCork[] = {
SPR_FLOOR_CORK_SE_SW,
SPR_FLOOR_CORK_SW,
SPR_FLOOR_CORK_SE,
SPR_FLOOR_CORK
};
static const uint fenceSpritesRope[] = {
SPR_FENCE_ROPE_NE,
SPR_FENCE_ROPE_SE,
SPR_FENCE_ROPE_SW,
SPR_FENCE_ROPE_NW
};
bool track_paint_util_has_fence(enum edge edge, rct_xy16 position, rct_map_element * mapElement, rct_ride * ride, uint8 rotation);
2016-05-17 19:48:28 +02:00
void track_paint_util_paint_floor(uint edges, uint32 colourFlags, uint16 height, const uint floorSprites[4], uint8 rotation);
void track_paint_util_paint_fences(uint edges, rct_xy16 position, rct_map_element * mapElement, rct_ride * ride, uint32 colourFlags, uint16 height, const uint fenceSprites[4], uint8 rotation);
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);
2016-03-25 14:54:28 +01:00
TRACK_PAINT_FUNCTION get_track_paint_function_maze(int trackType, int direction);
2016-03-24 21:52:32 +01:00
TRACK_PAINT_FUNCTION get_track_paint_function_spiral_slide(int trackType, int direction);
2016-03-25 15:43:03 +01:00
TRACK_PAINT_FUNCTION get_track_paint_function_dodgems(int trackType, int direction);
TRACK_PAINT_FUNCTION get_track_paint_function_topspin(int trackType, int direction);
TRACK_PAINT_FUNCTION get_track_paint_function_shop(int trackType, int direction);
TRACK_PAINT_FUNCTION get_track_paint_function_facility(int trackType, int direction);
2016-04-11 15:21:13 +02:00
TRACK_PAINT_FUNCTION get_track_paint_function_crooked_house(int trackType, int direction);
2015-12-21 05:03:37 +01:00
#endif