obstacles for the map

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Wall.cpp Source File

Wall.cpp

00001 #include "Wall.h"
00002 
00003 // Class constructor 
00004 Wall::Wall()
00005 {
00006 
00007 }
00008 
00009 // Class destructor
00010 Wall::~Wall()
00011 {
00012 
00013 }
00014 
00015 // Initialise the wall object
00016 void Wall::init(int x,
00017                 int y,
00018                 int heigth,
00019                 int width)
00020 {
00021     _posX = x;
00022     _posY = y;
00023     _heigth = heigth;
00024     _width = width;
00025     //pc.printf("a wall has been initialized");
00026 }
00027 
00028 int Wall::getPosX()
00029 {
00030     return _posX;
00031 }
00032 
00033 int Wall::getPosY()
00034 {
00035     return _posY;
00036 }
00037 
00038 int Wall::getHeigth()
00039 {
00040     return _heigth;
00041 }
00042 
00043 int Wall::getWidth()
00044 {
00045     return _width;
00046 }
00047 
00048 int Wall::getScenePosX()
00049 {
00050     return _scenePosX;
00051 }
00052 
00053 int Wall::getScenePosY() 
00054 { 
00055     return _scenePosY;
00056 }
00057 
00058 void Wall::setScenePosX(int x)
00059 {
00060     _scenePosX = x;
00061 }
00062 
00063 void Wall::setScenePosY(int y)
00064 {
00065     _scenePosY = y;
00066 }
00067 
00068 // Draw a rectangle with the dimentions
00069 // given by the inetialiser
00070 void Wall::draw(N5110 &lcd)
00071 {
00072     lcd.drawRect(_scenePosX, _scenePosY, _heigth, _width, FILL_BLACK);
00073     //pc.printf("a wall has been drawn");
00074 }