working on screen clear
This commit is contained in:
@@ -63,7 +63,7 @@ int main(int argc, char *argv[]) {
|
|||||||
TTF_Init();
|
TTF_Init();
|
||||||
|
|
||||||
|
|
||||||
window = SDL_CreateWindow("Text Adventure", 1280, 720, 0);
|
SDL_CreateWindowAndRenderer("Text Adventure", 1280, 720, SDL_WINDOW_RESIZABLE, &window, &renderer);
|
||||||
|
|
||||||
if (window == nullptr) {
|
if (window == nullptr) {
|
||||||
printf("SDL_CreateWindow Error: \n", SDL_GetError());
|
printf("SDL_CreateWindow Error: \n", SDL_GetError());
|
||||||
@@ -71,16 +71,6 @@ int main(int argc, char *argv[]) {
|
|||||||
return 1;
|
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) {
|
if (!game) {
|
||||||
game.Init();
|
game.Init();
|
||||||
|
|||||||
Reference in New Issue
Block a user