PokittoLib with changes to lcd refresh etc.
Fork of Pokitto by
This is a fork by user @Spinal, and is used in Pokittris for testing. Do not import this to your own program.
Revision 11:02ad9c807a21, committed 2017-10-15
- Comitter:
- spinal
- Date:
- Sun Oct 15 18:03:02 2017 +0000
- Parent:
- 10:8cde5d0bafad
- Commit message:
- fixed 4color refreshRegion code
Changed in this revision
POKITTO_HW/HWLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
Pokitto_settings.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/POKITTO_HW/HWLCD.cpp Sun Oct 15 16:50:56 2017 +0000 +++ b/POKITTO_HW/HWLCD.cpp Sun Oct 15 18:03:02 2017 +0000 @@ -381,11 +381,14 @@ setWindow(y0, x0, y1-1, x1-1); write_command(0x22); uint8_t pix; - uint8_t quartWide=(x1-x0)/4;; + uint8_t quartWide=(x1-x0)/4; uint8_t pic; + + x0/=4; + for(int y=y0; y<y1; y++){ for(int x=x0; x<x0+quartWide; x++){ - pic = scrbuf[x+quartWide*y]; + pic = scrbuf[x+55*y]; pix = (pic >> 6)&3; write_data(paletteptr[pix]); pix = (pic >> 4)&3; write_data(paletteptr[pix]); pix = (pic >> 2)&3; write_data(paletteptr[pix]);
--- a/Pokitto_settings.h Sun Oct 15 16:50:56 2017 +0000 +++ b/Pokitto_settings.h Sun Oct 15 18:03:02 2017 +0000 @@ -333,7 +333,7 @@ #define POK_STRETCH 1 // Stretch Gamebuino display #endif #ifndef POK_FPS - #define POK_FPS 20 + #define POK_FPS 600 #endif #define POK_FRAMEDURATION 1000/POK_FPS