summaryrefslogtreecommitdiff
path: root/osdbase.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-07-13 14:45:55 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-07-13 14:45:55 +0200
commit5b040b1d92cdf8ae36ad319a5f5805e8d83b5411 (patch)
treef7ea25370836adb149c0fdc866389b92c74e2195 /osdbase.c
parent5fb0a0ed1841e3825f73244af02864cc899f3e24 (diff)
downloadvdr-5b040b1d92cdf8ae36ad319a5f5805e8d83b5411.tar.gz
vdr-5b040b1d92cdf8ae36ad319a5f5805e8d83b5411.tar.bz2
Added direct access to the index data of cPalette (needed for displaying SPUs) (cont'd)
Diffstat (limited to 'osdbase.c')
-rw-r--r--osdbase.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/osdbase.c b/osdbase.c
index e7486a74..0d6e2a3a 100644
--- a/osdbase.c
+++ b/osdbase.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osdbase.c 1.4 2002/05/18 12:39:16 kls Exp $
+ * $Id: osdbase.c 1.5 2002/07/13 14:42:47 kls Exp $
*/
#include "osdbase.h"
@@ -23,6 +23,17 @@ cPalette::cPalette(int Bpp)
full = false;
}
+void cPalette::SetColor(int Index, eDvbColor Color)
+{
+ if (Index < maxColors) {
+ if (numColors < Index)
+ numColors = Index + 1;
+ used[Index] = true;
+ color[Index] = Color;
+ fetched[Index] = false;
+ }
+}
+
int cPalette::Index(eDvbColor Color)
{
#if __BYTE_ORDER == __BIG_ENDIAN