diff options
author | Bad Diode <bd@badd10de.dev> | 2021-05-19 12:22:42 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-05-19 12:22:42 +0200 |
commit | fd5dede600bcaf8d5c16963544512b2e0ba68586 (patch) | |
tree | dfcf87c67ec114e34a92e07b7545afcf75ee4d2d /src | |
parent | 9873680f9d24e30afc1962987fac2c3ad1612f7b (diff) | |
download | uxngba-fd5dede600bcaf8d5c16963544512b2e0ba68586.tar.gz uxngba-fd5dede600bcaf8d5c16963544512b2e0ba68586.zip |
Test automata drawing
Diffstat (limited to 'src')
-rw-r--r-- | src/bd-font.c | 11 | ||||
-rw-r--r-- | src/common.h | 11 | ||||
-rw-r--r-- | src/main.c | 5 | ||||
-rw-r--r-- | src/small-font.c | 11 | ||||
-rw-r--r-- | src/sprites.h | 11 |
5 files changed, 47 insertions, 2 deletions
diff --git a/src/bd-font.c b/src/bd-font.c index e3fb6cc..6913f78 100644 --- a/src/bd-font.c +++ b/src/bd-font.c | |||
@@ -1,3 +1,14 @@ | |||
1 | /* | ||
2 | Copyright (c) 2021 Bad Diode | ||
3 | |||
4 | Permission to use, copy, modify, and distribute this software for any | ||
5 | purpose with or without fee is hereby granted, provided that the above | ||
6 | copyright notice and this permission notice appear in all copies. | ||
7 | |||
8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | WITH REGARD TO THIS SOFTWARE. | ||
10 | */ | ||
11 | |||
1 | u32 bd_font[] = { | 12 | u32 bd_font[] = { |
2 | 0x00000000, 0x00000000, 0x00002400, 0x423c0000, | 13 | 0x00000000, 0x00000000, 0x00002400, 0x423c0000, |
3 | 0x00002400, 0x3c420000, 0x0000363e, 0x3e1c0800, | 14 | 0x00002400, 0x3c420000, 0x0000363e, 0x3e1c0800, |
diff --git a/src/common.h b/src/common.h index aeea1a6..2859b11 100644 --- a/src/common.h +++ b/src/common.h | |||
@@ -3,6 +3,17 @@ | |||
3 | 3 | ||
4 | #include "shorthand.h" | 4 | #include "shorthand.h" |
5 | 5 | ||
6 | /* | ||
7 | Copyright (c) 2021 Bad Diode | ||
8 | |||
9 | Permission to use, copy, modify, and distribute this software for any | ||
10 | purpose with or without fee is hereby granted, provided that the above | ||
11 | copyright notice and this permission notice appear in all copies. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | WITH REGARD TO THIS SOFTWARE. | ||
15 | */ | ||
16 | |||
6 | // | 17 | // |
7 | // Memory sections. | 18 | // Memory sections. |
8 | // | 19 | // |
@@ -10,7 +10,8 @@ | |||
10 | #include "uxn/uxn.c" | 10 | #include "uxn/uxn.c" |
11 | #include "uxn/devices/ppu.h" | 11 | #include "uxn/devices/ppu.h" |
12 | #include "uxn/devices/ppu.c" | 12 | #include "uxn/devices/ppu.c" |
13 | #include "uxn/roms/dvd.c" | 13 | // #include "uxn/roms/dvd.c" |
14 | #include "uxn/roms/automata.c" | ||
14 | 15 | ||
15 | /* | 16 | /* |
16 | Copyright (c) 2021 Bad Diode | 17 | Copyright (c) 2021 Bad Diode |
@@ -69,7 +70,7 @@ screen_talk(Device *d, Uint8 b0, Uint8 w) { | |||
69 | Uint8 *layer = d->dat[0xe] >> 4 & 0x1 ? ppu.fg : ppu.bg; | 70 | Uint8 *layer = d->dat[0xe] >> 4 & 0x1 ? ppu.fg : ppu.bg; |
70 | Uint8 mode = d->dat[0xe] >> 5; | 71 | Uint8 mode = d->dat[0xe] >> 5; |
71 | if(!mode) { | 72 | if(!mode) { |
72 | // putpixel(&ppu, layer, x, y, d->dat[0xe] & 0x3); | 73 | putpixel(&ppu, layer, x, y, d->dat[0xe] & 0x3); |
73 | } else if(mode-- & 0x1) { | 74 | } else if(mode-- & 0x1) { |
74 | puticn(&ppu, layer, x, y, addr, d->dat[0xe] & 0xf, mode & 0x2, mode & 0x4); | 75 | puticn(&ppu, layer, x, y, addr, d->dat[0xe] & 0xf, mode & 0x2, mode & 0x4); |
75 | } else { | 76 | } else { |
diff --git a/src/small-font.c b/src/small-font.c index 2f232dd..e5adb35 100644 --- a/src/small-font.c +++ b/src/small-font.c | |||
@@ -1,3 +1,14 @@ | |||
1 | /* | ||
2 | Copyright (c) 2021 Bad Diode | ||
3 | |||
4 | Permission to use, copy, modify, and distribute this software for any | ||
5 | purpose with or without fee is hereby granted, provided that the above | ||
6 | copyright notice and this permission notice appear in all copies. | ||
7 | |||
8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | WITH REGARD TO THIS SOFTWARE. | ||
10 | */ | ||
11 | |||
1 | u32 small_font[] = { | 12 | u32 small_font[] = { |
2 | 0x00000000, 0x00000000, 0x00020202, 0x00020000, | 13 | 0x00000000, 0x00000000, 0x00020202, 0x00020000, |
3 | 0x000a0a00, 0x00000000, 0x000a1f0a, 0x1f0a0000, | 14 | 0x000a0a00, 0x00000000, 0x000a1f0a, 0x1f0a0000, |
diff --git a/src/sprites.h b/src/sprites.h index a64b784..c5eb57c 100644 --- a/src/sprites.h +++ b/src/sprites.h | |||
@@ -3,6 +3,17 @@ | |||
3 | 3 | ||
4 | #include "common.h" | 4 | #include "common.h" |
5 | 5 | ||
6 | /* | ||
7 | Copyright (c) 2021 Bad Diode | ||
8 | |||
9 | Permission to use, copy, modify, and distribute this software for any | ||
10 | purpose with or without fee is hereby granted, provided that the above | ||
11 | copyright notice and this permission notice appear in all copies. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | WITH REGARD TO THIS SOFTWARE. | ||
15 | */ | ||
16 | |||
6 | typedef struct Sprite { | 17 | typedef struct Sprite { |
7 | // A unique sprite identifier. | 18 | // A unique sprite identifier. |
8 | size_t id; | 19 | size_t id; |