aboutsummaryrefslogtreecommitdiff
path: root/src/gfx
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-02-24 21:18:25 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-03-30 08:20:21 +0200
commit3507ab949e1ff2a783b83e9cb024f39ea2fb8d16 (patch)
tree74695b944a69ee5825a9c9e58c96f8b3411eb014 /src/gfx
parentab09e5f2cc148b7cf9eb81d050f45e3f80904b9b (diff)
downloadjancity-3507ab949e1ff2a783b83e9cb024f39ea2fb8d16.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.c9
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;
}