From a9281bfcf21861e621a3243ecb633a299c8d8e52 Mon Sep 17 00:00:00 2001 From: tom Date: Sat, 21 Jan 2017 08:58:12 -0600 Subject: -took basic math functions and put it into functions.hpp -spaced various lines -reorganized variables by datatype -implemented reproduction -reorganized pathing so once a target is set, the creature checks if that same target is near every cycle --- src/entity.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/entity.cpp') diff --git a/src/entity.cpp b/src/entity.cpp index 6ad0e3f..a2c2d87 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -2,9 +2,16 @@ void Entity::Place() { - if(type == 1) - SDL_SetRenderDrawColor(renderer,255,0,255,255); - else + if(type == CREATURE_TYPE){ + if(gender) + SDL_SetRenderDrawColor(renderer,255,0,0,255); + else + if(pregnate) + SDL_SetRenderDrawColor(renderer,255,0,255,255); + else + SDL_SetRenderDrawColor(renderer,0,0,255,255); + } + else if (type == RESOURCE_TYPE) SDL_SetRenderDrawColor(renderer,0,255,0,255); SDL_RenderFillRect(renderer, &rect); -- cgit v1.2.3