Skip to content

Commit 7e600d3

Browse files
committed
Fixed drawing
1 parent 95557b5 commit 7e600d3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/GameBoard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void GameBoard::init_resources()
101101
ADD_RESOURCE(0, 1, BRICK, 2);
102102
ADD_RESOURCE(-2, 2, SHEEP, 5);
103103
ADD_RESOURCE(2, 0, WOOD, 6);
104-
ADD_RESOURCE(-3, 3, DESERT, 0);
104+
ADD_RESOURCE(-3, 4, DESERT, 0);
105105
ADD_RESOURCE(-1, 3, SHEEP, 10);
106106
ADD_RESOURCE(1, 2, WHEAT, 9);
107107
ADD_RESOURCE(3, 1, WHEAT, 3);

src/Renderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ inline pair<float, float> coordToScreen(const Coordinate& coord) {
5151
float angle = M_PI / 3.f;
5252
float x = .5f + (scale * coord.first) + (scale * coord.second) * cos(angle);
5353
float y = .5f + (scale * coord.second) * sin(angle);
54-
return std::make_pair(x, y);
54+
return std::make_pair(x - 0.25f, y - 0.4f);
5555
}
5656

5757
inline void vertexPair(const Coordinate& coord) {

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int main(int argc, char *argv[]) {
4343
SDL_Window* displayWindow;
4444
SDL_Renderer* displayRenderer;
4545
SDL_RendererInfo displayRendererInfo;
46-
SDL_CreateWindowAndRenderer(800, 800, SDL_WINDOW_OPENGL, &displayWindow, &displayRenderer);
46+
SDL_CreateWindowAndRenderer(900, 900, SDL_WINDOW_OPENGL, &displayWindow, &displayRenderer);
4747
SDL_GetRendererInfo(displayRenderer, &displayRendererInfo);
4848
/*TODO: Check that we have OpenGL */
4949
if ((displayRendererInfo.flags & SDL_RENDERER_ACCELERATED) == 0 ||

0 commit comments

Comments
 (0)