PokittoLib with changes to lcd refresh etc.

Dependents:   Pokittris

Fork of Pokitto by Pokitto Community Team

This is a fork by user @Spinal, and is used in Pokittris for testing. Do not import this to your own program.

Files at this revision

API Documentation at this revision

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
diff -r 8cde5d0bafad -r 02ad9c807a21 POKITTO_HW/HWLCD.cpp
--- 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]);
diff -r 8cde5d0bafad -r 02ad9c807a21 Pokitto_settings.h
--- 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