Jonne Valola / PokittoLib Featured

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

PokittoLib

Library for programming Pokitto hardware

How to Use

  1. Import this library to online compiler (see button "import" on the right hand side
  2. DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
  3. Change My_settings.h according to your project
  4. Start coding!

Files at this revision

API Documentation at this revision

Comitter:
Pokitto
Date:
Mon May 21 18:10:03 2018 +0000
Parent:
47:8f962908f6a7
Child:
49:74201663ba8b
Commit message:
Fixed std::min max in HWLCD

Changed in this revision

POKITTO_HW/HWLCD.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/POKITTO_HW/HWLCD.cpp	Mon May 21 18:08:52 2018 +0000
+++ b/POKITTO_HW/HWLCD.cpp	Mon May 21 18:10:03 2018 +0000
@@ -763,15 +763,15 @@
                     // *** COMBINE DIRTY RECTS FOR THIS SCANLINE GROUP ***
 
                     // Dirty rect
-                    int sprDirtyYMin = std::min(spry, sprOldY);
-                    sprDirtyYMin = std::max((int)sprDirtyYMin, 0);
-                    int sprDirtyYMax = std::max(spry, sprOldY);
+                    int sprDirtyYMin = min(spry, sprOldY);
+                    sprDirtyYMin = max((int)sprDirtyYMin, 0);
+                    int sprDirtyYMax = max(spry, sprOldY);
                     if (isCurrentSpriteOutOfScreen)
                         sprDirtyYMax = sprOldY;
                     if (isOldSpriteOutOfScreen)
                         sprDirtyYMax = spry;
                     int sprDirtyYMaxEnd = sprDirtyYMax + sprh - 1;
-                    sprDirtyYMaxEnd = std::min(sprDirtyYMaxEnd, LCDHEIGHT - 1);  // Should use LCDHEIGHT instead of screenH? Same with other screen* ?
+                    sprDirtyYMaxEnd = min(sprDirtyYMaxEnd, LCDHEIGHT - 1);  // Should use LCDHEIGHT instead of screenH? Same with other screen* ?
 
                     // Get the scanline min and max y values for drawing
                     if (sprDirtyYMin < scanlineMinY)