mirror of https://github.com/OpenRCT2/OpenRCT2.git
rename max_window_count to window_limit_max
This commit is contained in:
parent
44202d0bd1
commit
3b8bd8ce93
|
@ -226,7 +226,7 @@ config_property_definition _generalDefinitions[] = {
|
||||||
{ offsetof(general_configuration, last_save_landscape_directory), "last_landscape_directory", CONFIG_VALUE_TYPE_STRING, { .value_string = NULL }, NULL },
|
{ offsetof(general_configuration, last_save_landscape_directory), "last_landscape_directory", CONFIG_VALUE_TYPE_STRING, { .value_string = NULL }, NULL },
|
||||||
{ offsetof(general_configuration, last_save_scenario_directory), "last_scenario_directory", CONFIG_VALUE_TYPE_STRING, { .value_string = NULL }, NULL },
|
{ offsetof(general_configuration, last_save_scenario_directory), "last_scenario_directory", CONFIG_VALUE_TYPE_STRING, { .value_string = NULL }, NULL },
|
||||||
{ offsetof(general_configuration, last_save_track_directory), "last_track_directory", CONFIG_VALUE_TYPE_STRING, { .value_string = NULL }, NULL },
|
{ offsetof(general_configuration, last_save_track_directory), "last_track_directory", CONFIG_VALUE_TYPE_STRING, { .value_string = NULL }, NULL },
|
||||||
{ offsetof(general_configuration, window_limit), "window_limit", CONFIG_VALUE_TYPE_UINT8, MAX_WINDOW_COUNT, NULL },
|
{ offsetof(general_configuration, window_limit), "window_limit", CONFIG_VALUE_TYPE_UINT8, WINDOW_LIMIT_MAX, NULL },
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ typedef struct viewport_interaction_info {
|
||||||
};
|
};
|
||||||
} viewport_interaction_info;
|
} viewport_interaction_info;
|
||||||
|
|
||||||
#define MAX_VIEWPORT_COUNT MAX_WINDOW_COUNT
|
#define MAX_VIEWPORT_COUNT WINDOW_LIMIT_MAX
|
||||||
|
|
||||||
#define gSavedViewX RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_X, sint16)
|
#define gSavedViewX RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_X, sint16)
|
||||||
#define gSavedViewY RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_Y, sint16)
|
#define gSavedViewY RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_Y, sint16)
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#define RCT2_LAST_WINDOW (gWindowNextSlot - 1)
|
#define RCT2_LAST_WINDOW (gWindowNextSlot - 1)
|
||||||
#define RCT2_NEW_WINDOW (gWindowNextSlot)
|
#define RCT2_NEW_WINDOW (gWindowNextSlot)
|
||||||
|
|
||||||
rct_window g_window_list[MAX_WINDOW_COUNT];
|
rct_window g_window_list[WINDOW_LIMIT_MAX];
|
||||||
rct_window * gWindowFirst;
|
rct_window * gWindowFirst;
|
||||||
rct_window * gWindowNextSlot;
|
rct_window * gWindowNextSlot;
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ void window_close_surplus(int cap, sint8 avoid_classification)
|
||||||
{
|
{
|
||||||
int count, i, diff;
|
int count, i, diff;
|
||||||
//find the amount of windows that are currently open
|
//find the amount of windows that are currently open
|
||||||
for (i = 0; i < MAX_WINDOW_COUNT; i++) {
|
for (i = 0; i < WINDOW_LIMIT_MAX; i++) {
|
||||||
if (&g_window_list[i] == RCT2_NEW_WINDOW) {
|
if (&g_window_list[i] == RCT2_NEW_WINDOW) {
|
||||||
count = i;
|
count = i;
|
||||||
break;
|
break;
|
||||||
|
@ -382,7 +382,7 @@ void window_close_surplus(int cap, sint8 avoid_classification)
|
||||||
void window_set_window_limit(int value)
|
void window_set_window_limit(int value)
|
||||||
{
|
{
|
||||||
int prev = gConfigGeneral.window_limit;
|
int prev = gConfigGeneral.window_limit;
|
||||||
int val = clamp(value, MIN_WINDOW_COUNT, MAX_WINDOW_COUNT);
|
int val = clamp(value, WINDOW_LIMIT_MIN, WINDOW_LIMIT_MAX);
|
||||||
gConfigGeneral.window_limit = val;
|
gConfigGeneral.window_limit = val;
|
||||||
config_save_default();
|
config_save_default();
|
||||||
// Checks if value decreases and then closes surplus
|
// Checks if value decreases and then closes surplus
|
||||||
|
|
|
@ -515,11 +515,11 @@ extern modal_callback gLoadSaveCallback;
|
||||||
|
|
||||||
typedef void (*close_callback)();
|
typedef void (*close_callback)();
|
||||||
|
|
||||||
#define MIN_WINDOW_COUNT 8
|
#define WINDOW_LIMIT_MIN 8
|
||||||
#define MAX_WINDOW_COUNT 64
|
#define WINDOW_LIMIT_MAX 64
|
||||||
|
|
||||||
// rct2: 0x01420078
|
// rct2: 0x01420078
|
||||||
extern rct_window g_window_list[MAX_WINDOW_COUNT];
|
extern rct_window g_window_list[WINDOW_LIMIT_MAX];
|
||||||
|
|
||||||
extern rct_window * gWindowFirst;
|
extern rct_window * gWindowFirst;
|
||||||
extern rct_window * gWindowNextSlot;
|
extern rct_window * gWindowNextSlot;
|
||||||
|
|
|
@ -1133,14 +1133,14 @@ static void window_options_mousedown(int widgetIndex, rct_window*w, rct_widget*
|
||||||
break;
|
break;
|
||||||
case WIDX_WINDOW_LIMIT_UP:
|
case WIDX_WINDOW_LIMIT_UP:
|
||||||
i = gConfigGeneral.window_limit;
|
i = gConfigGeneral.window_limit;
|
||||||
if (i < MAX_WINDOW_COUNT) {
|
if (i < WINDOW_LIMIT_MAX) {
|
||||||
window_set_window_limit(++i);
|
window_set_window_limit(++i);
|
||||||
}
|
}
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
break;
|
break;
|
||||||
case WIDX_WINDOW_LIMIT_DOWN:
|
case WIDX_WINDOW_LIMIT_DOWN:
|
||||||
i = gConfigGeneral.window_limit;
|
i = gConfigGeneral.window_limit;
|
||||||
if (i > MIN_WINDOW_COUNT) {
|
if (i > WINDOW_LIMIT_MIN) {
|
||||||
window_set_window_limit(--i);
|
window_set_window_limit(--i);
|
||||||
}
|
}
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
|
|
Loading…
Reference in New Issue