low_address = LOW_ADDRESS | (offset << 8);\r
\r
/* wait for appropriate timing and then program CRTC */\r
- //while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE));\r
+ while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE));\r
outpw(CRTC_INDEX, high_address);\r
outpw(CRTC_INDEX, low_address);\r
outp(CRTC_INDEX, 0x13);\r
outp(CRTC_DATA, crtcOffset);\r
\r
/* wait for one retrace */\r
- //while (!(inp(INPUT_STATUS_1) & VRETRACE));\r
+ while (!(inp(INPUT_STATUS_1) & VRETRACE));\r
\r
/* do PEL panning here */\r
outp(AC_INDEX, 0x33);\r
modexCopyPageRegion(mv[3].page, mv[0].page, 0/**/, 0/**/, 32, 16, 16, 32);
}
-
void near
mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
{
{
word x = (0) + gv->video.page[/*!*/(gv->video.p)].dx; // follow the screen
word y = (0) + gv->video.page[/*!*/(gv->video.p)].dy; // follow the screen
- word w = 64;
- word h = 8;
- word col = 7;
- word bgcol = 0;
- word type = 1;
+ word w = 64, h = 8, col = 7, bgcol = 0, type = 1;
byte o,o2,i;
- //modexClearRegion(&gv->video.page[2], 0, 0, gv->video.page[2].sw, gv->video.page[2].sh, 47);
- //modexClearRegion(&gv->video.page[3], 0, 0, gv->video.page[3].sw, gv->video.page[3].sh, 45);
//modexCopyPageRegion(pip[1].page, pip[2].page, 16, 16, 16, 16, (14*8)+4, 8+4);
/* block copy to visible RAM from offscreen */
// vga_setup_wm1_block_copy();
break;
}
-///*!*/(pip->video->p)
-
#ifdef SPRITE
/*#define FRAME1 PBUFSFUN(pip[PAGENUMB].page, 0, 0, 32, dire, 16, 32, PLAYERBMPDATA);
#define FRAME2 PBUFSFUN(pip[PAGENUMB].page, 0, 0, 16, dire, 16, 32, PLAYERBMPDATA);
#endif
if(!pageflipflop)
modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 36);
- else modexCopyPageRegion(pip[3].page, pip[0].page, bx, by, 16, 0, 16, 36);
+ else modexCopyPageRegion(pip[3].page, pip[0].page, bx, by, 0, 0, 16, 32);
//modexCopyPageRegion(page_t *dest, page_t *src, word sx, word sy, word dx, word dy, word width, word height);
//modexCopyPageRegion(pip[3].page, pip[!(pip->video->p)].page, x-4, y-4, 0, 128, 28, 36);
/*modexCopyPageRegion(pip[pip->video->p].page,
// delay(500);
//printf("x=%d y=%d bx=%d by=%d\n", x, y, bx, by);
pip->video->r=1;
- //TODO: mask copy //modexCopyPageRegion(dest->page, src->page, x-4, y-4, x-4, y-4, 28, 40);
- //modexClearRegion(top->page, 66, 66, 2, 40, 0);
- //modexCopyPageRegion(dest->page, top->page, 66, 66, 66, 66, 2, 40);
}
#define MODEX //this is for mode x initiating
//word far *clock= (word far*) 0x046C; /* 18.2hz clock */
-bitmap_t *p;
+//bitmap_t *p;
global_game_variables_t gvar;
static map_t map;
player_t player[MaxPlayers];
//mappalptr = map.tiles->btdata->palette;
/* data */
- p = malloc(48*128); //TODO use exmm
- player[0].data = p;
- *p = bitmapLoadPcx("data/chikyuu.pcx"); // load sprite
+ player[0].data = malloc(48*128); //TODO use exmm
*player[0].data = bitmapLoadPcx("data/chikyuu.pcx"); // load sprite
//npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite
// printf("Total used @ before palette initiation: %zu\n", oldfreemem-GetFreeSize());
//++++ player[0].data.offset=(paloffset/3);
//++++ modexPalUpdate1(&player[0].data, &paloffset, 0, 0);
- modexPalUpdate1(p->palette);
+ modexPalUpdate1(player[0].data->palette);
//++++0000 modexPalUpdate1(map.tiles->btdata->palette);
//printf(" %d\n", sizeof(ptmp->data));
//printf("1: %d\n", paloffset);
//modexClearRegion(mv[1].page, player[0].x, player[0].y-TILEWH, 16, 32, 15);
#else
//PBUFSFUN(mv[1].page, player[0].x, player[0].y-TILEWH, 16, 64, 24, 32, PLAYERBMPDATA);
- PBUFSFUN(mv[0].page, player[0].x, player[0].y-TILEWH, 16, 64, 16, 32, p);
+ PBUFSFUN(mv[0].page, player[0].x, player[0].y-TILEWH, 16, 64, 16, 32, player[0].data);
#endif
if(!pageflipflop) modexShowPage(mv[1].page);
}
if(IN_KeyDown(66)) //f8
{
- modexDrawSprite(mv[0].page, 16, 16, p);
+// modexDrawSprite(mv[0].page, 16, 16, p);
modexDrawSprite(mv[0].page, 32+48, 16, (player[0].data));
}
//TODO fmemtest into page