ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
colours.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) by Fred Klaus *
3  * development@fkweb.de *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef CPC_COLOURS_H
21 #define CPC_COLOURS_H
22 
23 #include "compspec.h"
24 #include "types.h"
25 
26 namespace cpcx
27 {
28 
30  class Colours final
31  {
32 
33  public:
34  Colours() : mDepth(16), mIntensity(10), mMonitor(0) {}
36 
37  void init();
38 
39  void setIntensity(uint intensity) {mIntensity = intensity; init();}
40  void setDepth (uint depth) {mDepth = depth; init();}
41  void setMonitor (uint monitor) {mMonitor = monitor; init();}
42 
43  tUDWORD get(int num) const {return mTable[num];}
44 
45  private:
49 
51 
52  static const float mColour[32][3];
53  static const double mGreen [32];
54 
55  };
56 
57 } // cpc
58 
59 #endif // CPC_COLOURS_H
60 
uint mIntensity
Definition: colours.h:47
static const float mColour[32][3]
Definition: colours.h:52
void init()
Definition: roland.cpp:97
Namespace for all CPC components.
Definition: colours.cpp:22
uint mMonitor
Definition: colours.h:48
Colours()
Definition: colours.h:34
uint mDepth
Definition: colours.h:46
uint32_t tUDWORD
Definition: types.h:86
~Colours() ROLAND_DEFAULT void init()
tUDWORD mTable[32]
Definition: colours.h:50
void setMonitor(uint monitor)
Definition: colours.h:41
void setDepth(uint depth)
Definition: colours.h:40
Definition: colours.h:30
#define ROLAND_DEFAULT
Definition: compspec.h:46
unsigned int uint
Definition: types.h:121
void setIntensity(uint intensity)
Definition: colours.h:39
static const double mGreen[32]
Definition: colours.h:53