diff --git a/session_data.cpp b/session_data.cpp index 48e5468..98ca0a5 100644 --- a/session_data.cpp +++ b/session_data.cpp @@ -39,19 +39,19 @@ short SurfaceData::getSurface(coord& point) { return surfaceMatrix[point.x][point.y]; } -bool SurfaceData::IsValidCoord(coord& point) { +bool SurfaceData::CoordIsValid(coord& point) { if ((point.x < 0 || point.x > mapWidth) || (point.y < 0 || point.y > mapHeight)) return false; return true; } -bool SurfaceData::IsValidRadius(coord& point, short radius) { +bool SurfaceData::RadiusIsValid(coord& point, short radius) { if ( (point.x - radius <= 0) || (point.x + radius >= mapWidth) || (point.y + radius >= mapHeight) || (point.y - radius <= 0) || - (!IsValidCoord(point)) + (!CoordIsValid(point)) ) return false; bool flag = false; diff --git a/session_data.h b/session_data.h index ac7e951..ba5c474 100644 --- a/session_data.h +++ b/session_data.h @@ -29,14 +29,15 @@ class SurfaceData { bool Init(); int getWidth(); int getHeight(); - bool IsValidRadius(coord&, short); - bool IsValidCoord(coord&); + bool RadiusIsValid(coord&, short); bool IsWalkable(coord&); short getSurface(coord&); Surface& getSurface(str); private: + bool CoordIsValid(coord&); int mapWidth, mapHeight; - short** surfaceMatrix; // std::unordered_map currentSurfaceList; // currently useless + short** surfaceMatrix; + // std::unordered_map currentSurfaceList; // currently useless // std::unordered_map globalSurfaceList; //will be added in future };