ScummVM API documentation
color.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef BLADERUNNER_COLOR_H
23 #define BLADERUNNER_COLOR_H
24 
25 #include "common/system.h"
26 
27 namespace BladeRunner {
28 
29 class Color {
30 
31  static const uint8 map5BitsTo8Bits[32];
32 
33 public:
34  float r;
35  float g;
36  float b;
37 
38  Color() : r(0.0f), g(0.0f), b(0.0f) {}
39 
40  Color(float r_, float g_, float b_) : r(r_), g(g_), b(b_) {}
41 
42  static uint8 get8BitColorFrom5Bit(uint8 col5b);
43 };
44 
45 #include "common/pack-start.h"
46 
47 struct Color256 {
48  uint8 r;
49  uint8 g;
50  uint8 b;
51 } PACKED_STRUCT;
52 
53 #include "common/pack-end.h"
54 
55 } // End of namespace BladeRunner
56 
57 #endif
Definition: actor.h:31
Definition: color.h:29
Definition: color.h:47