diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 | } |