qqqqqqqq\r
\r
Project 16 test.exe. This is just a test file!\r
-version Feb 10 2017 09:25:47\r
+version Feb 10 2017 09:28:45\r
VL_PrintmodexmemInfo:\r
Virtual Screen: 352x272 Tile: 22x17=((Virtual Screen)/16)\r
Screen: 320x240 Tile: 20x15=((Screen)/16)\r
[1]=(a000:5d80) size=23936 w=352 h=272 sw=320 sh=240 pi=1408\r
[2]=(a000:bb00) size=8448 w=352 h=96 sw=352 sh=96 pi=1408\r
[3]=(a000:dc00) size=8448 w=352 h=96 sw=352 sh=96 pi=1408\r
-tx=1 ty=1 player.d=2\r
+tx=1 ty=1 player.d=3\r
\r
====\r
0 paloffset= 255\r
}\r
}\r
\r
+void VL_LoadPalFilewithoffset(const char *filename, byte *palette, word o)\r
+{\r
+ int fd;\r
+\r
+ fd = open(filename,O_RDONLY|O_BINARY);\r
+ if (fd >= 0) {\r
+ word i;\r
+\r
+ read(fd,palette, PAL_SIZE);\r
+ close(fd);\r
+\r
+ vga_palette_lseek(o);\r
+ for (i=o;i < 256-o;i++) vga_palette_write(palette[(i*3)+0]>>2,palette[(i*3)+1]>>2,palette[(i*3)+2]>>2);\r
+ }\r
+}\r
+\r
\r
void\r
modexSavePalFile(char *filename, byte *pal) {\r
byte *modexNewPal();\r
void modexLoadPalFile(char *filename, byte **palette);\r
void VL_LoadPalFile(const char *filename, byte *palette);\r
+void VL_LoadPalFilewithoffset(const char *filename, byte *palette, word o);\r
void modexSavePalFile(char *filename, byte *palette);\r
\r
/* fixed palette functions */\r
case 0:\r
#endif\r
#ifndef TILERENDER\r
- if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i);\r
+ if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
#else\r
modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, i);\r
/* then the sprite. note modding ram ptr means we just draw to (x&3,0) */\r
#define HGQ 55\r
\r
static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
-static byte palette[PAL_SIZE];\r
+static byte *palette;//[PAL_SIZE];\r
\r
void main(int argc, char *argv[])\r
{\r
Startup16(&gvar);\r
\r
/* save the palette */\r
- //====pal = modexNewPal();\r
+ palette = modexNewPal();\r
//====modexPalSave(pal);\r
//====modexFadeOff(1, pal);\r
//====modexPalBlack();\r
EN_initplayer(&player, 0, &gvar.video);\r
\r
VGAmodeX(1, 1, &gvar);\r
- //====modexPalBlack();\r
+ modexPalBlack();\r
\r
/* load our palette */\r
VL_LoadPalFile("data/16.pal", &gvar.video.palette);\r
bmp1.offset=(paloffset/3);\r
VL_palette(&bmp1, &gvar.video.palette, &paloffset, 0, 0);\r
\r
- VL_LoadPalFile("data/default.pal", &palette);\r
+ //VL_LoadPalFilewithoffset("data/default.pal", &palette, paloffset);\r
+ modexLoadPalFile("data/16t.pal", &palette);\r
bmp2.offset=(paloffset/3);\r
- VL_palette(&bmp2, &palette, &paloffset, 0, 0);\r
+ VL_palette(&bmp2, palette, &paloffset, 0, 0);\r
//====modexLoadPalFile("data/default.pal", &pal2);\r
\r
/* overscan show */\r