#include "tweak.h"\r
+#include "types.h"\r
void tw_opengraph2()\r
{\r
__asm{\r
out dx, ax ; 384 wide\r
}\r
}\r
+\r
+void tw_setrgbpalette(byte *p)\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
+// }\r
+// modexWaitBorder(); /* waits one retrace -- less flicker */\r
+// for(; i<PAL_SIZE; i++)\r
+// {\r
+// outp(PAL_DATA_REG, p[(i)]);\r
+// }\r
+}\r
--- /dev/null
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+/*\r
+ * Just some handy typedefs that make it easier to think about the low\r
+ * level code\r
+ */\r
+\r
+#ifndef _TYPE_H_\r
+#define _TYPE_H_\r
+\r
+typedef unsigned char byte;\r
+typedef unsigned short word;\r
+typedef unsigned long dword;\r
+typedef signed char sbyte;\r
+typedef signed short sword;\r
+typedef signed long sdword;\r
+\r
+typedef unsigned int iword;\r
+typedef signed int siword;\r
+\r
+typedef enum {false,true} boolean;\r
+\r
+#endif/*_TYPE_H_*/\r