}\r
}\r
\r
-void tw_setrgbpalette(byte *p)\r
+void tw_setrgbpalette(/*byte *p, */int r, int g, int b)\r
{\r
int i;\r
// modexWaitBorder();\r
outp(PAL_WRITE_REG, 0); /* start at the beginning of palette */\r
// for(i=0; i<PAL_SIZE/2; i++)\r
// {\r
- outp(PAL_DATA_REG, p[i]);\r
+ outp(PAL_DATA_REG, r);\r
+ outp(PAL_DATA_REG, g);\r
+ outp(PAL_DATA_REG, b);\r
// }\r
// modexWaitBorder(); /* waits one retrace -- less flicker */\r
// for(; i<PAL_SIZE; i++)\r
#ifndef _TWEAK_H_\r
#define _TWEAK_H_\r
+#include <i86.h>\r
void tw_opengraph2();\r
-void tw_setrgbpalette(byte *p);\r
+//void tw_setrgbpalette(byte *p);\r
+void tw_setrgbpalette(int r, int g, int b);\r
+\r
+#define PAL_READ_REG 0x03C7 /* Color register, read address */\r
+#define PAL_WRITE_REG 0x03C8 /* Color register, write address */\r
+#define PAL_DATA_REG 0x03C9 /* Color register, data port */\r
+#define PAL_SIZE (256 * 3)\r
+\r
#endif\r