diff options
author | tom <tom@apollo> | 2017-01-11 02:19:07 -0600 |
---|---|---|
committer | tom <tom@apollo> | 2017-01-11 02:19:07 -0600 |
commit | b97a54b8acd113e99871fdb0f683e27e0912bf42 (patch) | |
tree | 0c32320f225569da513a505d73dd72a506f08c95 /src/entity.cpp | |
parent | f6f6d81c5634f659693914b7b74efcdd39ba5d4f (diff) |
-removed all magic numbers and placed them in a constants header
-removed unused libraries and redid all header files
Diffstat (limited to 'src/entity.cpp')
-rw-r--r-- | src/entity.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index be3e792..ff6799e 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -3,8 +3,8 @@ void Entity::Init(Window m) { renderer = m.getRenderer(); - rect.y = rand()%640; - rect.x = rand()%1080; + rect.y = rand()%WINDOW_Y; + rect.x = rand()%WINDOW_X; } void Entity::Init(Window m, Location z) @@ -21,7 +21,7 @@ void Entity::Place() else SDL_SetRenderDrawColor(renderer,0,255,0,255); - SDL_RenderDrawRect(renderer, &rect); + SDL_RenderFillRect(renderer, &rect); - SDL_SetRenderDrawColor(renderer,0,0,0,255); + SDL_SetRenderDrawColor(renderer,0,0,0,0); } |