Skip to content

Commit

Permalink
coord
Browse files Browse the repository at this point in the history
  • Loading branch information
jonylu7 committed Mar 7, 2024
1 parent 06c0a21 commit 8598ea7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/Map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MapClass: public Core::Drawable{
return glm::vec2(global[0], global[1]);
}

static glm::vec2 GlobaleCoordToCellCoord(glm::vec2 globalCoord){
static glm::vec2 GlobalCoordToCellCoord(glm::vec2 globalCoord){
float cellHeight=48.F;
float cellWidth=48.F;
return glm::vec2(int(globalCoord[0]/cellHeight),int(globalCoord[1]/cellWidth));
Expand Down
2 changes: 1 addition & 1 deletion src/UI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void UIClass::ShowPlayerConstructionMenu() {
std::string("X: " + std::to_string( CursorGlobalPosition.x) +
" Y: " + std::to_string(CursorGlobalPosition.y))
.c_str());
auto cellLocation=MapClass::GlobaleCoordToCellCoord(CursorGlobalPosition);
auto cellLocation=MapClass::GlobalCoordToCellCoord(CursorGlobalPosition);
ImGui::Text(
std::string("Cell X: " + std::to_string( int(cellLocation.x)) +
" Cell Y: " + std::to_string(int(cellLocation.y)))
Expand Down

0 comments on commit 8598ea7

Please sign in to comment.