diff --git a/Unuk-QT/Unuk-QT b/Unuk-QT/Unuk-QT index 790c1e1..00d48b5 100755 Binary files a/Unuk-QT/Unuk-QT and b/Unuk-QT/Unuk-QT differ diff --git a/src/Unuk/Player.cpp b/src/Unuk/Player.cpp index d0eae53..7ae1f12 100644 --- a/src/Unuk/Player.cpp +++ b/src/Unuk/Player.cpp @@ -8,7 +8,7 @@ Player::Player(Map *mapArg) : Character(mapArg) { } Player::~Player(void) { -\ + } void Player::HandleInput(void) { @@ -60,7 +60,7 @@ void Player::Update(void) { AddSpeachBubble("Woot, My name is Allanis, welcome to my home"); // For now The camera will be static. - //SetCamera(); + SetCamera(); } void Player::SetName(string nameArg) { diff --git a/src/libUnuk/Character.cpp b/src/libUnuk/Character.cpp index 691f697..08f0df3 100644 --- a/src/libUnuk/Character.cpp +++ b/src/libUnuk/Character.cpp @@ -137,9 +137,8 @@ void Character::Move(void) { tileX = ((x + (w / 2)) / TILE_WIDTH); tileY = ((y + (h / 2)) / TILE_HEIGHT); - // While we have a static camera, ensure that we do not go out - // of the camera boundaries. - if((x < 0) || (x + w) > levelWidth || (x + w) > SCREEN_WIDTH) x -= xVel; + // Check collisions. + if((x < 0) || (x + w) > levelWidth) x -= xVel; if(CheckTileCollisions()) x -= xVel; if(CheckEntityCollisions()) x -= xVel; //if(CheckCharacterCollisions()) x -= xVel; @@ -148,9 +147,7 @@ void Character::Move(void) { tileX = ((x + (w / 2)) / TILE_WIDTH); tileY = ((y + (h / 2)) / TILE_HEIGHT); - // While we have a static camera, ensure that we do not go out - // of the camera boundaries. - if((y < 0) || (y + h) > levelHeight || (y + h) > SCREEN_HEIGHT) y -= yVel; + if((y < 0) || (y + h) > levelHeight) y -= yVel; if(CheckTileCollisions()) y -= yVel; if(CheckEntityCollisions()) y -= yVel; if(CheckCharacterCollisions()) y -= yVel;