• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

wwww


Commit MetaInfo

修訂1ff7522be9df2fd844d372e4a3f510a1bc9a5519 (tree)
時間2016-05-06 08:05:35
作者sparky4 <sparky4@cock...>
Commitersparky4

Log Message

joncambell321 please help test.exe creates garbage if the 2nd rendering page is written writing beyon the 2nd page sw size breaks the program of all programs wwwwwwwww

Change Summary

差異

--- a/makefile
+++ b/makefile
@@ -117,8 +117,8 @@ tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
117117 tesuto.$(OBJ): $(SRC)tesuto.c
118118 wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c
119119
120-test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS)
121- wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) -fm=test.mah
120+test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB)
121+ wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB) -fm=test.mah
122122
123123 test2.exe: test2.$(OBJ) $(DOSLIBLIBS) gfx.lib
124124 wcl $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -35,7 +35,7 @@ player_t player[MaxPlayers];
3535 //page_t screen, gvar.video.page[1], gvar.video.page[2];
3636 map_view_t mv[3];
3737 bitmap_t p;
38-word pn=0;
38+//word pn=0; //i forgot ww
3939 static planar_buf_t huge *pp;
4040 float t;
4141 sword bakapee;
--- a/src/test.c
+++ b/src/test.c
@@ -23,15 +23,18 @@
2323 #include <stdio.h>
2424 #include "src/lib/modex16.h"
2525 #include "src/lib/16_in.h"
26+#include "src/lib/scroll16.h"
2627
2728 global_game_variables_t gvar;
2829 player_t player[MaxPlayers];
30+map_view_t mv[2];
31+pan_t pan;
2932
3033 void main(int argc, char *argv[])
3134 {
3235 int i, j;
3336 word startclk, endclk;
34- word p, k;
37+ word k;
3538 byte *pal, *pal2;
3639 sword bakapee;
3740
@@ -79,6 +82,12 @@ void main(int argc, char *argv[])
7982
8083 /* set up the page, but with 16 pixels on all borders in offscreen mem */
8184 modexHiganbanaPageSetup(&gvar.video);
85+ for(i=0;i<gvar.video.num_of_pages-2;i++)
86+ {
87+ mv[i].page = &gvar.video.page[i];
88+ mv[i].video = &gvar.video;
89+ mv[i].pan = &pan;
90+ }
8291 // gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);
8392 // gvar.video.page[1] = modexNextPage(&gvar.video.page[0]);
8493 // gvar.video.page[0].width += 32;
@@ -97,7 +106,7 @@ void main(int argc, char *argv[])
97106 /* fade in */
98107 modexFadeOn(1, pal2);
99108
100- i=0,k=0,j=0,p=1;
109+ i=0,k=0,j=0,pan.pn=1;
101110 startclk = *clockw;
102111 while(!IN_KeyDown(sc_Escape))
103112 {
@@ -108,23 +117,23 @@ void main(int argc, char *argv[])
108117 case 0:
109118 pee:
110119 /* go right */
111- gvar.video.page[p].dx++;
120+ gvar.video.page[pan.pn].dx++;
112121 if(i==5){ if(j>=31){ i++; j=0; goto baka; }else j++; }else
113122 if(j>=32){ k++; j=0; }else j++;
114123 break;
115124 case 1:
116125 /* go left */
117- gvar.video.page[p].dx--;
126+ gvar.video.page[pan.pn].dx--;
118127 if(j>=32){ k++; j=0; }else j++;
119128 break;
120129 case 2:
121130 /* go up */
122- gvar.video.page[p].dy++;
131+ gvar.video.page[pan.pn].dy++;
123132 if(j>=32){ k++; j=0; }else j++;
124133 break;
125134 case 3:
126135 /* go down */
127- gvar.video.page[p].dy--;
136+ gvar.video.page[pan.pn].dy--;
128137 if(j>=32){ k=0; j=0; i++; }else j++;
129138 break;
130139 default:
@@ -141,11 +150,12 @@ void main(int argc, char *argv[])
141150 modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 42);
142151 modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 128);
143152 }
153+ panpagemanual(mv, player, 0);
144154 }
145- if(IN_KeyDown(2)) p=0;
146- if(IN_KeyDown(3)) p=1;
155+ if(IN_KeyDown(2)) pan.pn=0;
156+ if(IN_KeyDown(3)) pan.pn=1;
147157 //if(IN_KeyDown(6)) modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[0].sw-64, gvar.video.page[0].sh-16, 45);
148- modexShowPage(&gvar.video.page[p]);
158+ modexShowPage(&gvar.video.page[pan.pn]);
149159 }
150160
151161 endclk = *clockw;