diff options
| author | miguel <miguel@localhost> | 2017-09-13 01:47:16 +0200 |
|---|---|---|
| committer | miguel <miguel@localhost> | 2017-09-13 01:47:16 +0200 |
| commit | 842c21d6aab2f38e35ea668194f67f85af2e3539 (patch) | |
| tree | 2277e439edf7980781f56b46fbb6dc837f3b8427 /main.cpp | |
| parent | 3e48a47b9c47721e041b5b54a55ce5cb74d27ddb (diff) | |
extra tiles
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -158,7 +158,7 @@ int main(int, char**){ mouse_x=event.button.x; mouse_y=event.button.y; - world.bricks[(mouse_x+50-world.player.x2)/100+world.player.x-5][0].altitude=10-mouse_y/100; + world.mouseclick((mouse_x+50-world.player.x2)/100+world.player.x-5,10-mouse_y/100); } @@ -193,9 +193,6 @@ int main(int, char**){ switch(world.bricks[i][j].type) { - case 1: - SDL_RenderCopy(ren,textures[4],NULL,&rect); - break; case 0: SDL_RenderCopy(ren,textures[4],NULL,&rect); SDL_SetRenderDrawColor(ren, 150+19*(i%2),115,70, 255); @@ -203,6 +200,18 @@ int main(int, char**){ rect.y+=100; SDL_RenderFillRect(ren,&rect); break; + case 1: + SDL_RenderCopy(ren,textures[4],NULL,&rect); + break; + case 2: + SDL_RenderCopy(ren,textures[5],NULL,&rect); + break; + case 3: + SDL_RenderCopy(ren,textures[6],NULL,&rect); + break; + case 4: + SDL_RenderCopyEx(ren,textures[6],NULL,&rect,90,NULL,SDL_FLIP_NONE); + break; } |
