Merge pull request #1852 from Gymnasiast/addresses-and-strings-cleanup

Name some addresses, clean up strings ids and usage, closes #515
This commit is contained in:
Duncan 2015-08-27 17:15:47 +01:00
commit 8b7c593bb5
21 changed files with 292 additions and 266 deletions

View File

@ -287,6 +287,8 @@
#define RCT2_ADDRESS_UNCOMPLETED_RESEARCH_TYPES 0x00EE787C
#define RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER 0x00F1AD60
#define RCT2_ADDRESS_MAP_IMAGE_DATA 0x00F1AD68
// No longer used
@ -347,6 +349,7 @@
#define RCT2_ADDRESS_TRACK_DESIGN_SCENERY_TOGGLE 0x00F44152
#define RCT2_ADDRESS_ABOVE_GROUND_FLAGS 0x00F441D4
#define RCT2_ADDRESS_TRACK_LIST 0x00F441EC
#define RCT2_ADDRESS_SCENERY_COST 0x00F64EB4
@ -507,7 +510,6 @@
#define RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT 0x0141E9AC
#define RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE 0x0141E9AE
#define RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID 0x0141E9AE
#define RCT2_ADDRESS_CURRENT_ROTATION 0x0141E9E0
#define RCT2_ADDRESS_CURRENT_VIEWPORT_FLAGS 0x0141E9E4

View File

@ -726,7 +726,7 @@ int game_load_sv6(SDL_RWops* rw)
log_error("invalid checksum");
RCT2_GLOBAL(RCT2_ADDRESS_ERROR_TYPE, uint8) = 255;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = STR_FILE_CONTAINS_INVALID_DATA;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_FILE_CONTAINS_INVALID_DATA;
return 0;
}
@ -857,7 +857,7 @@ int game_load_save(const char *path)
if (rw == NULL) {
log_error("unable to open %s", path);
RCT2_GLOBAL(RCT2_ADDRESS_ERROR_TYPE, uint8) = 255;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = STR_FILE_CONTAINS_INVALID_DATA;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_FILE_CONTAINS_INVALID_DATA;
return 0;
}

View File

@ -484,7 +484,7 @@ static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, i
if (sceneryEntry->wall.var_0D != 0xFF){
window_sign_small_open(mapElement->properties.fence.item[0]);
} else {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_REMOVE_THIS;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_REMOVE_THIS;
game_do_command(
x,
GAME_COMMAND_FLAG_APPLY,
@ -513,7 +513,7 @@ static void viewport_interaction_remove_large_scenery(rct_map_element *mapElemen
((mapElement->properties.scenerymultiple.colour[1] & 0xE0) >> 5);
window_sign_open(id);
} else {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1158;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_REMOVE_THIS;
game_do_command(
x,
1 | ((mapElement->type & 0x3) << 8),

View File

@ -85,9 +85,6 @@ enum {
STR_RESOLUTION_X_BY_Y = 840,
STR_ROTATE_CLOCKWISE = 5458,
STR_ROTATE_ANTI_CLOCKWISE = 5459,
STR_ABOUT = 847,
STR_ROLLERCOASTER_TYCOON_2 = 848,
STR_VERSION_X = 849,
@ -258,6 +255,8 @@ enum {
STR_CLOSE_PARK = 1013,
STR_OPEN_PARK = 1014,
STR_UNABLE_TO_OPERATE_WITH_MORE_THAN_ONE_STATION_IN_THIS_MODE = 1015,
STR_UNABLE_TO_OPERATE_WITH_LESS_THAN_TWO_STATIONS_IN_THIS_MODE = 1016,
STR_CANT_CHANGE_OPERATING_MODE = 1017,
STR_RIDE_SET_VEHICLE_TYPE_FAIL = 1018,
STR_RIDE_SET_VEHICLE_SET_NUM_CARS_PER_TRAIN_FAIL = 1019,
@ -283,6 +282,7 @@ enum {
STR_RCT2_SAVED_GAME = 1043,
STR_RCT2_SCENARIO_FILE = 1044,
STR_RCT2_LANDSCAPE_FILE = 1045,
STR_SCENARIO_SAVE_FAILED = 1048,
STR_INVISIBLE_SUPPORTS = 1051,
@ -397,6 +397,7 @@ enum {
STR_PLACE_SCENERY_TIP = 1159,
STR_ADJUST_WATER_TIP = 1160,
STR_CANT_POSITION_THIS_HERE = 1161,
STR_CANT_LOWER_WATER_LEVEL_HERE = 1166,
STR_CANT_RAISE_WATER_LEVEL_HERE = 1167,
@ -515,6 +516,8 @@ enum {
STR_RIDE_CONSTRUCTION_OTHER_TRACK_CONFIGURATIONS_TIP = 1385,
STR_RIDE_CONSTRUCTION_SPECIAL = 1386,
STR_CANT_CHANGE_LAND_TYPE = 1387,
STR_VIEW_OF_RIDE_ATTRACTION_TIP = 1392,
STR_VEHICLE_DETAILS_AND_OPTIONS_TIP = 1393,
STR_OPERATING_OPTIONS_TIP = 1394,
@ -567,6 +570,8 @@ enum {
STR_LEAVING_PARK = 1447,
STR_WATCHING_NEW_RIDE_BEING_CONSTRUCTED = 1448,
STR_CANT_NAME_GUEST = 1454,
STR_RIDE_CONSTRUCTION_TRACK_STYLE = 1459,
STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP = 1460,
STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP = 1461,
@ -873,11 +878,6 @@ enum {
STR_ON_RIDE_PHOTO_PRICE = 1963,
STR_MAIN_COLOUR_SCHEME = 2971,
STR_ALTERNATIVE_COLOUR_SCHEME_1 = 2972,
STR_ALTERNATIVE_COLOUR_SCHEME_2 = 2973,
STR_ALTERNATIVE_COLOUR_SCHEME_3 = 2974,
STR_SHOP_ITEM_SINGULAR_BALLOON = 1988,
STR_SHOP_ITEM_SINGULAR_CUDDLY_TOY = 1989,
STR_SHOP_ITEM_SINGULAR_PARK_MAP = 1990,
@ -906,25 +906,6 @@ enum {
STR_SHOP_ITEM_SINGULAR_LEMONADE = 2013,
STR_SHOP_ITEM_SINGULAR_EMPTY_BOX = 2014,
STR_SHOP_ITEM_SINGULAR_EMPTY_BOTTLE = 2015,
STR_SHOP_ITEM_SINGULAR_PRETZEL = 2125,
STR_SHOP_ITEM_SINGULAR_HOT_CHOCOLATE = 2126,
STR_SHOP_ITEM_SINGULAR_ICED_TEA = 2127,
STR_SHOP_ITEM_SINGULAR_FUNNEL_CAKE = 2128,
STR_SHOP_ITEM_SINGULAR_SUNGLASSES = 2129,
STR_SHOP_ITEM_SINGULAR_BEEF_NOODLES = 2130,
STR_SHOP_ITEM_SINGULAR_FRIED_RICE_NOODLES = 2131,
STR_SHOP_ITEM_SINGULAR_WONTON_SOUP = 2132,
STR_SHOP_ITEM_SINGULAR_MEATBALL_SOUP = 2133,
STR_SHOP_ITEM_SINGULAR_FRUIT_JUICE = 2134,
STR_SHOP_ITEM_SINGULAR_SOYBEAN_MILK = 2135,
STR_SHOP_ITEM_SINGULAR_SUJONGKWA = 2136,
STR_SHOP_ITEM_SINGULAR_SUB_SANDWICH = 2137,
STR_SHOP_ITEM_SINGULAR_COOKIE = 2138,
STR_SHOP_ITEM_SINGULAR_EMPTY_BOWL_RED = 2139,
STR_SHOP_ITEM_SINGULAR_EMPTY_DRINK_CARTON = 2140,
STR_SHOP_ITEM_SINGULAR_EMPTY_JUICE_CUP = 2141,
STR_SHOP_ITEM_SINGULAR_ROAST_SAUSAGE = 2142,
STR_SHOP_ITEM_SINGULAR_EMPTY_BOWL_BLUE = 2143,
STR_SHOP_ITEM_PLURAL_BALLOON = 2016,
STR_SHOP_ITEM_PLURAL_CUDDLY_TOY = 2017,
@ -954,25 +935,6 @@ enum {
STR_SHOP_ITEM_PLURAL_LEMONADE = 2041,
STR_SHOP_ITEM_PLURAL_EMPTY_BOX = 2042,
STR_SHOP_ITEM_PLURAL_EMPTY_BOTTLE = 2043,
STR_SHOP_ITEM_PLURAL_PRETZEL = 2147,
STR_SHOP_ITEM_PLURAL_HOT_CHOCOLATE = 2148,
STR_SHOP_ITEM_PLURAL_ICED_TEA = 2149,
STR_SHOP_ITEM_PLURAL_FUNNEL_CAKE = 2150,
STR_SHOP_ITEM_PLURAL_SUNGLASSES = 2151,
STR_SHOP_ITEM_PLURAL_BEEF_NOODLES = 2152,
STR_SHOP_ITEM_PLURAL_FRIED_RICE_NOODLES = 2153,
STR_SHOP_ITEM_PLURAL_WONTON_SOUP = 2154,
STR_SHOP_ITEM_PLURAL_MEATBALL_SOUP = 2155,
STR_SHOP_ITEM_PLURAL_FRUIT_JUICE = 2156,
STR_SHOP_ITEM_PLURAL_SOYBEAN_MILK = 2157,
STR_SHOP_ITEM_PLURAL_SUJONGKWA = 2158,
STR_SHOP_ITEM_PLURAL_SUB_SANDWICH = 2159,
STR_SHOP_ITEM_PLURAL_COOKIE = 2160,
STR_SHOP_ITEM_PLURAL_EMPTY_BOWL_RED = 2161,
STR_SHOP_ITEM_PLURAL_EMPTY_DRINK_CARTON = 2162,
STR_SHOP_ITEM_PLURAL_EMPTY_JUICE_CUP = 2163,
STR_SHOP_ITEM_PLURAL_ROAST_SAUSAGE = 2164,
STR_SHOP_ITEM_PLURAL_EMPTY_BOWL_BLUE = 2165,
STR_SHOP_ITEM_INDEFINITE_BALLOON = 2044,
STR_SHOP_ITEM_INDEFINITE_CUDDLY_TOY = 2045,
@ -1002,25 +964,6 @@ enum {
STR_SHOP_ITEM_INDEFINITE_LEMONADE = 2069,
STR_SHOP_ITEM_INDEFINITE_EMPTY_BOX = 2070,
STR_SHOP_ITEM_INDEFINITE_EMPTY_BOTTLE = 2071,
STR_SHOP_ITEM_INDEFINITE_PRETZEL = 2169,
STR_SHOP_ITEM_INDEFINITE_HOT_CHOCOLATE = 2170,
STR_SHOP_ITEM_INDEFINITE_ICED_TEA = 2171,
STR_SHOP_ITEM_INDEFINITE_FUNNEL_CAKE = 2172,
STR_SHOP_ITEM_INDEFINITE_SUNGLASSES = 2173,
STR_SHOP_ITEM_INDEFINITE_BEEF_NOODLES = 2174,
STR_SHOP_ITEM_INDEFINITE_FRIED_RICE_NOODLES = 2175,
STR_SHOP_ITEM_INDEFINITE_WONTON_SOUP = 2176,
STR_SHOP_ITEM_INDEFINITE_MEATBALL_SOUP = 2177,
STR_SHOP_ITEM_INDEFINITE_FRUIT_JUICE = 2178,
STR_SHOP_ITEM_INDEFINITE_SOYBEAN_MILK = 2179,
STR_SHOP_ITEM_INDEFINITE_SUJONGKWA = 2180,
STR_SHOP_ITEM_INDEFINITE_SUB_SANDWICH = 2181,
STR_SHOP_ITEM_INDEFINITE_COOKIE = 2182,
STR_SHOP_ITEM_INDEFINITE_EMPTY_BOWL_RED = 2183,
STR_SHOP_ITEM_INDEFINITE_EMPTY_DRINK_CARTON = 2184,
STR_SHOP_ITEM_INDEFINITE_EMPTY_JUICE_CUP = 2185,
STR_SHOP_ITEM_INDEFINITE_ROAST_SAUSAGE = 2186,
STR_SHOP_ITEM_INDEFINITE_EMPTY_BOWL_BLUE = 2187,
STR_SHOP_ITEM_DISPLAY_BALLOON = 2072,
STR_SHOP_ITEM_DISPLAY_CUDDLY_TOY = 2073,
@ -1050,6 +993,67 @@ enum {
STR_SHOP_ITEM_DISPLAY_LEMONADE = 2097,
STR_SHOP_ITEM_DISPLAY_EMPTY_BOX = 2098,
STR_SHOP_ITEM_DISPLAY_EMPTY_BOTTLE = 2099,
STR_SHOP_ITEM_SINGULAR_PRETZEL = 2125,
STR_SHOP_ITEM_SINGULAR_HOT_CHOCOLATE = 2126,
STR_SHOP_ITEM_SINGULAR_ICED_TEA = 2127,
STR_SHOP_ITEM_SINGULAR_FUNNEL_CAKE = 2128,
STR_SHOP_ITEM_SINGULAR_SUNGLASSES = 2129,
STR_SHOP_ITEM_SINGULAR_BEEF_NOODLES = 2130,
STR_SHOP_ITEM_SINGULAR_FRIED_RICE_NOODLES = 2131,
STR_SHOP_ITEM_SINGULAR_WONTON_SOUP = 2132,
STR_SHOP_ITEM_SINGULAR_MEATBALL_SOUP = 2133,
STR_SHOP_ITEM_SINGULAR_FRUIT_JUICE = 2134,
STR_SHOP_ITEM_SINGULAR_SOYBEAN_MILK = 2135,
STR_SHOP_ITEM_SINGULAR_SUJONGKWA = 2136,
STR_SHOP_ITEM_SINGULAR_SUB_SANDWICH = 2137,
STR_SHOP_ITEM_SINGULAR_COOKIE = 2138,
STR_SHOP_ITEM_SINGULAR_EMPTY_BOWL_RED = 2139,
STR_SHOP_ITEM_SINGULAR_EMPTY_DRINK_CARTON = 2140,
STR_SHOP_ITEM_SINGULAR_EMPTY_JUICE_CUP = 2141,
STR_SHOP_ITEM_SINGULAR_ROAST_SAUSAGE = 2142,
STR_SHOP_ITEM_SINGULAR_EMPTY_BOWL_BLUE = 2143,
STR_SHOP_ITEM_PLURAL_PRETZEL = 2147,
STR_SHOP_ITEM_PLURAL_HOT_CHOCOLATE = 2148,
STR_SHOP_ITEM_PLURAL_ICED_TEA = 2149,
STR_SHOP_ITEM_PLURAL_FUNNEL_CAKE = 2150,
STR_SHOP_ITEM_PLURAL_SUNGLASSES = 2151,
STR_SHOP_ITEM_PLURAL_BEEF_NOODLES = 2152,
STR_SHOP_ITEM_PLURAL_FRIED_RICE_NOODLES = 2153,
STR_SHOP_ITEM_PLURAL_WONTON_SOUP = 2154,
STR_SHOP_ITEM_PLURAL_MEATBALL_SOUP = 2155,
STR_SHOP_ITEM_PLURAL_FRUIT_JUICE = 2156,
STR_SHOP_ITEM_PLURAL_SOYBEAN_MILK = 2157,
STR_SHOP_ITEM_PLURAL_SUJONGKWA = 2158,
STR_SHOP_ITEM_PLURAL_SUB_SANDWICH = 2159,
STR_SHOP_ITEM_PLURAL_COOKIE = 2160,
STR_SHOP_ITEM_PLURAL_EMPTY_BOWL_RED = 2161,
STR_SHOP_ITEM_PLURAL_EMPTY_DRINK_CARTON = 2162,
STR_SHOP_ITEM_PLURAL_EMPTY_JUICE_CUP = 2163,
STR_SHOP_ITEM_PLURAL_ROAST_SAUSAGE = 2164,
STR_SHOP_ITEM_PLURAL_EMPTY_BOWL_BLUE = 2165,
STR_SHOP_ITEM_INDEFINITE_PRETZEL = 2169,
STR_SHOP_ITEM_INDEFINITE_HOT_CHOCOLATE = 2170,
STR_SHOP_ITEM_INDEFINITE_ICED_TEA = 2171,
STR_SHOP_ITEM_INDEFINITE_FUNNEL_CAKE = 2172,
STR_SHOP_ITEM_INDEFINITE_SUNGLASSES = 2173,
STR_SHOP_ITEM_INDEFINITE_BEEF_NOODLES = 2174,
STR_SHOP_ITEM_INDEFINITE_FRIED_RICE_NOODLES = 2175,
STR_SHOP_ITEM_INDEFINITE_WONTON_SOUP = 2176,
STR_SHOP_ITEM_INDEFINITE_MEATBALL_SOUP = 2177,
STR_SHOP_ITEM_INDEFINITE_FRUIT_JUICE = 2178,
STR_SHOP_ITEM_INDEFINITE_SOYBEAN_MILK = 2179,
STR_SHOP_ITEM_INDEFINITE_SUJONGKWA = 2180,
STR_SHOP_ITEM_INDEFINITE_SUB_SANDWICH = 2181,
STR_SHOP_ITEM_INDEFINITE_COOKIE = 2182,
STR_SHOP_ITEM_INDEFINITE_EMPTY_BOWL_RED = 2183,
STR_SHOP_ITEM_INDEFINITE_EMPTY_DRINK_CARTON = 2184,
STR_SHOP_ITEM_INDEFINITE_EMPTY_JUICE_CUP = 2185,
STR_SHOP_ITEM_INDEFINITE_ROAST_SAUSAGE = 2186,
STR_SHOP_ITEM_INDEFINITE_EMPTY_BOWL_BLUE = 2187,
STR_SHOP_ITEM_DISPLAY_PRETZEL = 2191,
STR_SHOP_ITEM_DISPLAY_HOT_CHOCOLATE = 2192,
STR_SHOP_ITEM_DISPLAY_ICED_TEA = 2193,
@ -1070,7 +1074,6 @@ enum {
STR_SHOP_ITEM_DISPLAY_ROAST_SAUSAGE = 2208,
STR_SHOP_ITEM_DISPLAY_EMPTY_BOWL_BLUE = 2209,
STR_STAFF_HANDYMEN_TAB_TIP = 2210,
STR_STAFF_MECHANICS_TAB_TIP = 2211,
STR_STAFF_SECURITY_TAB_TIP = 2212,
@ -1374,87 +1377,27 @@ enum {
STR_SHORTCUT_SHOW_RECENT_MESSAGES = 2522,
STR_SHORTCUT_SHOW_MAP = 2523,
STR_SHORTCUT_SCREENSHOT = 2524,
STR_INDIVIDUAL_KEYS_BASE = 2525,
STR_GOLF_HOLE_A = 3049,
STR_GOLF_HOLE_B = 3050,
STR_GOLF_HOLE_C = 3051,
STR_GOLF_HOLE_D = 3052,
STR_GOLF_HOLE_E = 3053,
STR_CHEAT_TIP_5K_MONEY = 2681,
STR_TOP_SECTION = 3069,
STR_SLOPE_TO_LEVEL = 3070,
STR_CHEAT_TIP_LARGE_TRAM_GUESTS = 2684,
STR_NOT_ALLOWED_TO_MODIFY_STATION = 3092,
// Cheats
STR_CHEAT_TITLE = 5217,
STR_CHEAT_TITLE_FINANCIAL = 5345,
STR_CHEAT_TITLE_GUEST = 5346,
STR_CHEAT_TITLE_RIDE = 5347,
STR_CHEAT_TITLE_PARK = 5348,
// Money
STR_CHEAT_5K_MONEY = 2760,
STR_CHEAT_CLEAR_LOAN = 5302,
// Guests
STR_CHEAT_LARGE_TRAM_GUESTS = 2765,
STR_CHEAT_EXPLODE = 5285,
STR_CHEAT_REMOVE_ALL_GUESTS = 5359,
STR_CHEAT_GUEST_HAPPINESS = 5352,
STR_CHEAT_GUEST_ENERGY = 5353,
STR_CHEAT_GUEST_HUNGER = 5354,
STR_CHEAT_GUEST_THIRST = 5355,
STR_CHEAT_GUEST_NAUSEA = 5356,
STR_CHEAT_GUEST_NAUSEA_TOLERANCE = 5357,
STR_CHEAT_GUEST_BATHROOM = 5358,
STR_CHEAT_GIVE_ALL_GUESTS = 5361,
STR_CHEAT_GUEST_PREFERRED_INTENSITY = 5362,
STR_CHEAT_MORE_THAN_1 = 5363,
STR_CHEAT_LESS_THAN_15 = 5364,
STR_CHEAT_IGNORE_INTENSITY = 5506,
// Misc.
STR_CHEAT_FREEZE_CLIMATE = 2767,
STR_CHEAT_UNFREEZE_CLIMATE = 2768,
STR_CHEAT_OPEN_PARK = 2769,
STR_CHEAT_CLOSE_PARK = 2770,
STR_CHEAT_ZERO_CLEARANCE = 2759,
STR_CHEAT_FORCE_SUN = 2757,
STR_CHEAT_FORCE_THUNDER = 2758,
STR_CHEAT_CLEAR_GRASS = 2752,
STR_CHEAT_MOWED_GRASS = 2753,
STR_CHEAT_WATER_PLANTS = 2754,
STR_CHEAT_FIX_VANDALISM = 2755,
STR_CHEAT_REMOVE_LITTER = 2756,
STR_CHEAT_FORCE_SUN = 2757,
STR_CHEAT_FORCE_THUNDER = 2758,
STR_CHEAT_ZERO_CLEARANCE = 2759,
STR_CHEAT_5K_MONEY = 2760,
STR_CHEAT_LARGE_TRAM_GUESTS = 2765,
STR_CHEAT_WIN_SCENARIO = 2766,
STR_CHEAT_UNLOCK_PRICES = 5157,
STR_CHEAT_BUILD_IN_PAUSE_MODE = 5303,
STR_CHEAT_PARK_PARAMETERS = 5369,
// Rides
STR_CHEAT_RENEW_RIDES = 5123,
STR_CHEAT_MAKE_DESTRUCTABLE = 5125,
STR_CHEAT_FIX_ALL_RIDES = 5132,
STR_CHEAT_410_HILL_LIFT = 5137,
STR_CHEAT_DISABLE_BRAKES_FAILURE = 5140,
STR_CHEAT_DISABLE_BREAKDOWNS = 5141,
// Cheat tips
STR_CHEAT_TIP_5K_MONEY = 2681,
STR_CHEAT_TIP_CLEAR_LOAN = 5301,
STR_CHEAT_TIP_LARGE_TRAM_GUESTS = 2684,
STR_CHEAT_TIP_EXPLODE = 5286,
STR_CHEAT_TIP_REMOVE_ALL_GUESTS = 5360,
STR_CHEAT_TIP_PARK_PARAMETERS = 5370,
// Cheat tab tips
STR_FINANCIAL_CHEATS_TIP = 5178,
STR_GUEST_CHEATS_TIP = 5179,
STR_PARK_CHEATS_TIP = 5180,
STR_RIDE_CHEATS_TIP = 5181,
STR_CHEAT_FREEZE_CLIMATE = 2767,
STR_CHEAT_UNFREEZE_CLIMATE = 2768,
STR_CHEAT_OPEN_PARK = 2769,
STR_CHEAT_CLOSE_PARK = 2770,
STR_SHORTCUT_ENTRY_FORMAT = 2781,
STR_SHIFT_PLUS = 2782,
@ -1543,6 +1486,13 @@ enum {
STR_MUSIC_ACKNOWLEDGEMENTS_ELLIPSIS = 2862,
STR_MUSIC_ACKNOWLEDGEMENTS = 2863,
STR_MAIN_COLOUR_SCHEME = 2971,
STR_ALTERNATIVE_COLOUR_SCHEME_1 = 2972,
STR_ALTERNATIVE_COLOUR_SCHEME_2 = 2973,
STR_ALTERNATIVE_COLOUR_SCHEME_3 = 2974,
STR_CANT_NAME_STAFF_MEMBER = 2979,
STR_TOO_MANY_BANNERS_IN_GAME = 2980,
STR_NO_ENTRY = 2981,
@ -1571,7 +1521,7 @@ enum {
STR_JUNGLE_DRUMS_STYLE = STR_MUSIC_STYLE_START + 5,
STR_EGYPTIAN_STYLE = STR_MUSIC_STYLE_START + 6,
STR_TOYLAND_STYLE = STR_MUSIC_STYLE_START + 7,
// STR_??? = STR_MUSIC_STYLE_START + 8,
// STR_??? = STR_MUSIC_STYLE_START + 8, // Circus show; never displayed as a string
STR_SPACE_STYLE = STR_MUSIC_STYLE_START + 9,
STR_HORROR_STYLE = STR_MUSIC_STYLE_START + 10,
STR_TECHNO_STYLE = STR_MUSIC_STYLE_START + 11,
@ -1602,6 +1552,12 @@ enum {
STR_THIS_RIDE_CANNOT_BE_MODIFIED = 3046,
STR_LOCAL_AUTHORITY_FORBIDS_DEMOLITION_OR_MODIFICATIONS_TO_THIS_RIDE = 3047,
STR_GOLF_HOLE_A = 3049,
STR_GOLF_HOLE_B = 3050,
STR_GOLF_HOLE_C = 3051,
STR_GOLF_HOLE_D = 3052,
STR_GOLF_HOLE_E = 3053,
STR_WHITE = 3055,
STR_TRANSLUCENT = 3056,
STR_CONSTRUCTION_MARKER = 3057,
@ -1620,6 +1576,9 @@ enum {
STR_REAL_PARKS = STR_BEGINNER_PARKS + 3,
STR_OTHER_PARKS = STR_BEGINNER_PARKS + 4,
STR_TOP_SECTION = 3069,
STR_SLOPE_TO_LEVEL = 3070,
STR_SAME_PRICE_THROUGHOUT_PARK = 3071,
STR_SAME_PRICE_THROUGHOUT_PARK_TIP = 3072,
@ -1643,12 +1602,18 @@ enum {
STR_SPACE_ENTRANCE = 3089,
STR_SELECT_STYLE_OF_ENTRANCE_EXIT_STATION_TIP = 3090,
STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION = 3091,
STR_NOT_ALLOWED_TO_MODIFY_STATION = 3092,
STR_SELECT_LIFT_HILL_CHAIN_SPEED_TIP = 3097,
STR_SELECT_COLOUR = 3099,
STR_SELECT_SECONDARY_COLOUR = 3100,
STR_SELECT_TERNARY_COLOUR = 3101,
STR_CANT_REPAINT_THIS = 3103,
STR_LIST_RIDES_TIP = 3104,
STR_LIST_SHOPS_AND_STALLS_TIP = 3105,
STR_LIST_KIOSKS_AND_FACILITIES_TIP = 3106,
@ -1685,6 +1650,8 @@ enum {
STR_SELECT_NEARBY_SCENERY = 3137,
STR_RESET_SELECTION = 3138,
STR_MULTICIRCUIT_NOT_POSSIBLE_WITH_CABLE_LIFT_HILL = 3141,
STR_SHOW_PEOPLE_ON_MAP_TIP = 3143,
STR_SHOW_RIDES_STALLS_ON_MAP_TIP = 3144,
@ -1807,7 +1774,6 @@ enum {
STR_CHANGE_NAME_OF_SCENARIO_TIP = 3296,
STR_CHANGE_DETAIL_NOTES_ABOUT_PARK_SCENARIO_TIP = 3297,
STR_NO_DETAILS_YET = 3317,
STR_SELECT_WHICH_GROUP_THIS_SCENARIO_APPEARS_IN = 3318,
@ -1832,10 +1798,15 @@ enum {
STR_ROLLER_COASTER_DESIGNER = 3344,
STR_TRACK_DESIGNS_MANAGER = 3345,
STR_CANT_SAVE_TRACK_DESIGN = 3346,
STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY = 3347,
STR_TRACK_MANAGE_RENAME = 3348,
STR_TRACK_MANAGE_DELETE = 3349,
STR_CANT_RENAME_TRACK_DESIGN = 3352,
STR_NEW_NAME_CONTAINS_INVALID_CHARACTERS = 3353,
STR_ANOTHER_FILE_EXISTS_WITH_NAME_OR_FILE_IS_WRITE_PROTECTED = 3354,
STR_FILE_IS_WRITE_PROTECTED_OR_LOCKED = 3355,
STR_ARE_YOU_SURE_YOU_WANT_TO_PERMANENTLY_DELETE_TRACK = 3357,
STR_CANT_DELETE_TRACK_DESIGN = 3358,
@ -1860,19 +1831,6 @@ enum {
STR_SAVE_TRACK_SCENERY_UNABLE_TO_SELECT_ADDITIONAL_ITEM_OF_SCENERY = 3389,
STR_SAVE_TRACK_SCENERY_TOO_MANY_ITEMS_SELECTED = 3390,
STR_OBJECTIVE_2_NONE = 2397,
STR_OBJECTIVE_2_NUMBER_OF_GUESTS_AT_A_GIVEN_DATE = STR_OBJECTIVE_2_NONE + 1,
STR_OBJECTIVE_2_PARK_VALUE_AT_A_GIVEN_DATE = STR_OBJECTIVE_2_NONE + 2,
STR_OBJECTIVE_2_HAVE_FUN = STR_OBJECTIVE_2_NONE + 3,
STR_OBJECTIVE_2_BUILD_THE_BEST_RIDE_YOU_CAN = STR_OBJECTIVE_2_NONE + 4,
STR_OBJECTIVE_2_BUILD_10_ROLLER_COASTERS = STR_OBJECTIVE_2_NONE + 5,
STR_OBJECTIVE_2_NUMBER_OF_GUESTS_IN_PARK = STR_OBJECTIVE_2_NONE + 6,
STR_OBJECTIVE_2_MONTHLY_INCOME_FROM_RIDE_TICKETS = STR_OBJECTIVE_2_NONE + 7,
STR_OBJECTIVE_2_BUILD_10_ROLLER_COASTERS_OF_A_GIVEN_LENGTH = STR_OBJECTIVE_2_NONE + 8,
STR_OBJECTIVE_2_FINISH_BUILDING_5_ROLLER_COASTERS = STR_OBJECTIVE_2_NONE + 9,
STR_OBJECTIVE_2_REPAY_LOAN_AND_ACHIEVE_A_GIVEN_PARK_VALUE = STR_OBJECTIVE_2_NONE + 10,
STR_OBJECTIVE_2_MONTHLY_PROFIT_FROM_FOOD_MERCHANDISE = STR_OBJECTIVE_2_NONE + 11,
STR_CLEAR_SCENERY_TIP = 3437,
STR_CLEAR_SCENERY = 3439,
@ -1885,11 +1843,20 @@ enum {
STR_SET_PATROL_AREA = 3445,
STR_CLEAR_PATROL_AREA = 3446,
STR_UNABLE_TO_REMOVE_ALL_SCENERY_FROM_HERE = 3438,
STR_OPENRCT2_BEGIN_STRING_ID = 5120,
STR_FINANCES_BUTTON_ON_TOOLBAR = 5120,
STR_RESEARCH_BUTTON_ON_TOOLBAR = 5121,
STR_SELECT_BY_TRACK_TYPE = 5122,
STR_CHEAT_RENEW_RIDES = 5123,
STR_CHEAT_MAKE_DESTRUCTABLE = 5125,
STR_CHEAT_FIX_ALL_RIDES = 5132,
STR_CHEAT_410_HILL_LIFT = 5137,
STR_CHEAT_DISABLE_BRAKES_FAILURE = 5140,
STR_CHEAT_DISABLE_BREAKDOWNS = 5141,
STR_CHEATS_BUTTON_ON_TOOLBAR = 5147,
STR_GAME_SPEED_TIP = 5148,
STR_CHEATS_TIP = 5149,
@ -1900,6 +1867,8 @@ enum {
STR_TEST_UNFINISHED_TRACKS = 5155,
STR_TEST_UNFINISHED_TRACKS_TIP = 5156,
STR_CHEAT_UNLOCK_PRICES = 5157,
STR_TWITCH_NAME = 5164,
STR_TWITCH_PEEP_FOLLOWERS = 5165,
STR_TWITCH_PEEP_FOLLOWERS_TIP = 5166,
@ -1916,6 +1885,14 @@ enum {
STR_FULLSCREEN_MODE = 5177,
// Cheat tab tips
STR_FINANCIAL_CHEATS_TIP = 5178,
STR_GUEST_CHEATS_TIP = 5179,
STR_PARK_CHEATS_TIP = 5180,
STR_RIDE_CHEATS_TIP = 5181,
STR_CHEAT_TITLE = 5217,
STR_GIANT_SCREENSHOT = 5260,
STR_OPTIONS_DISPLAY_TIP = 5266,
@ -1928,6 +1905,13 @@ enum {
STR_CHEAT_SANDBOX_MODE_DISABLE = 5279,
STR_CHEAT_SANDBOX_MODE_TIP = 5280,
STR_CHEAT_EXPLODE = 5285,
STR_CHEAT_TIP_EXPLODE = 5286,
STR_CHEAT_TIP_CLEAR_LOAN = 5301,
STR_CHEAT_CLEAR_LOAN = 5302,
STR_CHEAT_BUILD_IN_PAUSE_MODE = 5303,
STR_TITLE_SEQUENCE = 5304,
STR_TITLE_SEQUENCE_RCT1 = 5305,
STR_TITLE_SEQUENCE_RCT1_AA = 5306,
@ -1939,10 +1923,10 @@ enum {
STR_DEBUG_TIP = 5311,
STR_DEBUG_DROPDOWN_CONSOLE = 5312,
STR_DEBUG_DROPDOWN_TILE_INSPECTOR = 5313,
STR_DEBUG_DROPDOWN_OBJECT_SELECTION = 5371,
STR_TILE_INSPECTOR_TITLE = 5314,
STR_TILE_INSPECTOR_TERRAIN_START = 5315,
STR_TILE_INSPECTOR_TERRAIN_EDGE_START = 5331,
STR_TILE_INSPECTOR_ENTRANCE_START = 5335,
STR_TILE_INSPECTOR_ELEMENT_TYPE = 5338,
@ -1955,12 +1939,35 @@ enum {
STR_CHANGELOG_TITLE = 5344,
STR_CHEAT_TITLE_FINANCIAL = 5345,
STR_CHEAT_TITLE_GUEST = 5346,
STR_CHEAT_TITLE_RIDE = 5347,
STR_CHEAT_TITLE_PARK = 5348,
STR_MAX = 5350,
STR_MIN = 5351,
STR_CHEAT_GUEST_HAPPINESS = 5352,
STR_CHEAT_GUEST_ENERGY = 5353,
STR_CHEAT_GUEST_HUNGER = 5354,
STR_CHEAT_GUEST_THIRST = 5355,
STR_CHEAT_GUEST_NAUSEA = 5356,
STR_CHEAT_GUEST_NAUSEA_TOLERANCE = 5357,
STR_CHEAT_GUEST_BATHROOM = 5358,
STR_CHEAT_REMOVE_ALL_GUESTS = 5359,
STR_CHEAT_TIP_REMOVE_ALL_GUESTS = 5360,
STR_CHEAT_GIVE_ALL_GUESTS = 5361,
STR_CHEAT_GUEST_PREFERRED_INTENSITY = 5362,
STR_CHEAT_MORE_THAN_1 = 5363,
STR_CHEAT_LESS_THAN_15 = 5364,
STR_CHEAT_STAFF_SPEED = 5365,
STR_NORMAL = 5366,
STR_FAST = 5367,
STR_CHEAT_RESET_CRASH_STATUS = 5368,
STR_CHEAT_PARK_PARAMETERS = 5369,
STR_CHEAT_TIP_PARK_PARAMETERS = 5370,
STR_DEBUG_DROPDOWN_OBJECT_SELECTION = 5371,
STR_INVERT_RIGHT_MOUSE_DRAG = 5372,
@ -1969,6 +1976,7 @@ enum {
STR_UP = 5375,
STR_DOWN = 5376,
STR_EDIT_TITLE_SEQUENCES_BUTTON = 5436,
STR_MININISE_FULL_SCREEN_ON_FOCUS_LOSS = 5440,
@ -1993,6 +2001,8 @@ enum {
STR_DISABLE_CLEARANCE_CHECKS = 5456,
STR_DISABLE_SUPPORT_LIMITS = 5457,
STR_ROTATE_CLOCKWISE = 5458,
STR_ROTATE_ANTI_CLOCKWISE = 5459,
STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE = 5460,
STR_CHEAT_SET_GUESTS_PARAMETERS = 5461,
@ -2050,11 +2060,13 @@ enum {
STR_START_SERVER = 5501,
STR_MULTIPLAYER = 5502,
STR_ENTER_HOSTNAME_OR_IP_ADDRESS = 5503,
STR_SHOW_MULTIPLAYER_STATUS_TIP = 5504,
STR_UNABLE_TO_CONNECT_TO_SERVER = 5505,
STR_CHEAT_IGNORE_INTENSITY = 5506,
STR_HANDYMEN_MOW_BY_DEFAULT = 5507,
STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM = 5508,
STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM_TIP = 5509,

View File

@ -386,7 +386,7 @@ void update_staff_colour(uint8 staffType, uint16 colour)
*/
uint16 hire_new_staff_member(uint8 staffType)
{
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = STR_CANT_HIRE_NEW_STAFF;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_HIRE_NEW_STAFF;
int eax, ebx, ecx, edx, esi, edi, ebp;
eax = 0x8000;

View File

@ -3586,13 +3586,13 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int *
if (setting == 0){
if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN){
RCT2_GLOBAL(0x141E9AC, uint16) = 1796;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING;
*ebx = MONEY32_UNDEFINED;
return;
}
if (ride->status != RIDE_STATUS_CLOSED){
RCT2_GLOBAL(0x141E9AC, uint16) = 1006;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_MUST_BE_CLOSED_FIRST;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -3601,7 +3601,7 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int *
if (setting == 9 &&
ride->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT &&
new_value > 1){
RCT2_GLOBAL(0x141E9AC, uint16) = 3141;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_MULTICIRCUIT_NOT_POSSIBLE_WITH_CABLE_LIFT_HILL;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -3708,17 +3708,17 @@ int ride_mode_check_valid_station_numbers(rct_ride *ride)
case RIDE_MODE_POWERED_LAUNCH:
case RIDE_MODE_LIM_POWERED_LAUNCH:
if (no_stations <= 1) return 1;
RCT2_GLOBAL(0x141E9AC, uint16) = 1015;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_UNABLE_TO_OPERATE_WITH_MORE_THAN_ONE_STATION_IN_THIS_MODE;
return 0;
case RIDE_MODE_SHUTTLE:
if (no_stations >= 2) return 1;
RCT2_GLOBAL(0x141E9AC, uint16) = 1016;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_UNABLE_TO_OPERATE_WITH_LESS_THAN_TWO_STATIONS_IN_THIS_MODE;
return 0;
}
if (ride->type == RIDE_TYPE_GO_KARTS || ride->type == RIDE_TYPE_MINI_GOLF){
if (no_stations <= 1) return 1;
RCT2_GLOBAL(0x141E9AC, uint16) = 1015;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_UNABLE_TO_OPERATE_WITH_MORE_THAN_ONE_STATION_IN_THIS_MODE;
return 0;
}
@ -3787,12 +3787,12 @@ int ride_check_for_entrance_exit(int rideIndex)
}
if (entrance == 0){
RCT2_GLOBAL(0x141E9AC, uint16) = 1146;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_ENTRANCE_NOT_YET_BUILT;
return 0;
}
if (exit == 0){
RCT2_GLOBAL(0x141E9AC, uint16) = 1147;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_EXIT_NOT_YET_BUILT;
return 0;
}
@ -6315,7 +6315,7 @@ money32 place_ride_entrance_or_exit(sint16 x, sint16 y, sint16 z, uint8 directio
}
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 2214;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
return MONEY32_UNDEFINED;
}
@ -6339,13 +6339,13 @@ money32 place_ride_entrance_or_exit(sint16 x, sint16 y, sint16 z, uint8 directio
return MONEY32_UNDEFINED;
}
if (RCT2_GLOBAL(0x00F1AD60, uint8) & (1 << 2)){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1031;
if (RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & (1 << 2)){
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_RIDE_CANT_BUILD_THIS_UNDERWATER;
return MONEY32_UNDEFINED;
}
if (z > 1952){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 878;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_TOO_HIGH;
return MONEY32_UNDEFINED;
}
@ -6353,12 +6353,12 @@ money32 place_ride_entrance_or_exit(sint16 x, sint16 y, sint16 z, uint8 directio
else{
rct_ride* ride = GET_RIDE(rideIndex);
if (ride->status != RIDE_STATUS_CLOSED){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1006;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_MUST_BE_CLOSED_FIRST;
return MONEY32_UNDEFINED;
}
if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 3092;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_NOT_ALLOWED_TO_MODIFY_STATION;
return MONEY32_UNDEFINED;
}
@ -6372,7 +6372,7 @@ money32 place_ride_entrance_or_exit(sint16 x, sint16 y, sint16 z, uint8 directio
if (is_exit){
if (ride->exits[station_num] != 0xFFFF){
if (flags & (1 << 6)){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = 0;
return MONEY32_UNDEFINED;
}
@ -6384,7 +6384,7 @@ money32 place_ride_entrance_or_exit(sint16 x, sint16 y, sint16 z, uint8 directio
else{
if (ride->entrances[station_num] != 0xFFFF){
if (flags & (1 << 6)){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = 0;
return MONEY32_UNDEFINED;
}
@ -6433,13 +6433,13 @@ money32 place_ride_entrance_or_exit(sint16 x, sint16 y, sint16 z, uint8 directio
return MONEY32_UNDEFINED;
}
if (RCT2_GLOBAL(0x00F1AD60, uint8) & (1 << 2)){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1031;
if (RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & ELEMENT_IS_UNDERWATER){
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_RIDE_CANT_BUILD_THIS_UNDERWATER;
return MONEY32_UNDEFINED;
}
if (z / 8 > 244){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 878;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_TOO_HIGH;
return MONEY32_UNDEFINED;
}
@ -6501,13 +6501,13 @@ money32 remove_ride_entrance_or_exit(sint16 x, sint16 y, uint8 rideIndex, uint8
if (!(flags & (1 << 6))){
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 2214;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
return MONEY32_UNDEFINED;
}
}
if (ride->status != RIDE_STATUS_CLOSED){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1006;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_MUST_BE_CLOSED_FIRST;
return MONEY32_UNDEFINED;
}

View File

@ -2256,7 +2256,7 @@ int track_rename(const char *text)
case '*':
case '?':
// Invalid characters
RCT2_GLOBAL(0x141E9AC, uint16) = 3353;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_NEW_NAME_CONTAINS_INVALID_CHARACTERS;
return 0;
}
txt_chr++;
@ -2272,7 +2272,7 @@ int track_rename(const char *text)
subsitute_path(old_path, RCT2_ADDRESS(RCT2_ADDRESS_TRACKS_PATH, char), &RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, char)[128 * w->track_list.var_482]);
if (!platform_file_move(old_path, new_path)) {
RCT2_GLOBAL(0x141E9AC, uint16) = 3354;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_ANOTHER_FILE_EXISTS_WITH_NAME_OR_FILE_IS_WRITE_PROTECTED;
return 0;
}
@ -2301,7 +2301,7 @@ int track_delete()
subsitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_TRACKS_PATH, char), &RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, char)[128 * w->track_list.var_482]);
if (!platform_file_delete(path)) {
RCT2_GLOBAL(0x141E9AC, uint16) = 3355;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_FILE_IS_WRITE_PROTECTED_OR_LOCKED;
return 0;
}
@ -2431,7 +2431,7 @@ int copy_scenery_to_track(uint8** track_pointer){
y /= 32;
if (x > 127 || y > 127 || x < -126 || y < -126){
window_error_open(3346, 3347);
window_error_open(3346, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY);
return 0;
}
@ -2443,7 +2443,7 @@ int copy_scenery_to_track(uint8** track_pointer){
z /= 8;
if (z > 127 || z < -126){
window_error_open(3346, 3347);
window_error_open(3346, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY);
return 0;
}
@ -2487,7 +2487,7 @@ int maze_ride_to_td6(uint8 rideIndex, rct_track_td6* track_design, uint8* track_
}
if (map_found == 0){
RCT2_GLOBAL(0x00141E9AC, uint16) = 3347;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY;
return 0;
}
@ -2516,7 +2516,7 @@ int maze_ride_to_td6(uint8 rideIndex, rct_track_td6* track_design, uint8* track_
maze++;
if (maze >= RCT2_ADDRESS(0x009DA151, rct_maze_element)){
RCT2_GLOBAL(0x00141E9AC, uint16) = 3347;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY;
return 0;
}
} while (!map_element_is_last_for_tile(map_element++));
@ -2529,7 +2529,7 @@ int maze_ride_to_td6(uint8 rideIndex, rct_track_td6* track_design, uint8* track_
uint16 location = ride->entrances[0];
if (location == 0xFFFF){
RCT2_GLOBAL(0x00141E9AC, uint16) = 3347;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY;
return 0;
}
@ -2560,7 +2560,7 @@ int maze_ride_to_td6(uint8 rideIndex, rct_track_td6* track_design, uint8* track_
location = ride->exits[0];
if (location == 0xFFFF){
RCT2_GLOBAL(0x00141E9AC, uint16) = 3347;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY;
return 0;
}
@ -2628,7 +2628,7 @@ int tracked_ride_to_td6(uint8 rideIndex, rct_track_td6* track_design, uint8* tra
track_begin_end trackBeginEnd;
if (sub_6CAF80(rideIndex, &trackElement) == 0){
RCT2_GLOBAL(0x00141E9AC, uint16) = 3347;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY;
return 0;
}
@ -2649,7 +2649,7 @@ int tracked_ride_to_td6(uint8 rideIndex, rct_track_td6* track_design, uint8* tra
RCT2_GLOBAL(0x00F4414D, uint8) = direction;
if (sub_6C683D(&trackElement.x, &trackElement.y, &z, direction, track_type, 0, &trackElement.element, 0)){
RCT2_GLOBAL(0x00141E9AC, uint16) = 3347;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY;
return 0;
}
@ -2818,7 +2818,7 @@ int tracked_ride_to_td6(uint8 rideIndex, rct_track_td6* track_design, uint8* tra
z /= 8;
if (z > 127 || z < -126){
RCT2_GLOBAL(0x00141E9AC, uint16) = 3347;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY;
return 0;
}
@ -2973,22 +2973,22 @@ int save_track_design(uint8 rideIndex){
rct_ride* ride = GET_RIDE(rideIndex);
if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)){
window_error_open(3346, RCT2_GLOBAL(0x141E9AC, rct_string_id));
window_error_open(STR_CANT_SAVE_TRACK_DESIGN, RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id));
return 0;
}
if (ride->ratings.excitement == 0xFFFF){
window_error_open(3346, RCT2_GLOBAL(0x141E9AC, rct_string_id));
window_error_open(STR_CANT_SAVE_TRACK_DESIGN, RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id));
return 0;
}
if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_TRACK)) {
window_error_open(3346, RCT2_GLOBAL(0x141E9AC, rct_string_id));
window_error_open(STR_CANT_SAVE_TRACK_DESIGN, RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id));
return 0;
}
if (!ride_to_td6(rideIndex)){
window_error_open(3346, RCT2_GLOBAL(0x141E9AC, rct_string_id));
window_error_open(STR_CANT_SAVE_TRACK_DESIGN, RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id));
return 0;
}
@ -3187,7 +3187,7 @@ void game_command_place_track_design(int* eax, int* ebx, int* ecx, int* edx, int
if (!(flags & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED)){
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -3244,10 +3244,10 @@ void game_command_place_track_design(int* eax, int* ebx, int* ecx, int* edx, int
if (cost == MONEY32_UNDEFINED ||
!(flags & GAME_COMMAND_FLAG_APPLY)){
rct_string_id error_reason = RCT2_GLOBAL(0x00141E9AC, rct_string_id);
rct_string_id error_reason = RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id);
game_do_command(0, GAME_COMMAND_FLAG_APPLY, 0, rideIndex, GAME_COMMAND_DEMOLISH_RIDE, 0, 0);
*ebx = cost;
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = error_reason;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = error_reason;
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION * 4;
RCT2_GLOBAL(0x00F44121, money32) = cost;
return;
@ -3490,7 +3490,7 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
RCT2_GLOBAL(0x00F441D5, uint32) = properties_1;
RCT2_GLOBAL(0x00F441D9, uint32) = properties_2;
RCT2_GLOBAL(0x00F441DD, uint32) = properties_3;
RCT2_GLOBAL(0x00F441D4, uint8) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) = 0;
uint64 enabledTrackPieces = 0;
enabledTrackPieces |= rideEntry->enabledTrackPiecesB & RCT2_ADDRESS(0x01357644, uint32)[ride->type];
@ -3670,16 +3670,16 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
return MONEY32_UNDEFINED;
}
bh = RCT2_GLOBAL(0x00F1AD60, uint8) & 3;
if (RCT2_GLOBAL(0x00F441D4, uint8) != 0 && (RCT2_GLOBAL(0x00F441D4, uint8) & bh) == 0) {
bh = RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & 3;
if (RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) != 0 && (RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) & bh) == 0) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CANT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_GROUND;
return MONEY32_UNDEFINED;
}
RCT2_GLOBAL(0x00F441D4, uint8) = bh;
RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) = bh;
if (rideTypeFlags & RIDE_TYPE_FLAG_FLAT_RIDE) {
if (RCT2_ADDRESS(0x0099443C, uint16)[type] & 0x200) {
if (RCT2_GLOBAL(0x00F441D4, uint8) & 2) {
if (RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;
return MONEY32_UNDEFINED;
}
@ -3687,7 +3687,7 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
}
else {
if (RCT2_ADDRESS(0x0099423C, uint16)[type] & 0x200) {
if (RCT2_GLOBAL(0x00F441D4, uint8) & 2) {
if (RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;
return MONEY32_UNDEFINED;
}
@ -3696,7 +3696,7 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
if (rideTypeFlags & RIDE_TYPE_FLAG_FLAT_RIDE) {
if (RCT2_ADDRESS(0x0099443C, uint16)[type] & 1) {
if (!(RCT2_GLOBAL(0x00F1AD60, uint8) & 4)) {
if (!(RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & ELEMENT_IS_UNDERWATER)) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_UNDERWATER;
return MONEY32_UNDEFINED;
}
@ -3704,14 +3704,14 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
}
else {
if (RCT2_ADDRESS(0x0099423C, uint16)[type] & 1) {
if (RCT2_GLOBAL(0x00F1AD60, uint8) & 4) {
if (RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & ELEMENT_IS_UNDERWATER) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_UNDERWATER;
return MONEY32_UNDEFINED;
}
}
}
if (RCT2_GLOBAL(0x00F1AD60, uint8) & 4) {
if (RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & ELEMENT_IS_UNDERWATER) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_RIDE_CANT_BUILD_THIS_UNDERWATER;
return MONEY32_UNDEFINED;
}
@ -3978,7 +3978,7 @@ money32 track_remove(uint8 type, uint8 sequence, sint16 originX, sint16 originY,
}
if (!(flags & (1 << 3)) && RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 2214;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
return MONEY32_UNDEFINED;
}
@ -4019,7 +4019,7 @@ money32 track_remove(uint8 type, uint8 sequence, sint16 originX, sint16 originY,
}
if (mapElement->flags & (1 << 6)){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 3091;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION;
return MONEY32_UNDEFINED;
}

View File

@ -484,6 +484,10 @@ enum {
TRACK_ELEM_LEFT_LARGE_HALF_LOOP_DOWN
};
enum {
TRACK_ELEMENT_LOCATION_IS_UNDERGROUND = 2,
};
typedef struct {
rct_xy_element last;
rct_xy_element current;

View File

@ -111,7 +111,7 @@ static void window_ride_demolish_mouseup(rct_window *w, int widgetIndex)
{
switch (widgetIndex) {
case WIDX_DEMOLISH:
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_DEMOLISH_RIDE;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_DEMOLISH_RIDE;
game_do_command(0, 1, 0, w->number, GAME_COMMAND_DEMOLISH_RIDE, 0, 0);
break;
case WIDX_CANCEL:

View File

@ -986,7 +986,7 @@ static void window_editor_object_selection_scroll_mousedown(rct_window *w, int s
STR_UNABLE_TO_SELECT_THIS_OBJECT :
STR_UNABLE_TO_DE_SELECT_THIS_OBJECT;
window_error_open(error_title, RCT2_GLOBAL(0x141E9AC, uint16));
window_error_open(error_title, RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16));
return;
}
@ -1664,7 +1664,7 @@ void reset_required_object_flags(){
* object.
*/
void set_object_selection_error(uint8 is_master_object, rct_string_id error_msg){
RCT2_GLOBAL(0x141E9AC, rct_string_id) = error_msg;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = error_msg;
if (!is_master_object){
reset_selected_object_count_and_size();
}

View File

@ -888,7 +888,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
// Objective value
x = w->x + w->widgets[WIDX_OBJECTIVE].left + 1;
y = w->y + w->widgets[WIDX_OBJECTIVE].top;
stringId = STR_OBJECTIVE_2_NONE + RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8);
stringId = STR_OBJECTIVE_DROPDOWN_NONE + RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8);
gfx_draw_string_left(dpi, 1193, &stringId, 0, x, y);
if (w->widgets[WIDX_OBJECTIVE_ARG_1].type != WWT_EMPTY) {

View File

@ -753,7 +753,7 @@ static void window_footpath_place_path_at_point(int x, int y)
selectedType = (RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_PATH_TYPE, uint8) << 7) + RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_PATH_ID, uint8);
// Try and place path
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = STR_CANT_BUILD_FOOTPATH_HERE;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_BUILD_FOOTPATH_HERE;
cost = footpath_place(selectedType, x, y, z, presentType, GAME_COMMAND_FLAG_APPLY);
if (cost == MONEY32_UNDEFINED) {
@ -909,7 +909,7 @@ static void footpath_remove_map_element(rct_map_element *mapElement)
}
// Remove path
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = STR_CANT_REMOVE_FOOTPATH_FROM_HERE;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_REMOVE_FOOTPATH_FROM_HERE;
footpath_remove(
RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_FROM_X, uint16),
RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_FROM_Y, uint16),

View File

@ -1102,7 +1102,7 @@ void window_guest_overview_text_input(rct_window *w, int widgetIndex, char *text
if (text == NULL)
return;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = 1454;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_NAME_GUEST;
game_do_command(1, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 0)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 8)), *((int*)(text + 4)));
game_do_command(2, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 12)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 20)), *((int*)(text + 16)));
game_do_command(0, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 24)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 32)), *((int*)(text + 28)));

View File

@ -550,7 +550,7 @@ static void window_map_scrollmousedown(rct_window *w, int scrollIndex, int x, in
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) = mapY + size;
map_invalidate_selection_rect();
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1387;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_CHANGE_LAND_TYPE;
game_do_command(
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
GAME_COMMAND_FLAG_APPLY,

View File

@ -1579,7 +1579,7 @@ static void window_ride_construction_construct(rct_window *w)
sound_play_panned(SOUND_PLACE_ITEM, 0x8001, x, y, z);
if (RCT2_GLOBAL(0x00F441D4, uint8) & 2) {
if (RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND) {
viewport_set_visibility(1);
}
@ -2382,7 +2382,7 @@ money32 sub_6CA162(int rideIndex, int trackType, int trackDirection, int edxRS16
RCT2_GLOBAL(0x00F440C9, uint16) = z;
RCT2_GLOBAL(0x00F440CB, uint8) = trackDirection;
_currentTrackSelectionFlags |= 2;
viewport_set_visibility(RCT2_GLOBAL(0x00F441D4, uint8) & 2 ? 1 : 3);
viewport_set_visibility(RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND ? 1 : 3);
if (_currentTrackSlopeEnd != 0)
viewport_set_visibility(2);
@ -2401,7 +2401,7 @@ money32 sub_6CA162(int rideIndex, int trackType, int trackDirection, int edxRS16
RCT2_GLOBAL(0x00F440C9, uint16) = z;
RCT2_GLOBAL(0x00F440CB, uint8) = trackDirection;
_currentTrackSelectionFlags |= 2;
viewport_set_visibility(RCT2_GLOBAL(0x00F441D4, uint8) & 2 ? 1 : 3);
viewport_set_visibility(RCT2_GLOBAL(RCT2_ADDRESS_ABOVE_GROUND_FLAGS, uint8) & TRACK_ELEMENT_LOCATION_IS_UNDERGROUND ? 1 : 3);
if (_currentTrackSlopeEnd != 0)
viewport_set_visibility(2);

View File

@ -522,7 +522,7 @@ static void window_sign_small_mouseup(rct_window *w, int widgetIndex)
}
map_element++;
}
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1158;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_REMOVE_THIS;
game_do_command(
x,
1 | ((map_element->type & 0x3) << 8),
@ -612,4 +612,4 @@ static void window_sign_small_invalidate(rct_window *w)
main_colour_btn->image = (w->list_information_type << 19) | 0x600013C3;
text_colour_btn->image = (w->var_492 << 19) | 0x600013C3;
}
}

View File

@ -1161,7 +1161,7 @@ void window_staff_overview_text_input(rct_window *w, int widgetIndex, char *text
if (text == NULL)
return;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = 2979;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_NAME_STAFF_MEMBER;
game_do_command(1, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 0)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 8)), *((int*)(text + 4)));
game_do_command(2, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 12)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 20)), *((int*)(text + 16)));
game_do_command(0, GAME_COMMAND_FLAG_APPLY, w->number, *((int*)(text + 24)), GAME_COMMAND_SET_PEEP_NAME, *((int*)(text + 32)), *((int*)(text + 28)));

View File

@ -891,7 +891,7 @@ static void repaint_scenery_tool_down(sint16 x, sint16 y, sint16 widgetIndex){
SMALL_SCENERY_FLAG10)))
return;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 3103;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_REPAINT_THIS;
game_do_command(
grid_x,
1 | (map_element->type << 8),
@ -912,7 +912,7 @@ static void repaint_scenery_tool_down(sint16 x, sint16 y, sint16 widgetIndex){
WALL_SCENERY_FLAG2)))
return;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 3103;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_REPAINT_THIS;
game_do_command(
grid_x,
1 | (window_scenery_primary_colour << 8),
@ -932,7 +932,7 @@ static void repaint_scenery_tool_down(sint16 x, sint16 y, sint16 widgetIndex){
(1 << 0)))
return;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 3103;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_REPAINT_THIS;
game_do_command(
grid_x,
1 | ((map_element->type & MAP_ELEMENT_DIRECTION_MASK) << 8),
@ -953,7 +953,7 @@ static void repaint_scenery_tool_down(sint16 x, sint16 y, sint16 widgetIndex){
(1 << 0)))
return;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 3103;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_REPAINT_THIS;
game_do_command(
grid_x,
1,
@ -1471,7 +1471,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
ebx |= GAME_COMMAND_FLAG_APPLY;
}
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1161;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_POSITION_THIS_HERE;
int cost = game_do_command(cur_grid_x, ebx, cur_grid_y, parameter_2, GAME_COMMAND_PLACE_SCENERY, RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint8) | (parameter_3 & 0xFFFF0000), RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16));
@ -1485,8 +1485,8 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
break;
}
if (RCT2_GLOBAL(0x00141E9AC, rct_string_id) == 827 ||
RCT2_GLOBAL(0x00141E9AC, rct_string_id) == 1032){
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) == STR_NOT_ENOUGH_CASH_REQUIRES ||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) == STR_CAN_ONLY_BUILD_THIS_ON_WATER){
break;
}
@ -1509,7 +1509,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
ebx &= 0xFF00;
ebx |= 0x81;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1161;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_POSITION_THIS_HERE;
int cost = game_do_command(grid_x, ebx, grid_y, parameter_2, GAME_COMMAND_PLACE_PATH, parameter_3, 0);
@ -1532,7 +1532,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
for (; bl != 0; bl--){
RCT2_GLOBAL(0x009A8C29, uint8) |= 1;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1811;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_BUILD_PARK_ENTRANCE_HERE;
int ebx = (parameter_1 & 0xFF00) | 1;
@ -1546,8 +1546,8 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
return;
}
if (RCT2_GLOBAL(0x00141E9AC, rct_string_id) == 827 ||
RCT2_GLOBAL(0x00141E9AC, rct_string_id) == 1032){
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) == STR_NOT_ENOUGH_CASH_REQUIRES ||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) == STR_CAN_ONLY_BUILD_THIS_ON_WATER){
break;
}
@ -1569,7 +1569,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
for (; bl != 0; bl--){
RCT2_GLOBAL(0x009A8C29, uint8) |= 1;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1161;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_POSITION_THIS_HERE;
int ebx = (parameter_1 & 0xFF00) | 1;
@ -1584,8 +1584,8 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
return;
}
if (RCT2_GLOBAL(0x00141E9AC, rct_string_id) == 827 ||
RCT2_GLOBAL(0x00141E9AC, rct_string_id) == 1032){
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) == STR_NOT_ENOUGH_CASH_REQUIRES ||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) == STR_CAN_ONLY_BUILD_THIS_ON_WATER){
break;
}
@ -1598,7 +1598,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
case 4:
{
// Banners
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1161;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_POSITION_THIS_HERE;
// The return value will be banner id but the input is colour (param 3)
int banner_id = parameter_3;
@ -2110,9 +2110,11 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) = mapElement->base_height;
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT_TYPE, uint8) = mapElement->type;
if (RCT2_GLOBAL(0x00F64F14, uint8) & (1 << 1)){
//Set underground on
viewport_set_visibility(4);
}
else{
//Set underground off
viewport_set_visibility(5);
}
@ -2189,9 +2191,11 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) = mapElement->base_height;
if (RCT2_GLOBAL(0x00F64F14, uint8) & (1 << 1)){
//Set underground on
viewport_set_visibility(4);
}
else{
//Set underground off
viewport_set_visibility(5);
}
@ -2516,7 +2520,7 @@ static void window_top_toolbar_tool_down(rct_window* w, int widgetIndex, int x,
if (!RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) & (1 << 0))
break;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 3438;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_UNABLE_TO_REMOVE_ALL_SCENERY_FROM_HERE;
game_do_command(
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
@ -2531,7 +2535,7 @@ static void window_top_toolbar_tool_down(rct_window* w, int widgetIndex, int x,
break;
case WIDX_LAND:
if (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16)&(1 << 0)){
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1387;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_CHANGE_LAND_TYPE;
game_do_command(
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
1,
@ -2569,7 +2573,7 @@ money32 selection_raise_land(uint8 flags)
uint32 xBounds = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) & 0xFFFF) | (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16) << 16);
uint32 yBounds = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) & 0xFFFF) | (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16) << 16);
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_RAISE_LAND_HERE;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_RAISE_LAND_HERE;
if (RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) == 0) {
return game_do_command(centreX, flags, centreY, xBounds, GAME_COMMAND_EDIT_LAND_SMOOTH, 1, yBounds);
} else {
@ -2591,7 +2595,7 @@ money32 selection_lower_land(uint8 flags)
uint32 xBounds = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) & 0xFFFF) | (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16) << 16);
uint32 yBounds = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) & 0xFFFF) | (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16) << 16);
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_LOWER_LAND_HERE;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_LOWER_LAND_HERE;
if (RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) == 0) {
return game_do_command(centreX, flags, centreY, xBounds, GAME_COMMAND_EDIT_LAND_SMOOTH, 0xFFFF, yBounds);
} else {
@ -2671,7 +2675,7 @@ void window_top_toolbar_water_tool_drag(short x, short y)
if (y <= dx) {
RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_LAST_Y, uint16) += dx;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_RAISE_WATER_LEVEL_HERE;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_RAISE_WATER_LEVEL_HERE;
game_do_command(
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
@ -2693,7 +2697,7 @@ void window_top_toolbar_water_tool_drag(short x, short y)
if (y >= dx) {
RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_LAST_Y, uint16) += dx;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_LOWER_WATER_LEVEL_HERE;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_LOWER_WATER_LEVEL_HERE;
game_do_command(
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
@ -2725,7 +2729,7 @@ static void window_top_toolbar_tool_drag(rct_window* w, int widgetIndex, int x,
if (!RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) & (1 << 0))
break;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 3438;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_UNABLE_TO_REMOVE_ALL_SCENERY_FROM_HERE;
game_do_command(
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
@ -2742,7 +2746,7 @@ static void window_top_toolbar_tool_drag(rct_window* w, int widgetIndex, int x,
// Custom setting to only change land style instead of raising or lowering land
if (LandPaintMode) {
if (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16)&(1 << 0)){
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1387;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_CHANGE_LAND_TYPE;
game_do_command(
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
1,

View File

@ -167,8 +167,8 @@ static money32 footpath_element_insert(int type, int x, int y, int z, int slope,
if (!gCheatsDisableClearanceChecks && !map_can_construct_with_clear_at(x, y, z, zHigh, (void*)0x006A6733, bl))
return MONEY32_UNDEFINED;
RCT2_GLOBAL(0x00F3EFA4, uint8) = RCT2_GLOBAL(0x00F1AD60, uint8);
if (!gCheatsDisableClearanceChecks && (RCT2_GLOBAL(0x00F1AD60, uint8) & 4)) {
RCT2_GLOBAL(0x00F3EFA4, uint8) = RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8);
if (!gCheatsDisableClearanceChecks && (RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & ELEMENT_IS_UNDERWATER)) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CANT_BUILD_THIS_UNDERWATER;
return MONEY32_UNDEFINED;
}

View File

@ -2380,7 +2380,7 @@ void game_command_place_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi
RCT2_GLOBAL(0x00F64F24, uint16) = y;
RCT2_GLOBAL(0x00F64F1E, uint32) = (uint32)(ebx - 1); //0x006E0D6E uses [F64F1E+4] to read ebx value
if(gCheatsDisableClearanceChecks || map_can_construct_with_clear_at(x, y, zLow, zHigh, (void*)0x006E0D6E, bl)){
RCT2_GLOBAL(0x00F64F14, uint8) = RCT2_GLOBAL(0x00F1AD60, uint8) & 0x3;
RCT2_GLOBAL(0x00F64F14, uint8) = RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & 0x3;
if(*ebx & GAME_COMMAND_FLAG_APPLY){
int flags = (bl & 0xf);
rct_map_element* new_map_element = map_element_insert(x / 32, y / 32, zLow, flags);
@ -2484,7 +2484,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
}
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 2214;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -2536,14 +2536,14 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
water_height *= 16;
if (position.z < water_height){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1180;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CANT_BUILD_THIS_UNDERWATER;
*ebx = MONEY32_UNDEFINED;
return;
}
}
if (position.z / 8 < map_element->base_height){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -2553,7 +2553,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
bp += 2;
if (map_element->properties.surface.slope & (1 << new_edge)){
if (position.z / 8 < bp){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -2566,7 +2566,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
if (map_element->properties.surface.slope & (1 << new_edge)){
bp += 2;
if (position.z / 8 < bp){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -2579,7 +2579,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
new_edge = (edge + 3) & 3;
if (map_element->properties.surface.slope & (1 << new_edge)){
if (position.z / 8 < bp){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -2592,7 +2592,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
if (map_element->properties.surface.slope & (1 << new_edge)){
bp += 2;
if (position.z / 8 < bp){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -2632,7 +2632,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
RCT2_GLOBAL(0x00141F722, uint8) = position.z / 8;
if (bp & 0xC0){
if (fence->wall.flags & WALL_SCENERY_FLAG3){
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 3133;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = 3133;
*ebx = MONEY32_UNDEFINED;
return;
}
@ -2846,8 +2846,8 @@ void game_command_place_large_scenery(int* eax, int* ebx, int* ecx, int* edx, in
RCT2_GLOBAL(0x00F43894, sint16) = y2;
RCT2_GLOBAL(0x00F43896, uint32) = (uint32)(ebx - 3); // this is how ebx flags var is passed to 0x006B8D88
if(gCheatsDisableClearanceChecks || map_can_construct_with_clear_at(x2, y2, zLow, zHigh, (void*)0x006B8D88, bl)){
if(!(RCT2_GLOBAL(0x00F1AD60, uint8) & 4) && !(RCT2_GLOBAL(0x00F1AD60, uint8) & 2)){
int b = RCT2_GLOBAL(0x00F1AD60, uint8) & 0x3;
if(!(RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & ELEMENT_IS_UNDERWATER) && !(RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & 2)){
int b = RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) & 0x3;
if (!gCheatsDisableClearanceChecks) {
if (RCT2_GLOBAL(0x00F64F14, uint8) && !(RCT2_GLOBAL(0x00F64F14, uint8) & b)){
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_CANT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_GROUND;
@ -3121,7 +3121,7 @@ int sub_68B044()
if (RCT2_GLOBAL(0x00140E9A4, rct_map_element*) <= RCT2_ADDRESS(RCT2_ADDRESS_MAP_ELEMENTS_END, rct_map_element))
return 1;
else{
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 894;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = 894;
return 0;
}
}
@ -3189,7 +3189,7 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, void *cle
{
//return (RCT2_CALLPROC_X(0x0068B932, x, bl, y, (zHigh << 8) | zLow, 0, 0, (int)clearFunc) & 0x100) == 0;
RCT2_GLOBAL(0x00F1AD40, void*) = clearFunc;
RCT2_GLOBAL(0x00F1AD60, uint8) = 1;
RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) = 1;
if (x >= RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16) || y >= RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16) || x < 32 || y < 32) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_OFF_EDGE_OF_MAP;
return false;
@ -3206,7 +3206,7 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, void *cle
}
int water_height = ((map_element->properties.surface.terrain & MAP_ELEMENT_WATER_HEIGHT_MASK) * 2);
if (water_height && water_height > zLow && map_element->base_height < zHigh) {
RCT2_GLOBAL(0x00F1AD60, uint8) |= 4;
RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) |= 4;
if (water_height < zHigh) {
goto loc_68BAE6;
}
@ -3224,8 +3224,8 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, void *cle
if ((bl & 0xF0) != 0xF0) {
if (map_element->base_height >= zHigh) {
// loc_68BA81
RCT2_GLOBAL(0x00F1AD60, uint8) |= 2;
RCT2_GLOBAL(0x00F1AD60, uint8) &= 0xFE;
RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) |= 2;
RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) &= 0xFE;
} else {
int al = map_element->base_height;
int ah = al;

View File

@ -203,6 +203,10 @@ enum {
ENTRANCE_TYPE_PARK_ENTRANCE
};
enum {
ELEMENT_IS_UNDERWATER = 4,
};
#define MAP_ELEMENT_QUADRANT_MASK 0xC0
#define MAP_ELEMENT_TYPE_MASK 0x3C
#define MAP_ELEMENT_DIRECTION_MASK 0x03