Rally X
ELEN3009 Project by Justin Wernick and David Schneider
source/presentation/BitmapStore.h
Go to the documentation of this file.
00001 #ifndef BITMAPSTORE_H
00002 #define BITMAPSTORE_H
00003 
00004 #include <string>
00005 #include <map>
00006 using namespace std;
00007 
00008 #include <allegro5/allegro.h>
00009 #include <allegro5/allegro_primitives.h>
00010 #include <allegro5/allegro_font.h>
00011 #include <allegro5/allegro_ttf.h>
00012 #include <allegro5/allegro_native_dialog.h>
00013 
00014 #include "../logic/AllegroWrappers.h"
00015 
00030 class BitmapStore
00031 {
00032     public:
00038         BitmapStore(unsigned int blockWidth);
00042         ~BitmapStore();
00043 
00047         enum Image {PLAYER, ENEMY, ROCK, CHECKPOINT, MAZE_WALL, MAZE_FLOOR, SMOKE, CRASHED_CAR, CLAIMED_CHECKPOINT};
00048 
00055         ALLEGRO_BITMAP* getBitmap(Image image);
00056 
00057     private:
00063         BitmapStore(const BitmapStore& ref);
00069         BitmapStore& operator=(const BitmapStore& rhs);
00070 
00076         void drawPlayerCar(ALLEGRO_BITMAP* canvas);
00082         void drawEnemyCar(ALLEGRO_BITMAP* canvas);
00088         void drawRock(ALLEGRO_BITMAP* canvas);
00094         void drawCheckpoint(ALLEGRO_BITMAP* canvas);
00100         void drawMazeWall(ALLEGRO_BITMAP* canvas);
00106         void drawMazeFloor(ALLEGRO_BITMAP* canvas);
00112         void drawSmoke(ALLEGRO_BITMAP* canvas);
00118         void drawCrashedCar(ALLEGRO_BITMAP* canvas);
00124         void drawClaimedCheckpoint(ALLEGRO_BITMAP* canvas);
00125 
00126         AllegroDrawingInit _drawingInstalls; 
00127 
00128         ALLEGRO_FONT* _bitmapFont; 
00129 
00135         map<Image, ALLEGRO_BITMAP*> _bitmaps;
00136 
00137         unsigned int _blockWidth; 
00138 };
00139 
00140 #endif // BITMAPSTORE_H
 All Classes Files Functions Variables Typedefs Enumerations Enumerator