• 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

修訂7477a345cbe3f5ee467e18f1a1020eff67e43ded (tree)
時間2016-05-03 06:27:24
作者sparky4 <sparky4@cock...>
Commitersparky4

Log Message

panning updated and stuff wwww

Change Summary

差異

--- a/src/lib/scroll16.c
+++ b/src/lib/scroll16.c
@@ -32,7 +32,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
3232 //right movement
3333 case 3:
3434 //printf("pip[0].page->tilesw=%d\n", pip[0].page->tilesw);
35- if(pip[0].tx >= 0 && pip[0].tx+pip[0].page->tilesw < pip[0].map->width && player[pn].tx == pip[0].tx+pip[0].page->tilemidposscreenx &&
35+ if(pip[0].tx >= 0 && pip[0].tx+pip[0].page->tw < pip[0].map->width && player[pn].tx == pip[0].tx+pip[0].page->tilemidposscreenx &&
3636 !(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!
3737 {
3838 if(player[pn].q<=player[pn].spt)
@@ -75,7 +75,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
7575
7676 //left movement
7777 case 1:
78- if(pip[0].tx > 0 && pip[0].tx+pip[0].page->tilesw <= pip[0].map->width && player[pn].tx == pip[0].tx+pip[0].page->tilemidposscreenx &&
78+ if(pip[0].tx > 0 && pip[0].tx+pip[0].page->tw <= pip[0].map->width && player[pn].tx == pip[0].tx+pip[0].page->tilemidposscreenx &&
7979 !(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!
8080 {
8181 if(player[pn].q<=player[pn].spt)
@@ -118,7 +118,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
118118
119119 //down movement
120120 case 4:
121- if(pip[0].ty >= 0 && pip[0].ty+pip[0].page->tilesh < pip[0].map->height && player[pn].ty == pip[0].ty+pip[0].page->tilemidposscreeny &&
121+ if(pip[0].ty >= 0 && pip[0].ty+pip[0].page->th < pip[0].map->height && player[pn].ty == pip[0].ty+pip[0].page->tilemidposscreeny &&
122122 !(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!
123123 {
124124 if(player[pn].q<=player[pn].spt)
@@ -161,7 +161,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
161161
162162 //up movement
163163 case 0:
164- if(pip[0].ty > 0 && pip[0].ty+pip[0].page->tilesh <= pip[0].map->height && player[pn].ty == pip[0].ty+pip[0].page->tilemidposscreeny &&
164+ if(pip[0].ty > 0 && pip[0].ty+pip[0].page->th <= pip[0].map->height && player[pn].ty == pip[0].ty+pip[0].page->tilemidposscreeny &&
165165 !(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!
166166 {
167167 if(player[pn].q<=player[pn].spt)
@@ -211,7 +211,7 @@ void panpagemanual(map_view_t *pip, player_t *player, word pn)
211211 {
212212 //right movement
213213 case 3:
214- if(pip[pip[0].pan->pn].tx >= -1 && pip[pip[0].pan->pn].tx+pip[pip[0].pan->pn].page->tilesw < pip[pip[0].pan->pn].page->tilesw+1)
214+ if(pip[pip[0].pan->pn].tx >= -1 && pip[pip[0].pan->pn].tx+pip[pip[0].pan->pn].page->tw < pip[pip[0].pan->pn].page->tilesw+1)
215215 {
216216 if(player[pn].q<=player[pn].spt)
217217 {
@@ -372,9 +372,9 @@ void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid)
372372 x= mv[0].page->sw + mv[id].map->tiles->tileWidth;
373373 if(player[plid].q%4)
374374 if(id==0)
375- mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tilesw, mv[0].ty-1, x, player, mv->page->dx);
375+ mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx);
376376 else
377- modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->tilesh+2));
377+ 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));
378378 //}
379379 }
380380
@@ -403,7 +403,7 @@ void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid)
403403 if(id==0)
404404 mapDrawCol(&mv[0], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx);
405405 else
406- modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->tilesh+2));
406+ 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));
407407 //}
408408 }
409409
@@ -431,7 +431,7 @@ void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid)
431431 if(id==0)
432432 mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy);
433433 else
434- modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tilesw+2), mv[id].map->tiles->tileHeight);
434+ 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);
435435 //}
436436 }
437437
@@ -456,9 +456,9 @@ void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid)
456456 y= mv[0].page->sh + mv[id].map->tiles->tileHeight;
457457 if(player[plid].q%3)
458458 if(id==0)
459- mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->tilesh, y, player, mv->page->dy);
459+ mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy);
460460 else
461- modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tilesw+2), mv[id].map->tiles->tileHeight);
461+ 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);
462462 //}
463463 }
464464
@@ -583,7 +583,7 @@ void mapGoTo(map_view_t *mv, int tx, int ty)
583583 mv->dyThresh = mv->map->tiles->tileHeight * 2;
584584
585585 /* draw the tiles */
586- modexClearRegion(mv->page, 0, 0, mv->page->width+mv->map->tiles->tileWidth, mv->page->height+mv->map->tiles->tileHeight, 0);
586+ modexClearRegion(mv->page, 0, 0, mv->page->width, mv->page->height, 0);
587587 py=0;
588588 i=mv->ty * mv->map->width + mv->tx;
589589 for(ty=mv->ty-1; py < mv->page->sh+mv->dyThresh && ty < mv->map->height; ty++, py+=mv->map->tiles->tileHeight) {
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -40,7 +40,7 @@ static planar_buf_t huge *pp;
4040 float t;
4141 sword bakapee;
4242 pan_t pan;
43-boolean panswitch=1;
43+boolean panswitch=0;
4444 unsigned int i;
4545 const char *cpus;
4646 //static int persist_aniframe = 0; /* gonna be increased to 1 before being used, so 0 is ok for default */
@@ -175,38 +175,38 @@ void main(int argc, char *argv[])
175175
176176 //TODO: put player in starting position of spot
177177 //default player position on the viewable map
178- player[panswitch].tx = mv[0].tx + mv[0].page->tilemidposscreenx;
179- player[panswitch].ty = mv[0].ty + mv[0].page->tilemidposscreeny;
178+ player[0].tx = mv[0].tx + mv[0].page->tilemidposscreenx;
179+ player[0].ty = mv[0].ty + mv[0].page->tilemidposscreeny;
180180 IN_initplayer(&player, 0);
181181 IN_initplayer(&player, 1);
182182
183-// modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height);
183+ modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height);
184184 #ifndef SPRITE
185-// modexClearRegion(mv[1].page, player[panswitch].x-4, player[panswitch].y-TILEWH, 24, 32, 15);
185+ modexClearRegion(mv[1].page, player[panswitch].x-4, player[panswitch].y-TILEWH, 24, 32, 15);
186186 #else
187187 //PBUFSFUN(mv[1].page, player[panswitch].x-4, player[panswitch].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATA);
188-// PBUFSFUN(mv[1].page, player[panswitch].x-4, player[panswitch].y-TILEWH, 24, 64, 24, 32, &pp);
188+ PBUFSFUN(mv[1].page, player[panswitch].x-4, player[panswitch].y-TILEWH, 24, 64, 24, 32, &pp);
189189 #endif
190190
191- modexShowPage(mv[pan.pn].page);
192- shinku_fps_indicator_page = 0; // we're on page 1 now, shinku(). follow along please or it will not be visible.
191+ modexShowPage(mv[1].page);
192+ shinku_fps_indicator_page = 1; // we're on page 1 now, shinku(). follow along please or it will not be visible.
193193 //modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1);
194194 #ifdef MODEX
195195 #ifdef FADE
196196 modexFadeOn(4, gpal);
197197 #endif
198198 #endif
199- while(!IN_KeyDown(sc_Escape) && player[panswitch].hp>0)
199+ while(!IN_KeyDown(sc_Escape) && player[0].hp>0)
200200 {
201201 shinku(&gvar);
202202 //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square
203203 //to stop scrolling and have the player position data move to the edge of the screen with respect to the direction
204- //when player[panswitch].tx or player[panswitch].ty == 0 or player[panswitch].tx == 20 or player[panswitch].ty == 15 then stop because that is edge of map and you do not want to walk of the map
204+ //when player[0].tx or player[0].ty == 0 or player[0].tx == 20 or player[0].ty == 15 then stop because that is edge of map and you do not want to walk of the map
205205
206206 //player movement
207207 IN_ReadControl(panswitch,&player);
208208 if(!panswitch){
209- walk(mv, player, panswitch);
209+ walk(mv, player, 0);
210210 }else{
211211 panpagemanual(mv, player, pan.pn);
212212 //printf(" player[panswitch].q: %d", player[panswitch].q); printf(" player[panswitch].d: %d\n", player[panswitch].d);
@@ -215,7 +215,7 @@ void main(int argc, char *argv[])
215215
216216 //the scripting stuff....
217217 //if(((player[panswitch].triggerx == TRIGGX && player[panswitch].triggery == TRIGGY) && IN_KeyDown(0x1C))||(player[panswitch].tx == 5 && player[panswitch].ty == 5))
218- if(((mv[panswitch].map->data[(player[panswitch].triggerx-1)+(map.width*(player[panswitch].triggery-1))] == 0) && IN_KeyDown(0x1C))||(player[panswitch].tx == 5 && player[panswitch].ty == 5))
218+ if(((mv[0].map->data[(player[0].triggerx-1)+(map.width*(player[0].triggery-1))] == 0) && IN_KeyDown(0x1C))||(player[0].tx == 5 && player[0].ty == 5))
219219 {
220220 short i;
221221 for(i=800; i>=400; i--)
@@ -224,7 +224,7 @@ void main(int argc, char *argv[])
224224 }
225225 nosound();
226226 }
227- if(player[panswitch].q == (TILEWH/(player[panswitch].speed))+1 && player[panswitch].info.dir != 2 && (player[panswitch].triggerx == 5 && player[panswitch].triggery == 5)){ player[panswitch].hp--; }
227+ if(player[0].q == (TILEWH/(player[0].speed))+1 && player[0].info.dir != 2 && (player[0].triggerx == 5 && player[0].triggery == 5)){ player[0].hp--; }
228228 //debugging binds!
229229 //if(IN_KeyDown(0x0E)) while(1){ if(xmsmalloc(24)) break; }
230230 if(IN_KeyDown(2)){ modexShowPage(mv[0].page); pan.pn=0; }
@@ -238,7 +238,7 @@ void main(int argc, char *argv[])
238238 #ifdef FADE
239239 if(IN_KeyDown(24)){ modexPalUpdate0(gpal); paloffset=0; modexpdump(mv[0].page); modexpdump(mv[1].page); }
240240 if(IN_KeyDown(22)){
241- paloffset=0; modexPalBlack(); modexPalUpdate(&player[panswitch].data, &paloffset, 0, 0);
241+ paloffset=0; modexPalBlack(); modexPalUpdate(&player[0].data, &paloffset, 0, 0);
242242 printf("1paloffset = %d\n", paloffset/3);
243243 modexPalUpdate(map.tiles->data, &paloffset, 0, 0);
244244 printf("2paloffset = %d\n", paloffset/3);
@@ -276,7 +276,7 @@ void main(int argc, char *argv[])
276276 //9
277277 if(IN_KeyDown(10)){ modexPalOverscan(default_pal, rand()%56); modexPalUpdate1(default_pal); }
278278 //if(IN_KeyDown(11)){ modexPalOverscan(default_pal, 15); }
279- if((player[panswitch].q==1) && !(player[panswitch].x%TILEWH==0 && player[panswitch].y%TILEWH==0)) break; //incase things go out of sync!
279+ if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break; //incase things go out of sync!
280280 }
281281
282282 /* fade back to text mode */