Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pierre Kim
OpenRCT2-mod
Commits
3b8bd8ce
Commit
3b8bd8ce
authored
9 years ago
by
wolfreak99
Browse files
Options
Download
Email Patches
Plain Diff
rename max_window_count to window_limit_max
parent
44202d0b
develop
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
src/config.c
+1
-1
src/config.c
src/interface/viewport.h
+1
-1
src/interface/viewport.h
src/interface/window.c
+3
-3
src/interface/window.c
src/interface/window.h
+3
-3
src/interface/window.h
src/windows/options.c
+2
-2
src/windows/options.c
with
10 additions
and
10 deletions
+10
-10
src/config.c
+
1
-
1
View file @
3b8bd8ce
...
...
@@ -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_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
,
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
},
};
...
...
This diff is collapsed.
Click to expand it.
src/interface/viewport.h
+
1
-
1
View file @
3b8bd8ce
...
...
@@ -85,7 +85,7 @@ typedef struct 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 gSavedViewY RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_Y, sint16)
...
...
This diff is collapsed.
Click to expand it.
src/interface/window.c
+
3
-
3
View file @
3b8bd8ce
...
...
@@ -35,7 +35,7 @@
#define RCT2_LAST_WINDOW (gWindowNextSlot - 1)
#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
*
gWindowNextSlot
;
...
...
@@ -353,7 +353,7 @@ void window_close_surplus(int cap, sint8 avoid_classification)
{
int
count
,
i
,
diff
;
//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
)
{
count
=
i
;
break
;
...
...
@@ -382,7 +382,7 @@ void window_close_surplus(int cap, sint8 avoid_classification)
void
window_set_window_limit
(
int
value
)
{
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
;
config_save_default
();
// Checks if value decreases and then closes surplus
...
...
This diff is collapsed.
Click to expand it.
src/interface/window.h
+
3
-
3
View file @
3b8bd8ce
...
...
@@ -515,11 +515,11 @@ extern modal_callback gLoadSaveCallback;
typedef
void
(
*
close_callback
)();
#define
MIN_
WINDOW_
COUNT
8
#define
MAX_
WINDOW_
COUNT
64
#define WINDOW_
LIMIT_MIN
8
#define WINDOW_
LIMIT_MAX
64
// 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
*
gWindowNextSlot
;
...
...
This diff is collapsed.
Click to expand it.
src/windows/options.c
+
2
-
2
View file @
3b8bd8ce
...
...
@@ -1133,14 +1133,14 @@ static void window_options_mousedown(int widgetIndex, rct_window*w, rct_widget*
break
;
case
WIDX_WINDOW_LIMIT_UP
:
i
=
gConfigGeneral
.
window_limit
;
if
(
i
<
MAX_
WINDOW_
COUNT
)
{
if
(
i
<
WINDOW_
LIMIT_MAX
)
{
window_set_window_limit
(
++
i
);
}
window_invalidate
(
w
);
break
;
case
WIDX_WINDOW_LIMIT_DOWN
:
i
=
gConfigGeneral
.
window_limit
;
if
(
i
>
MIN_
WINDOW_
COUNT
)
{
if
(
i
>
WINDOW_
LIMIT_MIN
)
{
window_set_window_limit
(
--
i
);
}
window_invalidate
(
w
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help