From ac883d6b644a87448c79921e2b1bd1d425c156c1 Mon Sep 17 00:00:00 2001 From: Tamir Atias <engine.games@gmail.com> Date: Sun, 5 Feb 2012 18:14:11 +0200 Subject: [PATCH] [Remove] Map transitions are they were not in use. [Fix] Invisible collision in bottom left. --- Data/Media/Maps/map | 6 +----- src/Unuk/Player.cpp | 4 ---- src/libUnuk/LevelGen/LevelGen.cpp | 30 ------------------------------ src/libUnuk/LevelGen/LevelGen.h | 4 ---- src/libUnuk/LevelGen/MapTile.h | 13 ------------- 5 files changed, 1 insertion(+), 56 deletions(-) diff --git a/Data/Media/Maps/map b/Data/Media/Maps/map index c170515..1bd5088 100644 --- a/Data/Media/Maps/map +++ b/Data/Media/Maps/map @@ -8,10 +8,6 @@ <solidEntity>false</solidEntity> <zLevel>100</zLevel> - - <mapTransition>map</mapTransition> - <mapTransX>0</mapTransX> - <mapTransY>0</mapTransY> </tile> <tile> @@ -2039,7 +2035,7 @@ <line> <tile> <tileTexture>grass</tileTexture> - <solidTile>true</solidTile> + <solidTile>false</solidTile> <entityTexture>null</entityTexture> <solidEntity>false</solidEntity> diff --git a/src/Unuk/Player.cpp b/src/Unuk/Player.cpp index f121916..c4baee7 100644 --- a/src/Unuk/Player.cpp +++ b/src/Unuk/Player.cpp @@ -113,10 +113,6 @@ void Player::SetCamera(void) { void Player::Move() { Character::Move(); - if(map->GetMapTransitionName(tileX, tileY) != "null") { - SetXY((float)map->GetMapTransitionX(tileX, tileY), (float)map->GetMapTransitionY(tileX, tileY)); - map->Load(map->GetMapTransitionName(tileX, tileY)); - } } void Player::SetLevel(int level) { diff --git a/src/libUnuk/LevelGen/LevelGen.cpp b/src/libUnuk/LevelGen/LevelGen.cpp index 719d27f..b9fb795 100644 --- a/src/libUnuk/LevelGen/LevelGen.cpp +++ b/src/libUnuk/LevelGen/LevelGen.cpp @@ -98,24 +98,6 @@ void LevelGen::Load(const string filename) { _tile[x][y].SetZLevel(atoi(dataElem->GetText())); // </zlevel> - // <mapTransition> - dataElem = dataElem->NextSiblingElement("mapTransition"); - assert(dataElem != NULL); - _tile[x][y].SetMapTransitionName(dataElem->GetText()); - // </mapTransition> - - // <mapTransX> - dataElem = dataElem->NextSiblingElement("mapTransX"); - assert(dataElem != NULL); - // int mapTransX = atoi(dataElem->GetText()); // not referenced - // </mapTransX> - - // <mapTransY> - dataElem = dataElem->NextSiblingElement("mapTransY"); - assert(dataElem != NULL); - // int mapTransY = atoi(dataElem->GetText()); // not referenced - // </mapTransY> - tileElem = tileElem->NextSiblingElement("tile"); } //</tile> @@ -391,15 +373,3 @@ int LevelGen::GetEntityHeight(int xArg, int yArg) { int LevelGen::GetTileZLevel(int xArg, int yArg) { return _tile[xArg + 1][yArg + 1].GetZLevel(); } - -string LevelGen::GetMapTransitionName(int xArg, int yArg) { - return _tile[xArg + 1][yArg + 1].GetMapTransitionName(); -} - -int LevelGen::GetMapTransitionX(int xArg, int yArg) { - return _tile[xArg + 1][yArg + 1].GetMapTransitionX(); -} - -int LevelGen::GetMapTransitionY(int xArg, int yArg) { - return _tile[xArg + 1][yArg + 1].GetMapTransitionY(); -} diff --git a/src/libUnuk/LevelGen/LevelGen.h b/src/libUnuk/LevelGen/LevelGen.h index f299eb0..a1e0f45 100644 --- a/src/libUnuk/LevelGen/LevelGen.h +++ b/src/libUnuk/LevelGen/LevelGen.h @@ -41,10 +41,6 @@ public: int GetTileZLevel(int xArg, int yArg); - string GetMapTransitionName(int xArg, int yArg); - int GetMapTransitionX(int xArg, int yArg); - int GetMapTransitionY(int xArg, int yArg); - string GetCurrentMap(void); WorldManager& GetWorld(void) { return _world; } diff --git a/src/libUnuk/LevelGen/MapTile.h b/src/libUnuk/LevelGen/MapTile.h index dfde0d9..70bf6a6 100644 --- a/src/libUnuk/LevelGen/MapTile.h +++ b/src/libUnuk/LevelGen/MapTile.h @@ -43,14 +43,6 @@ public: void SetZLevel(int arg) { _zLevel = arg; } int GetZLevel(void) { return _zLevel; } - // Map Transition Mutators. - void SetMapTransitionName(string arg) { _mapTransitionName = arg; } - string GetMapTransitionName(void) { return _mapTransitionName; } - - void SetMapTransitionXY(int xArg, int yArg) { _mapTransitionX = xArg, _mapTransitionY = yArg; } - int GetMapTransitionX(void) { return _mapTransitionX; } - int GetMapTransitionY(void) { return _mapTransitionY; } - private: MapElement _tile; MapEntityGeneric _entity; @@ -58,9 +50,4 @@ private: // -1 is a 'special' tile, the next tile that the player walks // on is the players new zlevel. int _zLevel; - - // If not 'null', switch map when the player walks on this tile. - string _mapTransitionName; - int _mapTransitionX; - int _mapTransitionY; };