diff options
author | Bad Diode <bd@badd10de.dev> | 2022-10-27 19:14:15 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2022-10-27 19:14:15 +0200 |
commit | 6880fe7d0bef296b98420da6fc378204239b26bc (patch) | |
tree | 27c3af49b2edca6eff5a0a5ab6abbba2af61c029 /src | |
parent | 641518e364f391b194ba2302e8cd5fab1a35aa07 (diff) | |
download | uxn64-6880fe7d0bef296b98420da6fc378204239b26bc.tar.gz uxn64-6880fe7d0bef296b98420da6fc378204239b26bc.zip |
Fix extra element being added to rom.c array
Diffstat (limited to 'src')
-rw-r--r-- | src/ppu.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -18,8 +18,8 @@ u16 framebuffers[2][SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((aligned(16))); | |||
18 | static u16 pixels[SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((aligned(16))); | 18 | static u16 pixels[SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((aligned(16))); |
19 | static int current_fb = 0; | 19 | static int current_fb = 0; |
20 | 20 | ||
21 | static size_t screen_width = SCREEN_WIDTH; | 21 | static u16 screen_width = SCREEN_WIDTH; |
22 | static size_t screen_height = SCREEN_HEIGHT; | 22 | static u16 screen_height = SCREEN_HEIGHT; |
23 | static u16 palette[16]; | 23 | static u16 palette[16]; |
24 | 24 | ||
25 | static u8 pixels_fg[SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((aligned(16))); | 25 | static u8 pixels_fg[SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((aligned(16))); |
@@ -112,7 +112,18 @@ init_ppu(void) { | |||
112 | pixels[i + j * SCREEN_WIDTH] = color; | 112 | pixels[i + j * SCREEN_WIDTH] = color; |
113 | } | 113 | } |
114 | } | 114 | } |
115 | // TODO: clear pixel buffers and dirty lines | 115 | |
116 | // Clear pixel buffers and dirty lines | ||
117 | for (size_t i = 0; i < 16; i++) { | ||
118 | palette[i] = 0; | ||
119 | } | ||
120 | for (size_t i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; i++) { | ||
121 | pixels_fg[i] = 0; | ||
122 | pixels_bg[i] = 0; | ||
123 | } | ||
124 | for (size_t i = 0; i < SCREEN_HEIGHT; i++) { | ||
125 | dirty_lines[i] = 0; | ||
126 | } | ||
116 | 127 | ||
117 | // Setup the message queues | 128 | // Setup the message queues |
118 | osCreateMesgQueue(&retrace_msg_queue, &retrace_msg_buf, 1); | 129 | osCreateMesgQueue(&retrace_msg_queue, &retrace_msg_buf, 1); |