MCPcopy Create free account
hub / github.com/SpartanJ/eepp / IsTypeInTilePos

Method IsTypeInTilePos

src/modules/maps/src/eepp/maps/tilemap.cpp:1500–1515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1498void TileMap::onMapLoaded() {}
1499
1500GameObject* TileMap::IsTypeInTilePos( const Uint32& Type, const Vector2i& TilePos ) {
1501 for ( Uint32 i = 0; i < mLayerCount; i++ ) {
1502 if ( mLayers[i]->getType() == MAP_LAYER_TILED ) {
1503 TileMapLayer* tLayer = reinterpret_cast<TileMapLayer*>( mLayers[i] );
1504 GameObject* tObj = NULL;
1505
1506 if ( ( tObj = tLayer->getGameObject( TilePos ) ) ) {
1507 if ( tObj->isType( Type ) ) {
1508 return tObj;
1509 }
1510 }
1511 }
1512 }
1513
1514 return NULL;
1515}
1516
1517const Uint8& TileMap::getBackAlpha() const {
1518 return mBackAlpha;

Callers

nothing calls this directly

Calls 3

getGameObjectMethod · 0.80
getTypeMethod · 0.45
isTypeMethod · 0.45

Tested by

no test coverage detected