summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Richard <johnny@johnnyrichard.com>2021-11-14 01:37:22 +0100
committerJohnny Richard <johnny@johnnyrichard.com>2021-11-14 01:37:22 +0100
commit670d944f983a1063b6675b811a9d09910a1df2ec (patch)
tree66e1858aa05740dd02ab29623ea50e3b986bbec9
parentad3b7b0047c3f1590cbd750c4f3952d3de5d9b5d (diff)
main.c: Rename surface variable
-rw-r--r--src/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index 46b4dee..38b948c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,8 +42,8 @@ int
main (int argc,
char *args[])
{
- SDL_Window* window = NULL;
- SDL_Surface* screenSurface = NULL;
+ SDL_Window* window = NULL;
+ SDL_Surface* surface = NULL;
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
fprintf(
@@ -77,11 +77,11 @@ main (int argc,
controller_t ctrl = {0};
while (!quit) {
- screenSurface = SDL_GetWindowSurface(window);
+ surface = SDL_GetWindowSurface(window);
SDL_FillRect(
- screenSurface,
+ surface,
NULL,
- SDL_MapRGB(screenSurface->format, 0xFF, 0xFF, 0xFF)
+ SDL_MapRGB(surface->format, 0xFF, 0xFF, 0xFF)
);
SDL_Event event;
@@ -98,9 +98,9 @@ main (int argc,
if (controller_is_right_pressed(&ctrl)) rect.x += 1;
SDL_FillRect(
- screenSurface,
+ surface,
&rect,
- SDL_MapRGB(screenSurface->format, 0xFF, 0x0, 0x0)
+ SDL_MapRGB(surface->format, 0xFF, 0x0, 0x0)
);
SDL_UpdateWindowSurface(window);