]> 4ch.mooo.com Git - 16.git/commitdiff
joncambell321 please help test.exe creates garbage if the 2nd rendering page is writt...
authorsparky4 <sparky4@cock.li>
Thu, 5 May 2016 23:05:35 +0000 (18:05 -0500)
committersparky4 <sparky4@cock.li>
Thu, 5 May 2016 23:05:35 +0000 (18:05 -0500)
makefile
src/scroll.c
src/test.c

index 9e002883a96c4b481ce4004025b1433a811429cb..86c191bc8c609114e31b487fad04436578b4a4d9 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -117,8 +117,8 @@ tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
 tesuto.$(OBJ): $(SRC)tesuto.c
        wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c
 
-test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS)
-       wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) -fm=test.mah
+test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB)
+       wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB) -fm=test.mah
 
 test2.exe: test2.$(OBJ) $(DOSLIBLIBS) gfx.lib
        wcl $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah
index deed3df9dfdb7e289cbf1227ab1256dcbf2b0893..f371f87d1d3ddd494ddf23f4829ec404218788a7 100755 (executable)
@@ -35,7 +35,7 @@ player_t player[MaxPlayers];
 //page_t screen, gvar.video.page[1], gvar.video.page[2];
 map_view_t mv[3];
 bitmap_t p;
-word pn=0;
+//word pn=0; //i forgot ww
 static planar_buf_t huge *pp;
 float t;
 sword bakapee;
index 02fdf1d5fb8e60992c6a7dfc84de7f817ebe6dc4..89f1d0ff1fceef502ca45379d3807d257e0df822 100755 (executable)
 #include <stdio.h>\r
 #include "src/lib/modex16.h"\r
 #include "src/lib/16_in.h"\r
+#include "src/lib/scroll16.h"\r
 \r
 global_game_variables_t gvar;\r
 player_t player[MaxPlayers];\r
+map_view_t mv[2];\r
+pan_t pan;\r
 \r
 void main(int argc, char *argv[])\r
 {\r
        int i, j;\r
        word startclk, endclk;\r
-       word p, k;\r
+       word k;\r
        byte *pal, *pal2;\r
        sword bakapee;\r
 \r
@@ -79,6 +82,12 @@ void main(int argc, char *argv[])
 \r
        /* set up the page, but with 16 pixels on all borders in offscreen mem */\r
        modexHiganbanaPageSetup(&gvar.video);\r
+       for(i=0;i<gvar.video.num_of_pages-2;i++)\r
+       {\r
+               mv[i].page = &gvar.video.page[i];\r
+               mv[i].video = &gvar.video;\r
+               mv[i].pan       = &pan;\r
+       }\r
 //     gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
 //     gvar.video.page[1] = modexNextPage(&gvar.video.page[0]);\r
 //     gvar.video.page[0].width += 32;\r
@@ -97,7 +106,7 @@ void main(int argc, char *argv[])
        /* fade in */\r
        modexFadeOn(1, pal2);\r
 \r
-       i=0,k=0,j=0,p=1;\r
+       i=0,k=0,j=0,pan.pn=1;\r
        startclk = *clockw;\r
        while(!IN_KeyDown(sc_Escape))\r
        {\r
@@ -108,23 +117,23 @@ void main(int argc, char *argv[])
                        case 0:\r
                                pee:\r
                                /* go right */\r
-                               gvar.video.page[p].dx++;\r
+                               gvar.video.page[pan.pn].dx++;\r
                                if(i==5){ if(j>=31){ i++; j=0; goto baka; }else j++; }else\r
                                if(j>=32){ k++; j=0; }else j++;\r
                        break;\r
                        case 1:\r
                                /* go left */\r
-                               gvar.video.page[p].dx--;\r
+                               gvar.video.page[pan.pn].dx--;\r
                                if(j>=32){ k++; j=0; }else j++;\r
                        break;\r
                        case 2:\r
                                /* go up */\r
-                               gvar.video.page[p].dy++;\r
+                               gvar.video.page[pan.pn].dy++;\r
                                if(j>=32){ k++; j=0; }else j++;\r
                        break;\r
                        case 3:\r
                                /* go down */\r
-                               gvar.video.page[p].dy--;\r
+                               gvar.video.page[pan.pn].dy--;\r
                                if(j>=32){ k=0; j=0; i++; }else j++;\r
                        break;\r
                        default:\r
@@ -141,11 +150,12 @@ void main(int argc, char *argv[])
                                modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 42);\r
                                modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 128);\r
                        }\r
+                       panpagemanual(mv, player, 0);\r
                }\r
-               if(IN_KeyDown(2)) p=0;\r
-               if(IN_KeyDown(3)) p=1;\r
+               if(IN_KeyDown(2)) pan.pn=0;\r
+               if(IN_KeyDown(3)) pan.pn=1;\r
                //if(IN_KeyDown(6)) modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[0].sw-64, gvar.video.page[0].sh-16, 45);\r
-               modexShowPage(&gvar.video.page[p]);\r
+               modexShowPage(&gvar.video.page[pan.pn]);\r
        }\r
 \r
        endclk = *clockw;\r