Archived
1
0

Basic hard-coded KType rainbow demo

This commit is contained in:
Jacob Alexander 2016-01-05 04:04:11 -08:00
parent ad1ea632e4
commit 922885d749
2 changed files with 2227 additions and 33 deletions

File diff suppressed because it is too large Load Diff

View File

@ -72,8 +72,8 @@ typedef struct PixelBuf {
void *data; // Pointer to start of buffer
} PixelBuf;
#define PixelBufElem(len,width,offset,ptr) { len, width, offset, (void*)ptr }
#define PixelBuf8(pixbuf, ch) ( ((uint8_t*) (pixbuf.data))[ ch - pixbuf.offset ] )
#define PixelBuf16(pixbuf, ch) ( ((uint16_t*)(pixbuf.data))[ ch - pixbuf.offset ] )
#define PixelBuf8(pixbuf, ch) ( ((uint8_t*) (pixbuf->data))[ ch - pixbuf->offset ] )
#define PixelBuf16(pixbuf, ch) ( ((uint16_t*)(pixbuf->data))[ ch - pixbuf->offset ] )
// Individual Pixel element