working on screen clear
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user