]> 4ch.mooo.com Git - plz.git/commitdiff
tweak is made wwww
authorsparky4 <sparky4@cock.li>
Mon, 15 Feb 2016 16:38:58 +0000 (10:38 -0600)
committersparky4 <sparky4@cock.li>
Mon, 15 Feb 2016 16:38:58 +0000 (10:38 -0600)
copper.o
plz.o [deleted file]
plzpart.o
tweak.c
tweak.err [new file with mode: 0755]
tweak.h
tweak.o

index 7344a435da861d42ffbfd35dfb0a90b37a7a8aa1..d315cdbee972b7b7e2e7ae5bf4ac068760acd309 100755 (executable)
Binary files a/copper.o and b/copper.o differ
diff --git a/plz.o b/plz.o
deleted file mode 100755 (executable)
index f3455e9..0000000
Binary files a/plz.o and /dev/null differ
index 7e82377d9751d8e4b7b075339e7982988d8f7950..5c99e7887722325f99b9b081d8d835782deb8960 100755 (executable)
Binary files a/plzpart.o and b/plzpart.o differ
diff --git a/tweak.c b/tweak.c
index 5b648310014a6255197c284221f5581738f82e2a..39163a15a5600cb5b1e5d4036aefd5a5528d58cc 100755 (executable)
--- a/tweak.c
+++ b/tweak.c
@@ -31,14 +31,16 @@ __asm{
 }\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
diff --git a/tweak.err b/tweak.err
new file mode 100755 (executable)
index 0000000..4c9a7fa
--- /dev/null
+++ b/tweak.err
@@ -0,0 +1 @@
+tweak.c(38): Warning! W131: No prototype found for function 'outp'
diff --git a/tweak.h b/tweak.h
index 8cfeb77cd3a727e2800e0d0b846a3acbd3f24515..5eaa74d3e158ea8c4cdc9dac48c0ce59d98ed96d 100755 (executable)
--- a/tweak.h
+++ b/tweak.h
@@ -1,5 +1,13 @@
 #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
diff --git a/tweak.o b/tweak.o
index c77bfdc04ed0d0cc28fef6a7df96e1bfff4e1d88..cb1fe33265c7ccaca80fb2a5e6ec852c31242186 100755 (executable)
Binary files a/tweak.o and b/tweak.o differ