test 1 doc

Dependencies:   mbed Gamepad2

Platform/Platform.cpp

Committer:
joebarhouch
Date:
2020-05-27
Revision:
15:9ea5269b4cd4
Parent:
7:530ca713d2b2

File content as of revision 15:9ea5269b4cd4:

#include "Platform.h"

Platform::Platform(int x, int y, int w, int h)
{
    _x = x;
    _y = y;
    _width = w;
    _height = h;
}

Platform::~Platform()
{

}


////////////////////// DRAW  //////////////////////////
void Platform::draw(N5110 &lcd)
{
    lcd.drawRect(_x, _y, _width, _height, FILL_TRANSPARENT);
    //debug prints
    //printf("x: %i, y: %i, width: %i, height %i \n", x, y, width, height);
}

////////////////////// POSTITIONS //////////////////////////
Vector4 Platform::get_pos()
{
    Vector4 pos = {_x, _y, _width, _height};
    return pos;
}