summaryrefslogtreecommitdiff
path: root/source/presentation/ColourStore.cpp
blob: e08b6f8bfb5be889c16edec4b8063ec3e6be3a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "ColourStore.h"

ColourStore::ColourStore()
{
    populateColours();
}

void ColourStore::populateColours()
{
    _colours[BitmapStore::PLAYER] = al_map_rgb(0,255,255);
    _colours[BitmapStore::ENEMY] = al_map_rgb(255,0,0);
    _colours[BitmapStore::CHECKPOINT] = al_map_rgb(0,255,0);
    _colours[BitmapStore::MAZE_WALL] = al_map_rgb(255,255,255);
    _colours[BitmapStore::MAZE_FLOOR] = al_map_rgb(0,0,0);
    _transparent = al_map_rgba(0,0,0,0);
}

ALLEGRO_COLOR ColourStore::getColour(BitmapStore::Image image)
{
    if (_colours.find(image) != _colours.end())
    {
        return _colours[image];
    }
    else return _transparent;
}