wwww
修訂 | 785c0951f7d623318d8b04f01793472d81d94a7d (tree) |
---|---|
時間 | 2016-05-05 00:46:06 |
作者 | sparky4 <sparky4@cock...> |
Commiter | sparky4 |
MORE WORK ON SCROLL wwwwwww
@@ -11,226 +11,26 @@ chkmap ok | ||
11 | 11 | [2], vmem_remain=256 |
12 | 12 | [3], video->page[i].pagesize=256 |
13 | 13 | [3], vmem_remain=0 |
14 | -player[0].d=2 | |
15 | -player[0].d=2 | |
16 | -player[0].d=2 | |
17 | -player[0].d=2 | |
18 | -player[0].d=2 | |
19 | -player[0].d=2 | |
20 | -player[0].d=2 | |
21 | -player[0].d=2 | |
22 | -player[0].d=2 | |
23 | -player[0].d=2 | |
24 | -player[0].d=2 | |
25 | -player[0].d=2 | |
26 | -player[0].d=2 | |
27 | -player[0].d=2 | |
28 | -player[0].d=3 | |
29 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
30 | -player[0].d=3 | |
31 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
32 | -player[0].d=3 | |
33 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
34 | -player[0].d=3 | |
35 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
36 | -player[0].d=3 | |
37 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
38 | -player[0].d=2 | |
39 | -player[0].d=3 | |
40 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
41 | -player[0].d=3 | |
42 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
43 | -player[0].d=3 | |
44 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
45 | -player[0].d=3 | |
46 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
47 | -player[0].d=3 | |
48 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
49 | -player[0].d=2 | |
50 | -player[0].d=3 | |
51 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
52 | -player[0].d=3 | |
53 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
54 | -player[0].d=3 | |
55 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
56 | -player[0].d=3 | |
57 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
58 | -player[0].d=3 | |
59 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
60 | -player[0].d=2 | |
61 | -player[0].d=3 | |
62 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
63 | -player[0].d=3 | |
64 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
65 | -player[0].d=3 | |
66 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
67 | -player[0].d=3 | |
68 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
69 | -player[0].d=3 | |
70 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
71 | -player[0].d=2 | |
72 | -player[0].d=3 | |
73 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
74 | -player[0].d=3 | |
75 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
76 | -player[0].d=3 | |
77 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
78 | -player[0].d=3 | |
79 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
80 | -player[0].d=3 | |
81 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
82 | -player[0].d=2 | |
83 | -player[0].d=3 | |
84 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
85 | -player[0].d=3 | |
86 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
87 | -player[0].d=3 | |
88 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
89 | -player[0].d=3 | |
90 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
91 | -player[0].d=3 | |
92 | -pip[0].page->tilesw=22 pip[0].page->tw=20 | |
93 | -player[0].d=2 | |
94 | -player[0].d=2 | |
95 | -player[0].d=2 | |
96 | -player[0].d=4 | |
97 | -player[0].d=4 | |
98 | -player[0].d=4 | |
99 | -player[0].d=4 | |
100 | -player[0].d=4 | |
101 | -player[0].d=2 | |
102 | -player[0].d=4 | |
103 | -player[0].d=4 | |
104 | -player[0].d=4 | |
105 | -player[0].d=4 | |
106 | -player[0].d=4 | |
107 | -player[0].d=2 | |
108 | -player[0].d=4 | |
109 | -player[0].d=4 | |
110 | -player[0].d=4 | |
111 | -player[0].d=4 | |
112 | -player[0].d=4 | |
113 | -player[0].d=2 | |
114 | -player[0].d=4 | |
115 | -player[0].d=4 | |
116 | -player[0].d=4 | |
117 | -player[0].d=4 | |
118 | -player[0].d=4 | |
119 | -player[0].d=2 | |
120 | -player[0].d=4 | |
121 | -player[0].d=4 | |
122 | -player[0].d=4 | |
123 | -player[0].d=4 | |
124 | -player[0].d=4 | |
125 | -player[0].d=2 | |
126 | -player[0].d=2 | |
127 | -player[0].d=2 | |
128 | -player[0].d=2 | |
129 | -player[0].d=2 | |
130 | -player[0].d=2 | |
131 | -player[0].d=2 | |
132 | -player[0].d=2 | |
133 | -player[0].d=2 | |
134 | -player[0].d=2 | |
135 | -player[0].d=2 | |
136 | -player[0].d=2 | |
137 | -player[0].d=2 | |
138 | -player[0].d=2 | |
139 | -player[0].d=2 | |
140 | -player[0].d=2 | |
141 | -player[0].d=0 | |
142 | -player[0].d=0 | |
143 | -player[0].d=0 | |
144 | -player[0].d=0 | |
145 | -player[0].d=0 | |
146 | -player[0].d=2 | |
147 | -player[0].d=0 | |
148 | -player[0].d=0 | |
149 | -player[0].d=0 | |
150 | -player[0].d=0 | |
151 | -player[0].d=0 | |
152 | -player[0].d=2 | |
153 | -player[0].d=0 | |
154 | -player[0].d=0 | |
155 | -player[0].d=0 | |
156 | -player[0].d=0 | |
157 | -player[0].d=0 | |
158 | -player[0].d=2 | |
159 | -player[0].d=0 | |
160 | -player[0].d=0 | |
161 | -player[0].d=0 | |
162 | -player[0].d=0 | |
163 | -player[0].d=0 | |
164 | -player[0].d=2 | |
165 | -player[0].d=0 | |
166 | -player[0].d=0 | |
167 | -player[0].d=0 | |
168 | -player[0].d=0 | |
169 | -player[0].d=0 | |
170 | -player[0].d=2 | |
171 | -player[0].d=0 | |
172 | -player[0].d=0 | |
173 | -player[0].d=0 | |
174 | -player[0].d=0 | |
175 | -player[0].d=0 | |
176 | -player[0].d=2 | |
177 | -player[0].d=0 | |
178 | -player[0].d=0 | |
179 | -player[0].d=0 | |
180 | -player[0].d=0 | |
181 | -player[0].d=0 | |
182 | -player[0].d=2 | |
183 | -player[0].d=0 | |
184 | -player[0].d=0 | |
185 | -player[0].d=0 | |
186 | -player[0].d=0 | |
187 | -player[0].d=0 | |
188 | -player[0].d=2 | |
189 | -player[0].d=1 | |
190 | -player[0].d=1 | |
191 | -player[0].d=1 | |
192 | -player[0].d=1 | |
193 | -player[0].d=1 | |
194 | -player[0].d=2 | |
195 | -player[0].d=1 | |
196 | -player[0].d=1 | |
197 | -player[0].d=1 | |
198 | -player[0].d=1 | |
199 | -player[0].d=1 | |
200 | -player[0].d=2 | |
201 | -player[0].d=1 | |
202 | -player[0].d=1 | |
203 | -player[0].d=1 | |
204 | -player[0].d=1 | |
205 | -player[0].d=1 | |
206 | -player[0].d=2 | |
207 | -player[0].d=1 | |
208 | -player[0].d=1 | |
209 | -player[0].d=1 | |
210 | -player[0].d=1 | |
211 | -player[0].d=1 | |
212 | -player[0].d=2 | |
213 | -player[0].d=2 | |
214 | 14 | Project 16 scroll.exe. This is just a test file! |
215 | -version May 3 2016 13:10:29 | |
216 | -tx: 2 | |
217 | -ty: 0 | |
218 | -player.x: 160 player.y: 80 | |
219 | -player.tx: 12 player.ty: 5 | |
220 | -player.triggx: 11 player.triggy: 5 | |
15 | +version May 4 2016 10:25:12 | |
16 | +tx: 15 | |
17 | +ty: 4 | |
18 | +player.x: 160 player.y: 128 | |
19 | +player.tx: 25 player.ty: 12 | |
20 | +player.triggx: 24 player.triggy: 12 | |
221 | 21 | player.hp: 4 player.q: 1 player.info.dir: 2 player.d: 2 pdir=1 |
222 | -tile data value at player trigger position: 1 | |
22 | +tile data value at player trigger position: 3 | |
223 | 23 | Virtual Screen: 352x272 |
224 | 24 | Screen: 320x240 |
225 | 25 | virtual tile resolution: 22x17 |
226 | 26 | tile resolution: 20x15 |
227 | 27 | middle tile position: 10x8 |
228 | 28 | video memory remaining: 0 |
229 | -page [0]=(a000:0008) | |
230 | - [1]=(a000:5d88) | |
231 | - [2]=(a000:bb8c) | |
232 | - [3]=(a000:000c) | |
233 | -mv[1].tx: 2 mv[1].ty: 0 panswitch=0 | |
29 | +page [0]=(a000:163c) | |
30 | + [1]=(a000:73bc) | |
31 | + [2]=(a000:bd14) | |
32 | + [3]=(a000:010c) | |
33 | +mv[1].tx: 15 mv[1].ty: 4 panswitch=0 | |
234 | 34 | |
235 | 35 | |
236 | 36 | detected CPU type: 386 or newer |
@@ -40,10 +40,11 @@ void walk(map_view_t *pip, player_t *player, word pn) | ||
40 | 40 | { |
41 | 41 | INC_PER_FRAME; |
42 | 42 | animatePlayer(pip, player, pn, 1); |
43 | + if(!pageflipflop) mapScrollRight(pip, player, !(pip[0].video->p), pn); else{ | |
43 | 44 | mapScrollRight(pip, player, 0, pn); |
44 | 45 | mapScrollRight(pip, player, 1, pn); |
45 | 46 | ScrollRight(pip, player, 2, pn); |
46 | - ScrollRight(pip, player, 3, pn); | |
47 | + ScrollRight(pip, player, 3, pn); } | |
47 | 48 | if(!pageflipflop) modexShowPage(pip[1].page); |
48 | 49 | player[pn].q++; |
49 | 50 | } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; } |
@@ -61,7 +62,7 @@ void walk(map_view_t *pip, player_t *player, word pn) | ||
61 | 62 | } |
62 | 63 | else |
63 | 64 | { |
64 | - modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); | |
65 | + if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); | |
65 | 66 | #ifdef SPRITE |
66 | 67 | PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATA); |
67 | 68 | #else |
@@ -83,10 +84,11 @@ void walk(map_view_t *pip, player_t *player, word pn) | ||
83 | 84 | { |
84 | 85 | INC_PER_FRAME; |
85 | 86 | animatePlayer(pip, player, pn, 1); |
87 | + if(!pageflipflop) mapScrollLeft(pip, player, !(pip[0].video->p), pn); else{ | |
86 | 88 | mapScrollLeft(pip, player, 0, pn); |
87 | 89 | mapScrollLeft(pip, player, 1, pn); |
88 | 90 | ScrollLeft(pip, player, 2, pn); |
89 | - ScrollLeft(pip, player, 3, pn); | |
91 | + ScrollLeft(pip, player, 3, pn); } | |
90 | 92 | if(!pageflipflop) modexShowPage(pip[1].page); |
91 | 93 | player[pn].q++; |
92 | 94 | } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; } |
@@ -104,7 +106,7 @@ void walk(map_view_t *pip, player_t *player, word pn) | ||
104 | 106 | } |
105 | 107 | else |
106 | 108 | { |
107 | - modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); | |
109 | + if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); | |
108 | 110 | #ifdef SPRITE |
109 | 111 | PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATA); |
110 | 112 | #else |
@@ -126,10 +128,11 @@ void walk(map_view_t *pip, player_t *player, word pn) | ||
126 | 128 | { |
127 | 129 | INC_PER_FRAME; |
128 | 130 | animatePlayer(pip, player, pn, 1); |
131 | + if(!pageflipflop) mapScrollDown(pip, player, !(pip[0].video->p), pn); else{ | |
129 | 132 | mapScrollDown(pip, player, 0, pn); |
130 | 133 | mapScrollDown(pip, player, 1, pn); |
131 | 134 | ScrollDown(pip, player, 2, pn); |
132 | - ScrollDown(pip, player, 3, pn); | |
135 | + ScrollDown(pip, player, 3, pn); } | |
133 | 136 | if(!pageflipflop) modexShowPage(pip[1].page); |
134 | 137 | player[pn].q++; |
135 | 138 | } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; } |
@@ -147,7 +150,7 @@ void walk(map_view_t *pip, player_t *player, word pn) | ||
147 | 150 | } |
148 | 151 | else |
149 | 152 | { |
150 | - modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); | |
153 | + if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); | |
151 | 154 | #ifdef SPRITE |
152 | 155 | PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATA); |
153 | 156 | #else |
@@ -169,10 +172,11 @@ void walk(map_view_t *pip, player_t *player, word pn) | ||
169 | 172 | { |
170 | 173 | INC_PER_FRAME; |
171 | 174 | animatePlayer(pip, player, pn, 1); |
175 | + if(!pageflipflop) mapScrollUp(pip, player, !(pip[0].video->p), pn); else{ | |
172 | 176 | mapScrollUp(pip, player, 0, pn); |
173 | 177 | mapScrollUp(pip, player, 1, pn); |
174 | 178 | ScrollUp(pip, player, 2, pn); |
175 | - ScrollUp(pip, player, 3, pn); | |
179 | + ScrollUp(pip, player, 3, pn); } | |
176 | 180 | if(!pageflipflop) modexShowPage(pip[1].page); |
177 | 181 | player[pn].q++; |
178 | 182 | } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; } |
@@ -190,7 +194,7 @@ void walk(map_view_t *pip, player_t *player, word pn) | ||
190 | 194 | } |
191 | 195 | else |
192 | 196 | { |
193 | - modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); | |
197 | + if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); | |
194 | 198 | #ifdef SPRITE |
195 | 199 | PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATA); |
196 | 200 | #else |
@@ -372,11 +376,12 @@ void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid) | ||
372 | 376 | /* draw the next column */ |
373 | 377 | x= mv[0].page->sw + mv[id].map->tiles->tileWidth; |
374 | 378 | if(player[plid].q%4) |
379 | + if(pageflipflop){ | |
375 | 380 | if(id==0) |
376 | 381 | mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx); |
377 | 382 | else |
378 | 383 | modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2)); |
379 | - //} | |
384 | + }else mapDrawCol(&mv[(!mv[0].video->p)], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx); | |
380 | 385 | } |
381 | 386 | |
382 | 387 |
@@ -401,11 +406,12 @@ void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid) | ||
401 | 406 | /* draw the next column */ |
402 | 407 | x= 0; |
403 | 408 | if(player[plid].q%4) |
409 | + if(pageflipflop){ | |
404 | 410 | if(id==0) |
405 | 411 | mapDrawCol(&mv[0], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx); |
406 | 412 | else |
407 | 413 | modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2)); |
408 | - //} | |
414 | + }else mapDrawCol(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx); | |
409 | 415 | } |
410 | 416 | |
411 | 417 |
@@ -429,11 +435,12 @@ void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid) | ||
429 | 435 | /* draw the next row */ |
430 | 436 | y= 0; |
431 | 437 | if(player[plid].q%3) |
438 | + if(pageflipflop){ | |
432 | 439 | if(id==0) |
433 | 440 | mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy); |
434 | 441 | else |
435 | 442 | modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight); |
436 | - //} | |
443 | + }else mapDrawRow(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy); | |
437 | 444 | } |
438 | 445 | |
439 | 446 | void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid) |
@@ -456,11 +463,12 @@ void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid) | ||
456 | 463 | /* draw the next row */ |
457 | 464 | y= mv[0].page->sh + mv[id].map->tiles->tileHeight; |
458 | 465 | if(player[plid].q%3) |
466 | + if(pageflipflop){ | |
459 | 467 | if(id==0) |
460 | 468 | mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy); |
461 | 469 | else |
462 | 470 | modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight); |
463 | - //} | |
471 | + }else mapDrawRow(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy); | |
464 | 472 | } |
465 | 473 | |
466 | 474 |
@@ -574,23 +582,24 @@ void mapGoTo(map_view_t *mv, int tx, int ty) | ||
574 | 582 | unsigned int i; |
575 | 583 | |
576 | 584 | /* set up the coordinates */ |
577 | - mv->tx = tx; | |
578 | - mv->ty = ty; | |
579 | - mv->page->dx = mv->map->tiles->tileWidth; | |
580 | - mv->page->dy = mv->map->tiles->tileHeight; | |
585 | + mv[0].tx = mv[1].tx = tx; | |
586 | + mv[0].ty = mv[1].ty = ty; | |
587 | + mv[0].page->dx = mv[1].page->dx = mv->map->tiles->tileWidth; | |
588 | + mv[0].page->dy = mv[1].page->dy = mv->map->tiles->tileHeight; | |
581 | 589 | |
582 | 590 | /* set up the thresholds */ |
583 | - mv->dxThresh = mv->map->tiles->tileWidth * 2; | |
584 | - mv->dyThresh = mv->map->tiles->tileHeight * 2; | |
591 | + mv[0].dxThresh = mv[1].dxThresh = mv->map->tiles->tileWidth * 2; | |
592 | + mv[0].dyThresh = mv[1].dyThresh = mv->map->tiles->tileHeight * 2; | |
585 | 593 | |
586 | 594 | /* draw the tiles */ |
587 | - modexClearRegion(mv->page, 0, 0, mv->page->width, mv->page->height, 0); | |
595 | + modexClearRegion(mv[0].page, 0, 0, mv[0].page->width, mv[0].page->height, 0); | |
588 | 596 | py=0; |
589 | - i=mv->ty * mv->map->width + mv->tx; | |
590 | - for(ty=mv->ty-1; py < mv->page->sh+mv->dyThresh && ty < mv->map->height; ty++, py+=mv->map->tiles->tileHeight) { | |
591 | - mapDrawWRow(mv, tx-1, ty, py); | |
597 | + i=mv[0].ty * mv[0].map->width + mv[0].tx; | |
598 | + for(ty=mv[0].ty-1; py < mv[0].page->sh+mv->dyThresh && ty < mv[0].map->height; ty++, py+=mv[0].map->tiles->tileHeight) { | |
599 | + mapDrawWRow(&mv[0], tx-1, ty, py); | |
592 | 600 | i+=mv->map->width - tx; |
593 | 601 | } |
602 | + modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height); | |
594 | 603 | } |
595 | 604 | |
596 | 605 |
@@ -617,7 +626,7 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) | ||
617 | 626 | case 0: |
618 | 627 | #ifndef TILERENDER |
619 | 628 | modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1)); |
620 | - //cannot print number value du to it being slow as bakapee | |
629 | + modexprint(page, x, y, 1, 15, 0, (char const *)(t->debug_data[i])); | |
621 | 630 | #else |
622 | 631 | PBUFBFUN (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); |
623 | 632 | /* then the sprite. note modding ram ptr means we just draw to (x&3,0) */ |
@@ -724,8 +733,8 @@ boolean pageflipflop=0; | ||
724 | 733 | /* sync */ |
725 | 734 | void shinku(global_game_variables_t *gv) |
726 | 735 | { |
727 | - word x = (0) + gv->video.page[shinku_fps_indicator_page].dx; // follow the screen | |
728 | - word y = (0) + gv->video.page[shinku_fps_indicator_page].dy; // follow the screen | |
736 | + word x = (0) + gv->video.page[!(gv->video.p)].dx; // follow the screen | |
737 | + word y = (0) + gv->video.page[!(gv->video.p)].dy; // follow the screen | |
729 | 738 | word w = 64; |
730 | 739 | word h = 8; |
731 | 740 | word col = 7; |
@@ -745,7 +754,7 @@ void shinku(global_game_variables_t *gv) | ||
745 | 754 | { |
746 | 755 | sprintf(gv->pee, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv)); |
747 | 756 | //modexClearRegion(&(gv->video.page[shinku_fps_indicator_page]), x, y, w, h, 45); |
748 | - modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y, type, col, bgcol, gv->pee); | |
757 | + modexprint(&(gv->video.page[!(gv->video.p)]), x, y, type, col, bgcol, gv->pee); | |
749 | 758 | gv->kurokku.tiku=0; |
750 | 759 | /* block copy to visible RAM from offscreen */ |
751 | 760 | // vga_setup_wm1_block_copy(); |
@@ -772,11 +781,10 @@ void shinku(global_game_variables_t *gv) | ||
772 | 781 | break; |
773 | 782 | } |
774 | 783 | if(pageflipflop){ |
775 | - modexCopyPageRegion(&(gv->video.page[gv->video.p]), &(gv->video.page[!gv->video.p]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height); | |
776 | - modexShowPage(&(gv->video.page[gv->video.p])); | |
777 | - | |
784 | + modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height); | |
785 | + modexShowPage(&(gv->video.page[gv->video.p])); //this is slow as fack too!! | |
786 | + gv->video.p=!gv->video.p; | |
778 | 787 | } |
779 | - gv->video.p=!gv->video.p; | |
780 | 788 | } |
781 | 789 | |
782 | 790 | void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch) |
@@ -40,7 +40,9 @@ static planar_buf_t huge *pp; | ||
40 | 40 | float t; |
41 | 41 | sword bakapee; |
42 | 42 | pan_t pan; |
43 | +//debugswitches | |
43 | 44 | boolean panswitch=0; |
45 | +boolean pageflipflop=1; | |
44 | 46 | unsigned int i; |
45 | 47 | const char *cpus; |
46 | 48 | //static int persist_aniframe = 0; /* gonna be increased to 1 before being used, so 0 is ok for default */ |
@@ -169,8 +171,7 @@ void main(int argc, char *argv[]) | ||
169 | 171 | } |
170 | 172 | /* set up paging */ |
171 | 173 | //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen |
172 | - mapGoTo(&mv[0], 0, 0); | |
173 | - mapGoTo(&mv[1], 0, 0); | |
174 | + mapGoTo(mv, 0, 0); | |
174 | 175 | //modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[1].page->width, mv[1].page->height); |
175 | 176 | |
176 | 177 | //TODO: put player in starting position of spot |
@@ -187,8 +188,9 @@ void main(int argc, char *argv[]) | ||
187 | 188 | PBUFSFUN(mv[1].page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, &pp); |
188 | 189 | #endif |
189 | 190 | |
190 | - modexShowPage(mv[1].page); | |
191 | - shinku_fps_indicator_page = 1; // we're on page 1 now, shinku(). follow along please or it will not be visible. | |
191 | + if(!pageflipflop) modexShowPage(mv[1].page); | |
192 | + else modexShowPage(mv[(gvar.video.p)].page); | |
193 | + shinku_fps_indicator_page = 1; // we're on page 1 now, shinku(). follow along please or it will not be visible. | |
192 | 194 | //modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1); |
193 | 195 | #ifdef MODEX |
194 | 196 | #ifdef FADE |
@@ -207,7 +209,7 @@ void main(int argc, char *argv[]) | ||
207 | 209 | if(!panswitch){ |
208 | 210 | walk(mv, player, 0); |
209 | 211 | }else{ |
210 | - panpagemanual(mv, player, pan.pn); | |
212 | + panpagemanual(mv, player, 0); | |
211 | 213 | //printf(" player[0].q: %d", player[0].q); printf(" player[0].d: %d\n", player[0].d); |
212 | 214 | } |
213 | 215 |