forked from rosebudai/OpenRCT2-Web
integrate screen variables
This commit is contained in:
1 parent
1950fad315
commit
4cdb2df9dc
43 files changed
+261
-249
No files matched your search
+4
-4
@@ -48,7 +48,6 @@
|
||||
#define RCT2_ADDRESS_SCROLLING_MODE_POSITIONS 0x00992FB8
|
||||
|
||||
#define RCT2_ADDRESS_LAND_TOOL_SIZE 0x009A9800
|
||||
#define RCT2_ADDRESS_SAVE_PROMPT_MODE 0x009A9802
|
||||
#define RCT2_ADDRESS_BTM_TOOLBAR_DIRTY_FLAGS 0x009A9804
|
||||
#define RCT2_ADDRESS_MAP_TOOLTIP_ARGS 0x009A9808
|
||||
|
||||
@@ -215,9 +214,6 @@
|
||||
#define RCT2_ADDRESS_COMMAND_MAP_Y 0x009DEA60
|
||||
#define RCT2_ADDRESS_COMMAND_MAP_Z 0x009DEA62
|
||||
|
||||
//Counts how many ticks the current screen has been open for
|
||||
#define RCT2_ADDRESS_SCREEN_AGE 0x009DEA66
|
||||
#define RCT2_ADDRESS_SCREEN_FLAGS 0x009DEA68
|
||||
#define RCT2_ADDRESS_SCREENSHOT_COUNTDOWN 0x009DEA6D
|
||||
// Note: not only the zeroth bit can be set to control pause
|
||||
// When paused by saving track 2nd bit is set
|
||||
@@ -587,6 +583,7 @@
|
||||
#define RCT2_ADDRESS_X_END_POINT_GLOBAL 0x9ABDA8 //sint16
|
||||
#define RCT2_ADDRESS_X_START_POINT_GLOBAL 0xEDF80C //sint16
|
||||
#define RCT2_ADDRESS_DPI_LINE_LENGTH_GLOBAL 0x9ABDB0 //uint16 width+pitch
|
||||
#define RCT2_ADDRESS_SAVE_PROMPT_MODE 0x009A9802
|
||||
#define RCT2_ADDRESS_CONFIG_FIRST_TIME_LOAD_OBJECTS 0x009AA00D
|
||||
#define RCT2_ADDRESS_CONFIG_FIRST_TIME_LOAD_CONFIG 0x009AB4C6
|
||||
#define RCT2_ADDRESS_NAUSEA_THRESHOLDS 0x00982390 //uint16
|
||||
@@ -596,6 +593,9 @@
|
||||
#define RCT2_ADDRESS_CURRENT_TOOL 0x009DE545
|
||||
#define RCT2_ADDRESS_TOOL_WIDGETINDEX 0x009DE546
|
||||
|
||||
#define RCT2_ADDRESS_SCREEN_AGE 0x009DEA66
|
||||
#define RCT2_ADDRESS_SCREEN_FLAGS 0x009DEA68
|
||||
|
||||
#define RCT2_ADDRESS_PARK_ENTRANCE_GHOST_X 0x009E32CC
|
||||
#define RCT2_ADDRESS_PARK_ENTRANCE_GHOST_Y 0x009E32CE
|
||||
#define RCT2_ADDRESS_PARK_ENTRANCE_GHOST_Z 0x009E32D0
|
||||
|
||||
+1
-1
@@ -254,7 +254,7 @@ int audio_play_sound(int soundId, int volume, int pan)
|
||||
|
||||
void audio_start_title_music()
|
||||
{
|
||||
if (gGameSoundsOff || !(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO)) {
|
||||
if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) {
|
||||
audio_stop_title_music();
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -677,7 +677,7 @@ void Mixer::MixChannel(Channel& channel, uint8* data, int length)
|
||||
volumeadjust *= (gConfigSound.sound_volume / 100.0f);
|
||||
|
||||
// Cap sound volume on title screen so music is more audible
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) {
|
||||
volumeadjust = Math::Min(volumeadjust, 0.75f);
|
||||
}
|
||||
break;
|
||||
|
||||
+16
-16
@@ -77,7 +77,7 @@ void editor_load()
|
||||
date_reset();
|
||||
window_guest_list_init_vars_b();
|
||||
window_staff_list_init_vars();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
RCT2_GLOBAL(0x0141F570, uint8) = 0;
|
||||
gParkFlags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
window_new_ride_init_vars();
|
||||
@@ -90,7 +90,7 @@ void editor_load()
|
||||
mainWindow->flags &= ~WF_SCROLLING_TO_LOCATION;
|
||||
load_palette();
|
||||
gfx_invalidate_screen();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, sint16) = 0;
|
||||
gScreenAge = 0;
|
||||
|
||||
safe_strcpy((char*)RCT2_ADDRESS_SCENARIO_NAME, language_get_string(2749), 0x40);
|
||||
}
|
||||
@@ -137,14 +137,14 @@ void editor_convert_save_to_scenario_callback(int result)
|
||||
s6Info->name[0] = 0;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
s6Info->editor_step = EDITOR_STEP_OBJECTIVE_SELECTION;
|
||||
s6Info->category = SCENARIO_CATEGORY_OTHER;
|
||||
viewport_init_all();
|
||||
news_item_init_queue();
|
||||
window_editor_main_open();
|
||||
editor_finalise_main_view();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0;
|
||||
gScreenAge = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,8 +155,8 @@ void trackdesigner_load()
|
||||
{
|
||||
rct_window *mainWindow;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TRACK_DESIGNER;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, sint16) = 0;
|
||||
gScreenFlags = SCREEN_FLAGS_TRACK_DESIGNER;
|
||||
gScreenAge = 0;
|
||||
|
||||
object_unload_all();
|
||||
map_init(150);
|
||||
@@ -193,8 +193,8 @@ void trackmanager_load()
|
||||
{
|
||||
rct_window *mainWindow;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TRACK_MANAGER;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, sint16) = 0;
|
||||
gScreenFlags = SCREEN_FLAGS_TRACK_MANAGER;
|
||||
gScreenAge = 0;
|
||||
|
||||
object_unload_all();
|
||||
map_init(150);
|
||||
@@ -265,8 +265,8 @@ static int editor_load_landscape_from_sv4(const char *path)
|
||||
editor_clear_map_for_editing();
|
||||
|
||||
g_editor_step = EDITOR_STEP_LANDSCAPE_EDITOR;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
gScreenAge = 0;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
viewport_init_all();
|
||||
window_editor_main_open();
|
||||
editor_finalise_main_view();
|
||||
@@ -279,8 +279,8 @@ static int editor_load_landscape_from_sc4(const char *path)
|
||||
editor_clear_map_for_editing();
|
||||
|
||||
g_editor_step = EDITOR_STEP_LANDSCAPE_EDITOR;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
gScreenAge = 0;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
viewport_init_all();
|
||||
window_editor_main_open();
|
||||
editor_finalise_main_view();
|
||||
@@ -383,7 +383,7 @@ static int editor_read_s6(const char *path)
|
||||
map_update_tile_pointers();
|
||||
game_convert_strings_to_utf8();
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
viewport_init_all();
|
||||
window_editor_main_open();
|
||||
editor_finalise_main_view();
|
||||
@@ -491,7 +491,7 @@ static void editor_clear_map_for_editing()
|
||||
*/
|
||||
void editor_open_windows_for_current_step()
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR))
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_EDITOR))
|
||||
return;
|
||||
|
||||
switch (g_editor_step) {
|
||||
@@ -502,7 +502,7 @@ void editor_open_windows_for_current_step()
|
||||
if (window_find_by_class(49))
|
||||
return;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
object_unload_all();
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ static bool editor_check_object_group_at_least_one_selected(int objectType)
|
||||
int editor_check_object_selection()
|
||||
{
|
||||
bool isTrackDesignerManager =
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER);
|
||||
gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER);
|
||||
|
||||
if (!isTrackDesignerManager) {
|
||||
if (!editor_check_object_group_at_least_one_selected(OBJECT_TYPE_PATHS)) {
|
||||
|
||||
+15
-11
@@ -354,9 +354,9 @@ void game_logic_update()
|
||||
}
|
||||
gCurrentTicks++;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENARIO_TICKS, uint32)++;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, sint16)++;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, sint16) == 0)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, sint16)--;
|
||||
gScreenAge++;
|
||||
if (gScreenAge == 0)
|
||||
gScreenAge--;
|
||||
|
||||
sub_68B089();
|
||||
scenario_update();
|
||||
@@ -600,7 +600,7 @@ static void game_load_or_quit(int *eax, int *ebx, int *ecx, int *edx, int *esi,
|
||||
if (*ebx & GAME_COMMAND_FLAG_APPLY) {
|
||||
switch (*edx & 0xFF) {
|
||||
case 0:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SAVE_PROMPT_MODE, uint16) = *edi & 0xFF;
|
||||
gSavePromptMode = *edi & 0xFF;
|
||||
window_save_prompt_open();
|
||||
break;
|
||||
case 1:
|
||||
@@ -783,7 +783,7 @@ int game_load_sv6(SDL_RWops* rw)
|
||||
game_fix_save_vars(); // OpenRCT2 fix broken save games
|
||||
|
||||
// #2407: Resetting screen time to not open a save prompt shortly after loading a park.
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0;
|
||||
gScreenAge = 0;
|
||||
|
||||
gLastAutoSaveTick = SDL_GetTicks();
|
||||
return 1;
|
||||
@@ -944,7 +944,7 @@ void game_load_init()
|
||||
{
|
||||
rct_window *mainWindow;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_PLAYING;
|
||||
gScreenFlags = SCREEN_FLAGS_PLAYING;
|
||||
viewport_init_all();
|
||||
game_create_windows();
|
||||
mainWindow = window_get_main();
|
||||
@@ -1010,7 +1010,7 @@ void save_game()
|
||||
|
||||
// Setting screen age to zero, so no prompt will pop up when closing the
|
||||
// game shortly after saving.
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0;
|
||||
gScreenAge = 0;
|
||||
}
|
||||
} else {
|
||||
save_game_as();
|
||||
@@ -1165,15 +1165,17 @@ void rct2_exit()
|
||||
*/
|
||||
void game_load_or_quit_no_save_prompt()
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SAVE_PROMPT_MODE, uint16) < 1) {
|
||||
switch (gSavePromptMode) {
|
||||
case PM_SAVE_BEFORE_LOAD:
|
||||
game_do_command(0, 1, 0, 1, GAME_COMMAND_LOAD_OR_QUIT, 0, 0);
|
||||
tool_cancel();
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
load_landscape();
|
||||
} else {
|
||||
window_loadsave_open(LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME, NULL);
|
||||
}
|
||||
} else if (RCT2_GLOBAL(RCT2_ADDRESS_SAVE_PROMPT_MODE, uint16) == 1) {
|
||||
break;
|
||||
case PM_SAVE_BEFORE_QUIT:
|
||||
game_do_command(0, 1, 0, 1, GAME_COMMAND_LOAD_OR_QUIT, 0, 0);
|
||||
tool_cancel();
|
||||
if (gInputFlags & INPUT_FLAG_5) {
|
||||
@@ -1181,8 +1183,10 @@ void game_load_or_quit_no_save_prompt()
|
||||
}
|
||||
gGameSpeed = 1;
|
||||
title_load();
|
||||
} else {
|
||||
break;
|
||||
default:
|
||||
rct2_exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -327,7 +327,7 @@ static void game_handle_input_mouse(int x, int y, int state)
|
||||
if (widgetIndex != -1) {
|
||||
switch (widget->type) {
|
||||
case WWT_VIEWPORT:
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO))) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO))) {
|
||||
input_viewport_drag_begin(w, x, y);
|
||||
}
|
||||
break;
|
||||
@@ -1610,7 +1610,7 @@ void game_handle_edge_scroll()
|
||||
mainWindow = window_get_main();
|
||||
if (mainWindow == NULL)
|
||||
return;
|
||||
if ((mainWindow->flags & WF_NO_SCROLLING) || (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 9))
|
||||
if ((mainWindow->flags & WF_NO_SCROLLING) || (gScreenFlags & 9))
|
||||
return;
|
||||
if (mainWindow->viewport == NULL)
|
||||
return;
|
||||
@@ -1653,7 +1653,7 @@ void game_handle_key_scroll()
|
||||
mainWindow = window_get_main();
|
||||
if (mainWindow == NULL)
|
||||
return;
|
||||
if ((mainWindow->flags & WF_NO_SCROLLING) || (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 9))
|
||||
if ((mainWindow->flags & WF_NO_SCROLLING) || (gScreenFlags & 9))
|
||||
return;
|
||||
if (mainWindow->viewport == NULL)
|
||||
return;
|
||||
|
||||
@@ -903,7 +903,7 @@ static int cc_fix_banner_count(const utf8 **argv, int argc)
|
||||
|
||||
static int cc_open(const utf8 **argv, int argc) {
|
||||
if (argc > 0) {
|
||||
bool title = (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) != 0;
|
||||
bool title = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) != 0;
|
||||
bool invalidTitle = false;
|
||||
if (strcmp(argv[0], "object_selection") == 0 && invalidArguments(&invalidTitle, !title)) {
|
||||
// Only this window should be open for safety reasons
|
||||
|
||||
@@ -132,7 +132,7 @@ static void shortcut_close_top_most_window()
|
||||
|
||||
static void shortcut_close_all_floating_windows()
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR))
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR))
|
||||
window_close_all();
|
||||
else if (RCT2_GLOBAL(0x0141F570, uint8) == 1)
|
||||
window_close_top();
|
||||
@@ -153,7 +153,7 @@ static void shortcut_pause_game()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -166,8 +166,8 @@ static void shortcut_zoom_view_out()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -181,8 +181,8 @@ static void shortcut_zoom_view_in()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -264,7 +264,7 @@ static void shortcut_remove_vertical_land_toggle()
|
||||
|
||||
static void shortcut_remove_top_bottom_toolbar_toggle()
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
if (window_find_by_class(WC_TOP_TOOLBAR) != NULL) {
|
||||
@@ -272,7 +272,7 @@ static void shortcut_remove_top_bottom_toolbar_toggle()
|
||||
window_close(window_find_by_class(WC_TOP_TOOLBAR));
|
||||
window_close(window_find_by_class(WC_BOTTOM_TOOLBAR));
|
||||
} else {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == 0) {
|
||||
if (gScreenFlags == 0) {
|
||||
window_top_toolbar_open();
|
||||
window_game_bottom_toolbar_open();
|
||||
} else {
|
||||
@@ -321,8 +321,8 @@ static void shortcut_adjust_land()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -336,8 +336,8 @@ static void shortcut_adjust_water()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -351,8 +351,8 @@ static void shortcut_build_scenery()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -366,8 +366,8 @@ static void shortcut_build_paths()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -381,8 +381,8 @@ static void shortcut_build_new_ride()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR)) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -394,14 +394,14 @@ static void shortcut_build_new_ride()
|
||||
|
||||
static void shortcut_show_financial_information()
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
window_finances_open();
|
||||
}
|
||||
|
||||
static void shortcut_show_research_information()
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (gConfigInterface.toolbar_show_research)
|
||||
window_research_open();
|
||||
else
|
||||
@@ -413,7 +413,7 @@ static void shortcut_show_rides_list()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -426,7 +426,7 @@ static void shortcut_show_park_information()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -439,7 +439,7 @@ static void shortcut_show_guest_list()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -452,7 +452,7 @@ static void shortcut_show_staff_list()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
@@ -463,14 +463,14 @@ static void shortcut_show_staff_list()
|
||||
|
||||
static void shortcut_show_recent_messages()
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
window_news_open();
|
||||
}
|
||||
|
||||
static void shortcut_show_map()
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1)
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1)
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
window_map_open();
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ static void shortcut_open_cheat_window()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) != SCREEN_FLAGS_PLAYING)
|
||||
if (gScreenFlags != SCREEN_FLAGS_PLAYING)
|
||||
return;
|
||||
|
||||
// Check if window is already open
|
||||
@@ -515,11 +515,11 @@ static void shortcut_open_chat_window()
|
||||
static void shortcut_quick_save_game()
|
||||
{
|
||||
// Do a quick save in playing mode and a regular save in Scenario Editor mode. In other cases, don't do anything.
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_PLAYING) {
|
||||
if (gScreenFlags == SCREEN_FLAGS_PLAYING) {
|
||||
tool_cancel();
|
||||
save_game();
|
||||
}
|
||||
else if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x0141F570;
|
||||
window_loadsave_open(LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE, s6Info->name);
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ int cmdline_for_screenshot(const char **argv, int argc)
|
||||
rct2_open_file(inputPath);
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_PLAYING;
|
||||
gScreenFlags = SCREEN_FLAGS_PLAYING;
|
||||
|
||||
int mapSize = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16);
|
||||
if (resolutionWidth == 0 || resolutionHeight == 0) {
|
||||
|
||||
@@ -53,11 +53,11 @@ int viewport_interaction_get_item_left(int x, int y, viewport_interaction_info *
|
||||
rct_vehicle *vehicle;
|
||||
|
||||
// No click input for title screen or scenario editor or track manager
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
//
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) && s6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && s6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
rct_xy16 mapCoord = { 0 };
|
||||
@@ -176,11 +176,11 @@ int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info
|
||||
int i, stationIndex;
|
||||
|
||||
// No click input for title screen or track manager
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_MANAGER))
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_MANAGER))
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
//
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) && s6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && s6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
rct_xy16 mapCoord = { 0 };
|
||||
@@ -192,7 +192,7 @@ int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info
|
||||
|
||||
switch (info->type) {
|
||||
case VIEWPORT_INTERACTION_ITEM_SPRITE:
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || mapElement->type != 0)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || mapElement->type != 0)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
mapElement += 6;
|
||||
@@ -205,7 +205,7 @@ int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info
|
||||
return info->type;
|
||||
|
||||
case VIEWPORT_INTERACTION_ITEM_RIDE:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_PATH)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
@@ -304,7 +304,7 @@ int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info
|
||||
return info->type;
|
||||
|
||||
case VIEWPORT_INTERACTION_ITEM_PARK:
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode)
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode)
|
||||
break;
|
||||
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_ENTRANCE)
|
||||
|
||||
@@ -263,7 +263,7 @@ static int window_wheel_input(rct_window *w, int wheel)
|
||||
*/
|
||||
static void window_viewport_wheel_input(rct_window *w, int wheel)
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 9)
|
||||
if (gScreenFlags & 9)
|
||||
return;
|
||||
|
||||
if (wheel < 0)
|
||||
@@ -798,7 +798,7 @@ void window_close_top()
|
||||
|
||||
window_close_by_class(WC_DROPDOWN);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 2)
|
||||
if (gScreenFlags & 2)
|
||||
if (RCT2_GLOBAL(0x0141F570, uint8) != 1)
|
||||
return;
|
||||
|
||||
@@ -1343,7 +1343,7 @@ void window_scroll_to_location(rct_window *w, int x, int y, int z)
|
||||
rct_xy16 map_coordinate = coordinate_3d_to_2d(&location_3d, get_current_rotation());
|
||||
|
||||
int i = 0;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) {
|
||||
int found = 0;
|
||||
while (!found) {
|
||||
sint16 x2 = w->viewport->x + (sint16)(w->viewport->width * window_scroll_locations[i][0]);
|
||||
@@ -2075,7 +2075,7 @@ void window_relocate_windows(int width, int height){
|
||||
*/
|
||||
void window_resize_gui(int width, int height)
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 0xE){
|
||||
if (gScreenFlags & 0xE){
|
||||
window_resize_gui_scenario_editor(width, height);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void news_item_tick_current()
|
||||
int ticks;
|
||||
ticks = ++news_item_get(0)->ticks;
|
||||
// Only play news item sound when in normal playing mode
|
||||
if (ticks == 1 && (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_PLAYING)) {
|
||||
if (ticks == 1 && (gScreenFlags == SCREEN_FLAGS_PLAYING)) {
|
||||
// Play sound
|
||||
audio_play_sound_panned(SOUND_NEWS_ITEM, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16) / 2, 0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ void research_update()
|
||||
int editorScreenFlags, researchLevel, currentResearchProgress;
|
||||
|
||||
editorScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & editorScreenFlags)
|
||||
if (gScreenFlags & editorScreenFlags)
|
||||
return;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCENARIO_TICKS, uint32) % 32 != 0)
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace Twitch
|
||||
static bool IsTwitchEnabled()
|
||||
{
|
||||
if (!gTwitchEnable) return false;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (~SCREEN_FLAGS_PLAYING)) return false;
|
||||
if (gScreenFlags & (~SCREEN_FLAGS_PLAYING)) return false;
|
||||
if (String::IsNullOrEmpty(gConfigTwitch.channel)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-2
@@ -276,7 +276,7 @@ void openrct2_launch()
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) = 1;
|
||||
break;
|
||||
case STARTUP_ACTION_TITLE:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TITLE_DEMO;
|
||||
gScreenFlags = SCREEN_FLAGS_TITLE_DEMO;
|
||||
break;
|
||||
case STARTUP_ACTION_OPEN:
|
||||
assert(gOpenRCT2StartupActionPath != NULL);
|
||||
@@ -284,7 +284,7 @@ void openrct2_launch()
|
||||
break;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_PLAYING;
|
||||
gScreenFlags = SCREEN_FLAGS_PLAYING;
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
if (gNetworkStart == NETWORK_MODE_SERVER) {
|
||||
|
||||
+3
-3
@@ -169,7 +169,7 @@ void peep_update_all()
|
||||
uint16 spriteIndex;
|
||||
rct_peep* peep;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 0x0E)
|
||||
if (gScreenFlags & 0x0E)
|
||||
return;
|
||||
|
||||
spriteIndex = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_START_PEEP, uint16);
|
||||
@@ -3267,7 +3267,7 @@ static void peep_update_ride_sub_state_20(rct_peep* peep){
|
||||
}
|
||||
|
||||
// Do not play toilet flush sound on title screen as its considered loud and annoying
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) {
|
||||
audio_play_sound_at_location(SOUND_TOILET_FLUSH, peep->x, peep->y, peep->z);
|
||||
}
|
||||
|
||||
@@ -5935,7 +5935,7 @@ void peep_update_crowd_noise()
|
||||
if (!gConfigSound.sound_enabled)
|
||||
return;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 2)
|
||||
if (gScreenFlags & 2)
|
||||
return;
|
||||
|
||||
viewport = RCT2_GLOBAL(0x00F438A4, rct_viewport*);
|
||||
|
||||
+7
-3
@@ -111,6 +111,10 @@ const char * const RCT2FilePaths[PATH_ID_END] = {
|
||||
|
||||
uint32 gCurrentDrawCount = 0;
|
||||
|
||||
uint8 gScreenFlags;
|
||||
uint32 gScreenAge;
|
||||
uint8 gSavePromptMode;
|
||||
|
||||
typedef struct tm tm_t;
|
||||
|
||||
void print_launch_information();
|
||||
@@ -122,7 +126,7 @@ static void rct2_draw_fps();
|
||||
|
||||
void rct2_quit()
|
||||
{
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SAVE_PROMPT_MODE, uint16) = PM_QUIT;
|
||||
gSavePromptMode = PM_QUIT;
|
||||
window_save_prompt_open();
|
||||
}
|
||||
|
||||
@@ -286,7 +290,7 @@ void rct2_draw()
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) != 0) {
|
||||
//intro
|
||||
} else if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) {
|
||||
} else if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) {
|
||||
//title
|
||||
DrawOpenRCT2(0, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, uint16) - 20);
|
||||
} else {
|
||||
@@ -454,7 +458,7 @@ void rct2_update()
|
||||
// Screens
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) != 0)
|
||||
intro_update();
|
||||
else if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) && !gOpenRCT2Headless)
|
||||
else if ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && !gOpenRCT2Headless)
|
||||
title_update();
|
||||
else
|
||||
game_update();
|
||||
|
||||
@@ -281,6 +281,10 @@ extern const char * const RCT2FilePaths[PATH_ID_END];
|
||||
|
||||
extern uint32 gCurrentDrawCount;
|
||||
|
||||
extern uint8 gScreenFlags;
|
||||
extern uint32 gScreenAge;
|
||||
extern uint8 gSavePromptMode;
|
||||
|
||||
int rct2_init();
|
||||
void rct2_dispose();
|
||||
void rct2_update();
|
||||
|
||||
+8
-8
@@ -1878,7 +1878,7 @@ void ride_update_all()
|
||||
int i;
|
||||
|
||||
// Remove all rides if scenario editor
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
if (s6Info->editor_step <= EDITOR_STEP_INVENTIONS_LIST_SET_UP)
|
||||
FOR_ALL_RIDES(i, ride)
|
||||
ride->type = RIDE_TYPE_NULL;
|
||||
@@ -2098,7 +2098,7 @@ static void ride_inspection_update(rct_ride *ride)
|
||||
|
||||
if (gCurrentTicks & 2047)
|
||||
return;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
return;
|
||||
|
||||
ride->last_inspection++;
|
||||
@@ -2163,7 +2163,7 @@ static void ride_breakdown_update(int rideIndex)
|
||||
|
||||
if (gCurrentTicks & 255)
|
||||
return;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
return;
|
||||
|
||||
if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))
|
||||
@@ -2831,7 +2831,7 @@ void ride_measurements_update()
|
||||
int i, j;
|
||||
uint16 spriteIndex;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
return;
|
||||
|
||||
// For each ride measurement
|
||||
@@ -3336,7 +3336,7 @@ void ride_set_map_tooltip(rct_map_element *mapElement)
|
||||
*/
|
||||
int ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint16 sampleRate, uint32 position, uint8 *tuneId)
|
||||
{
|
||||
if(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gGameSoundsOff && RCT2_GLOBAL(0x00F438A4, rct_viewport*) != (rct_viewport*)-1) {
|
||||
if(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gGameSoundsOff && RCT2_GLOBAL(0x00F438A4, rct_viewport*) != (rct_viewport*)-1) {
|
||||
rct_xy16 rotatedCoords;
|
||||
|
||||
switch (get_current_rotation()) {
|
||||
@@ -3546,9 +3546,9 @@ void ride_music_update_final()
|
||||
{
|
||||
rct_ride_music_params* edi = NULL;
|
||||
int ebx;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 2)) {
|
||||
if (!(gScreenFlags & 2)) {
|
||||
// TODO Allow circus music (CSS24) to play if ride music is disabled (that should be sound)
|
||||
if (!gGameSoundsOff && gConfigSound.ride_music_enabled && !(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 1)) {
|
||||
if (!gGameSoundsOff && gConfigSound.ride_music_enabled && !(gScreenFlags & 1)) {
|
||||
// set to stop music if volume <= 1 ?
|
||||
while (1) {
|
||||
int v8 = 0;
|
||||
@@ -8389,7 +8389,7 @@ void ride_crash(uint8 rideIndex, uint8 vehicleIndex)
|
||||
ride = get_ride(rideIndex);
|
||||
vehicle = GET_VEHICLE(ride->vehicles[vehicleIndex]);
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) {
|
||||
// Open ride window for crashed vehicle
|
||||
w = window_ride_open_vehicle(vehicle);
|
||||
if (w->viewport != NULL) {
|
||||
|
||||
@@ -101,7 +101,7 @@ static void ride_ratings_score_close_proximity(rct_map_element *mapElement);
|
||||
*/
|
||||
void ride_ratings_update_all()
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
return;
|
||||
|
||||
switch (_rideRatingsState) {
|
||||
|
||||
+3
-3
@@ -1085,7 +1085,7 @@ int track_place_scenery(rct_track_scenery* scenery_start, uint8 rideIndex, int o
|
||||
entry_type = scenery->scenery_object.flags & 0xF;
|
||||
if (entry_type != OBJECT_TYPE_PATHS)
|
||||
entry_type = 0xFF;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8)&SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
if (gScreenFlags&SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
entry_type = 0xFF;
|
||||
|
||||
entry_index = 0;
|
||||
@@ -1184,7 +1184,7 @@ int track_place_scenery(rct_track_scenery* scenery_start, uint8 rideIndex, int o
|
||||
continue;
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8)&SCREEN_FLAGS_TRACK_DESIGNER){
|
||||
if (gScreenFlags&SCREEN_FLAGS_TRACK_DESIGNER){
|
||||
RCT2_GLOBAL(0x00F4414E, uint8) |= 1 << 1;
|
||||
continue;
|
||||
}
|
||||
@@ -2104,7 +2104,7 @@ void draw_track_preview(uint8** preview){
|
||||
|
||||
blank_map();
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER){
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER){
|
||||
load_track_scenery_objects();
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -233,7 +233,7 @@ void vehicle_invalidate(rct_vehicle *vehicle)
|
||||
*/
|
||||
void vehicle_update_sound_params(rct_vehicle* vehicle)
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) || RCT2_GLOBAL(0x0141F570, uint8) == 6)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (!(gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) || RCT2_GLOBAL(0x0141F570, uint8) == 6)) {
|
||||
if (vehicle->sound1_id != (uint8)-1 || vehicle->sound2_id != (uint8)-1) {
|
||||
if (vehicle->sprite_left != (sint16)0x8000) {
|
||||
sint16 x = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_x;
|
||||
@@ -623,10 +623,10 @@ void vehicle_update_all()
|
||||
uint16 sprite_index;
|
||||
rct_vehicle *vehicle;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
return;
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) && RCT2_GLOBAL(0x0141F570, uint8) != 6)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && RCT2_GLOBAL(0x0141F570, uint8) != 6)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
+5
-5
@@ -234,7 +234,7 @@ void scenario_begin()
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x0141F570;
|
||||
rct_window *mainWindow;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_PLAYING;
|
||||
gScreenFlags = SCREEN_FLAGS_PLAYING;
|
||||
viewport_init_all();
|
||||
game_create_windows();
|
||||
mainWindow = window_get_main();
|
||||
@@ -371,7 +371,7 @@ void scenario_begin()
|
||||
load_palette();
|
||||
|
||||
gfx_invalidate_screen();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0;
|
||||
gScreenAge = 0;
|
||||
gGameSpeed = 1;
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ static void scenario_update_daynight_cycle()
|
||||
float currentDayNightCycle = gDayNightCycle;
|
||||
gDayNightCycle = 0;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_PLAYING && gConfigGeneral.day_night_cycle) {
|
||||
if (gScreenFlags == SCREEN_FLAGS_PLAYING && gConfigGeneral.day_night_cycle) {
|
||||
float monthFraction = gDateMonthTicks / (float)0x10000;
|
||||
if (monthFraction < (1 / 8.0f)) {
|
||||
gDayNightCycle = 0.0f;
|
||||
@@ -601,7 +601,7 @@ static void scenario_update_daynight_cycle()
|
||||
*/
|
||||
void scenario_update()
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & ~SCREEN_FLAGS_PLAYING)) {
|
||||
if (!(gScreenFlags & ~SCREEN_FLAGS_PLAYING)) {
|
||||
uint32 currentMonthTick = gDateMonthTicks;
|
||||
uint32 nextMonthTick = currentMonthTick + 4;
|
||||
uint8 currentMonth = gDateMonthsElapsed & 7;
|
||||
@@ -1029,7 +1029,7 @@ int scenario_save(SDL_RWops* rw, int flags)
|
||||
|
||||
gfx_invalidate_screen();
|
||||
if (!(flags & 0x80000000))
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0;
|
||||
gScreenAge = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -108,7 +108,7 @@ void title_load()
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) & 1)
|
||||
pause_toggle();
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TITLE_DEMO;
|
||||
gScreenFlags = SCREEN_FLAGS_TITLE_DEMO;
|
||||
|
||||
reset_park_entrances();
|
||||
user_string_clear_all();
|
||||
@@ -134,7 +134,7 @@ void title_load()
|
||||
title_create_windows();
|
||||
title_init_showcase();
|
||||
gfx_invalidate_screen();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0;
|
||||
gScreenAge = 0;
|
||||
#ifndef DISABLE_NETWORK
|
||||
network_close();
|
||||
#endif
|
||||
@@ -220,7 +220,7 @@ static int title_load_park(const char *path)
|
||||
scenery_set_default_placement_configuration();
|
||||
news_item_init_queue();
|
||||
gfx_invalidate_screen();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, sint16) = 0;
|
||||
gScreenAge = 0;
|
||||
gGameSpeed = 1;
|
||||
return 1;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ static void title_set_location(int x, int y)
|
||||
*/
|
||||
void title_fix_location()
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_TITLE_DEMO) {
|
||||
if (gScreenFlags == SCREEN_FLAGS_TITLE_DEMO) {
|
||||
rct_xy16 position = _titleScriptCurrentCentralPosition;
|
||||
if (position.x != -1) {
|
||||
title_set_location(position.x, position.y);
|
||||
@@ -786,7 +786,7 @@ bool title_refresh_sequence()
|
||||
gTitleScriptCommand = -1;
|
||||
gTitleScriptSave = 0xFF;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_TITLE_DEMO) {
|
||||
if (gScreenFlags == SCREEN_FLAGS_TITLE_DEMO) {
|
||||
title_update_showcase();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
@@ -808,7 +808,7 @@ bool title_refresh_sequence()
|
||||
window_invalidate_by_class(WC_OPTIONS);
|
||||
window_invalidate_by_class(WC_TITLE_EDITOR);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_TITLE_DEMO) {
|
||||
if (gScreenFlags == SCREEN_FLAGS_TITLE_DEMO) {
|
||||
title_update_showcase();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ void window_editor_bottom_toolbar_jump_forward_from_object_selection()
|
||||
if (!window_editor_bottom_toolbar_check_object_selection())
|
||||
return;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
sub_66F6E3();
|
||||
} else {
|
||||
sub_6DFED0();
|
||||
@@ -344,7 +344,7 @@ void window_editor_bottom_toolbar_jump_forward_to_save_scenario()
|
||||
static void window_editor_bottom_toolbar_mouseup(rct_window *w, int widgetIndex)
|
||||
{
|
||||
if (widgetIndex == WIDX_PREVIOUS_STEP_BUTTON) {
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) ||
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) ||
|
||||
(RCT2_GLOBAL(0x13573C8, uint16) == 0x2710 && !(gParkFlags & PARK_FLAGS_18))) {
|
||||
previous_button_mouseup_events[g_editor_step]();
|
||||
}
|
||||
@@ -369,7 +369,7 @@ void hide_next_step_button() {
|
||||
*/
|
||||
void window_editor_bottom_toolbar_invalidate(rct_window *w)
|
||||
{
|
||||
colour_scheme_update_by_class(w, (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) ? WC_EDITOR_SCENARIO_BOTTOM_TOOLBAR : WC_EDITOR_TRACK_BOTTOM_TOOLBAR);
|
||||
colour_scheme_update_by_class(w, (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WC_EDITOR_SCENARIO_BOTTOM_TOOLBAR : WC_EDITOR_TRACK_BOTTOM_TOOLBAR);
|
||||
|
||||
uint16 screenWidth = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16);
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left = screenWidth - 200;
|
||||
@@ -382,7 +382,7 @@ void window_editor_bottom_toolbar_invalidate(rct_window *w)
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].type = WWT_IMGBTN;
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].type = WWT_IMGBTN;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
hide_previous_step_button();
|
||||
hide_next_step_button();
|
||||
} else {
|
||||
@@ -390,7 +390,7 @@ void window_editor_bottom_toolbar_invalidate(rct_window *w)
|
||||
hide_previous_step_button();
|
||||
} else if (g_editor_step == EDITOR_STEP_ROLLERCOASTER_DESIGNER) {
|
||||
hide_next_step_button();
|
||||
} else if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)) {
|
||||
} else if (!(gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)) {
|
||||
if (RCT2_GLOBAL(0x13573C8, uint16) != 0x2710 || gParkFlags & PARK_FLAGS_18) {
|
||||
hide_previous_step_button();
|
||||
}
|
||||
@@ -410,7 +410,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
if (g_editor_step == EDITOR_STEP_OBJECT_SELECTION) {
|
||||
drawNextButton = true;
|
||||
}
|
||||
else if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
else if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
drawPreviousButton = true;
|
||||
}
|
||||
else if (RCT2_GLOBAL(0x13573C8, uint16) != 0x2710) {
|
||||
@@ -423,7 +423,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
drawPreviousButton = true;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (drawPreviousButton) {
|
||||
gfx_fill_rect(dpi,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].left + w->x,
|
||||
@@ -443,7 +443,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
|
||||
window_draw_widgets(w, dpi);
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
|
||||
|
||||
if (drawPreviousButton) {
|
||||
@@ -488,7 +488,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
short textY = window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].top + 6 + w->y;
|
||||
|
||||
short stringId = STR_OBJECT_SELECTION_STEP + g_editor_step - 1;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
stringId = STR_OBJECT_SELECTION_STEP;
|
||||
|
||||
gfx_draw_string_centred(dpi, STR_BACK_TO_PREVIOUS_STEP, textX, textY, textColour, 0);
|
||||
@@ -513,7 +513,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
short textY = window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].top + 6 + w->y;
|
||||
|
||||
short stringId = STR_OBJECT_SELECTION_STEP + g_editor_step + 1;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
stringId = STR_ROLLERCOASTER_DESIGNER_STEP;
|
||||
|
||||
gfx_draw_string_centred(dpi, STR_FORWARD_TO_NEXT_STEP, textX, textY, textColour, 0);
|
||||
|
||||
@@ -561,7 +561,7 @@ static void window_editor_inventions_list_close(rct_window *w)
|
||||
research_remove_flags();
|
||||
|
||||
// When used in-game (as a cheat)
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) {
|
||||
gSilentResearch = true;
|
||||
sub_684AC3();
|
||||
gSilentResearch = false;
|
||||
@@ -725,7 +725,7 @@ static void window_editor_inventions_list_invalidate(rct_window *w)
|
||||
w->pressed_widgets |= 1 << WIDX_TAB_1;
|
||||
|
||||
w->widgets[WIDX_CLOSE].type =
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -690,22 +690,22 @@ static int sub_6AB211(){
|
||||
installedObject = object_get_next(installedObject);
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER){
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER){
|
||||
setup_track_designer_objects();
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER){
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER){
|
||||
setup_track_manager_objects();
|
||||
}
|
||||
|
||||
setup_in_use_selection_flags();
|
||||
reset_selected_object_count_and_size();
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))){
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))){
|
||||
window_editor_object_selection_select_required_objects();
|
||||
|
||||
// To prevent it breaking in scenario mode.
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
window_editor_object_selection_select_default_objects();
|
||||
}
|
||||
|
||||
@@ -767,7 +767,7 @@ void unload_unselected_objects(){
|
||||
*/
|
||||
static void window_editor_object_selection_close(rct_window *w)
|
||||
{
|
||||
//if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR))
|
||||
//if (!(gScreenFlags & SCREEN_FLAGS_EDITOR))
|
||||
// return;
|
||||
|
||||
unload_unselected_objects();
|
||||
@@ -776,7 +776,7 @@ static void window_editor_object_selection_close(rct_window *w)
|
||||
object_free_scenario_text();
|
||||
editor_object_flags_free();
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_EDITOR) {
|
||||
research_populate_list_random();
|
||||
}
|
||||
else {
|
||||
@@ -801,7 +801,7 @@ static void window_editor_object_selection_mouseup(rct_window *w, int widgetInde
|
||||
{
|
||||
switch (widgetIndex) {
|
||||
case WIDX_CLOSE:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_EDITOR) {
|
||||
game_do_command(0, 1, 0, 0, GAME_COMMAND_LOAD_OR_QUIT, 1, 0);
|
||||
}
|
||||
else {
|
||||
@@ -993,7 +993,7 @@ static void window_editor_object_selection_scroll_mousedown(rct_window *w, int s
|
||||
audio_play_sound_panned(SOUND_CLICK_1, RCT2_GLOBAL(0x142406C,uint32), 0, 0, 0);
|
||||
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (!window_editor_object_selection_select_object(0, 1, installed_entry))
|
||||
return;
|
||||
|
||||
@@ -1122,10 +1122,10 @@ static void window_editor_object_selection_invalidate(rct_window *w)
|
||||
|
||||
// Set window title and buttons
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = STR_OBJECT_SELECTION_RIDE_VEHICLES_ATTRACTIONS + w->selected_tab;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
w->widgets[WIDX_TITLE].image = STR_TRACK_DESIGNS_MANAGER_SELECT_RIDE_TYPE;
|
||||
w->widgets[WIDX_INSTALL_TRACK].type = WWT_DROPDOWN_BUTTON;
|
||||
} else if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
} else if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
w->widgets[WIDX_TITLE].image = STR_ROLLER_COASTER_DESIGNER_SELECT_RIDE_TYPES_VEHICLES;
|
||||
w->widgets[WIDX_INSTALL_TRACK].type = WWT_EMPTY;
|
||||
} else {
|
||||
@@ -1148,7 +1148,7 @@ static void window_editor_object_selection_invalidate(rct_window *w)
|
||||
}
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TRACK_DESIGNER)) {
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TRACK_DESIGNER)) {
|
||||
w->widgets[WIDX_ADVANCED].type = WWT_EMPTY;
|
||||
for (i = 1; i < WINDOW_OBJECT_SELECTION_PAGE_COUNT; i++)
|
||||
w->widgets[WIDX_TAB_1 + i].type = WWT_EMPTY;
|
||||
@@ -1287,13 +1287,13 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf
|
||||
);
|
||||
|
||||
// Draw number of selected items
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
x = w->x + 3;
|
||||
y = w->y + w->height - 13;
|
||||
|
||||
numSelected = RCT2_ADDRESS(0x00F433F7, uint16)[w->selected_tab];
|
||||
totalSelectable = object_entry_group_counts[w->selected_tab];
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
totalSelectable = 4;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = numSelected;
|
||||
@@ -1365,7 +1365,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf
|
||||
|
||||
stringId = 3165;
|
||||
stringBuffer = (char*)language_get_string(3165) + 1;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
// Skip name
|
||||
do {
|
||||
text++;
|
||||
@@ -1457,7 +1457,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
|
||||
|
||||
if (y + 12 >= dpi->y && y <= dpi->y + dpi->height) {
|
||||
// Draw checkbox
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) && !(*listItem->flags & 0x20))
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && !(*listItem->flags & 0x20))
|
||||
gfx_fill_rect_inset(dpi, 2, y, 11, y + 10, w->colours[1], 0xE0);
|
||||
|
||||
// Highlight background
|
||||
@@ -1468,7 +1468,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
|
||||
}
|
||||
|
||||
// Draw checkmark
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) && (*listItem->flags & OBJECT_SELECTION_FLAG_SELECTED)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && (*listItem->flags & OBJECT_SELECTION_FLAG_SELECTED)) {
|
||||
x = 2;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, sint16) = colour == 14 ? -2 : -1;
|
||||
colour2 = w->colours[1] & 0x7F;
|
||||
@@ -1478,7 +1478,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
|
||||
gfx_draw_string(dpi, (char*)CheckBoxMarkString, colour2, x, y);
|
||||
}
|
||||
|
||||
x = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 15;
|
||||
x = gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 15;
|
||||
|
||||
char *bufferWithColour = (char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER;
|
||||
char *buffer = utf8_write_codepoint(bufferWithColour, colour);
|
||||
@@ -1500,7 +1500,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
|
||||
|
||||
// Draw text
|
||||
strcpy(buffer, object_get_name(listItem->entry));
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
while (*buffer != 0 && *buffer != 9)
|
||||
buffer++;
|
||||
|
||||
@@ -1831,7 +1831,7 @@ static int window_editor_object_selection_select_object(uint8 bh, int flags, rct
|
||||
|
||||
uint8 object_type = installedObject->flags & 0xF;
|
||||
uint16 no_objects = object_entry_group_counts[object_type];
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER){
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER){
|
||||
no_objects = 4;
|
||||
}
|
||||
|
||||
|
||||
@@ -868,7 +868,7 @@ static void window_editor_objective_options_main_invalidate(rct_window *w)
|
||||
}
|
||||
|
||||
window_editor_objective_options_main_widgets[WIDX_CLOSE].type =
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
|
||||
window_editor_objective_options_anchor_border_widgets(w);
|
||||
}
|
||||
@@ -1161,7 +1161,7 @@ static void window_editor_objective_options_rides_invalidate(rct_window *w)
|
||||
window_editor_objective_options_set_pressed_tab(w);
|
||||
|
||||
window_editor_objective_options_main_widgets[WIDX_CLOSE].type =
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
|
||||
window_editor_objective_options_anchor_border_widgets(w);
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ static void window_editor_scenario_options_financial_mouseup(rct_window *w, int
|
||||
window_editor_scenario_options_set_page(w, widgetIndex - WIDX_TAB_1);
|
||||
break;
|
||||
case WIDX_NO_MONEY:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
gParkFlags ^= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
} else {
|
||||
gParkFlags ^= PARK_FLAGS_NO_MONEY;
|
||||
@@ -567,7 +567,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex,
|
||||
break;
|
||||
}
|
||||
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_PLAYING) {
|
||||
if(gScreenFlags == SCREEN_FLAGS_PLAYING) {
|
||||
window_invalidate_by_class(WC_FINANCES);
|
||||
window_invalidate_by_class(WC_BOTTOM_TOOLBAR);
|
||||
}
|
||||
@@ -603,8 +603,8 @@ static void window_editor_scenario_options_financial_invalidate(rct_window *w)
|
||||
|
||||
window_editor_scenario_options_set_pressed_tab(w);
|
||||
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
w->pressed_widgets |= (1 << WIDX_NO_MONEY);
|
||||
for (i = WIDX_INITIAL_CASH; i <= WIDX_FORBID_MARKETING; i++)
|
||||
w->widgets[i].type = WWT_EMPTY;
|
||||
@@ -631,7 +631,7 @@ static void window_editor_scenario_options_financial_invalidate(rct_window *w)
|
||||
w->pressed_widgets &= ~(1 << WIDX_FORBID_MARKETING);
|
||||
|
||||
w->widgets[WIDX_CLOSE].type =
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
|
||||
window_editor_scenario_options_anchor_border_widgets(w);
|
||||
}
|
||||
@@ -832,8 +832,8 @@ static void window_editor_scenario_options_guests_invalidate(rct_window *w)
|
||||
|
||||
window_editor_scenario_options_set_pressed_tab(w);
|
||||
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
w->widgets[WIDX_CASH_PER_GUEST].type = WWT_EMPTY;
|
||||
w->widgets[WIDX_CASH_PER_GUEST_INCREASE].type = WWT_EMPTY;
|
||||
w->widgets[WIDX_CASH_PER_GUEST_DECREASE].type = WWT_EMPTY;
|
||||
@@ -856,7 +856,7 @@ static void window_editor_scenario_options_guests_invalidate(rct_window *w)
|
||||
w->pressed_widgets &= ~(1 << WIDX_GUEST_PREFER_MORE_INTENSE_RIDES);
|
||||
|
||||
w->widgets[WIDX_CLOSE].type =
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
|
||||
window_editor_scenario_options_anchor_border_widgets(w);
|
||||
}
|
||||
@@ -1057,7 +1057,7 @@ static void window_editor_scenario_options_park_mousedown(int widgetIndex, rct_w
|
||||
static void window_editor_scenario_options_park_dropdown(rct_window *w, int widgetIndex, int dropdownIndex)
|
||||
{
|
||||
if (widgetIndex == WIDX_PAY_FOR_PARK_OR_RIDES_DROPDOWN && dropdownIndex != -1) {
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
if(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
if (dropdownIndex == 0) {
|
||||
if (!(gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY)) {
|
||||
gParkFlags |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
@@ -1118,8 +1118,8 @@ static void window_editor_scenario_options_park_invalidate(rct_window *w)
|
||||
|
||||
window_editor_scenario_options_set_pressed_tab(w);
|
||||
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
for (i = WIDX_LAND_COST; i <= WIDX_ENTRY_PRICE_DECREASE; i++)
|
||||
w->widgets[i].type = WWT_EMPTY;
|
||||
} else {
|
||||
@@ -1165,7 +1165,7 @@ static void window_editor_scenario_options_park_invalidate(rct_window *w)
|
||||
w->pressed_widgets = pressedWidgets;
|
||||
|
||||
w->widgets[WIDX_CLOSE].type =
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR ? WWT_EMPTY : WWT_CLOSEBOX;
|
||||
|
||||
window_editor_scenario_options_anchor_border_widgets(w);
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ static void window_footpath_dropdown(rct_window *w, int widgetIndex, int dropdow
|
||||
pathId = gFootpathSelectedId;
|
||||
} else {
|
||||
int flags = 4;
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode)
|
||||
flags = 0;
|
||||
|
||||
j = 0;
|
||||
@@ -534,7 +534,7 @@ static void window_footpath_invalidate(rct_window *w)
|
||||
}
|
||||
|
||||
// Disable queue line button if in Scenario Editor
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
window_footpath_widgets[WIDX_QUEUELINE_TYPE].type = WWT_EMPTY;
|
||||
}
|
||||
|
||||
@@ -595,7 +595,7 @@ static void window_footpath_show_footpath_types_dialog(rct_window *w, rct_widget
|
||||
numPathTypes = 0;
|
||||
flags = 4;
|
||||
// If the game is in sandbox mode, also show paths that are normally restricted to the scenario editor, but not their queues (since these usually shouldn't have one)
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || (gCheatsSandboxMode && !showQueues))
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || (gCheatsSandboxMode && !showQueues))
|
||||
flags = 0;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
|
||||
@@ -158,7 +158,7 @@ static void window_install_track_select(rct_window *w, int index)
|
||||
w->track_list.var_480 = index;
|
||||
|
||||
audio_play_sound_panned(SOUND_CLICK_1, w->x + (w->width / 2), 0, 0, 0);
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) && index == 0) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && index == 0) {
|
||||
window_close(w);
|
||||
ride_construct_new(_window_install_track_item);
|
||||
return;
|
||||
@@ -167,7 +167,7 @@ static void window_install_track_select(rct_window *w, int index)
|
||||
if (RCT2_GLOBAL(0x00F44153, uint8) != 0)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TRACK_DESIGN_SCENERY_TOGGLE, uint8) = 1;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER))
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER))
|
||||
index--;
|
||||
|
||||
trackDesignItem = trackDesignList + (index * 128);
|
||||
@@ -176,7 +176,7 @@ static void window_install_track_select(rct_window *w, int index)
|
||||
window_track_list_format_name(
|
||||
(char*)0x009BC313,
|
||||
trackDesignItem,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER ?
|
||||
gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER ?
|
||||
0 :
|
||||
FORMAT_WHITE,
|
||||
1);
|
||||
@@ -184,7 +184,7 @@ static void window_install_track_select(rct_window *w, int index)
|
||||
char track_path[MAX_PATH] = { 0 };
|
||||
substitute_path(track_path, (char*)RCT2_ADDRESS_TRACKS_PATH, trackDesignItem);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
window_track_manage_open();
|
||||
return;
|
||||
}
|
||||
|
||||
+4
-4
@@ -693,7 +693,7 @@ static void window_map_invalidate(rct_window *w)
|
||||
w->widgets[WIDX_CLOSE].right = w->width - 2 - 11 + 10;
|
||||
w->widgets[WIDX_MAP].right = w->width - 4;
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode)
|
||||
w->widgets[WIDX_MAP].bottom = w->height - 1 - 72;
|
||||
else if (w->selected_tab == PAGE_RIDES)
|
||||
w->widgets[WIDX_MAP].bottom = w->height - 1 - 44;
|
||||
@@ -737,7 +737,7 @@ static void window_map_invalidate(rct_window *w)
|
||||
w->widgets[i].type = WWT_EMPTY;
|
||||
}
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) {
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) {
|
||||
// scenario editor: build park entrance selected, show rotate button
|
||||
if (
|
||||
(gInputFlags & INPUT_FLAG_TOOL_ACTIVE) &&
|
||||
@@ -804,7 +804,7 @@ static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
gfx_draw_sprite(dpi, 0x0B6E0190A, x, y, 0);
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
// Render the map legend
|
||||
if (w->selected_tab == PAGE_RIDES) {
|
||||
x = w->x + 4;
|
||||
@@ -1293,7 +1293,7 @@ static void window_map_place_park_entrance_tool_down(int x, int y)
|
||||
SOUND_PLACE_ITEM,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Z, uint16),
|
||||
RCT2_GLOBAL(0x009DEA64, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16)
|
||||
gScreenAge
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ static bool _trackSelectionByType;
|
||||
*/
|
||||
void window_new_ride_init_vars() {
|
||||
// If we are in the track designer, default to the Roller Coaster tab
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_SELECTED_TAB, uint8) = WINDOW_NEW_RIDE_PAGE_ROLLER_COASTER;
|
||||
}
|
||||
else {
|
||||
@@ -741,7 +741,7 @@ static void window_new_ride_invalidate(rct_window *w)
|
||||
|
||||
window_new_ride_widgets[WIDX_TITLE].image = STR_NEW_TRANSPORT_RIDES + _window_new_ride_current_tab;
|
||||
window_new_ride_widgets[WIDX_TAB_7].type = WWT_TAB;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 4)
|
||||
if (gScreenFlags & 4)
|
||||
window_new_ride_widgets[WIDX_TAB_7].type = WWT_EMPTY;
|
||||
|
||||
if (_window_new_ride_current_tab == WINDOW_NEW_RIDE_PAGE_RESEARCH) {
|
||||
|
||||
+2
-2
@@ -1164,7 +1164,7 @@ void window_ride_disable_tabs(rct_window *w)
|
||||
(gParkFlags & PARK_FLAGS_NO_MONEY) != 0)
|
||||
disabled_tabs |= (1 << WIDX_TAB_9); // 0x1000
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint32) & SCREEN_FLAGS_TRACK_DESIGNER) != 0)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) != 0)
|
||||
disabled_tabs |= (1 << WIDX_TAB_4 | 1 << WIDX_TAB_6 | 1 << WIDX_TAB_9 | 1 << WIDX_TAB_10); // 0x3280
|
||||
|
||||
rct_ride_entry *type = get_ride_entry(ride->subtype);
|
||||
@@ -4808,7 +4808,7 @@ static void window_ride_measurements_mousedown(int widgetIndex, rct_window *w, r
|
||||
2
|
||||
);
|
||||
gDropdownDefaultIndex = 0;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
gDropdownItemsDisabled |= 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,16 +112,16 @@ void window_save_prompt_open()
|
||||
{
|
||||
int stringId, width, height;
|
||||
rct_window* window;
|
||||
unsigned short prompt_mode;
|
||||
uint8 prompt_mode;
|
||||
rct_widget *widgets;
|
||||
uint64 enabled_widgets;
|
||||
|
||||
prompt_mode = RCT2_GLOBAL(RCT2_ADDRESS_SAVE_PROMPT_MODE, uint16);
|
||||
prompt_mode = gSavePromptMode;
|
||||
if (prompt_mode == PM_QUIT)
|
||||
prompt_mode = PM_SAVE_BEFORE_QUIT;
|
||||
|
||||
// do not show save prompt if we're in the title demo and click on load game
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) {
|
||||
game_load_or_quit_no_save_prompt();
|
||||
return;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ void window_save_prompt_open()
|
||||
* and game_load_or_quit() are not called by the original binary anymore.
|
||||
*/
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) < 3840) {
|
||||
if (gScreenAge < 3840) {
|
||||
game_load_or_quit_no_save_prompt();
|
||||
return;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ void window_save_prompt_open()
|
||||
window_close(window);
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
widgets = window_quit_prompt_widgets;
|
||||
enabled_widgets =
|
||||
(1 << WQIDX_CLOSE) |
|
||||
@@ -182,9 +182,9 @@ void window_save_prompt_open()
|
||||
window_invalidate_by_class(WC_TOP_TOOLBAR);
|
||||
|
||||
stringId = prompt_mode + STR_LOAD_GAME_PROMPT_TITLE;
|
||||
if (stringId == STR_LOAD_GAME_PROMPT_TITLE && RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 2)
|
||||
if (stringId == STR_LOAD_GAME_PROMPT_TITLE && gScreenFlags & 2)
|
||||
stringId = STR_LOAD_LANDSCAPE_PROMPT_TITLE;
|
||||
if (stringId == STR_QUIT_GAME_PROMPT_TITLE && RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 2)
|
||||
if (stringId == STR_QUIT_GAME_PROMPT_TITLE && gScreenFlags & 2)
|
||||
stringId = STR_QUIT_SCENARIO_EDITOR;
|
||||
window_save_prompt_widgets[WIDX_TITLE].image = stringId;
|
||||
window_save_prompt_widgets[WIDX_LABEL].image = prompt_mode + STR_SAVE_BEFORE_LOADING;
|
||||
@@ -208,7 +208,7 @@ static void window_save_prompt_close(rct_window *w)
|
||||
*/
|
||||
static void window_save_prompt_mouseup(rct_window *w, int widgetIndex)
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
switch (widgetIndex) {
|
||||
case WQIDX_OK:
|
||||
game_load_or_quit_no_save_prompt();
|
||||
|
||||
@@ -521,7 +521,7 @@ static void window_title_command_editor_invalidate(rct_window *w)
|
||||
break;
|
||||
}
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO)
|
||||
w->disabled_widgets |= (1 << WIDX_GET);
|
||||
else
|
||||
w->disabled_widgets &= ~(1 << WIDX_GET);
|
||||
|
||||
@@ -304,8 +304,8 @@ static void window_title_editor_mouseup(rct_window *w, int widgetIndex)
|
||||
int defaultPreset, playing, inTitle, i, commandEditorOpen;
|
||||
|
||||
defaultPreset = (gCurrentTitleSequence < TITLE_SEQUENCE_DEFAULT_PRESETS);
|
||||
playing = (gCurrentTitleSequence == gCurrentPreviewTitleSequence) && ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
inTitle = ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
playing = (gCurrentTitleSequence == gCurrentPreviewTitleSequence) && ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
inTitle = ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
commandEditorOpen = (window_find_by_class(WC_TITLE_COMMAND_EDITOR) != NULL);
|
||||
switch (widgetIndex) {
|
||||
case WIDX_TITLE_EDITOR_CLOSE:
|
||||
@@ -836,8 +836,8 @@ void window_title_editor_invalidate(rct_window *w)
|
||||
int defaultPreset, playing, inTitle;
|
||||
|
||||
defaultPreset = (gCurrentTitleSequence < TITLE_SEQUENCE_DEFAULT_PRESETS);
|
||||
playing = (gCurrentTitleSequence == gCurrentPreviewTitleSequence) && ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
inTitle = ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
playing = (gCurrentTitleSequence == gCurrentPreviewTitleSequence) && ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
inTitle = ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
|
||||
if (!inTitle)
|
||||
w->disabled_widgets |= (1 << WIDX_TITLE_EDITOR_PLAY);
|
||||
@@ -891,7 +891,7 @@ void window_title_editor_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int
|
||||
|
||||
title_sequence *title = &gConfigTitleSequences.presets[gCurrentTitleSequence];
|
||||
|
||||
inTitle = ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
inTitle = ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) == SCREEN_FLAGS_TITLE_DEMO);
|
||||
y = 0; x = 0; x2 = 0; width = 0;
|
||||
width = w->widgets[WIDX_TITLE_EDITOR_LIST].right - w->widgets[WIDX_TITLE_EDITOR_LIST].left;
|
||||
if (w->selected_tab == WINDOW_TITLE_EDITOR_TAB_SAVES) {
|
||||
|
||||
@@ -367,7 +367,7 @@ static void window_top_toolbar_mousedown(int widgetIndex, rct_window*w, rct_widg
|
||||
switch (widgetIndex) {
|
||||
case WIDX_FILE_MENU:
|
||||
_menuDropdownIncludesTwitch = false;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
gDropdownItemsFormat[0] = STR_ABOUT;
|
||||
gDropdownItemsFormat[1] = STR_OPTIONS;
|
||||
gDropdownItemsFormat[2] = STR_SCREENSHOT;
|
||||
@@ -376,11 +376,11 @@ static void window_top_toolbar_mousedown(int widgetIndex, rct_window*w, rct_widg
|
||||
gDropdownItemsFormat[5] = STR_QUIT_TRACK_DESIGNS_MANAGER;
|
||||
gDropdownItemsFormat[6] = STR_EXIT_OPENRCT2;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
gDropdownItemsFormat[5] = STR_QUIT_ROLLERCOASTER_DESIGNER;
|
||||
|
||||
numItems = 7;
|
||||
} else if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
} else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
gDropdownItemsFormat[0] = STR_LOAD_LANDSCAPE;
|
||||
gDropdownItemsFormat[1] = STR_SAVE_LANDSCAPE;
|
||||
gDropdownItemsFormat[2] = 0;
|
||||
@@ -469,7 +469,7 @@ static void window_top_toolbar_mousedown(int widgetIndex, rct_window*w, rct_widg
|
||||
gDropdownItemsFormat[1] = 2780;
|
||||
numItems = 2;
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && g_editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && g_editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
gDropdownItemsFormat[2] = 2690;
|
||||
numItems++;
|
||||
}
|
||||
@@ -516,15 +516,15 @@ static void window_top_toolbar_dropdown(rct_window *w, int widgetIndex, int drop
|
||||
case WIDX_FILE_MENU:
|
||||
|
||||
// New game is only available in the normal game. Skip one position to avoid incorrect mappings in the menus of the other modes.
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR))
|
||||
if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR))
|
||||
dropdownIndex += 1;
|
||||
|
||||
// Quicksave is only available in the normal game. Skip one position to avoid incorrect mappings in the menus of the other modes.
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR) && dropdownIndex > DDIDX_LOAD_GAME)
|
||||
if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR) && dropdownIndex > DDIDX_LOAD_GAME)
|
||||
dropdownIndex += 1;
|
||||
|
||||
// Track designer and track designs manager start with About, not Load/save
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))
|
||||
dropdownIndex += DDIDX_ABOUT;
|
||||
|
||||
switch (dropdownIndex) {
|
||||
@@ -539,7 +539,7 @@ static void window_top_toolbar_dropdown(rct_window *w, int widgetIndex, int drop
|
||||
save_game();
|
||||
break;
|
||||
case DDIDX_SAVE_GAME_AS:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x0141F570;
|
||||
window_loadsave_open(LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE, s6Info->name);
|
||||
}
|
||||
@@ -659,7 +659,7 @@ static void window_top_toolbar_invalidate(rct_window *w)
|
||||
window_top_toolbar_widgets[WIDX_NEWS].type = WWT_TRNBTN;
|
||||
window_top_toolbar_widgets[WIDX_NETWORK].type = WWT_TRNBTN;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
window_top_toolbar_widgets[WIDX_PAUSE].type = WWT_EMPTY;
|
||||
window_top_toolbar_widgets[WIDX_RIDES].type = WWT_EMPTY;
|
||||
window_top_toolbar_widgets[WIDX_PARK].type = WWT_EMPTY;
|
||||
|
||||
+15
-15
@@ -120,7 +120,7 @@ void window_track_list_open(ride_list_item item)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TRACK_DESIGN_CACHE, void*) = mem;
|
||||
reset_track_list_cache();
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
x = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16) / 2 - 300;
|
||||
y = max(28, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, uint16) / 2 - 200);
|
||||
} else {
|
||||
@@ -140,7 +140,7 @@ void window_track_list_open(ride_list_item item)
|
||||
w->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_ROTATE) | (1 << WIDX_TOGGLE_SCENERY) | (1 << WIDX_BACK);
|
||||
window_init_scroll_widgets(w);
|
||||
w->track_list.var_480 = 0xFFFF;
|
||||
w->track_list.var_482 = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 1;
|
||||
w->track_list.var_482 = gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 1;
|
||||
w->track_list.var_484 = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TRACK_DESIGN_SCENERY_TOGGLE, uint8) = 0;
|
||||
window_push_others_right(w);
|
||||
@@ -159,7 +159,7 @@ static void window_track_list_select(rct_window *w, int index)
|
||||
w->track_list.var_480 = index;
|
||||
|
||||
audio_play_sound_panned(SOUND_CLICK_1, w->x + (w->width / 2), 0, 0, 0);
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) && index == 0) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && index == 0) {
|
||||
window_close(w);
|
||||
ride_construct_new(_window_track_list_item);
|
||||
return;
|
||||
@@ -168,7 +168,7 @@ static void window_track_list_select(rct_window *w, int index)
|
||||
if (RCT2_GLOBAL(0x00F44153, uint8) != 0)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TRACK_DESIGN_SCENERY_TOGGLE, uint8) = 1;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER))
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER))
|
||||
index--;
|
||||
|
||||
trackDesignItem = trackDesignList + (index * 128);
|
||||
@@ -177,7 +177,7 @@ static void window_track_list_select(rct_window *w, int index)
|
||||
window_track_list_format_name(
|
||||
(char*)0x009BC313,
|
||||
trackDesignItem,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER ?
|
||||
gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER ?
|
||||
0 :
|
||||
FORMAT_WHITE,
|
||||
1);
|
||||
@@ -185,7 +185,7 @@ static void window_track_list_select(rct_window *w, int index)
|
||||
char track_path[MAX_PATH] = { 0 };
|
||||
substitute_path(track_path, (char*)RCT2_ADDRESS_TRACKS_PATH, trackDesignItem);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
window_track_manage_open();
|
||||
return;
|
||||
}
|
||||
@@ -211,7 +211,7 @@ static int window_track_list_get_list_item_index_from_position(int x, int y)
|
||||
uint8 *trackDesignItem, *trackDesignList = RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, uint8);
|
||||
|
||||
index = 0;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
y -= 10;
|
||||
if (y < 0)
|
||||
return index;
|
||||
@@ -246,7 +246,7 @@ static void window_track_list_mouseup(rct_window *w, int widgetIndex)
|
||||
switch (widgetIndex) {
|
||||
case WIDX_CLOSE:
|
||||
window_close(w);
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
window_close_by_number(WC_MANAGE_TRACK_DESIGN, w->number);
|
||||
window_close_by_number(WC_TRACK_DELETE_PROMPT, w->number);
|
||||
trackmanager_load();
|
||||
@@ -264,7 +264,7 @@ static void window_track_list_mouseup(rct_window *w, int widgetIndex)
|
||||
break;
|
||||
case WIDX_BACK:
|
||||
window_close(w);
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
window_close_by_number(WC_MANAGE_TRACK_DESIGN, w->number);
|
||||
window_close_by_number(WC_TRACK_DELETE_PROMPT, w->number);
|
||||
trackmanager_load();
|
||||
@@ -283,7 +283,7 @@ static void window_track_list_scrollgetsize(rct_window *w, int scrollIndex, int
|
||||
{
|
||||
uint8 *trackDesignItem, *trackDesignList = RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, uint8);
|
||||
|
||||
*height = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 10;
|
||||
*height = gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 10;
|
||||
for (trackDesignItem = trackDesignList; *trackDesignItem != 0; trackDesignItem += 128)
|
||||
*height += 10;
|
||||
}
|
||||
@@ -349,7 +349,7 @@ static void window_track_list_invalidate(rct_window *w)
|
||||
stringId = _window_track_list_item.type + 2;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
window_track_list_widgets[WIDX_TITLE].image = STR_TRACK_DESIGNS;
|
||||
window_track_list_widgets[WIDX_TRACK_LIST].tooltip = STR_CLICK_ON_DESIGN_TO_RENAME_OR_DELETE_IT;
|
||||
} else {
|
||||
@@ -357,7 +357,7 @@ static void window_track_list_invalidate(rct_window *w)
|
||||
window_track_list_widgets[WIDX_TRACK_LIST].tooltip = STR_CLICK_ON_DESIGN_TO_BUILD_IT_TIP;
|
||||
}
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) || w->track_list.var_482 != 0) {
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) || w->track_list.var_482 != 0) {
|
||||
w->pressed_widgets |= 1 << WIDX_TRACK_PREVIEW;
|
||||
w->disabled_widgets &= ~(1 << WIDX_TRACK_PREVIEW);
|
||||
window_track_list_widgets[WIDX_ROTATE].type = WWT_FLATBTN;
|
||||
@@ -392,7 +392,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
window_draw_widgets(w, dpi);
|
||||
|
||||
trackIndex = w->track_list.var_482;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (*trackDesignList == 0 || trackIndex == -1)
|
||||
return;
|
||||
} else if (trackIndex-- == 0) {
|
||||
@@ -428,7 +428,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
|
||||
RCT2_GLOBAL(0x00F44153, uint8) = 0;
|
||||
// Warnings
|
||||
if ((track_td6->track_flags & 4) && !(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
if ((track_td6->track_flags & 4) && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
// Vehicle design not available
|
||||
gfx_draw_string_centred_clipped(dpi, STR_VEHICLE_DESIGN_UNAVAILABLE, NULL, 0, x, y, 368);
|
||||
y -= 10;
|
||||
@@ -571,7 +571,7 @@ static void window_track_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
|
||||
y = 0;
|
||||
|
||||
trackDesignItem = trackDesignList;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) {
|
||||
if (*trackDesignItem == 0) {
|
||||
// No track designs
|
||||
gfx_draw_string_left(dpi, STR_NO_TRACK_DESIGNS_OF_THIS_TYPE, NULL, 0, x, y - 1);
|
||||
|
||||
+2
-2
@@ -112,7 +112,7 @@ sint8 step_weather_level(sint8 cur_weather_level, sint8 next_weather_level) {
|
||||
*/
|
||||
void climate_update()
|
||||
{
|
||||
uint8 screen_flags = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8);
|
||||
uint8 screen_flags = gScreenFlags;
|
||||
sint8 temperature = gClimateCurrentTemperature,
|
||||
target_temperature = gClimateNextTemperature,
|
||||
cur_gloom = gClimateCurrentWeatherGloom,
|
||||
@@ -225,7 +225,7 @@ void climate_update_sound()
|
||||
return;
|
||||
if (!gConfigSound.sound_enabled)
|
||||
return;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO)
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
climate_update_rain_sound();
|
||||
|
||||
@@ -200,7 +200,7 @@ static money32 footpath_element_insert(int type, int x, int y, int z, int slope,
|
||||
if (!(flags & (1 << 7)))
|
||||
footpath_remove_edges_at(x, y, mapElement);
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !(flags & (1 << 6)))
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !(flags & (1 << 6)))
|
||||
automatically_set_peep_spawn(x, y, mapElement->base_height / 2);
|
||||
|
||||
loc_6A6620(flags, x, y, mapElement);
|
||||
@@ -334,7 +334,7 @@ static money32 footpath_place_real(int type, int x, int y, int z, int slope, int
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (!((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && !map_is_location_owned(x, y, z * 8))
|
||||
if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && !map_is_location_owned(x, y, z * 8))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (slope & 8) {
|
||||
@@ -405,7 +405,7 @@ money32 footpath_remove_real(int x, int y, int z, int flags)
|
||||
footpath_remove_litter(x, y, z * 8);
|
||||
}
|
||||
|
||||
if (!((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && !map_is_location_owned(x, y, z * 8))
|
||||
if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && !map_is_location_owned(x, y, z * 8))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
mapElement = map_get_footpath_element(x / 32, y / 32, z);
|
||||
@@ -470,7 +470,7 @@ static money32 footpath_place_from_track(int type, int x, int y, int z, int slop
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (!((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && !map_is_location_owned(x, y, z * 8))
|
||||
if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && !map_is_location_owned(x, y, z * 8))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (z < 2) {
|
||||
@@ -1120,7 +1120,7 @@ static void loc_6A6D7E(
|
||||
) {
|
||||
int x = initialX + TileDirectionDelta[direction].x;
|
||||
int y = initialY + TileDirectionDelta[direction].y;
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && map_is_edge(x, y)) {
|
||||
if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && map_is_edge(x, y)) {
|
||||
if (query) {
|
||||
neighbour_list_push(neighbourList, 7, direction, 255);
|
||||
}
|
||||
|
||||
+22
-22
@@ -592,7 +592,7 @@ void map_update_path_wide_flags()
|
||||
{
|
||||
int i, x, y;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))
|
||||
return;
|
||||
|
||||
// Presumebly update_path_wide_flags is too computationally expensive to call for every
|
||||
@@ -731,7 +731,7 @@ void game_command_remove_scenery(int* eax, int* ebx, int* ecx, int* edx, int* es
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !(flags & GAME_COMMAND_FLAG_GHOST) && !gCheatsSandboxMode) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !(flags & GAME_COMMAND_FLAG_GHOST) && !gCheatsSandboxMode) {
|
||||
// Check if allowed to remove item
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL) {
|
||||
if (entry->small_scenery.height > 64) {
|
||||
@@ -872,7 +872,7 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
|
||||
currentTile.y += firstTile.y;
|
||||
currentTile.z += firstTile.z;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode){
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode){
|
||||
if (!map_is_location_owned(currentTile.x, currentTile.y, currentTile.z)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
@@ -959,7 +959,7 @@ void game_command_remove_banner(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_owned(x, y, z - 16)){
|
||||
if(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_owned(x, y, z - 16)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
@@ -1017,7 +1017,7 @@ void game_command_set_scenery_colour(int* eax, int* ebx, int* ecx, int* edx, int
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, uint16) = y + 16;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Z, uint16) = z;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode){
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode){
|
||||
if (!map_is_location_owned(x, y, z)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
@@ -1069,7 +1069,7 @@ void game_command_set_fence_colour(int* eax, int* ebx, int* ecx, int* edx, int*
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, uint16) = y + 16;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Z, uint16) = z;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) &&
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) &&
|
||||
!map_is_location_in_park(x, y) &&
|
||||
!gCheatsSandboxMode) {
|
||||
|
||||
@@ -1166,7 +1166,7 @@ void game_command_set_large_scenery_colour(int* eax, int* ebx, int* ecx, int* ed
|
||||
currentTile.y += baseTile.y;
|
||||
currentTile.z += baseTile.z;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode){
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode){
|
||||
if (!map_is_location_owned(currentTile.x, currentTile.y, currentTile.z)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
@@ -1209,7 +1209,7 @@ void game_command_set_banner_colour(int* eax, int* ebx, int* ecx, int* edx, int*
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, uint16) = y + 16;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Z, uint16) = z;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode){
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode){
|
||||
if (!map_is_location_owned(x, y, z - 16)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
@@ -1385,7 +1385,7 @@ money32 map_clear_scenery(int x0, int y0, int x1, int y1, int clear, int flags)
|
||||
totalCost = 0;
|
||||
for (y = y0; y <= y1; y += 32) {
|
||||
for (x = x0; x <= x1; x += 32) {
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode || map_is_location_owned_or_has_rights(x, y)) {
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode || map_is_location_owned_or_has_rights(x, y)) {
|
||||
cost = map_clear_scenery_from_tile(x / 32, y / 32, clear, flags);
|
||||
if (cost != MONEY32_UNDEFINED) {
|
||||
noValidTiles = false;
|
||||
@@ -1460,7 +1460,7 @@ money32 map_change_surface_style(int x0, int y0, int x1, int y1, uint8 surfaceSt
|
||||
return (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : cost;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) {
|
||||
cost += RCT2_GLOBAL(0x009E32B4, uint32);
|
||||
return (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : cost;
|
||||
}
|
||||
@@ -1470,7 +1470,7 @@ money32 map_change_surface_style(int x0, int y0, int x1, int y1, uint8 surfaceSt
|
||||
if (x > 0x1FFF) continue;
|
||||
if (y > 0x1FFF) continue;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!map_is_location_in_park(x, y)) continue;
|
||||
}
|
||||
|
||||
@@ -1605,7 +1605,7 @@ static money32 map_set_land_height(int flags, int x, int y, int height, int styl
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) {
|
||||
gGameCommandErrorText = STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY;
|
||||
return MONEY32_UNDEFINED;
|
||||
@@ -1635,7 +1635,7 @@ static money32 map_set_land_height(int flags, int x, int y, int height, int styl
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!map_is_location_in_park(x, y)) {
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
@@ -2574,7 +2574,7 @@ void game_command_set_water_height(int* eax, int* ebx, int* ecx, int* edx, int*
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
if(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES){
|
||||
if(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES){
|
||||
gGameCommandErrorText = STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY;
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
@@ -2598,7 +2598,7 @@ void game_command_set_water_height(int* eax, int* ebx, int* ecx, int* edx, int*
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_in_park(x, y)){
|
||||
if(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_in_park(x, y)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
@@ -2662,7 +2662,7 @@ void game_command_remove_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
if(!(*ebx & 0x40) && !(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_owned(x, y, base_height * 8)){
|
||||
if(!(*ebx & 0x40) && !(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_owned(x, y, base_height * 8)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
@@ -2754,7 +2754,7 @@ void game_command_place_banner(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_owned(x, y, base_height * 16)){
|
||||
if(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_owned(x, y, base_height * 16)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
@@ -2944,7 +2944,7 @@ void game_command_place_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
||||
if(F64EC8 == 0){
|
||||
F64EC8 = base_height2;
|
||||
}
|
||||
if(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_owned(x, y, F64EC8)){
|
||||
if(!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && !map_is_location_owned(x, y, F64EC8)){
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
@@ -3295,7 +3295,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) &&
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) &&
|
||||
!(flags & (1 << 7)) && !gCheatsSandboxMode){
|
||||
|
||||
if (position.z == 0){
|
||||
@@ -3695,7 +3695,7 @@ void game_command_place_large_scenery(int* eax, int* ebx, int* ecx, int* edx, in
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) &&
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) &&
|
||||
!map_is_location_owned(curTile.x, curTile.y, zLow * 8) &&
|
||||
!gCheatsSandboxMode) {
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
@@ -4222,7 +4222,7 @@ void map_remove_intersecting_walls(int x, int y, int z0, int z1, int direction)
|
||||
void map_update_tiles()
|
||||
{
|
||||
int ignoreScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & ignoreScreenFlags)
|
||||
if (gScreenFlags & ignoreScreenFlags)
|
||||
return;
|
||||
|
||||
// Update 43 more tiles
|
||||
@@ -4904,7 +4904,7 @@ void map_clear_all_elements()
|
||||
}
|
||||
|
||||
money32 place_park_entrance(int flags, sint16 x, sint16 y, sint16 z, uint8 direction) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -535,7 +535,7 @@ static void park_generate_new_guests()
|
||||
*/
|
||||
void park_update()
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 0x0E)
|
||||
if (gScreenFlags & 0x0E)
|
||||
return;
|
||||
|
||||
// Every 5 seconds approximately
|
||||
@@ -817,7 +817,7 @@ void game_command_remove_park_entrance(int *eax, int *ebx, int *ecx, int *edx, i
|
||||
y = *ecx & 0xFFFF;
|
||||
z = *edx * 16;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
@@ -942,7 +942,7 @@ money32 map_buy_land_rights_for_tile(int x, int y, int setting, int flags) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || (surfaceElement->properties.surface.ownership & OWNERSHIP_AVAILABLE) == 0) {
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || (surfaceElement->properties.surface.ownership & OWNERSHIP_AVAILABLE) == 0) {
|
||||
gGameCommandErrorText = STR_LAND_NOT_FOR_SALE;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
@@ -970,7 +970,7 @@ money32 map_buy_land_rights_for_tile(int x, int y, int setting, int flags) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || (surfaceElement->properties.surface.ownership & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) == 0) {
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || (surfaceElement->properties.surface.ownership & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) == 0) {
|
||||
gGameCommandErrorText = STR_CONSTRUCTION_RIGHTS_NOT_FOR_SALE;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
@@ -1003,7 +1003,7 @@ money32 map_buy_land_rights_for_tile(int x, int y, int setting, int flags) {
|
||||
}
|
||||
return 0;
|
||||
default:
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
@@ -1077,7 +1077,7 @@ int map_buy_land_rights(int x0, int y0, int x1, int y1, int setting, int flags)
|
||||
// Game command modified to accept selection size
|
||||
totalCost = 0;
|
||||
gGameCommandErrorText = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) == 0 || gCheatsBuildInPauseMode) {
|
||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) == 0 || gCheatsBuildInPauseMode) {
|
||||
for (y = y0; y <= y1; y += 32) {
|
||||
for (x = x0; x <= x1; x += 32) {
|
||||
cost = map_buy_land_rights_for_tile(x, y, setting, flags);
|
||||
|
||||
Reference in new issue
Block a user