gba-trycatch
diff src/polyfill.c @ 8:fb0a0d6a8b52
sortof works
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 19 Jun 2014 05:53:46 +0300 |
parents | 73b5f2e5d18a |
children | b0ed38f13261 |
line diff
1.1 --- a/src/polyfill.c Wed Jun 18 06:20:07 2014 +0300 1.2 +++ b/src/polyfill.c Thu Jun 19 05:53:46 2014 +0300 1.3 @@ -96,3 +96,17 @@ 1.4 *pixels++ = color; 1.5 } 1.6 } 1.7 + 1.8 + 1.9 +void draw_point(const pvec3 *v, uint16_t color) 1.10 +{ 1.11 + int x = v->x >> 16; 1.12 + int y = v->y >> 16; 1.13 + uint16_t *pixels = (uint16_t*)back_buffer->pixels; 1.14 + 1.15 + if(x < 0 || x >= WIDTH || y < 0 || y >= HEIGHT) { 1.16 + return; 1.17 + } 1.18 + 1.19 + pixels[y * WIDTH + x] = color; 1.20 +}