mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-24 11:22:02 -05:00
Merge pull request #8774 from duncanspumpkin/ghost_refactor
Use IsGhost() to access ghost state
This commit is contained in:
commit
5b0367ea0e
30 changed files with 68 additions and 46 deletions
|
@ -2185,7 +2185,7 @@ static void window_tile_inspector_scrollpaint(rct_window* w, rct_drawpixelinfo*
|
|||
|
||||
const int32_t baseHeight = tileElement->base_height;
|
||||
const int32_t clearanceHeight = tileElement->clearance_height;
|
||||
const bool ghost = (tileElement->flags & TILE_ELEMENT_FLAG_GHOST) != 0;
|
||||
const bool ghost = tileElement->IsGhost();
|
||||
const bool broken = (tileElement->flags & TILE_ELEMENT_FLAG_BROKEN) != 0;
|
||||
const bool last = (tileElement->flags & TILE_ELEMENT_FLAG_LAST_TILE) != 0;
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ public:
|
|||
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
tileElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
tileElement->SetGhost(true);
|
||||
}
|
||||
|
||||
map_invalidate_tile_full(flooredX, flooredY);
|
||||
|
|
|
@ -170,7 +170,7 @@ public:
|
|||
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
newElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
newElement->SetGhost(true);
|
||||
}
|
||||
|
||||
entranceElement->SetDirection(_direction);
|
||||
|
|
|
@ -616,7 +616,7 @@ public:
|
|||
tileElement->AsTrack()->SetTrackType(_trackType);
|
||||
if (GetFlags() & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
tileElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
tileElement->SetGhost(true);
|
||||
}
|
||||
|
||||
switch (_trackType)
|
||||
|
|
|
@ -442,7 +442,7 @@ public:
|
|||
|
||||
invalidate_test_results(ride);
|
||||
footpath_queue_chain_reset();
|
||||
if (!gCheatsDisableClearanceChecks || !(tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if (!gCheatsDisableClearanceChecks || !(tileElement->IsGhost()))
|
||||
{
|
||||
footpath_remove_edges_at(mapLoc.x, mapLoc.y, tileElement);
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ static void virtual_floor_get_tile_properties(
|
|||
continue;
|
||||
}
|
||||
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
{
|
||||
*outLit = true;
|
||||
continue;
|
||||
|
|
|
@ -60,7 +60,7 @@ void banner_paint(paint_session* session, uint8_t direction, int32_t height, con
|
|||
uint32_t base_id = (direction << 1) + banner_scenery->image;
|
||||
uint32_t image_id = base_id;
|
||||
|
||||
if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST) // if being placed
|
||||
if (tile_element->IsGhost()) // if being placed
|
||||
{
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
image_id |= CONSTRUCTION_MARKER;
|
||||
|
@ -81,7 +81,7 @@ void banner_paint(paint_session* session, uint8_t direction, int32_t height, con
|
|||
direction = direction_reverse(direction);
|
||||
direction--;
|
||||
// If text not showing / ghost
|
||||
if (direction >= 2 || (tile_element->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if (direction >= 2 || (tile_element->IsGhost()))
|
||||
return;
|
||||
|
||||
uint16_t scrollingMode = banner_scenery->banner.scrolling_mode;
|
||||
|
|
|
@ -91,7 +91,7 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
|
|||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_RIDE;
|
||||
_unk9E32BC = 0;
|
||||
|
||||
if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tile_element->IsGhost())
|
||||
{
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
image_id = CONSTRUCTION_MARKER;
|
||||
|
@ -157,8 +157,8 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
|
|||
paint_util_push_tunnel_left(session, height, TUNNEL_6);
|
||||
}
|
||||
|
||||
if (!is_exit && !(tile_element->flags & TILE_ELEMENT_FLAG_GHOST) && tile_element->AsEntrance()->GetRideIndex() != 0xFF
|
||||
&& stationObj->ScrollingMode != 0xFF)
|
||||
if (!is_exit && !(tile_element->IsGhost()) && tile_element->AsEntrance()->GetRideIndex() != RIDE_ID_NULL
|
||||
&& stationObj->ScrollingMode != SCROLLING_MODE_NONE)
|
||||
{
|
||||
set_format_arg(0, uint32_t, 0);
|
||||
set_format_arg(4, uint32_t, 0);
|
||||
|
@ -225,7 +225,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
|
|||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_PARK;
|
||||
_unk9E32BC = 0;
|
||||
uint32_t image_id, ghost_id = 0;
|
||||
if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tile_element->IsGhost())
|
||||
{
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
ghost_id = CONSTRUCTION_MARKER;
|
||||
|
|
|
@ -248,7 +248,7 @@ void large_scenery_paint(paint_session* session, uint8_t direction, uint16_t hei
|
|||
image_id |= dword_F4387C;
|
||||
}
|
||||
}
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
{
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
sequenceNum = CONSTRUCTION_MARKER;
|
||||
|
|
|
@ -829,7 +829,7 @@ void path_paint(paint_session* session, uint16_t height, const TileElement* tile
|
|||
sceneryImageFlags = CONSTRUCTION_MARKER;
|
||||
}
|
||||
|
||||
if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tile_element->IsGhost())
|
||||
{
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
imageFlags = CONSTRUCTION_MARKER;
|
||||
|
|
|
@ -53,7 +53,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
|
|||
baseImageid = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46);
|
||||
}
|
||||
}
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
{
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
baseImageid = CONSTRUCTION_MARKER;
|
||||
|
|
|
@ -198,7 +198,7 @@ void fence_paint(paint_session* session, uint8_t direction, int32_t height, cons
|
|||
}
|
||||
}
|
||||
|
||||
if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tile_element->IsGhost())
|
||||
{
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
dword_141F710 = CONSTRUCTION_MARKER;
|
||||
|
|
|
@ -238,7 +238,7 @@ static uint8_t footpath_element_next_in_direction(TileCoordsXYZ loc, TileElement
|
|||
nextTileElement = map_get_first_element_at(loc.x, loc.y);
|
||||
do
|
||||
{
|
||||
if (nextTileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (nextTileElement->IsGhost())
|
||||
continue;
|
||||
if (nextTileElement->GetType() != TILE_ELEMENT_TYPE_PATH)
|
||||
continue;
|
||||
|
@ -292,7 +292,7 @@ static uint8_t footpath_element_dest_in_dir(
|
|||
}
|
||||
do
|
||||
{
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
|
||||
switch (tileElement->GetType())
|
||||
|
@ -643,7 +643,7 @@ static void peep_pathfind_heuristic_search(
|
|||
/* Look for all map elements that the peep could walk onto while
|
||||
* navigating to the goal, including the goal tile. */
|
||||
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
|
||||
ride_id_t rideIndex = RIDE_ID_NULL;
|
||||
|
|
|
@ -3191,7 +3191,7 @@ void rct_peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_res
|
|||
continue;
|
||||
if (top_z < tileElement->base_height)
|
||||
continue;
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
|
||||
if (tileElement->GetType() == TILE_ELEMENT_TYPE_PATH)
|
||||
|
|
|
@ -31,6 +31,11 @@ bool RCT12TileElementBase::IsLastForTile() const
|
|||
return (this->flags & TILE_ELEMENT_FLAG_LAST_TILE) != 0;
|
||||
}
|
||||
|
||||
bool RCT12TileElementBase::IsGhost() const
|
||||
{
|
||||
return (this->flags & TILE_ELEMENT_FLAG_GHOST) != 0;
|
||||
}
|
||||
|
||||
uint8_t RCT12SurfaceElement::GetSlope() const
|
||||
{
|
||||
return (slope & TILE_ELEMENT_SURFACE_SLOPE_MASK);
|
||||
|
|
|
@ -6521,7 +6521,7 @@ bool ride_has_any_track_elements(const Ride* ride)
|
|||
continue;
|
||||
if (it.element->AsTrack()->GetRideIndex() != ride->id)
|
||||
continue;
|
||||
if (it.element->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (it.element->IsGhost())
|
||||
continue;
|
||||
|
||||
return true;
|
||||
|
@ -6541,7 +6541,7 @@ void ride_all_has_any_track_elements(bool* rideIndexArray)
|
|||
{
|
||||
if (it.element->GetType() != TILE_ELEMENT_TYPE_TRACK)
|
||||
continue;
|
||||
if (it.element->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (it.element->IsGhost())
|
||||
continue;
|
||||
|
||||
rideIndexArray[it.element->AsTrack()->GetRideIndex()] = true;
|
||||
|
|
|
@ -1170,7 +1170,7 @@ static money32 track_remove(
|
|||
|
||||
invalidate_test_results(ride);
|
||||
footpath_queue_chain_reset();
|
||||
if (!gCheatsDisableClearanceChecks || !(tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if (!gCheatsDisableClearanceChecks || !(tileElement->IsGhost()))
|
||||
{
|
||||
footpath_remove_edges_at(x, y, tileElement);
|
||||
}
|
||||
|
|
|
@ -2137,7 +2137,7 @@ static money32 place_maze_design(uint8_t flags, Ride* ride, uint16_t mazeEntry,
|
|||
tileElement->AsTrack()->SetMazeEntry(mazeEntry);
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
tileElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
tileElement->SetGhost(true);
|
||||
}
|
||||
|
||||
map_invalidate_element(fx, fy, tileElement);
|
||||
|
|
|
@ -2199,7 +2199,7 @@ void track_paint(paint_session* session, uint8_t direction, int32_t height, cons
|
|||
session->TrackColours[SCHEME_MISC] = 0x21600000;
|
||||
session->TrackColours[SCHEME_3] = 0x21600000;
|
||||
}
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
{
|
||||
uint32_t ghost_id = CONSTRUCTION_MARKER;
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
|
|
@ -695,7 +695,7 @@ void scenario_fix_ghosts(rct_s6_data* s6)
|
|||
RCT12TileElement* originalElement = reinterpret_cast<RCT12TileElement*>(map_get_first_element_at(x, y));
|
||||
do
|
||||
{
|
||||
if (originalElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (originalElement->IsGhost())
|
||||
{
|
||||
BannerIndex bannerIndex = tile_element_get_banner_index(reinterpret_cast<TileElement*>(originalElement));
|
||||
if (bannerIndex != BANNER_INDEX_NULL)
|
||||
|
|
|
@ -254,7 +254,7 @@ static money32 BannerPlace(
|
|||
newTileElement->AsBanner()->SetIndex(*bannerIndex);
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
newTileElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
newTileElement->SetGhost(true);
|
||||
}
|
||||
map_invalidate_tile_full(x, y);
|
||||
map_animation_create(MAP_ANIMATION_TYPE_BANNER, x, y, newTileElement->base_height);
|
||||
|
|
|
@ -275,7 +275,7 @@ static money32 RideEntranceExitPlace(
|
|||
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
tileElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
tileElement->SetGhost(true);
|
||||
}
|
||||
|
||||
if (isExit)
|
||||
|
@ -370,7 +370,7 @@ static money32 RideEntranceExitRemove(int16_t x, int16_t y, ride_id_t rideIndex,
|
|||
if (tileElement->AsEntrance()->GetStationIndex() != stationNum)
|
||||
continue;
|
||||
|
||||
if (flags & GAME_COMMAND_FLAG_5 && !(tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if (flags & GAME_COMMAND_FLAG_5 && !(tileElement->IsGhost()))
|
||||
continue;
|
||||
|
||||
if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE)
|
||||
|
|
|
@ -291,7 +291,7 @@ static money32 footpath_element_insert(
|
|||
tileElement->AsPath()->SetAdditionStatus(255);
|
||||
pathElement->flags &= ~TILE_ELEMENT_FLAG_BROKEN;
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
pathElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
pathElement->SetGhost(true);
|
||||
|
||||
footpath_queue_chain_reset();
|
||||
|
||||
|
@ -686,7 +686,7 @@ static money32 footpath_place_from_track(
|
|||
tileElement->AsPath()->SetCorners(0);
|
||||
pathElement->flags &= ~TILE_ELEMENT_FLAG_BROKEN;
|
||||
if (flags & (1 << 6))
|
||||
pathElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
pathElement->SetGhost(true);
|
||||
|
||||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ bool fence_in_the_way(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t dire
|
|||
{
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
if (z0 >= tileElement->clearance_height)
|
||||
continue;
|
||||
|
|
|
@ -283,7 +283,7 @@ TileElement* map_get_path_element_at(int32_t x, int32_t y, int32_t z)
|
|||
// Find the path element at known z
|
||||
do
|
||||
{
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST)
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_PATH)
|
||||
continue;
|
||||
|
@ -413,7 +413,7 @@ void map_strip_ghost_flag_from_elements()
|
|||
{
|
||||
for (auto& element : gTileElements)
|
||||
{
|
||||
element.flags &= ~TILE_ELEMENT_FLAG_GHOST;
|
||||
element.SetGhost(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -821,7 +821,7 @@ void game_command_set_large_scenery_colour(
|
|||
return;
|
||||
}
|
||||
|
||||
if ((flags & GAME_COMMAND_FLAG_GHOST) && !(tile_element->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if ((flags & GAME_COMMAND_FLAG_GHOST) && !(tile_element->IsGhost()))
|
||||
{
|
||||
*ebx = 0;
|
||||
return;
|
||||
|
@ -2472,7 +2472,7 @@ void game_command_place_large_scenery(
|
|||
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
new_tile_element->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
new_tile_element->SetGhost(true);
|
||||
}
|
||||
|
||||
if (tile_num == 0)
|
||||
|
@ -2884,8 +2884,7 @@ bool map_can_construct_with_clear_at(
|
|||
{
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_SURFACE)
|
||||
{
|
||||
if (zLow < tileElement->clearance_height && zHigh > tileElement->base_height
|
||||
&& !(tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if (zLow < tileElement->clearance_height && zHigh > tileElement->base_height && !(tileElement->IsGhost()))
|
||||
{
|
||||
if (tileElement->flags & (bl.GetBaseQuarterOccupied()))
|
||||
{
|
||||
|
@ -3372,7 +3371,7 @@ EntranceElement* map_get_park_entrance_element_at(int32_t x, int32_t y, int32_t
|
|||
if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_PARK_ENTRANCE)
|
||||
continue;
|
||||
|
||||
if ((ghost == false) && (tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if ((ghost == false) && (tileElement->IsGhost()))
|
||||
continue;
|
||||
|
||||
return tileElement->AsEntrance();
|
||||
|
@ -3397,7 +3396,7 @@ EntranceElement* map_get_ride_entrance_element_at(int32_t x, int32_t y, int32_t
|
|||
if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_ENTRANCE)
|
||||
continue;
|
||||
|
||||
if ((ghost == false) && (tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if ((ghost == false) && (tileElement->IsGhost()))
|
||||
continue;
|
||||
|
||||
return tileElement->AsEntrance();
|
||||
|
@ -3422,7 +3421,7 @@ EntranceElement* map_get_ride_exit_element_at(int32_t x, int32_t y, int32_t z, b
|
|||
if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_EXIT)
|
||||
continue;
|
||||
|
||||
if ((ghost == false) && (tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if ((ghost == false) && (tileElement->IsGhost()))
|
||||
continue;
|
||||
|
||||
return tileElement->AsEntrance();
|
||||
|
|
|
@ -183,7 +183,7 @@ void update_park_fences(const CoordsXY coords)
|
|||
if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_PARK_ENTRANCE)
|
||||
continue;
|
||||
|
||||
if (!(tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if (!(tileElement->IsGhost()))
|
||||
{
|
||||
fenceRequired = false;
|
||||
break;
|
||||
|
|
|
@ -49,7 +49,7 @@ static money32 SmallScenerySetColour(
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ((flags & GAME_COMMAND_FLAG_GHOST) && !(tileElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if ((flags & GAME_COMMAND_FLAG_GHOST) && !(tileElement->IsGhost()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ static money32 SmallSceneryPlace(
|
|||
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
newElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
newElement->SetGhost(true);
|
||||
}
|
||||
|
||||
map_invalidate_tile_full(x, y);
|
||||
|
|
|
@ -54,6 +54,18 @@ bool TileElementBase::IsGhost() const
|
|||
return (this->flags & TILE_ELEMENT_FLAG_GHOST) != 0;
|
||||
}
|
||||
|
||||
void TileElementBase::SetGhost(bool isGhost)
|
||||
{
|
||||
if (isGhost == true)
|
||||
{
|
||||
this->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->flags &= ~TILE_ELEMENT_FLAG_GHOST;
|
||||
}
|
||||
}
|
||||
|
||||
bool tile_element_is_underground(TileElement* tileElement)
|
||||
{
|
||||
do
|
||||
|
|
|
@ -71,6 +71,7 @@ struct TileElementBase
|
|||
uint8_t GetDirectionWithOffset(uint8_t offset) const;
|
||||
bool IsLastForTile() const;
|
||||
bool IsGhost() const;
|
||||
void SetGhost(bool isGhost);
|
||||
void Remove();
|
||||
};
|
||||
|
||||
|
|
|
@ -538,7 +538,7 @@ static money32 WallPlace(
|
|||
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
{
|
||||
tileElement->flags |= TILE_ELEMENT_FLAG_GHOST;
|
||||
tileElement->SetGhost(true);
|
||||
}
|
||||
|
||||
gSceneryTileElement = tileElement;
|
||||
|
@ -577,7 +577,7 @@ static money32 WallSetColour(
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ((flags & GAME_COMMAND_FLAG_GHOST) && !(wallElement->flags & TILE_ELEMENT_FLAG_GHOST))
|
||||
if ((flags & GAME_COMMAND_FLAG_GHOST) && !(wallElement->IsGhost()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -165,6 +165,11 @@ uint8_t TileElementBase::GetType() const
|
|||
return this->type & TILE_ELEMENT_TYPE_MASK;
|
||||
}
|
||||
|
||||
bool TileElementBase::IsGhost() const
|
||||
{
|
||||
return (this->flags & TILE_ELEMENT_FLAG_GHOST) != 0;
|
||||
}
|
||||
|
||||
TileElement* map_get_first_element_at(int x, int y)
|
||||
{
|
||||
if (x < 0 || y < 0 || x > 255 || y > 255)
|
||||
|
|
Loading…
Add table
Reference in a new issue