Maxint R&D / RETRO_BallsAndThings

Dependents:   RETRO_BallsAndPaddle RETRO_BallAndHoles

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Paddle.h Source File

Paddle.h

00001 #pragma once
00002 #include "mbed.h"
00003 
00004 #include "Color565.h"
00005 #include "font_OEM.h"
00006 #include "LCD_ST7735.h"
00007 
00008 #include "Shapes.h"
00009 #include "Vector.h"
00010 #include "Physics.h"
00011 
00012 class Paddle
00013 {
00014     public:
00015         Paddle(LCD_ST7735* pDisp);
00016         Paddle(LCD_ST7735* pDisp, int nX, int nY, int nWidth, int nHeight);
00017         void initialize(int nX, int nY, int nWidth, int nHeight);
00018 
00019      
00020         void move(Vector vDiff);
00021         void checkBoundary(Rectangle rBoundary);
00022         bool hasChanged();
00023 
00024         void clearPrev();
00025         void clear();
00026         void draw();
00027         void redraw(bool fForceDraw=false);
00028 
00029         Position pos;
00030         Dimension dim;
00031         Vector vSpeed;
00032 
00033 
00034 
00035     private:
00036         LCD_ST7735* pDisp;
00037 };