From e2894c2a79895d4d11998fc54115a72dcc5f0190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Mon, 10 Sep 2018 00:22:06 +0200 Subject: [PATCH] Add info bar --- demo2.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/demo2.cpp b/demo2.cpp index 697aa63..90ac032 100644 --- a/demo2.cpp +++ b/demo2.cpp @@ -18,6 +18,7 @@ Player player; #define SHOT_SPEED 5 * UNITS_PER_SQUARE +#define INFO_BAR_START 70 const unsigned char level[] = { @@ -539,6 +540,9 @@ void draw() pos.position.y,pos.depth, perspectiveScale(64,pos.depth)); } + + pokitto.display.setColor(0xFF); + pokitto.display.fillRect(0,INFO_BAR_START,SCREEN_WIDTH,SCREEN_HEIGHT - INFO_BAR_START); } int main() @@ -551,6 +555,8 @@ int main() player.setPositionSquare(6,5); player.mCamera.height = CAMERA_COLL_HEIGHT_BELOW; + player.mCamera.resolution.y = INFO_BAR_START; + uint32_t previousTime = 0; uint32_t dt;