
Simple vertical scrolling space shooter game using navigation switch (joystick), uLCD-144-G2, and a pushbutton switch.
Dependencies: 4DGL-uLCD-SE PinDetect mbed
Display/Rectangle.cpp
- Committer:
- jaspinall3
- Date:
- 2016-03-17
- Revision:
- 0:5c666e5cd22d
File content as of revision 0:5c666e5cd22d:
#include "Rectangle.h" Rectangle::Rectangle() { } void Rectangle::init(int x, int y, uLCD_4DGL *uLCD) { initSprite(x, y, uLCD); setDimensions(4,4); } void Rectangle::setDimensions(int height, int width) { _height = height; _width = width; } void Rectangle::drawRect(int baseX, int baseY, int color) { int newX = baseX + _x; int newY = baseY + _y; _uLCDptr->filled_rectangle(newX, newY, newX + _width, newY + _height, color); }