summary refs log tree commit diff stats
path: root/util.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-07-12 18:43:31 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-07-12 18:43:31 -0400
commitb64ada0dfec5895d14bd0d41cb83779d093970fe (patch)
tree3f31faee0ce14de2072c997768b889a970df9c7a /util.cpp
parentf6413b88fba9ac6d61c7ecdd8a1a300b69368c8d (diff)
downloadmazeoflife-b64ada0dfec5895d14bd0d41cb83779d093970fe.tar.gz
mazeoflife-b64ada0dfec5895d14bd0d41cb83779d093970fe.tar.bz2
mazeoflife-b64ada0dfec5895d14bd0d41cb83779d093970fe.zip
Whitespace changes
Diffstat (limited to 'util.cpp')
-rw-r--r--util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/util.cpp b/util.cpp index 868161f..5ccfe51 100644 --- a/util.cpp +++ b/util.cpp
@@ -11,7 +11,7 @@ void wrap(int* x, int* y)
11 { 11 {
12 *x = *x-WIDTH; 12 *x = *x-WIDTH;
13 } 13 }
14 14
15 if (*y < 0) 15 if (*y < 0)
16 { 16 {
17 *y = HEIGHT-(0-*y); 17 *y = HEIGHT-(0-*y);
@@ -53,10 +53,10 @@ SDL_Texture* loadImage(SDL_Renderer* renderer, std::string file)
53 std::cout << SDL_GetError() << std::endl; 53 std::cout << SDL_GetError() << std::endl;
54 return NULL; 54 return NULL;
55 } 55 }
56 56
57 SDL_Texture* texture = SDL_CreateTextureFromSurface(renderer, surface); 57 SDL_Texture* texture = SDL_CreateTextureFromSurface(renderer, surface);
58 SDL_FreeSurface(surface); 58 SDL_FreeSurface(surface);
59 59
60 return texture; 60 return texture;
61} 61}
62 62
@@ -66,6 +66,6 @@ void applyTexture(SDL_Renderer* renderer, SDL_Texture* tex, int x, int y)
66 pos.x = x; 66 pos.x = x;
67 pos.y = y; 67 pos.y = y;
68 SDL_QueryTexture(tex, NULL, NULL, &pos.w, &pos.h); 68 SDL_QueryTexture(tex, NULL, NULL, &pos.w, &pos.h);
69 69
70 SDL_RenderCopy(renderer, tex, NULL, &pos); 70 SDL_RenderCopy(renderer, tex, NULL, &pos);
71} \ No newline at end of file 71} \ No newline at end of file