diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-06 18:19:16 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-06 18:19:16 +0100 |
commit | 133d07d5e7781c86cc11cd86e80ad1ff5325fc36 (patch) | |
tree | a295229e8a57889fbae232ba4f191dbf1bf4b927 /src/types.c | |
parent | c8260245622780be003a897464bd5f7798b3a307 (diff) | |
download | ldjam57-133d07d5e7781c86cc11cd86e80ad1ff5325fc36.tar |
add nelson transparency
Diffstat (limited to 'src/types.c')
-rw-r--r-- | src/types.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/types.c b/src/types.c index d2a7575..fdb9aa0 100644 --- a/src/types.c +++ b/src/types.c @@ -15,10 +15,16 @@ typedef struct { } Color; typedef struct { + char index; + unsigned char opacity; + char padding[2]; +} ImageRef; + +typedef struct { int x, y, w, h; Color fill; Color border; - int image; + ImageRef image; } DrawElement; typedef struct { @@ -63,6 +69,14 @@ enum { N_IMAGES, }; +static const char colorImages[N_COLORS] = { + [RED] = IMAGE_NELSON, + [RED_LEFT] = IMAGE_NELSON_LEFT, + [RED_UP] = IMAGE_NELSON_UP, + [RED_RIGHT] = IMAGE_NELSON_RIGHT, + [RED_DOWN] = IMAGE_NELSON_DOWN, +}; + enum { BUTTON_BACK, BUTTON_RETRY, |