X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fplanrpcx.c;h=4a8295920fb72b3b9421a3b42c8f55e8de87faf4;hb=71a92773e710064cda8e127e92e5469a7fc4c134;hp=4829b54f7181cc05aa548798afde56aecc40f8ae;hpb=4b889090f4bfb628d99a7940bc14469b3de12dba;p=16.git diff --git a/src/planrpcx.c b/src/planrpcx.c index 4829b54f..4a829592 100755 --- a/src/planrpcx.c +++ b/src/planrpcx.c @@ -28,11 +28,11 @@ #include "src/lib/planar.h" global_game_variables_t gvar; +bitmap_t bmp; +planar_buf_t *p; void main(int argc, char *argv[]) { - bitmap_t bmp; - planar_buf_t *p; int i; word start; int plane; @@ -44,15 +44,13 @@ void main(int argc, char *argv[]) bakapeee = malloc(64); - if(argv[1]) bakapeee = argv[1]; - else bakapeee = "data/koishi~.pcx"; + if(argv[1]) bakapeee = argv[1]; + else bakapeee = "data/koishi~.pcx"; -// if(argv[2]) baka = atoi(argv[2]); -// else -baka = 1; -//0000 bmp = bitmapLoadPcx("data/koishi~~.pcx"); - bmp = bitmapLoadPcx(bakapeee); - //bmp = bitmapLoadPcx("data/koishi~.pcx"); + if(argv[2]) baka = atoi(argv[2]); + else baka = 1; + + bmp = bitmapLoadPcx(bakapeee); p = planar_buf_from_bitmap(&bmp); VGAmodeX(baka, &gvar); gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); @@ -80,7 +78,7 @@ baka = 1; // t2 = (*clockw-start)/18.2; start = *clockw; for(i=0; i<100 ;i++) { - DrawPBuf(&gvar.video.page[0], gvar.video.page[0].sw-(p->width), gvar.video.page[0].sh-(p->height), p, 0); + DrawPBuf(&gvar.video.page[0], 0, 0, p, 0); } t2 = (*clockw-start) /18.2; while(!kbhit()) @@ -110,6 +108,7 @@ baka = 1; fprintf(stderr,"ph=%d\n", p->height); fprintf(stderr,"ppw=%d\n", p->pwidth); fprintf(stderr,"%d\n", sizeof(bmp)); + fprintf(stderr,"%dx%d\n", gvar.video.page[0].sw-(p->width), gvar.video.page[0].sh-(p->height)); planar_buf_free(p); fprintf(stderr, "modexDrawBmp: %f\n", t1); fprintf(stderr, "DrawPBuf: %f\n", t2);