use shared sdl

This commit is contained in:
2025-03-13 10:54:51 +02:00
parent ab18ed1d4a
commit 2c90324d18
5 changed files with 9 additions and 7 deletions

View File

@@ -55,7 +55,7 @@ int iterate(EngineData *state)
const float scale = ((float) (((int) (now % 1000)) - 500) / 500.0f) * direction;
/* as you can see from this, rendering draws over whatever was drawn before it. */
SDL_SetRenderDrawColor(renderer, 0, 50, 50, SDL_ALPHA_OPAQUE); /* black, full alpha */
SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE); /* black, full alpha */
SDL_RenderClear(renderer); /* start with a blank canvas. */
/* Rectangles are comprised of set of X and Y coordinates, plus width and
@@ -84,7 +84,7 @@ int iterate(EngineData *state)
rects[0].y = 50;
rects[0].w = 100 + (100 * scale);
rects[0].h = 50 + (50 * scale);
SDL_SetRenderDrawColor(renderer, 0, 0, 255, SDL_ALPHA_OPAQUE); /* blue, full alpha */
SDL_SetRenderDrawColor(renderer, 0, 255, 255, SDL_ALPHA_OPAQUE); /* blue, full alpha */
SDL_RenderFillRect(renderer, &rects[0]);