Thomas Davies / Mbed 2 deprecated LetTheBallDrop

Dependencies:   N5110 mbed PowerControl

GameScreen.cpp

Committer:
AppleJuice
Date:
2015-03-07
Revision:
1:3305d7e44880
Parent:
0:c2c1df1163f1
Child:
2:d4402bc3dd45

File content as of revision 1:3305d7e44880:

#include "mbed.h"
#include "N5110.h"
#include "GameScreen.h"

//need to extend on initialization to set some variables
void GameScreen::Initialize()
{
    init();
    
    platGapSize = 4;
    platThickness = 2;
    maxX_ = 48;
    maxY_ = 84;
    
        
}

//draw platform
//  ___________  ________  < y
//               ^ x       
void GameScreen::drawPlatform(int x,int y)
{

    
    for (int a = 0; a < 48; a ++)
    {
        for (int b = y; b < (y+platThickness); b++)
        {
            setPixel(b,a);    
        }
    }
}