diff options
author | Bad Diode <bd@badd10de.dev> | 2021-04-15 18:27:11 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-04-15 18:27:11 +0200 |
commit | 07ed91a0b730e84ac351748fcefc4c846ff7d5ba (patch) | |
tree | d82c2c2b355c2e0de71fb6386ffdb53d1e9ff059 | |
parent | 05f557f302ce566247c37619b130ebebae2a39c8 (diff) | |
download | gba-experiments-07ed91a0b730e84ac351748fcefc4c846ff7d5ba.tar.gz gba-experiments-07ed91a0b730e84ac351748fcefc4c846ff7d5ba.zip |
Fix warnings
-rw-r--r-- | src/bd-font.c | 2 | ||||
-rw-r--r-- | src/main.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bd-font.c b/src/bd-font.c index 9795860..6173e97 100644 --- a/src/bd-font.c +++ b/src/bd-font.c | |||
@@ -1,4 +1,4 @@ | |||
1 | static u8 font[][8] = { | 1 | static const u8 font[][8] = { |
2 | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, | 2 | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
3 | {0x00, 0x00, 0x24, 0x00, 0x42, 0x3c, 0x00, 0x00}, | 3 | {0x00, 0x00, 0x24, 0x00, 0x42, 0x3c, 0x00, 0x00}, |
4 | {0x00, 0x00, 0x24, 0x00, 0x3c, 0x42, 0x00, 0x00}, | 4 | {0x00, 0x00, 0x24, 0x00, 0x3c, 0x42, 0x00, 0x00}, |
@@ -234,9 +234,9 @@ wait_vsync() { | |||
234 | // memory, instead we need to read a u16 word, mask and or the corresponding | 234 | // memory, instead we need to read a u16 word, mask and or the corresponding |
235 | // bits and wave the updated u16. | 235 | // bits and wave the updated u16. |
236 | static inline void | 236 | static inline void |
237 | put_pixel_m4(int x, int y, u8 col_index, u16 *buffer) { | 237 | put_pixel_m4(int x, int y, u8 col_index, vu16 *buffer) { |
238 | int buffer_index = (y * SCREEN_WIDTH + x) / 2; | 238 | int buffer_index = (y * SCREEN_WIDTH + x) / 2; |
239 | u16 *destination = &buffer[buffer_index]; | 239 | vu16 *destination = &buffer[buffer_index]; |
240 | // Odd pixels will go to the top 8 bits of the destination. Even pixels to | 240 | // Odd pixels will go to the top 8 bits of the destination. Even pixels to |
241 | // the lower 8 bits. | 241 | // the lower 8 bits. |
242 | int odd = x & 0x1; | 242 | int odd = x & 0x1; |
@@ -248,7 +248,7 @@ put_pixel_m4(int x, int y, u8 col_index, u16 *buffer) { | |||
248 | } | 248 | } |
249 | 249 | ||
250 | static inline void | 250 | static inline void |
251 | draw_fill_rect_m4(int x0, int y0, int x1, int y1, u8 col_index, u16 *buffer) { | 251 | draw_fill_rect_m4(int x0, int y0, int x1, int y1, u8 col_index, vu16 *buffer) { |
252 | int ix, iy; | 252 | int ix, iy; |
253 | for(iy = y0; iy < y1; iy++) { | 253 | for(iy = y0; iy < y1; iy++) { |
254 | for(ix = x0; ix < x1; ix++) { | 254 | for(ix = x0; ix < x1; ix++) { |
@@ -257,7 +257,7 @@ draw_fill_rect_m4(int x0, int y0, int x1, int y1, u8 col_index, u16 *buffer) { | |||
257 | } | 257 | } |
258 | } | 258 | } |
259 | 259 | ||
260 | static inline u16 | 260 | static inline void |
261 | flip_page() { | 261 | flip_page() { |
262 | DISP_CONTROL ^= DISP_CONTROL_PAGE; | 262 | DISP_CONTROL ^= DISP_CONTROL_PAGE; |
263 | } | 263 | } |