#include "Window.h" #include "Entity.h" #include #include #include Entity* ent; bool my_setup(Window* win){ ent = new Entity({10,10}, {5,0}, {0,2}); return true; } bool my_Draw(Window* win){ SDL_Renderer* ren = win->GetRenderer(); /* if(win->step){ */ ent->Update(); win->step = false; /* } */ Vec2 ent_pos = ent->GetPos(); SDL_SetRenderDrawColor(ren, 0xff, 0x00, 0x00, 0x00); win->DrawCircle(ren, ent_pos.x, ent_pos.y, 5, true); return true; } int main(int argc, char *argv[]) { Window win("test", 100, 100); win.Draw(my_setup, my_Draw); delete ent; return 0; }