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
436809f7
Commit
436809f7
authored
8 years ago
by
Michał Janiszewski
Browse files
Options
Download
Email Patches
Plain Diff
Integrate rct_window::var_496
parent
91e04282
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/interface/window.h
+4
-0
src/interface/window.h
src/windows/guest.c
+3
-4
src/windows/guest.c
src/windows/ride.c
+3
-5
src/windows/ride.c
src/windows/staff.c
+2
-2
src/windows/staff.c
with
12 additions
and
11 deletions
+12
-11
src/interface/window.h
+
4
-
0
View file @
436809f7
...
...
@@ -282,6 +282,10 @@ typedef struct rct_window {
rct_research_item
*
research_item
;
rct_object_entry
*
object_entry
;
scenario_index_entry
*
highlighted_scenario
;
union
{
uint16
var_494
;
uint16
var_496
;
};
};
uint8
var_498
[
0x14
];
sint16
selected_tab
;
// 0x4AC
...
...
This diff is collapsed.
Click to expand it.
src/windows/guest.c
+
3
-
4
View file @
436809f7
...
...
@@ -842,7 +842,7 @@ static void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dp
int
eax
=
0
;
if
(
w
->
page
==
WINDOW_GUEST_OVERVIEW
){
eax
=
w
->
highlighted_item
>>
1
6
;
eax
=
w
->
var_49
6
;
eax
&=
0xFFFC
;
}
ebx
+=
eax
;
...
...
@@ -1114,11 +1114,10 @@ void window_guest_overview_invalidate(rct_window *w)
* rct2: 0x696F45
*/
void
window_guest_overview_update
(
rct_window
*
w
){
int
var_496
=
w
->
highlighted_item
>>
1
6
;
int
var_496
=
w
->
var_49
6
;
var_496
++
;
var_496
%=
24
;
w
->
highlighted_item
&=
0x0000FFFF
;
w
->
highlighted_item
|=
var_496
<<
16
;
w
->
var_496
=
var_496
;
widget_invalidate
(
w
,
WIDX_TAB_1
);
widget_invalidate
(
w
,
WIDX_TAB_2
);
...
...
This diff is collapsed.
Click to expand it.
src/windows/ride.c
+
3
-
5
View file @
436809f7
...
...
@@ -40,8 +40,6 @@
#include "dropdown.h"
#include "../rct1.h"
#define var_496(w) RCT2_GLOBAL((uintptr_t)w + 0x496, uint16)
enum
{
WINDOW_RIDE_PAGE_MAIN
,
WINDOW_RIDE_PAGE_VEHICLE
,
...
...
@@ -1568,7 +1566,7 @@ static rct_window *window_ride_open(int rideIndex)
numSubTypes
++
;
}
}
var_496
(
w
)
=
numSubTypes
;
w
->
var_496
=
numSubTypes
;
window_ride_update_overall_view
((
uint8
)
rideIndex
);
...
...
@@ -2901,7 +2899,7 @@ static void window_ride_vehicle_invalidate(rct_window *w)
// Vehicle type
window_ride_vehicle_widgets
[
WIDX_VEHICLE_TYPE
].
text
=
rideEntry
->
name
;
// Always show a dropdown button when changing subtypes is allowed
if
((
var_496
(
w
)
<=
1
||
(
rideEntry
->
flags
&
RIDE_ENTRY_FLAG_SEPARATE_RIDE
))
&&
!
(
gConfigInterface
.
select_by_track_type
||
gCheatsShowVehiclesFromOtherTrackTypes
))
{
if
((
w
->
var_496
<=
1
||
(
rideEntry
->
flags
&
RIDE_ENTRY_FLAG_SEPARATE_RIDE
))
&&
!
(
gConfigInterface
.
select_by_track_type
||
gCheatsShowVehiclesFromOtherTrackTypes
))
{
window_ride_vehicle_widgets
[
WIDX_VEHICLE_TYPE
].
type
=
WWT_14
;
window_ride_vehicle_widgets
[
WIDX_VEHICLE_TYPE_DROPDOWN
].
type
=
WWT_EMPTY
;
w
->
enabled_widgets
&=
~
(
1
<<
WIDX_VEHICLE_TYPE
);
...
...
@@ -2989,7 +2987,7 @@ static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi)
}
y
+=
15
;
if
((
!
(
rideEntry
->
flags
&
RIDE_ENTRY_FLAG_SEPARATE_RIDE
)
||
rideTypeShouldLoseSeparateFlag
(
rideEntry
))
&&
var_496
(
w
)
>
1
)
{
if
((
!
(
rideEntry
->
flags
&
RIDE_ENTRY_FLAG_SEPARATE_RIDE
)
||
rideTypeShouldLoseSeparateFlag
(
rideEntry
))
&&
w
->
var_496
>
1
)
{
// Excitement Factor
factor
=
rideEntry
->
excitement_multipler
;
if
(
factor
>
0
)
{
...
...
This diff is collapsed.
Click to expand it.
src/windows/staff.c
+
2
-
2
View file @
436809f7
...
...
@@ -593,12 +593,12 @@ void window_staff_overview_dropdown(rct_window *w, int widgetIndex, int dropdown
*/
void
window_staff_overview_update
(
rct_window
*
w
)
{
int
var_496
=
RCT2_GLOBAL
((
uintptr_t
)
w
+
0x496
,
uint16
)
;
int
var_496
=
w
->
var_496
;
var_496
++
;
if
(
var_496
>=
24
)
{
var_496
=
0
;
}
RCT2_GLOBAL
((
uintptr_t
)
w
+
0x496
,
uint16
)
=
var_496
;
w
->
var_496
=
var_496
;
widget_invalidate
(
w
,
WIDX_TAB_1
);
}
...
...
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