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
585fc1af
Unverified
Commit
585fc1af
authored
7 years ago
by
Michał Janiszewski
Committed by
GitHub
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Ensure variables in switch are properly scoped
parent
86ec2101
develop
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/openrct2/input.c
+4
-2
src/openrct2/input.c
src/openrct2/paint/tile_element/entrance.c
+25
-20
src/openrct2/paint/tile_element/entrance.c
with
29 additions
and
22 deletions
+29
-22
src/openrct2/input.c
+
4
-
2
View file @
585fc1af
...
...
@@ -1265,8 +1265,10 @@ void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetinde
if
(
!
widget
)
break
;
sint32
mid_point_x
=
(
widget
->
left
+
widget
->
right
)
/
2
+
w
->
x
;
audio_play_sound
(
SOUND_CLICK_2
,
0
,
mid_point_x
);
{
sint32
mid_point_x
=
(
widget
->
left
+
widget
->
right
)
/
2
+
w
->
x
;
audio_play_sound
(
SOUND_CLICK_2
,
0
,
mid_point_x
);
}
if
(
cursor_w_class
!=
w
->
classification
||
cursor_w_number
!=
w
->
number
||
widgetIndex
!=
cursor_widgetIndex
)
break
;
...
...
This diff is collapsed.
Click to expand it.
src/openrct2/paint/tile_element/entrance.c
+
25
-
20
View file @
585fc1af
...
...
@@ -232,32 +232,37 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32
if
(
ghost_id
!=
0
)
break
;
rct_string_id
park_text_id
=
STR_BANNER_TEXT_CLOSED
;
set_format_arg
(
0
,
uint32
,
0
);
set_format_arg
(
4
,
uint32
,
0
);
{
rct_string_id
park_text_id
=
STR_BANNER_TEXT_CLOSED
;
set_format_arg
(
0
,
uint32
,
0
);
set_format_arg
(
4
,
uint32
,
0
);
if
(
gParkFlags
&
PARK_FLAGS_PARK_OPEN
){
set_format_arg
(
0
,
rct_string_id
,
gParkName
);
set_format_arg
(
2
,
uint32
,
gParkNameArgs
);
if
(
gParkFlags
&
PARK_FLAGS_PARK_OPEN
){
set_format_arg
(
0
,
rct_string_id
,
gParkName
);
set_format_arg
(
2
,
uint32
,
gParkNameArgs
);
park_text_id
=
STR_BANNER_TEXT_FORMAT
;
}
park_text_id
=
STR_BANNER_TEXT_FORMAT
;
}
utf8
park_name
[
256
];
if
(
gConfigGeneral
.
upper_case_banners
)
{
format_string_to_upper
(
park_name
,
sizeof
(
park_name
),
park_text_id
,
gCommonFormatArgs
);
}
else
{
format_string
(
park_name
,
sizeof
(
park_name
),
park_text_id
,
gCommonFormatArgs
);
}
utf8
park_name
[
256
];
if
(
gConfigGeneral
.
upper_case_banners
)
{
format_string_to_upper
(
park_name
,
sizeof
(
park_name
),
park_text_id
,
gCommonFormatArgs
);
}
else
{
format_string
(
park_name
,
sizeof
(
park_name
),
park_text_id
,
gCommonFormatArgs
);
}
gCurrentFontSpriteBase
=
FONT_SPRITE_BASE_TINY
;
uint16
string_width
=
gfx_get_string_width
(
park_name
);
uint16
scroll
=
(
gCurrentTicks
/
2
)
%
string_width
;
gCurrentFontSpriteBase
=
FONT_SPRITE_BASE_TINY
;
if
(
entrance
->
scrolling_mode
==
0xFF
)
break
;
uint16
string_width
=
gfx_get_string_width
(
park_name
);
uint16
scroll
=
(
gCurrentTicks
/
2
)
%
string_width
;
if
(
entrance
->
scrolling_mode
==
0xFF
)
break
;
sub_98199C
(
session
,
scrolling_text_setup
(
session
,
park_text_id
,
scroll
,
entrance
->
scrolling_mode
+
direction
/
2
),
0
,
0
,
0x1C
,
0x1C
,
0x2F
,
height
+
entrance
->
text_height
,
2
,
2
,
height
+
entrance
->
text_height
,
get_current_rotation
());
sint32
stsetup
=
scrolling_text_setup
(
session
,
park_text_id
,
scroll
,
entrance
->
scrolling_mode
+
direction
/
2
);
uint8
text_height
=
height
+
entrance
->
text_height
;
sub_98199C
(
session
,
stsetup
,
0
,
0
,
0x1C
,
0x1C
,
0x2F
,
text_height
,
2
,
2
,
text_height
,
get_current_rotation
());
}
break
;
case
1
:
case
2
:
...
...
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