mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 05:53:02 +01:00
add variable for gS6Info
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "../addresses.h"
|
||||
#include "../config.h"
|
||||
#include "../game.h"
|
||||
#include "../editor.h"
|
||||
#include "../interface/chat.h"
|
||||
#include "../input.h"
|
||||
#include "../localisation/localisation.h"
|
||||
@@ -131,7 +132,7 @@ static void shortcut_close_all_floating_windows()
|
||||
{
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR))
|
||||
window_close_all();
|
||||
else if (RCT2_GLOBAL(0x0141F570, uint8) == 1)
|
||||
else if (gS6Info->editor_step == EDITOR_STEP_LANDSCAPE_EDITOR)
|
||||
window_close_top();
|
||||
}
|
||||
|
||||
@@ -163,7 +164,7 @@ static void shortcut_zoom_view_out()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gS6Info->editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
@@ -178,7 +179,7 @@ static void shortcut_zoom_view_in()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gS6Info->editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
@@ -318,7 +319,7 @@ static void shortcut_adjust_land()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gS6Info->editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
@@ -333,7 +334,7 @@ static void shortcut_adjust_water()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gS6Info->editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
@@ -348,7 +349,7 @@ static void shortcut_build_scenery()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gS6Info->editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
@@ -363,7 +364,7 @@ static void shortcut_build_paths()
|
||||
{
|
||||
rct_window *window;
|
||||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1) {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gS6Info->editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
@@ -466,7 +467,7 @@ static void shortcut_show_recent_messages()
|
||||
|
||||
static void shortcut_show_map()
|
||||
{
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || RCT2_GLOBAL(0x0141F570, uint8) == 1)
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gS6Info->editor_step == EDITOR_STEP_LANDSCAPE_EDITOR)
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
window_map_open();
|
||||
}
|
||||
@@ -517,8 +518,7 @@ static void shortcut_quick_save_game()
|
||||
save_game();
|
||||
}
|
||||
else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x0141F570;
|
||||
window_loadsave_open(LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE, s6Info->name);
|
||||
window_loadsave_open(LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE, gS6Info->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ static rct_peep *viewport_interaction_get_closest_peep(int x, int y, int maxDist
|
||||
*/
|
||||
int viewport_interaction_get_item_left(int x, int y, viewport_interaction_info *info)
|
||||
{
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x00141F570;
|
||||
rct_map_element *mapElement;
|
||||
rct_sprite *sprite;
|
||||
rct_vehicle *vehicle;
|
||||
@@ -54,7 +53,7 @@ int viewport_interaction_get_item_left(int x, int y, viewport_interaction_info *
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
//
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && s6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && gS6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
rct_xy16 mapCoord = { 0 };
|
||||
@@ -164,7 +163,6 @@ int viewport_interaction_left_click(int x, int y)
|
||||
*/
|
||||
int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info *info)
|
||||
{
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x00141F570;
|
||||
rct_map_element *mapElement;
|
||||
rct_sprite *sprite;
|
||||
rct_scenery_entry *sceneryEntry;
|
||||
@@ -177,7 +175,7 @@ int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
//
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && s6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && gS6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
rct_xy16 mapCoord = { 0 };
|
||||
|
||||
@@ -16,18 +16,19 @@
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../audio/audio.h"
|
||||
#include "../game.h"
|
||||
#include "../cursors.h"
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../editor.h"
|
||||
#include "../game.h"
|
||||
#include "../input.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/string_ids.h"
|
||||
#include "../platform/platform.h"
|
||||
#include "../world/map.h"
|
||||
#include "../world/sprite.h"
|
||||
#include "viewport.h"
|
||||
#include "widget.h"
|
||||
#include "window.h"
|
||||
#include "viewport.h"
|
||||
#include "../localisation/string_ids.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../cursors.h"
|
||||
|
||||
#define RCT2_FIRST_WINDOW (g_window_list)
|
||||
#define RCT2_LAST_WINDOW (gWindowNextSlot - 1)
|
||||
@@ -757,7 +758,7 @@ void window_close_top()
|
||||
window_close_by_class(WC_DROPDOWN);
|
||||
|
||||
if (gScreenFlags & 2)
|
||||
if (RCT2_GLOBAL(0x0141F570, uint8) != 1)
|
||||
if (gS6Info->editor_step != EDITOR_STEP_LANDSCAPE_EDITOR)
|
||||
return;
|
||||
|
||||
for (w = RCT2_NEW_WINDOW - 1; w >= g_window_list; w--) {
|
||||
|
||||
Reference in New Issue
Block a user