//printf("%02X ", (int) p->plane[plane][i++]);\r
// _fmemcpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
// printf("buff %u==%s\n", y, *buff);\r
- _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=rw]), rw/4);\r
+ _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=p->pwidth]), rw/4);\r
//}\r
}\r
x=px;\r
\r
/*temp*/\r
void\r
-DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)\r
+modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)\r
{\r
int plane;\r
int i;\r
void oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite);
void modexDrawBmp(page_t *page, int x, int y, bitmap_t *bmp);
void modexDrawBmpRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp);
-void modexDrawPlanarBuf(page_t *page, int x, int y, planar_buf_t *bmp);
void modexDrawSprite(page_t *page, int x, int y, bitmap_t *bmp);
void modexDrawSpriteRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp);
void modexCopyPageRegion(page_t *dest, page_t *src, word sx, word sy, word dx, word dy, word width, word height);
#include "src/lib/planar.h"\r
\r
global_game_variables_t gvar;\r
-bitmap_t bmp;\r
-planar_buf_t *p;\r
+bitmap_t bmp, ptmpbt;\r
+planar_buf_t *p, *ptmp;\r
\r
void main(int argc, char *argv[])\r
{\r
\r
bmp = bitmapLoadPcx(bakapeee);\r
p = planar_buf_from_bitmap(&bmp);\r
+ ptmpbt = bitmapLoadPcx("data/ptmp.pcx");\r
+ ptmp = planar_buf_from_bitmap(&bmp);\r
VGAmodeX(baka, &gvar);\r
gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
\r
// t2 = (*clockw-start)/18.2;\r
start = *clockw;\r
for(i=0; i<100 ;i++) {\r
- //DrawPBuf(&gvar.video.page[0], 0, 0, p, 0);\r
+ modexDrawPBuf(&gvar.video.page[0], 0, 0, p, 0);\r
}\r
t2 = (*clockw-start) /18.2;\r
+ getch();\r
+ modexPalUpdate1(ptmpbt.palette);\r
+ modexDrawPBufRegion(&gvar.video.page[0], 140, 140, 48, 32, 24, 32, ptmp, 1);\r
while(!kbhit())\r
{\r
}\r
// printf("Total used @ before palette initiation: %zu\n", oldfreemem-GetFreeSize());
//++++ player[0].data.offset=(paloffset/3);
//++++ modexPalUpdate1(&player[0].data, &paloffset, 0, 0);
- modexPalUpdate1(gpal);
+ modexPalUpdate1(p.palette);
//printf(" %d\n", sizeof(ptmp->data));
//printf("1: %d\n", paloffset);
//++++ map.tiles->data->offset=(paloffset/3);