summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/rltiles/tool/tile_colour.h
blob: 4c77162b9ff5d7df0f67bcb70bfe37d273f94a80 (plain) (blame)
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
26
27
#ifndef TILE_COLOUR_H
#define TILE_COLOUR_H

class tile_colour
{
public:
    tile_colour() {};
    tile_colour(unsigned char _r, unsigned char _g, unsigned char _b,
        unsigned char _a) : r(_r), g(_g), b(_b), a(_a) {}

    bool operator==(const tile_colour &rhs) const;
    bool operator!=(const tile_colour &rhs) const;
    const tile_colour &operator=(const tile_colour &rhs);

    unsigned char r;
    unsigned char g;
    unsigned char b;
    unsigned char a;

    static tile_colour background;
    static tile_colour transparent;
    static tile_colour black;
};

bool write_png(const char *filename, tile_colour *pixels,
               unsigned int width, unsigned int height);
#endif