diff --git a/src/entity.h b/src/entity.h deleted file mode 100644 index cad2aae..0000000 --- a/src/entity.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include "datatypes.h" -#include -//#include -#include -#include -#include - -class Entity { - - public: - Entity() {} - Entity(float x, float y) : position(x, y) {} - Entity(float x, float y, int w, int h) : position(x, y), rect(w, h) {} - - bool load(SDL_Renderer *renderer, std::string path) { - - SDL_Surface *asset = SDL_LoadBMP(path.c_str()); - if(asset == NULL) { - SDL_Log("Unable to load image: %s", SDL_GetError()); - return false; - } - - texture = SDL_CreateTextureFromSurface(renderer, asset); - return true; - }; - - Vec2D position; - Vec2D size; - - SDL_Texture *texture; - SDL_FRect rect; - Color color = {100,100,100}; - - void draw(SDL_Renderer *renderer){ - rect.x = position.x; - rect.y = position.y; - rect.w = size.x; - rect.h = size.y; - - //SDL_SetTextureColorMod(texture, color.r, color.g, color.b); - SDL_RenderTexture(renderer, texture, NULL, &rect); - }; -}; -