mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 13:33:02 +01:00
Moved new strings to end of file, and formatting
strings should be in order, and code formatted was to make it more consistant
This commit is contained in:
@@ -4228,54 +4228,52 @@ STR_5916 :{COMMA16} player
|
||||
STR_5917 :{COMMA16} players
|
||||
STR_5918 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16}
|
||||
STR_5919 :{COMMA16}
|
||||
STR_5920 :Surface details
|
||||
STR_5921 :Path details
|
||||
STR_5922 :Track details
|
||||
STR_5923 :Scenery details
|
||||
STR_5924 :Entrance details
|
||||
STR_5925 :Fence details
|
||||
STR_5926 :Large scenery details
|
||||
STR_5927 :Banner details
|
||||
STR_5928 :Currupt element details
|
||||
STR_5929 :Properties
|
||||
STR_5930 :{WINDOW_COLOUR_2}Terrain texture: {BLACK}{STRINGID}
|
||||
STR_5931 :{WINDOW_COLOUR_2}Terrain edge: {BLACK}{STRINGID}
|
||||
STR_5932 :{WINDOW_COLOUR_2}Land ownership: {BLACK}{STRINGID}
|
||||
STR_5933 :Not owned and not for sale
|
||||
STR_5934 :{WINDOW_COLOUR_2}Water level: {BLACK}{COMMA16}
|
||||
STR_5935 :Remove park fences
|
||||
STR_5936 :Restore park fences
|
||||
STR_5937 :{WINDOW_COLOUR_2}Raise / lower:
|
||||
STR_5938 :{WINDOW_COLOUR_2}Path name: {BLACK}{STRINGID}
|
||||
STR_5939 :{WINDOW_COLOUR_2}Additions: {BLACK}{STRINGID}
|
||||
STR_5940 :{WINDOW_COLOUR_2}Additions: {BLACK}None
|
||||
STR_5941 :{WINDOW_COLOUR_2}Connected edges:
|
||||
STR_5942 :{WINDOW_COLOUR_2}Ride type: {BLACK}{STRINGID}
|
||||
STR_5943 :{WINDOW_COLOUR_2}Ride ID: {BLACK}{COMMA16}
|
||||
STR_5944 :{WINDOW_COLOUR_2}Ride name: {BLACK}{STRINGID}
|
||||
STR_5945 :{WINDOW_COLOUR_2}Track piece sequence: {BLACK}{COMMA16}/{COMMA16}
|
||||
STR_5946 :{WINDOW_COLOUR_2}Chain lift
|
||||
STR_5947 :{WINDOW_COLOUR_2}Apply changes to entire track piece
|
||||
STR_5948 :{WINDOW_COLOUR_2}Track piece ID: {BLACK}{COMMA16}
|
||||
STR_5949 :{WINDOW_COLOUR_2}Sequence number: {BLACK}{COMMA16}
|
||||
STR_5950 :{SMALLFONT}{BLACK}Sort the map elements on the current tile based on their base height.
|
||||
STR_5951 :{WINDOW_COLOUR_2}Scenery age: {BLACK}{COMMA16}
|
||||
STR_5952 :{WINDOW_COLOUR_2}Quadrant placement: {BLACK}{STRINGID}
|
||||
STR_5953 :Southwest
|
||||
STR_5954 :Northwest
|
||||
STR_5955 :Northeast
|
||||
STR_5956 :Southeast
|
||||
STR_5957 :{WINDOW_COLOUR_2}Quadrant placement:
|
||||
STR_5958 :{WINDOW_COLOUR_2}Entry index: {BLACK}{COMMA16}
|
||||
STR_5959 :{WINDOW_COLOUR_2}Collission detection:
|
||||
STR_5960 :{WINDOW_COLOUR_2}Raised Corners:
|
||||
STR_5961 :{WINDOW_COLOUR_2}Diagonal
|
||||
|
||||
#TODO: Fix rebase
|
||||
STR_5920 :Render weather effects
|
||||
STR_5921 :{SMALLFONT}{BLACK}If enabled, rain and gloomy colours will be rendered during storms.
|
||||
STR_5922 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{SMALLFONT}{BLACK}Max {STRINGID}
|
||||
STR_5923 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{SMALLFONT}{BLACK}Max {COMMA16} {STRINGID} per train
|
||||
STR_5924 :Surface details
|
||||
STR_5925 :Path details
|
||||
STR_5926 :Track details
|
||||
STR_5927 :Scenery details
|
||||
STR_5928 :Entrance details
|
||||
STR_5929 :Fence details
|
||||
STR_5930 :Large scenery details
|
||||
STR_5931 :Banner details
|
||||
STR_5932 :Currupt element details
|
||||
STR_5933 :Properties
|
||||
STR_5934 :{WINDOW_COLOUR_2}Terrain texture: {BLACK}{STRINGID}
|
||||
STR_5935 :{WINDOW_COLOUR_2}Terrain edge: {BLACK}{STRINGID}
|
||||
STR_5936 :{WINDOW_COLOUR_2}Land ownership: {BLACK}{STRINGID}
|
||||
STR_5937 :Not owned and not for sale
|
||||
STR_5938 :{WINDOW_COLOUR_2}Water level: {BLACK}{COMMA16}
|
||||
STR_5939 :Remove park fences
|
||||
STR_5940 :Restore park fences
|
||||
STR_5941 :{WINDOW_COLOUR_2}Raise / lower:
|
||||
STR_5942 :{WINDOW_COLOUR_2}Path name: {BLACK}{STRINGID}
|
||||
STR_5943 :{WINDOW_COLOUR_2}Additions: {BLACK}{STRINGID}
|
||||
STR_5944 :{WINDOW_COLOUR_2}Additions: {BLACK}None
|
||||
STR_5945 :{WINDOW_COLOUR_2}Connected edges:
|
||||
STR_5946 :{WINDOW_COLOUR_2}Ride type: {BLACK}{STRINGID}
|
||||
STR_5947 :{WINDOW_COLOUR_2}Ride ID: {BLACK}{COMMA16}
|
||||
STR_5948 :{WINDOW_COLOUR_2}Ride name: {BLACK}{STRINGID}
|
||||
STR_5949 :<removed string - do not use>
|
||||
STR_5950 :{WINDOW_COLOUR_2}Chain lift
|
||||
STR_5951 :{WINDOW_COLOUR_2}Apply changes to entire track piece
|
||||
STR_5952 :{WINDOW_COLOUR_2}Track piece ID: {BLACK}{COMMA16}
|
||||
STR_5953 :{WINDOW_COLOUR_2}Sequence number: {BLACK}{COMMA16}
|
||||
STR_5954 :{SMALLFONT}{BLACK}Sort the map elements on the current tile based on their base height.
|
||||
STR_5955 :{WINDOW_COLOUR_2}Scenery age: {BLACK}{COMMA16}
|
||||
STR_5956 :{WINDOW_COLOUR_2}Quadrant placement: {BLACK}{STRINGID}
|
||||
STR_5957 :Southwest
|
||||
STR_5958 :Northwest
|
||||
STR_5959 :Northeast
|
||||
STR_5960 :Southeast
|
||||
STR_5961 :{WINDOW_COLOUR_2}Quadrant placement:
|
||||
STR_5962 :{WINDOW_COLOUR_2}Entry index: {BLACK}{COMMA16}
|
||||
STR_5963 :{WINDOW_COLOUR_2}Collission detection:
|
||||
STR_5964 :{WINDOW_COLOUR_2}Raised Corners:
|
||||
STR_5965 :{WINDOW_COLOUR_2}Diagonal
|
||||
|
||||
#############
|
||||
# Scenarios #
|
||||
|
||||
@@ -1165,8 +1165,6 @@ enum {
|
||||
STR_CONSTRUCTION_RIGHTS_NOT_FOR_SALE = 1727,
|
||||
STR_CANT_BUY_CONSTRUCTION_RIGHTS_HERE = 1728,
|
||||
STR_LAND_NOT_OWNED_BY_PARK = 1729,
|
||||
STR_LAND_NOT_OWNED_AND_NOT_AVAILABLE = 5933,
|
||||
|
||||
STR_BANNER_TEXT_CLOSED = 1730,
|
||||
STR_BANNER_TEXT_FORMAT = 1731,
|
||||
STR_RIDE_CONSTRUCTION_BUILD = 1732,
|
||||
@@ -3302,47 +3300,6 @@ enum {
|
||||
STR_TILE_INSPECTOR_FLAG_BROKEN = 5614,
|
||||
STR_TILE_INSPECTOR_FLAG_LAST_SHORT = 5615,
|
||||
STR_TILE_INSPECTOR_FLAG_LAST = 5616,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_SURFACE_INFO = 5920,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_PATH_INFO = 5921,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_TRACK_INFO = 5922,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_SCENERY_INFO = 5923,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_ENTRANCE_INFO = 5924,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_FENCE_INFO = 5925,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_LARGE_SCENERY_INFO = 5926,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_BANNER_INFO = 5927,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_CORRUPT_INFO = 5928,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_PROPERTIES = 5929,
|
||||
STR_TILE_INSPECTOR_SURFACE_TERAIN = 5930,
|
||||
STR_TILE_INSPECTOR_SURFACE_EDGE = 5931,
|
||||
STR_TILE_INSPECTOR_SURFACE_OWNERSHIP = 5932,
|
||||
STR_TILE_INSPECTOR_SURFACE_WATER_LEVEL = 5934,
|
||||
STR_TILE_INSPECTOR_SURFACE_REMOVE_FENCES = 5935,
|
||||
STR_TILE_INSPECTOR_SURFACE_RESTORE_FENCES = 5936,
|
||||
STR_TILE_INSPECTOR_RAISE_LOWER = 5937,
|
||||
STR_TILE_INSPECTOR_PATH_NAME = 5938,
|
||||
STR_TILE_INSPECTOR_PATH_ADDITIONS = 5939,
|
||||
STR_TILE_INSPECTOR_PATH_ADDITIONS_NONE = 5940,
|
||||
STR_TILE_INSPECTOR_PATH_CONECTED_EDGES = 5941,
|
||||
STR_TILE_INSPECTOR_TRACK_RIDE_TYPE = 5942,
|
||||
STR_TILE_INSPECTOR_TRACK_RIDE_ID = 5943,
|
||||
STR_TILE_INSPECTOR_TRACK_RIDE_NAME = 5944,
|
||||
//STR_TILE_INSPECTOR_TRACK_SEQUENCE= 5945,
|
||||
STR_TILE_INSPECTOR_TRACK_CHAIN_LIFT = 5946,
|
||||
STR_TILE_INSPECTOR_TRACK_ENTIRE_TRACK_PIECE = 5947,
|
||||
STR_TILE_INSPECTOR_TRACK_PIECE_ID = 5948,
|
||||
STR_TILE_INSPECTOR_TRACK_SEQUENCE = 5949,
|
||||
STR_TILE_INSPECTOR_SORT_TIP = 5950,
|
||||
STR_TILE_INSPECTOR_SCENERY_AGE = 5951,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT = 5952,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_SW = 5953,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_NW = 5954,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_NE = 5955,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_SE = 5956,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_LABEL = 5957,
|
||||
STR_TILE_INSPECTOR_SCENERY_ENTRY_IDX = 5958,
|
||||
STR_TILE_INSPECTOR_COLLISSION = 5959,
|
||||
STR_TILE_INSPECTOR_SURFACE_CORNERS = 5960,
|
||||
STR_TILE_INSPECTOR_SURFACE_DIAGONAL = 5961,
|
||||
STR_SCENARIO_CATEGORY_RCT1 = 5619,
|
||||
STR_SCENARIO_CATEGORY_RCT1_AA = 5620,
|
||||
STR_SCENARIO_CATEGORY_RCT1_LL = 5621,
|
||||
@@ -3611,11 +3568,52 @@ enum {
|
||||
STR_MULTIPLAYER_PLAYER_COUNT_PLURAL = 5917,
|
||||
STR_SERVER_MAX_PLAYERS_VALUE = 5918,
|
||||
STR_COMMA16 = 5919,
|
||||
|
||||
STR_RENDER_WEATHER_EFFECTS = 5920,
|
||||
STR_RENDER_WEATHER_EFFECTS_TIP = 5921,
|
||||
STR_MAX_VEHICLES_TIP = 5922,
|
||||
STR_MAX_CARS_PER_TRAIN_TIP = 5923,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_SURFACE_INFO = 5924,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_PATH_INFO = 5925,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_TRACK_INFO = 5926,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_SCENERY_INFO = 5927,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_ENTRANCE_INFO = 5928,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_FENCE_INFO = 5929,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_LARGE_SCENERY_INFO = 5930,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_BANNER_INFO = 5931,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_CORRUPT_INFO = 5932,
|
||||
STR_TILE_INSPECTOR_GROUPBOX_PROPERTIES = 5933,
|
||||
STR_TILE_INSPECTOR_SURFACE_TERAIN = 5934,
|
||||
STR_TILE_INSPECTOR_SURFACE_EDGE = 5935,
|
||||
STR_TILE_INSPECTOR_SURFACE_OWNERSHIP = 5936,
|
||||
STR_TILE_INSPECTOR_LAND_NOT_OWNED_AND_NOT_AVAILABLE = 5937,
|
||||
STR_TILE_INSPECTOR_SURFACE_WATER_LEVEL = 5938,
|
||||
STR_TILE_INSPECTOR_SURFACE_REMOVE_FENCES = 5939,
|
||||
STR_TILE_INSPECTOR_SURFACE_RESTORE_FENCES = 5940,
|
||||
STR_TILE_INSPECTOR_RAISE_LOWER = 5931,
|
||||
STR_TILE_INSPECTOR_PATH_NAME = 5942,
|
||||
STR_TILE_INSPECTOR_PATH_ADDITIONS = 5943,
|
||||
STR_TILE_INSPECTOR_PATH_ADDITIONS_NONE = 5944,
|
||||
STR_TILE_INSPECTOR_PATH_CONECTED_EDGES = 5945,
|
||||
STR_TILE_INSPECTOR_TRACK_RIDE_TYPE = 5946,
|
||||
STR_TILE_INSPECTOR_TRACK_RIDE_ID = 5947,
|
||||
STR_TILE_INSPECTOR_TRACK_RIDE_NAME = 5948,
|
||||
//STR_TILE_INSPECTOR_TRACK_SEQUENCE= 5949,
|
||||
STR_TILE_INSPECTOR_TRACK_CHAIN_LIFT = 5950,
|
||||
STR_TILE_INSPECTOR_TRACK_ENTIRE_TRACK_PIECE = 5951,
|
||||
STR_TILE_INSPECTOR_TRACK_PIECE_ID = 5952,
|
||||
STR_TILE_INSPECTOR_TRACK_SEQUENCE = 5953,
|
||||
STR_TILE_INSPECTOR_SORT_TIP = 5954,
|
||||
STR_TILE_INSPECTOR_SCENERY_AGE = 5955,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT = 5956,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_SW = 5957,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_NW = 5958,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_NE = 5959,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_SE = 5960,
|
||||
STR_TILE_INSPECTOR_SCENERY_QUADRANT_LABEL = 5961,
|
||||
STR_TILE_INSPECTOR_SCENERY_ENTRY_IDX = 5962,
|
||||
STR_TILE_INSPECTOR_COLLISSION = 5963,
|
||||
STR_TILE_INSPECTOR_SURFACE_CORNERS = 5964,
|
||||
STR_TILE_INSPECTOR_SURFACE_DIAGONAL = 5965,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
STR_COUNT = 32768
|
||||
|
||||
@@ -464,8 +464,7 @@ static uint64 window_tile_inspector_page_disabled_widgets[] = {
|
||||
(1ULL << WIDX_BUTTON_ROTATE),
|
||||
};
|
||||
|
||||
void window_tile_inspector_open()
|
||||
{
|
||||
void window_tile_inspector_open() {
|
||||
rct_window* window;
|
||||
|
||||
// Check if window is already open
|
||||
@@ -498,12 +497,10 @@ void window_tile_inspector_open()
|
||||
window_tile_inspector_auto_set_buttons(window);
|
||||
}
|
||||
|
||||
static void window_tile_inspector_load_tile(rct_window* w)
|
||||
{
|
||||
static void window_tile_inspector_load_tile(rct_window* w) {
|
||||
rct_map_element *element = map_get_first_element_at(window_tile_inspector_tile_x, window_tile_inspector_tile_y);
|
||||
int numItems = 0;
|
||||
do
|
||||
{
|
||||
do {
|
||||
numItems++;
|
||||
} while (!map_element_is_last_for_tile(element++));
|
||||
|
||||
@@ -533,8 +530,7 @@ static void corrupt_element() {
|
||||
map_invalidate_tile_full(window_tile_inspector_tile_x << 5, window_tile_inspector_tile_y << 5);
|
||||
}
|
||||
|
||||
static void remove_element(int index)
|
||||
{
|
||||
static void remove_element(int index) {
|
||||
assert(index < window_tile_inspector_item_count);
|
||||
rct_map_element *mapElement = map_get_first_element_at(window_tile_inspector_tile_x, window_tile_inspector_tile_y);
|
||||
mapElement += index;
|
||||
@@ -543,15 +539,13 @@ static void remove_element(int index)
|
||||
map_invalidate_tile_full(window_tile_inspector_tile_x << 5, window_tile_inspector_tile_y << 5);
|
||||
}
|
||||
|
||||
static void rotate_element(int index)
|
||||
{
|
||||
static void rotate_element(int index) {
|
||||
uint8 new_rotation, path_edges, path_corners;
|
||||
|
||||
assert(index < window_tile_inspector_item_count);
|
||||
rct_map_element *mapElement = map_get_first_element_at(window_tile_inspector_tile_x, window_tile_inspector_tile_y);
|
||||
mapElement += index;
|
||||
switch (map_element_get_type(mapElement))
|
||||
{
|
||||
switch (map_element_get_type(mapElement)) {
|
||||
case MAP_ELEMENT_TYPE_PATH:
|
||||
if (footpath_element_is_sloped(mapElement)) {
|
||||
new_rotation = (footpath_element_get_slope_direction(mapElement) + 1) & MAP_ELEMENT_DIRECTION_MASK;
|
||||
@@ -579,8 +573,7 @@ static void rotate_element(int index)
|
||||
}
|
||||
|
||||
// Swap element with its parent
|
||||
static void swap_elements(sint16 first, sint16 second)
|
||||
{
|
||||
static void swap_elements(sint16 first, sint16 second) {
|
||||
rct_map_element *mapElement;
|
||||
rct_map_element *firstElement = NULL;
|
||||
rct_map_element *secondElement = NULL;
|
||||
@@ -614,20 +607,17 @@ static void swap_elements(sint16 first, sint16 second)
|
||||
map_invalidate_tile_full(window_tile_inspector_tile_x << 5, window_tile_inspector_tile_y << 5);
|
||||
}
|
||||
|
||||
static void sort_elements(rct_window *w)
|
||||
{
|
||||
static void sort_elements(rct_window *w) {
|
||||
const rct_map_element *const firstElement = map_get_first_element_at(window_tile_inspector_tile_x, window_tile_inspector_tile_y);
|
||||
|
||||
// Bubble sort
|
||||
for (int loop_start = 1; loop_start < window_tile_inspector_item_count; loop_start++)
|
||||
{
|
||||
for (int loop_start = 1; loop_start < window_tile_inspector_item_count; loop_start++) {
|
||||
int current_id = loop_start;
|
||||
const rct_map_element *currentElement = firstElement + current_id;
|
||||
const rct_map_element *otherElement = currentElement - 1;
|
||||
|
||||
// While current element's base height is lower, or (when their baseheight is the same) the other map element's clearance height is lower...
|
||||
while (current_id > 0 && (otherElement->base_height > currentElement->base_height || (otherElement->base_height == currentElement->base_height && otherElement->clearance_height > currentElement->clearance_height)))
|
||||
{
|
||||
while (current_id > 0 && (otherElement->base_height > currentElement->base_height || (otherElement->base_height == currentElement->base_height && otherElement->clearance_height > currentElement->clearance_height))) {
|
||||
swap_elements(current_id - 1, current_id);
|
||||
current_id--;
|
||||
currentElement--;
|
||||
@@ -638,8 +628,7 @@ static void sort_elements(rct_window *w)
|
||||
|
||||
// Copied from track.c (track_remove), and modified for raising/lowering
|
||||
// Not sure if this should be in this file, track.c, or maybe another one
|
||||
static void track_block_height_offset(rct_map_element *mapElement, uint8 offset)
|
||||
{
|
||||
static void track_block_height_offset(rct_map_element *mapElement, uint8 offset) {
|
||||
uint8 type = mapElement->properties.track.type;
|
||||
uint8 sequence = mapElement->properties.track.sequence;
|
||||
sint16 originX = window_tile_inspector_tile_x << 5;
|
||||
@@ -649,8 +638,7 @@ static void track_block_height_offset(rct_map_element *mapElement, uint8 offset)
|
||||
|
||||
sint16 trackpieceZ = originZ;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
switch (type) {
|
||||
case TRACK_ELEM_BEGIN_STATION:
|
||||
case TRACK_ELEM_MIDDLE_STATION:
|
||||
type = TRACK_ELEM_END_STATION;
|
||||
@@ -665,8 +653,7 @@ static void track_block_height_offset(rct_map_element *mapElement, uint8 offset)
|
||||
trackBlock += mapElement->properties.track.sequence & 0xF;
|
||||
|
||||
uint8 originDirection = map_element_get_direction(mapElement);
|
||||
switch (originDirection)
|
||||
{
|
||||
switch (originDirection) {
|
||||
case 0:
|
||||
originX -= trackBlock->x;
|
||||
originY -= trackBlock->y;
|
||||
@@ -688,12 +675,10 @@ static void track_block_height_offset(rct_map_element *mapElement, uint8 offset)
|
||||
originZ -= trackBlock->z;
|
||||
|
||||
trackBlock = get_track_def_from_ride(ride, type);
|
||||
for (; trackBlock->index != 255; trackBlock++)
|
||||
{
|
||||
for (; trackBlock->index != 255; trackBlock++) {
|
||||
sint16 x = originX, y = originY, z = originZ;
|
||||
|
||||
switch (originDirection)
|
||||
{
|
||||
switch (originDirection) {
|
||||
case 0:
|
||||
x += trackBlock->x;
|
||||
y += trackBlock->y;
|
||||
@@ -720,8 +705,7 @@ static void track_block_height_offset(rct_map_element *mapElement, uint8 offset)
|
||||
|
||||
bool found = false;
|
||||
mapElement = map_get_first_element_at(x / 32, y / 32);
|
||||
do
|
||||
{
|
||||
do {
|
||||
if (mapElement->base_height != z / 8)
|
||||
continue;
|
||||
|
||||
@@ -741,8 +725,7 @@ static void track_block_height_offset(rct_map_element *mapElement, uint8 offset)
|
||||
break;
|
||||
} while (!map_element_is_last_for_tile(mapElement++));
|
||||
|
||||
if (!found)
|
||||
{
|
||||
if (!found) {
|
||||
log_error("Track map element part not found!");
|
||||
return;
|
||||
}
|
||||
@@ -760,8 +743,7 @@ static void track_block_height_offset(rct_map_element *mapElement, uint8 offset)
|
||||
|
||||
// Sets chainlift for entire block
|
||||
// Basically a copy of the above function, with just two different lines... should probably be combined somehow
|
||||
static void track_block_set_lift(rct_map_element *mapElement, bool chain)
|
||||
{
|
||||
static void track_block_set_lift(rct_map_element *mapElement, bool chain) {
|
||||
uint8 type = mapElement->properties.track.type;
|
||||
uint8 sequence = mapElement->properties.track.sequence;
|
||||
sint16 originX = window_tile_inspector_tile_x << 5;
|
||||
@@ -771,8 +753,7 @@ static void track_block_set_lift(rct_map_element *mapElement, bool chain)
|
||||
|
||||
sint16 trackpieceZ = originZ;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
switch (type) {
|
||||
case TRACK_ELEM_BEGIN_STATION:
|
||||
case TRACK_ELEM_MIDDLE_STATION:
|
||||
type = TRACK_ELEM_END_STATION;
|
||||
@@ -787,8 +768,7 @@ static void track_block_set_lift(rct_map_element *mapElement, bool chain)
|
||||
trackBlock += mapElement->properties.track.sequence & 0xF;
|
||||
|
||||
uint8 originDirection = map_element_get_direction(mapElement);
|
||||
switch (originDirection)
|
||||
{
|
||||
switch (originDirection) {
|
||||
case 0:
|
||||
originX -= trackBlock->x;
|
||||
originY -= trackBlock->y;
|
||||
@@ -810,12 +790,10 @@ static void track_block_set_lift(rct_map_element *mapElement, bool chain)
|
||||
originZ -= trackBlock->z;
|
||||
|
||||
trackBlock = get_track_def_from_ride(ride, type);
|
||||
for (; trackBlock->index != 255; trackBlock++)
|
||||
{
|
||||
for (; trackBlock->index != 255; trackBlock++) {
|
||||
sint16 x = originX, y = originY, z = originZ;
|
||||
|
||||
switch (originDirection)
|
||||
{
|
||||
switch (originDirection) {
|
||||
case 0:
|
||||
x += trackBlock->x;
|
||||
y += trackBlock->y;
|
||||
@@ -842,8 +820,7 @@ static void track_block_set_lift(rct_map_element *mapElement, bool chain)
|
||||
|
||||
bool found = false;
|
||||
mapElement = map_get_first_element_at(x / 32, y / 32);
|
||||
do
|
||||
{
|
||||
do {
|
||||
if (mapElement->base_height != z / 8)
|
||||
continue;
|
||||
|
||||
@@ -863,8 +840,7 @@ static void track_block_set_lift(rct_map_element *mapElement, bool chain)
|
||||
break;
|
||||
} while (!map_element_is_last_for_tile(mapElement++));
|
||||
|
||||
if (!found)
|
||||
{
|
||||
if (!found) {
|
||||
log_error("Track map element part not found!");
|
||||
return;
|
||||
}
|
||||
@@ -905,8 +881,7 @@ static void toggle_quarter_collision(rct_map_element *const mapElement, const in
|
||||
mapElement->flags ^= 1 << ((index + 6 - get_current_rotation()) % 4);
|
||||
}
|
||||
|
||||
static void window_tile_inspector_mouseup(rct_window *w, int widgetIndex)
|
||||
{
|
||||
static void window_tile_inspector_mouseup(rct_window *w, int widgetIndex) {
|
||||
switch (widgetIndex) {
|
||||
case WIDX_CLOSE:
|
||||
tool_cancel();
|
||||
@@ -1155,8 +1130,7 @@ static void window_tile_inspector_mouseup(rct_window *w, int widgetIndex)
|
||||
} // switch page
|
||||
}
|
||||
|
||||
static void window_tile_inspector_resize(rct_window *w)
|
||||
{
|
||||
static void window_tile_inspector_resize(rct_window *w) {
|
||||
w->min_width = WW;
|
||||
w->min_height = MIN_WH;
|
||||
if (w->width < w->min_width) {
|
||||
@@ -1169,20 +1143,18 @@ static void window_tile_inspector_resize(rct_window *w)
|
||||
}
|
||||
}
|
||||
|
||||
static void window_tile_inspector_update(rct_window *w)
|
||||
{
|
||||
static void window_tile_inspector_update(rct_window *w) {
|
||||
// Check if the mouse is hovering over the list
|
||||
if (!widget_is_highlighted(w, WIDX_LIST)) {
|
||||
window_tile_inspector_highlighted_index = -1;
|
||||
widget_invalidate(w, WIDX_LIST);
|
||||
}
|
||||
|
||||
if(gCurrentToolWidget.window_classification != WC_TILE_INSPECTOR)
|
||||
if (gCurrentToolWidget.window_classification != WC_TILE_INSPECTOR)
|
||||
window_close(w);
|
||||
}
|
||||
|
||||
static void window_tile_inspector_tool_update(rct_window* w, int widgetIndex, int x, int y)
|
||||
{
|
||||
static void window_tile_inspector_tool_update(rct_window* w, int widgetIndex, int x, int y) {
|
||||
int direction;
|
||||
short mapX, mapY;
|
||||
|
||||
@@ -1206,8 +1178,7 @@ static void window_tile_inspector_tool_update(rct_window* w, int widgetIndex, in
|
||||
map_invalidate_selection_rect();
|
||||
}
|
||||
|
||||
static void window_tile_inspector_tool_down(rct_window* w, int widgetIndex, int x, int y)
|
||||
{
|
||||
static void window_tile_inspector_tool_down(rct_window* w, int widgetIndex, int x, int y) {
|
||||
int direction;
|
||||
short mapX, mapY;
|
||||
|
||||
@@ -1225,22 +1196,19 @@ static void window_tile_inspector_tool_down(rct_window* w, int widgetIndex, int
|
||||
window_tile_inspector_auto_set_buttons(w);
|
||||
}
|
||||
|
||||
static void window_tile_inspector_scrollgetsize(rct_window *w, int scrollIndex, int *width, int *height)
|
||||
{
|
||||
static void window_tile_inspector_scrollgetsize(rct_window *w, int scrollIndex, int *width, int *height) {
|
||||
*width = WW - 30;
|
||||
*height = window_tile_inspector_item_count * LIST_ITEM_HEIGHT;
|
||||
}
|
||||
|
||||
static void window_tile_inspector_set_page(rct_window *w, const int page)
|
||||
{
|
||||
static void window_tile_inspector_set_page(rct_window *w, const int page) {
|
||||
w->page = page;
|
||||
w->widgets = tile_inspector_widgets[page];
|
||||
w->enabled_widgets = window_tile_inspector_page_enabled_widgets[page];
|
||||
w->disabled_widgets = window_tile_inspector_page_disabled_widgets[page];
|
||||
}
|
||||
|
||||
static void window_tile_inspector_auto_set_buttons(rct_window *w)
|
||||
{
|
||||
static void window_tile_inspector_auto_set_buttons(rct_window *w) {
|
||||
// X and Y spinners
|
||||
bool tile_is_selected = (window_tile_inspector_tile_x != -1) && (window_tile_inspector_tile_y != -1);
|
||||
widget_set_enabled(w, WIDX_SPINNER_X_INCREASE, (tile_is_selected && (window_tile_inspector_tile_x < 255)));
|
||||
@@ -1260,8 +1228,7 @@ static void window_tile_inspector_auto_set_buttons(rct_window *w)
|
||||
widget_invalidate(w, WIDX_BUTTON_MOVE_DOWN);
|
||||
}
|
||||
|
||||
static void window_tile_inspector_scrollmousedown(rct_window *w, int scrollIndex, int x, int y)
|
||||
{
|
||||
static void window_tile_inspector_scrollmousedown(rct_window *w, int scrollIndex, int x, int y) {
|
||||
// Because the list items are displayed in reverse order, subtract the calculated index from the amount of elements
|
||||
const sint16 index = window_tile_inspector_item_count - (y - 1) / LIST_ITEM_HEIGHT - 1;
|
||||
int page;
|
||||
@@ -1285,8 +1252,7 @@ static void window_tile_inspector_scrollmousedown(rct_window *w, int scrollIndex
|
||||
window_invalidate(w);
|
||||
}
|
||||
|
||||
static void window_tile_inspector_scrollmouseover(rct_window *w, int scrollIndex, int x, int y)
|
||||
{
|
||||
static void window_tile_inspector_scrollmouseover(rct_window *w, int scrollIndex, int x, int y) {
|
||||
sint16 index = window_tile_inspector_item_count - (y - 1) / LIST_ITEM_HEIGHT - 1;
|
||||
if (index < 0 || index >= window_tile_inspector_item_count)
|
||||
window_tile_inspector_highlighted_index = -1;
|
||||
@@ -1296,8 +1262,7 @@ static void window_tile_inspector_scrollmouseover(rct_window *w, int scrollIndex
|
||||
widget_invalidate(w, WIDX_LIST);
|
||||
}
|
||||
|
||||
static void window_tile_inspector_invalidate(rct_window *w)
|
||||
{
|
||||
static void window_tile_inspector_invalidate(rct_window *w) {
|
||||
colour_scheme_update(w);
|
||||
|
||||
w->widgets[WIDX_BACKGROUND].bottom = w->height - 1;
|
||||
@@ -1473,8 +1438,7 @@ static void window_tile_inspector_invalidate(rct_window *w)
|
||||
}
|
||||
}
|
||||
|
||||
static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
{
|
||||
static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) {
|
||||
window_draw_widgets(w, dpi);
|
||||
|
||||
// Set medium font size
|
||||
@@ -1482,7 +1446,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
|
||||
// Draw column headers
|
||||
rct_widget *widget;
|
||||
if ((widget= &w->widgets[WIDX_COLUMN_TYPE])->type != WWT_EMPTY) {
|
||||
if ((widget = &w->widgets[WIDX_COLUMN_TYPE])->type != WWT_EMPTY) {
|
||||
gfx_draw_string_left_clipped(dpi, STR_TILE_INSPECTOR_ELEMENT_TYPE, gCommonFormatArgs, w->colours[1], w->x + widget->left + 1, w->y + widget->top + 1, widget->right - widget->left);
|
||||
}
|
||||
if ((widget = &w->widgets[WIDX_COLUMN_BASEHEIGHT])->type != WWT_EMPTY) {
|
||||
@@ -1509,8 +1473,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
gfx_draw_string_right(dpi, STR_FORMAT_INTEGER, &window_tile_inspector_tile_y, 12, w->x + 105, w->y + 24);
|
||||
}
|
||||
|
||||
if (w->selected_list_item != -1)
|
||||
{
|
||||
if (w->selected_list_item != -1) {
|
||||
// X and Y of first element in detail box
|
||||
int x = w->x + w->widgets[WIDX_GROUPBOX_DETAILS].left + 7;
|
||||
int y = w->y + w->widgets[WIDX_GROUPBOX_DETAILS].top + 14;
|
||||
@@ -1536,7 +1499,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
else if (mapElement->properties.surface.ownership & OWNERSHIP_AVAILABLE) land_ownership = STR_LAND_SALE;
|
||||
else if (mapElement->properties.surface.ownership & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED) land_ownership = STR_CONSTRUCTION_RIGHTS_OWNED;
|
||||
else if (mapElement->properties.surface.ownership & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) land_ownership = STR_CONSTRUCTION_RIGHTS_SALE;
|
||||
else land_ownership = STR_LAND_NOT_OWNED_AND_NOT_AVAILABLE;
|
||||
else land_ownership = STR_TILE_INSPECTOR_LAND_NOT_OWNED_AND_NOT_AVAILABLE;
|
||||
gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_SURFACE_OWNERSHIP, &land_ownership, 12, x, y + 22);
|
||||
|
||||
// Water level
|
||||
@@ -1623,8 +1586,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
break;
|
||||
}
|
||||
|
||||
case PAGE_SCENERY:
|
||||
{
|
||||
case PAGE_SCENERY: {
|
||||
// Details
|
||||
// Age
|
||||
sint16 age = mapElement->properties.scenery.age;
|
||||
@@ -1683,8 +1645,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
}
|
||||
}
|
||||
|
||||
static void window_tile_inspector_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex)
|
||||
{
|
||||
static void window_tile_inspector_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) {
|
||||
int x = 3;
|
||||
int y = LIST_ITEM_HEIGHT * (window_tile_inspector_item_count - 1);
|
||||
int i = 0;
|
||||
|
||||
Reference in New Issue
Block a user