]> 4ch.mooo.com Git - 16.git/blobdiff - src/scroll.c
I cannot use the UINT32 Variable! wwww
[16.git] / src / scroll.c
old mode 100644 (file)
new mode 100755 (executable)
index ab6bedd..1261b7b
@@ -21,7 +21,7 @@
  */
 
 #include "src/lib/scroll16.h"
-#include "src/lib/mapread.h"
+//#include "src/lib/mapread.h"
 #include "src/lib/wcpu/wcpu.h"
 
 //#define FADE
@@ -54,9 +54,11 @@ void main()
 
        player[0].persist_aniframe=0;
        player[0].speed=4;
-
+       //0000printf("starting timer\n");
+//++++
        start_timer(&gvar);
-       gvar.frames_per_second = 60;
+//++++ gvar.frames_per_second = 60;
+//0000 printf("ok\n");
        //extern struct inconfig inpu;
 
 //     atexit(qclean());
@@ -72,6 +74,7 @@ void main()
        map.width=0;
        map.height=0;
        chkmap(&map, 1);
+//     printf("chkmap ok\n");
 //0000 fprintf(stderr, "yay map loaded~~\n");
        mv[0].map = ↦
        mv[1].map = ↦
@@ -82,15 +85,17 @@ void main()
        mappalptr = map.tiles->data->palette;
        /* data */
 //0000 printf("Total used @ before image loading:              %zu\n", oldfreemem-GetFreeSize());
-//++++ player[0].data = bitmapLoadPcx("data/ptmp.pcx"); // load sprite
+       player[0].data = bitmapLoadPcx("data/ptmp.pcx"); // load sprite
        //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite
 
        /* create the planar buffer */
 //0000 printf("Total used @ before planar buffer creation:     %zu\n", oldfreemem-GetFreeSize());
        p = planar_buf_from_bitmap(&player[0].data);
+//0000 printf("planar buffer ok\n");
 //0000 printf("Total used @ after planar buffer creation:      %zu\n", oldfreemem-GetFreeSize());
 
        /*      input!  */
+//0000 getch();
        IN_Startup();
        IN_Default(0,&player,ctrl_Joystick);
 
@@ -102,7 +107,7 @@ void main()
 #endif
 
        textInit();
-       VGAmodeX(1);
+       VGAmodeX(1, &gvar);
 #ifdef FADE
        modexPalBlack();        //reset the palette~
 #endif
@@ -341,7 +346,7 @@ void main()
        //TSR
        if(IN_KeyDown(87))      //f11
        {
-               VGAmodeX(0);
+               VGAmodeX(0, &gvar);
                IN_Shutdown();
                __asm
                {
@@ -362,9 +367,10 @@ void main()
        modexSavePalFile("data/g.pal", gpal);
        modexFadeOff(4, gpal);
 #endif
-       VGAmodeX(0);
+       VGAmodeX(0, &gvar);
        IN_Shutdown();
        printf("Project 16 scroll.exe. This is just a test file!\n");
+       printf("version %s\n", VERSION);
        printf("tx: %d\n", bg->tx);
        printf("ty: %d\n", bg->ty);
        printf("player[0].x: %d", player[0].x); printf("                player[0].y: %d\n", player[0].y);
@@ -386,7 +392,7 @@ void main()
 //     printf("player[0].info.x: %d", player[0].info.xaxis); printf("          player[0].info.y: %d\n", player[0].info.yaxis);
 //     printf("player[0].info.tx: %d", player[0].info.x); printf("             player[0].info.ty: %d\n", player[0].info.y);
        //printf("map.width=%d  map.height=%d   map.data[0]=%d\n", bg->map->width, bg->map->height, bg->map->data[0]);
-       
+
        switch(detectcpu())
        {
                case 0: cpus = "8086/8088 or 186/88"; break;