Browse Source

Basic hard-coded KType rainbow demo

ICPad
Jacob Alexander 8 years ago
parent
commit
922885d749
2 changed files with 2228 additions and 34 deletions
  1. 2226
    32
      Macro/PixelMap/pixel.c
  2. 2
    2
      Macro/PixelMap/pixel.h

+ 2226
- 32
Macro/PixelMap/pixel.c
File diff suppressed because it is too large
View File


+ 2
- 2
Macro/PixelMap/pixel.h 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