diff options
author | yzrh <yzrh@noema.org> | 2023-01-09 15:18:37 +0000 |
---|---|---|
committer | yzrh <yzrh@noema.org> | 2023-01-09 15:18:37 +0000 |
commit | 09cfe6cee9bc8ac36659f490515375e6a9abe45e (patch) | |
tree | a914c6a7e662641c85b55c011d73d0b5b8b58182 /src | |
parent | 471a8b42d262ec1cc1324e357af178ded2e04555 (diff) | |
download | snake-sdl-09cfe6cee9bc8ac36659f490515375e6a9abe45e.tar.gz snake-sdl-09cfe6cee9bc8ac36659f490515375e6a9abe45e.tar.zst |
Signed-off-by: yzrh <yzrh@noema.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 4 | ||||
-rw-r--r-- | src/snake-sdl.c | 23 |
2 files changed, 15 insertions, 12 deletions
diff --git a/src/Makefile b/src/Makefile index 21ccda9..67f1a2b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2019-2022, yzrh <yzrh@noema.org> +# Copyright (c) 2019-2023, yzrh <yzrh@noema.org> # # SPDX-License-Identifier: Apache-2.0 # @@ -18,7 +18,7 @@ obj = ${src:.c=.o} PREFIX = /usr/local -CFLAGS = -O2 -pipe -flto -Wall -Wextra -Wno-unused-result -Wno-unused-parameter +CFLAGS = -O2 -pipe -flto -Wall -Wextra -Wno-unused-parameter LDFLAGS = -Wl,-O2 -lpthread -lSDL2 -lSDL2_ttf .ifdef SOUND diff --git a/src/snake-sdl.c b/src/snake-sdl.c index 47cf07e..587979d 100644 --- a/src/snake-sdl.c +++ b/src/snake-sdl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2022, yzrh <yzrh@noema.org> + * Copyright (c) 2019-2023, yzrh <yzrh@noema.org> * * SPDX-License-Identifier: Apache-2.0 */ @@ -108,19 +108,22 @@ static void* handler_rendering(void *args) { const SDL_Color fg = { - COLOUR_FOREGROUND_R, - COLOUR_FOREGROUND_G, - COLOUR_FOREGROUND_B + .r = COLOUR_FOREGROUND_R, + .g = COLOUR_FOREGROUND_G, + .b = COLOUR_FOREGROUND_B, + .a = 255 }; const SDL_Color bg = { - COLOUR_BACKGROUND_R, - COLOUR_BACKGROUND_G, - COLOUR_BACKGROUND_B + .r = COLOUR_BACKGROUND_R, + .g = COLOUR_BACKGROUND_G, + .b = COLOUR_BACKGROUND_B, + .a = 255 }; const SDL_Color bg_s = { - COLOUR_BACKGROUND_SHADE_R, - COLOUR_BACKGROUND_SHADE_G, - COLOUR_BACKGROUND_SHADE_B + .r = COLOUR_BACKGROUND_SHADE_R, + .g = COLOUR_BACKGROUND_SHADE_G, + .b = COLOUR_BACKGROUND_SHADE_B, + .a = 255 }; char result_str[23]; |