]> git.sur5r.net Git - c128-kasse/commitdiff
add color code definitions
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 29 Sep 2012 15:40:21 +0000 (17:40 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 29 Sep 2012 15:40:21 +0000 (17:40 +0200)
include/general.h

index 3c76062c6d78de4ebc3f2c6f2393c6018457e7b1..3bd4bc4a31ecb53fd4c776ac032000ddb4812a90 100644 (file)
@@ -11,6 +11,27 @@ extern BYTE _oserror;
 #define PEEK(addr)         (*(unsigned char*) (addr))
 #define PEEKW(addr)        (*(unsigned*) (addr))
 
 #define PEEK(addr)         (*(unsigned char*) (addr))
 #define PEEKW(addr)        (*(unsigned*) (addr))
 
+/* C128 color codes, see PDF page 127 of
+ * http://www.pagetable.com/docs/Commodore%20128%20Programmer%27s%20Reference%20Guide.pdf */
+#define TC_BLACK        1
+#define TC_WHITE        2
+#define TC_RED          3
+#define TC_CYAN         4
+#define TC_PURPLE       5
+#define TC_GREEN        6
+#define TC_BLUE         7
+#define TC_YELLOW       8
+#define TC_ORANGE       9
+#define TC_BROWN       10
+/* This is the good red */
+#define TC_LIGHT_RED   11
+#define TC_DARK_GRAY   12
+#define TC_MEDIUM_GRAY 13
+/* This is the good green */
+#define TC_LIGHT_GREEN 14
+#define TC_LIGHT_BLUE  15
+#define TC_LIGHT_GRAY  16
+
 #define VIDEOMODE (((* (BYTE *)0xD7) == 0x80) ? 80 : 40)
 
 /* because there is no macro expansion when stringifying, we need to use two
 #define VIDEOMODE (((* (BYTE *)0xD7) == 0x80) ? 80 : 40)
 
 /* because there is no macro expansion when stringifying, we need to use two