breakout

A simple breakout clone created with C and SDL2
git clone git://git.hellocld.com/breakout
Log | Files | Refs

commit e16ec42ccca2937f04ab89eaa0bed07d497008b6
parent 1eab2bb6c1f7643e331a0f141ea633db252531fa
Author: Christopher Ray Langford <chris@hellocld.com>
Date:   Sun,  6 Oct 2019 13:08:55 -0400

Fixed makefile. Sorted low res scaling

Diffstat:
MMakefile | 3++-
Msrc/main.c | 9+++++----
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,9 +1,10 @@ CC = gcc CFLAGS = -g -Wall -pedantic `sdl2-config --cflags --libs` +SDL = `sdl2-config --cflags --libs` default: dirs ./src/main.c cp -r assets ./bin/assets - $(CC) $(CFLAGS) ./src/main.c -o ./bin/breakout + $(CC) $(CFLAGS) ./src/main.c -o ./bin/breakout $(SDL) dirs: diff --git a/src/main.c b/src/main.c @@ -153,10 +153,9 @@ int Initialize() "BREAKOUT", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - WINDOW_W, - WINDOW_H, - 0 - ); + 0, + 0, + SDL_WINDOW_RESIZABLE); if(window == NULL) { SDL_Log("Failed to create window: %s\n", SDL_GetError()); @@ -168,6 +167,8 @@ int Initialize() SDL_Log("Failed to create renderer: %s\n", SDL_GetError()); return 1; } + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0"); + SDL_RenderSetLogicalSize(renderer, WINDOW_W, WINDOW_H); /* Success! */ return 0;