int main(int argc, char* args[]) { //Run and check if the initialize function returns false //and if so, it prints an error and ends the program if (!Initialize()) { printf("Could not initialize!\n"); return -1; } bool run = true; EventHandler e; GameTime t; //Create a Vector (List) of all Rooms (Levels) std::vector<Room_MainParent*> rooms { new Room_TestRoom(renderer, 2000, 2000, 0, 0) }; //Main game loop while (run) { //EVENTS e.update(); t.update(); //Exit event or escape key if (e.getEvent(SDL_QUIT)) run = false; //Update the current room rooms[0]->mainUpdate(e, t); //rooms[0]->update(e, t); //RENDERING //Clear the Window SDL_RenderClear(renderer); //Render all items in the current room rooms[0]->mainRender(); //Update the renderer (Screen) SDL_RenderPresent(renderer); } return 0; }