mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Fix cast to bool in map element functions
This commit is contained in:
committed by
GitHub
parent
ee443818a8
commit
2f3a30f22b
@@ -55,7 +55,7 @@ extern "C" {
|
|||||||
// This define specifies which version of network stream current build uses.
|
// This define specifies which version of network stream current build uses.
|
||||||
// It is used for making sure only compatible builds get connected, even within
|
// It is used for making sure only compatible builds get connected, even within
|
||||||
// single OpenRCT2 version.
|
// single OpenRCT2 version.
|
||||||
#define NETWORK_STREAM_VERSION "15"
|
#define NETWORK_STREAM_VERSION "16"
|
||||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -2886,7 +2886,7 @@ void map_element_set_track_sequence(rct_map_element * mapElement, sint32 trackSe
|
|||||||
|
|
||||||
bool map_element_get_green_light(const rct_map_element * mapElement)
|
bool map_element_get_green_light(const rct_map_element * mapElement)
|
||||||
{
|
{
|
||||||
return (bool)mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT;
|
return (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void map_element_set_green_light(rct_map_element * mapElement, bool greenLight)
|
void map_element_set_green_light(rct_map_element * mapElement, bool greenLight)
|
||||||
@@ -2910,7 +2910,7 @@ void map_element_set_brake_booster_speed(rct_map_element *mapElement, sint32 spe
|
|||||||
|
|
||||||
bool map_element_is_taking_photo(const rct_map_element * mapElement)
|
bool map_element_is_taking_photo(const rct_map_element * mapElement)
|
||||||
{
|
{
|
||||||
return (bool)mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK;
|
return (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void map_element_set_onride_photo_timeout(rct_map_element * mapElement)
|
void map_element_set_onride_photo_timeout(rct_map_element * mapElement)
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ void map_element_set_track_sequence(rct_map_element * mapElement, int trackSeque
|
|||||||
|
|
||||||
bool map_element_get_green_light(const rct_map_element * mapElement)
|
bool map_element_get_green_light(const rct_map_element * mapElement)
|
||||||
{
|
{
|
||||||
return (bool)mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT;
|
return (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void map_element_set_green_light(rct_map_element * mapElement, bool greenLight)
|
void map_element_set_green_light(rct_map_element * mapElement, bool greenLight)
|
||||||
@@ -188,7 +188,7 @@ void map_element_set_brake_booster_speed(rct_map_element *mapElement, int speed)
|
|||||||
|
|
||||||
bool map_element_is_taking_photo(const rct_map_element * mapElement)
|
bool map_element_is_taking_photo(const rct_map_element * mapElement)
|
||||||
{
|
{
|
||||||
return (bool)mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK;
|
return (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void map_element_set_onride_photo_timeout(rct_map_element * mapElement)
|
void map_element_set_onride_photo_timeout(rct_map_element * mapElement)
|
||||||
|
|||||||
Reference in New Issue
Block a user