X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fpcxtest.c;h=1c80dce78cd3fb318bb6c30c55a7e53c36df921d;hb=280b2698e9eb1af403b0ae29c357a4ae8fdd51a3;hp=be51733b77ce894dbeafdbdbcf4e517ea9ed6801;hpb=18e9a8fb1179c8843a3dc67cbb8f69250265858f;p=16.git diff --git a/src/pcxtest.c b/src/pcxtest.c index be51733b..1c80dce7 100755 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -27,7 +27,7 @@ #include "src/lib/bitmap.h" #include "src/lib/planar.h" -word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ +global_game_variables_t gvar; /* void @@ -70,7 +70,7 @@ void main() { bmp = bitmapLoadPcx("data/koishi^^.pcx"); // bmp = bitmapLoadPcx("16/PCX_LIB/chikyuu.pcx"); p = planar_buf_from_bitmap(&bmp); - modexEnter(); + VGAmodeX(1, &gvar); /* fix up the palette and everything */ modexPalUpdate1(bmp.palette); @@ -87,7 +87,7 @@ void main() { start = *clockw; //for(i=0; i<100 ;i++) { //0000 modexDrawBmp(&page, 20, 20, &bmp); - modexDrawBmp(&page, 100, 100, &bmp); + modexDrawBmp(&page, 160, 120, &bmp); //} t1 = (*clockw-start) /18.2; @@ -108,7 +108,7 @@ void main() { start = *clockw; //for(i=0; i<100 ;i++) { //0000 modexDrawSprite(&page, 20, 20, &bmp); - modexDrawSprite(&page, 100, 100, &bmp); + modexDrawSprite(&page, 160, 120, &bmp); //} //_fmemset(MK_FP(0xA000, 0), (int)p->plane, SCREEN_WIDTH*(SCREEN_HEIGHT*2)); //modexDrawBmp(&page, 0, 0, &bmp); @@ -116,18 +116,23 @@ void main() { { //DrawPBuf(&page, 0, 0, p, 0); } - modexLeave(); - printf("main=%Fp\n", &i); + VGAmodeX(0, &gvar); + /*printf("\nmain=%Fp\n\n", &i); + printf("bmp.data=%Fp\n", bmp.data); + printf("*bmp.data=%Fp\n", *(bmp.data)); + printf("&bmp.data=%Fp\n", &(bmp.data)); printf("\n%d\n", sizeof(p->plane)); - printf("%d\n", sizeof(bmp)); + printf("%d\n", sizeof(bmp));*/ /*for(i=0; i<(320*240); i++) { fprintf(stdout, "%d", bmp.data[i]); - if(i%320==0) fprintf(stdout, "\n"); + if(i%bmp.width==0) fprintf(stdout, "\n"); }*/ printf("CPU to VGA: %f\n", t1); printf("VGA to VGA: %f\n", t2); + printf("page.width: %u\n", page.width); + printf("page.height: %u\n", page.height); return; }