mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Adhere to coding style
This commit is contained in:
parent
c5fd9e67eb
commit
353c8bcf8d
4 changed files with 23 additions and 23 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "Surface.h"
|
||||
|
||||
sint32 surface_get_terrain(const rct_tile_element *element)
|
||||
sint32 surface_get_terrain(const rct_tile_element * element)
|
||||
{
|
||||
sint32 terrain = (element->properties.surface.terrain >> 5) & 7;
|
||||
if (element->type & 1)
|
||||
|
@ -24,7 +24,7 @@ sint32 surface_get_terrain(const rct_tile_element *element)
|
|||
return terrain;
|
||||
}
|
||||
|
||||
sint32 surface_get_terrain_edge(const rct_tile_element *element)
|
||||
sint32 surface_get_terrain_edge(const rct_tile_element * element)
|
||||
{
|
||||
sint32 terrain_edge = (element->properties.surface.slope >> 5) & 7;
|
||||
if (element->type & 128)
|
||||
|
@ -32,7 +32,7 @@ sint32 surface_get_terrain_edge(const rct_tile_element *element)
|
|||
return terrain_edge;
|
||||
}
|
||||
|
||||
void surface_set_terrain(rct_tile_element *element, sint32 terrain)
|
||||
void surface_set_terrain(rct_tile_element * element, sint32 terrain)
|
||||
{
|
||||
// Bit 3 for terrain is stored in element.type bit 0
|
||||
if (terrain & 8)
|
||||
|
@ -45,7 +45,7 @@ void surface_set_terrain(rct_tile_element *element, sint32 terrain)
|
|||
element->properties.surface.terrain |= (terrain & 7) << 5;
|
||||
}
|
||||
|
||||
void surface_set_terrain_edge(rct_tile_element *element, sint32 terrain)
|
||||
void surface_set_terrain_edge(rct_tile_element * element, sint32 terrain)
|
||||
{
|
||||
// Bit 3 for terrain is stored in element.type bit 7
|
||||
if (terrain & 8)
|
||||
|
|
|
@ -112,10 +112,10 @@ enum {
|
|||
#define TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK 0x1F // in rct_tile_element.properties.surface.terrain
|
||||
#define TILE_ELEMENT_SURFACE_TERRAIN_MASK 0xE0 // in rct_tile_element.properties.surface.terrain
|
||||
|
||||
sint32 surface_get_terrain(const rct_tile_element *element);
|
||||
sint32 surface_get_terrain_edge(const rct_tile_element *element);
|
||||
void surface_set_terrain(rct_tile_element *element, sint32 terrain);
|
||||
void surface_set_terrain_edge(rct_tile_element *element, sint32 terrain);
|
||||
sint32 surface_get_terrain(const rct_tile_element * element);
|
||||
sint32 surface_get_terrain_edge(const rct_tile_element * element);
|
||||
void surface_set_terrain(rct_tile_element * element, sint32 terrain);
|
||||
void surface_set_terrain_edge(rct_tile_element * element, sint32 terrain);
|
||||
|
||||
// ~Oli414: Needs to renamed. This function is specific to the surface object.
|
||||
sint32 surface_get_water_height(const rct_tile_element * tileElement);
|
||||
|
|
|
@ -23,32 +23,32 @@
|
|||
#include "TileElement.h"
|
||||
#include "Scenery.h"
|
||||
|
||||
uint8 tile_element_get_scenery_quadrant(const rct_tile_element *element)
|
||||
uint8 tile_element_get_scenery_quadrant(const rct_tile_element * element)
|
||||
{
|
||||
return (element->type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
|
||||
}
|
||||
|
||||
sint32 tile_element_get_type(const rct_tile_element *element)
|
||||
sint32 tile_element_get_type(const rct_tile_element * element)
|
||||
{
|
||||
return element->type & TILE_ELEMENT_TYPE_MASK;
|
||||
}
|
||||
|
||||
sint32 tile_element_get_direction(const rct_tile_element *element)
|
||||
sint32 tile_element_get_direction(const rct_tile_element * element)
|
||||
{
|
||||
return element->type & TILE_ELEMENT_DIRECTION_MASK;
|
||||
}
|
||||
|
||||
sint32 tile_element_get_direction_with_offset(const rct_tile_element *element, uint8 offset)
|
||||
sint32 tile_element_get_direction_with_offset(const rct_tile_element * element, uint8 offset)
|
||||
{
|
||||
return ((element->type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK;
|
||||
}
|
||||
|
||||
bool tile_element_is_ghost(const rct_tile_element *element)
|
||||
bool tile_element_is_ghost(const rct_tile_element * element)
|
||||
{
|
||||
return element->flags & TILE_ELEMENT_FLAG_GHOST;
|
||||
}
|
||||
|
||||
bool tile_element_is_underground(rct_tile_element *tileElement)
|
||||
bool tile_element_is_underground(rct_tile_element * tileElement)
|
||||
{
|
||||
do {
|
||||
tileElement++;
|
||||
|
@ -58,7 +58,7 @@ bool tile_element_is_underground(rct_tile_element *tileElement)
|
|||
return true;
|
||||
}
|
||||
|
||||
sint32 tile_element_get_banner_index(rct_tile_element *tileElement)
|
||||
sint32 tile_element_get_banner_index(rct_tile_element * tileElement)
|
||||
{
|
||||
rct_scenery_entry* sceneryEntry;
|
||||
|
||||
|
@ -101,7 +101,7 @@ void tile_element_set_banner_index(rct_tile_element * tileElement, sint32 banner
|
|||
}
|
||||
}
|
||||
|
||||
void tile_element_remove_banner_entry(rct_tile_element *tileElement)
|
||||
void tile_element_remove_banner_entry(rct_tile_element * tileElement)
|
||||
{
|
||||
sint32 bannerIndex = tile_element_get_banner_index(tileElement);
|
||||
if (bannerIndex == BANNER_INDEX_NULL)
|
||||
|
|
|
@ -208,13 +208,13 @@ enum
|
|||
#define MAP_ELEM_TRACK_SEQUENCE_SEQUENCE_MASK 0x0F
|
||||
#define MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK 0xF0
|
||||
|
||||
uint8 tile_element_get_scenery_quadrant(const rct_tile_element *element);
|
||||
sint32 tile_element_get_type(const rct_tile_element *element);
|
||||
sint32 tile_element_get_direction(const rct_tile_element *element);
|
||||
sint32 tile_element_get_direction_with_offset(const rct_tile_element *element, uint8 offset);
|
||||
sint32 tile_element_get_banner_index(rct_tile_element *tileElement);
|
||||
bool tile_element_is_ghost(const rct_tile_element *element);
|
||||
bool tile_element_is_underground(rct_tile_element *tileElement);
|
||||
uint8 tile_element_get_scenery_quadrant(const rct_tile_element * element);
|
||||
sint32 tile_element_get_type(const rct_tile_element * element);
|
||||
sint32 tile_element_get_direction(const rct_tile_element * element);
|
||||
sint32 tile_element_get_direction_with_offset(const rct_tile_element * element, uint8 offset);
|
||||
sint32 tile_element_get_banner_index(rct_tile_element * tileElement);
|
||||
bool tile_element_is_ghost(const rct_tile_element * element);
|
||||
bool tile_element_is_underground(rct_tile_element * tileElement);
|
||||
|
||||
// ~Oli414: The banner functions should be part of banner.
|
||||
void tile_element_set_banner_index(rct_tile_element * tileElement, sint32 bannerIndex);
|
||||
|
|
Loading…
Reference in a new issue