From faf73c184a95d29beacffe7cb8b480710653d2bb Mon Sep 17 00:00:00 2001 From: Timothy O'Barr Date: Fri, 25 Sep 2026 16:52:06 -0500 Subject: [PATCH] working on screen clear --- main.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/main.cpp b/main.cpp index 8aa2c29..baa00fe 100644 --- a/main.cpp +++ b/main.cpp @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { TTF_Init(); - window = SDL_CreateWindow("Text Adventure", 1280, 720, 0); + SDL_CreateWindowAndRenderer("Text Adventure", 1280, 720, SDL_WINDOW_RESIZABLE, &window, &renderer); if (window == nullptr) { printf("SDL_CreateWindow Error: \n", SDL_GetError()); @@ -71,16 +71,6 @@ int main(int argc, char *argv[]) { return 1; } - renderer = SDL_CreateRenderer(window, NULL); - - if (renderer == nullptr) - { - printf("SDL_CreateRenderer Error: \n", SDL_GetError()); - SDL_DestroyWindow(window); - SDL_Quit(); - return 1; - } - if (!game) { game.Init();