OSDN Git Service

PEE!!!
authorsparky4 <sparky4@cock.li>
Fri, 31 Jul 2015 03:44:56 +0000 (22:44 -0500)
committersparky4 <sparky4@cock.li>
Fri, 31 Jul 2015 03:44:56 +0000 (22:44 -0500)
modified:   16.exe
modified:   inputest.exe
modified:   scroll.exe
modified:   sountest.exe
modified:   src/lib/16_in.c
modified:   src/lib/16_in.h
modified:   src/lib/scroll16.c
modified:   src/scroll.c

16.exe
inputest.exe
scroll.exe
sountest.exe
src/lib/16_in.c
src/lib/16_in.h
src/lib/scroll16.c
src/scroll.c

diff --git a/16.exe b/16.exe
index 3cdce8a..14810f3 100644 (file)
Binary files a/16.exe and b/16.exe differ
index 81d917f..c9ce4ab 100644 (file)
Binary files a/inputest.exe and b/inputest.exe differ
index 53216d3..c35387a 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
index 4577d0d..40741b6 100644 (file)
Binary files a/sountest.exe and b/sountest.exe differ
index b2f3136..fd812ff 100644 (file)
@@ -851,16 +851,15 @@ register  KeyboardDef     *def;
                                mx = motion_Right,my = motion_Down;*/\r
 \r
                        if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){
-                       \r
-                       if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down] && player[playnum].info.dir == 2))// || player[playnum].info.dir == 0)\r
+                       if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down] && player[playnum].info.dir == 2) || player[playnum].info.dir == 0)\r
                                my = motion_Up;\r
-                       if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up] && player[playnum].info.dir == 2))// || player[playnum].info.dir == 4)\r
+                       if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up] && player[playnum].info.dir == 2) || player[playnum].info.dir == 4)\r
                                my = motion_Down;\r
 \r
                        }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){\r
-                       if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right] && player[playnum].info.dir == 2))// || player[playnum].info.dir == 1)\r
+                       if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right] && player[playnum].info.dir == 2) || player[playnum].info.dir == 1)\r
                                mx = motion_Left;\r
-                       if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left] && player[playnum].info.dir == 2))// || player[playnum].info.dir == 3)\r
+                       if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left] && player[playnum].info.dir == 2) || player[playnum].info.dir == 3)\r
                                mx = motion_Right;\r
                        }\r
                        if (inpu.Keyboard[def->button0])\r
index 9b3e9db..e092c1d 100644 (file)
@@ -220,7 +220,7 @@ typedef     struct
        word speed;             //player speed!\r
        bitmap_t data; //supposively the sprite sheet data\r
        sword hp; //hitpoints of the player
-       word persist_aniframe;    /* gonna be increased to 1 before being used, so 0 is ok for default */\r
+       sword persist_aniframe;    /* gonna be increased to 1 before being used, so 0 is ok for default */\r
        CursorInfo      info;\r
        ControlType     Controls;
 } player_t;\r
index fa0061d..c5fe5fe 100644 (file)
@@ -34,6 +34,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        if(pip[0].tx >= 0 && pip[0].tx+20 < pip[0].map->width && player[pn].tx == pip[0].tx + 10 &&
                        !(pip[0].map->data[(player[pn].tx)+(pip[0].map->width*(player[pn].ty-1))] == 0))//!(player[pn].tx+1 == TRIGGX && player[pn].ty == TRIGGY))      //collision detection!
                        {
+                               modexprint(pip[1].page, 320, (player[pn].q*8), 1, player[pn].q, 0, (byte *)player[pn].q);
                                if(player[pn].q<=(TILEWH/(player[pn].speed)))
                                {
                                        INC_PER_FRAME;
@@ -71,6 +72,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        if(pip[0].tx > 0 && pip[0].tx+20 <= pip[0].map->width && player[pn].tx == pip[0].tx + 10 &&
                        !(pip[0].map->data[(player[pn].tx-2)+(pip[0].map->width*(player[pn].ty-1))] == 0))//!(player[pn].tx-1 == TRIGGX && player[pn].ty == TRIGGY))    //collision detection!
                        {
+                               modexprint(pip[1].page, 320, (player[pn].q*8), 1, player[pn].q, 0, (byte *)player[pn].q);
                                if(player[pn].q<=(TILEWH/(player[pn].speed)))
                                {
                                        INC_PER_FRAME;
@@ -108,6 +110,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        if(pip[0].ty >= 0 && pip[0].ty+15 < pip[0].map->height && player[pn].ty == pip[0].ty + 8 &&
                        !(pip[0].map->data[(player[pn].tx-1)+(pip[0].map->width*(player[pn].ty))] == 0))//!(player[pn].tx == TRIGGX && player[pn].ty+1 == TRIGGY))      //collision detection!
                        {
+                               modexprint(pip[1].page, 320, (player[pn].q*8), 1, player[pn].q, 0, (byte *)player[pn].q);
                                if(player[pn].q<=(TILEWH/(player[pn].speed)))
                                {
                                        INC_PER_FRAME;
@@ -145,6 +148,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        if(pip[0].ty > 0 && pip[0].ty+15 <= pip[0].map->height && player[pn].ty == pip[0].ty + 8 &&
                        !(pip[0].map->data[(player[pn].tx-1)+(pip[0].map->width*(player[pn].ty-2))] == 0))//!(player[pn].tx == TRIGGX && player[pn].ty-1 == TRIGGY))    //collision detection!
                        {
+                               modexprint(pip[1].page, 320, (player[pn].q*8), 1, player[pn].q, 0, (byte *)player[pn].q);
                                if(player[pn].q<=(TILEWH/(player[pn].speed)))
                                {
                                        INC_PER_FRAME;
@@ -434,8 +438,8 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
 {
        word rx;
        word ry;
-       word textx;
-       word texty;
+       word textx=0;
+       word texty=0;
        //if(i==0) i=2;
        if(i==0)
        {
@@ -453,12 +457,13 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
                                modexDrawBmpRegion(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));
                        break;
                        case 1:
+                               modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((word)(t->debug_data))); //currently the over scan color!
                                //modexprintbig(page, x, y, 1, 15, 0, (t->debug_data));
                                /*for(texty=0; texty<2; texty++)
                                {
                                        for(textx=0; textx<2; textx++)
                                        {*/
-                                               modexprint(page, x+(textx*8), y+(texty*8), 1, (word)(t->debug_data), 0, (t->debug_data));
+//                                             modexprint(page, x+(textx*8), y+(texty*8), 1, (word)(t->debug_data), 0, (t->debug_data));
 /*                                     }
                                }*/
                        break;
index 6e6dc03..9afbbcd 100644 (file)
@@ -24,6 +24,8 @@
 #include "src/lib/mapread.h"
 #include "src/lib/wcpu/wcpu.h"
 
+//#define FADE
+
 //word far *clock= (word far*) 0x046C; /* 18.2hz clock */
 
 void main()
@@ -42,7 +44,9 @@ void main()
        map_view_t mv[3];
        map_view_t *bg, *spri, *mask;//, *tmp;
        //map_view_db_t pgid[4];
+#ifdef FADE
        byte *dpal, *gpal;
+#endif
        byte *ptr;
        byte *mappalptr;
        byte *mesg=malloc(sizeof(dword));
@@ -94,13 +98,17 @@ void main()
        IN_Default(0,&player,ctrl_Joystick);
 
        /* save the palette */
+#ifdef FADE
        dpal = modexNewPal();
        modexPalSave(dpal);
        modexFadeOff(4, dpal);
+#endif
 
        textInit();
        VGAmodeX(1);
+#ifdef FADE
        modexPalBlack();        //reset the palette~
+#endif
 //     printf("Total used @ before palette initiation:         %zu\n", oldfreemem-GetFreeSize());
 //++++ player[0].data.offset=(paloffset/3);
 //++++ modexPalUpdate(&player[0].data, &paloffset, 0, 0);
@@ -111,10 +119,12 @@ void main()
 //     printf("\n====\n");
 //     printf("0       paloffset=      %d\n", paloffset/3);
 //     printf("====\n\n");
+#ifdef FADE
        gpal = modexNewPal();
        modexPalSave(gpal);
        modexSavePalFile("data/g.pal", gpal);
        modexPalBlack();        //so player will not see loadings~
+#endif
 
        /* setup camera and screen~ */
        screen = modexDefaultPage();
@@ -163,12 +173,13 @@ void main()
        modexShowPage(spri->page);
 //     printf("Total used @ before loop:                       %zu\n", oldfreemem-GetFreeSize());
        modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1);
-//++++ modexFadeOn(4, gpal);
-       modexFadeOn(4, dpal);
+#ifdef FADE
+       modexFadeOn(4, gpal);
+#endif
        while(!IN_KeyDown(sc_Escape) && player[0].hp>0)
        {
                sprintf(mesg, "%lu", tiku);
-               modexprint(mv[1].page, 0, 0, 1, 15, 0, mesg);
+               modexprint(mv[1].page, 16, 16, 1, 15, 0, mesg);
                shinku(mv[1].page, &gvar);
                IN_ReadControl(0,&player);
        //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square
@@ -310,6 +321,7 @@ void main()
        if(IN_KeyDown(3)){ modexShowPage(spri->page); panpagenum=1; }
        if(IN_KeyDown(4)){ modexShowPage(mask->page); panpagenum=2; }
        if(IN_KeyDown(25)){ pdump(bg->page); pdump(spri->page); }       //p
+#ifdef FADE
        if(IN_KeyDown(24)){ modexPalUpdate0(gpal); paloffset=0; pdump(bg->page); pdump(spri->page); }
        if(IN_KeyDown(22)){
        paloffset=0; modexPalBlack(); modexPalUpdate(&player[0].data, &paloffset, 0, 0);
@@ -317,6 +329,7 @@ void main()
         modexPalUpdate(map.tiles->data, &paloffset, 0, 0);
        printf("2paloffset      =       %d\n", paloffset/3);
         pdump(bg->page); pdump(spri->page); }
+#endif
        //pan switch
        //if(IN_KeyDown(88)){if(!panswitch) panswitch++; else panswitch--; }    //f12
        //TSR
@@ -338,9 +351,11 @@ void main()
 
        /* fade back to text mode */
        /* but 1st lets save the game palette~ */
+#ifdef FADE
        modexPalSave(gpal);
        modexSavePalFile("data/g.pal", gpal);
        modexFadeOff(4, gpal);
+#endif
        VGAmodeX(0);
        IN_Shutdown();
        printf("Project 16 scroll.exe\n");
@@ -377,5 +392,7 @@ void main()
                default: cpus = "internal error"; break;
        }
        printf("detected CPU type: %s\n", cpus);
+#ifdef FADE
        modexFadeOn(4, dpal);
+#endif
 }