diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-02-24 21:18:25 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-03-30 08:20:21 +0200 |
| commit | c8cce5ea87e54cbe669e1d621132aeb79d446e30 (patch) | |
| tree | ef780bd706d6c711a605dc709f88564ccbe1d3a7 /src/gfx | |
| parent | c5434beff157bd481d05306002b8dda55198b0d9 (diff) | |
| download | rts-c8cce5ea87e54cbe669e1d621132aeb79d446e30.tar.gz | |
sdl-1.2: implement rect_init and semitrans_rect_init
Diffstat (limited to 'src/gfx')
| -rw-r--r-- | src/gfx/sdl-1.2/src/rect.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gfx/sdl-1.2/src/rect.c b/src/gfx/sdl-1.2/src/rect.c index 38d9b62..03c07ae 100644 --- a/src/gfx/sdl-1.2/src/rect.c +++ b/src/gfx/sdl-1.2/src/rect.c @@ -2,8 +2,10 @@ #include <gfx/port.h> #include <sdl-1.2/gfx_private.h> #include <SDL/SDL.h> +#include <stdbool.h> #include <stddef.h> #include <stdlib.h> +#include <string.h> void rect_sort(struct rect *const r) { @@ -25,10 +27,13 @@ void rect_sort(struct rect *const r) } } -void semitrans_rect_init(struct rect *const r) +void rect_init(struct rect *const r) { + memset(r, 0, sizeof *r); } -void rect_init(struct rect *const r) +void semitrans_rect_init(struct rect *const r) { + rect_init(r); + r->stp = true; } |
