• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

wwww


Commit MetaInfo

Revision20f690b53a11b7aa09a8614b3d281c4014e0df22 (tree)
Time2016-06-07 00:15:47
Authorsparky4 <sparky4@cock...>
Commitersparky4

Log Message

====i made a quick and dirty fix to the video issue wwww====

Change Summary

Incremental Difference

--- a/src/lib/scroll16.c
+++ b/src/lib/scroll16.c
@@ -40,6 +40,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
4040 {
4141 INC_PER_FRAME;
4242 animatePlayer(pip, player, pn, 1);
43+ pip[0].video->startclk = (*clockw);
4344 if(!pageflipflop) mapScrollRight(pip, player, !(pip[0].video->p), pn); else{
4445 mapScrollRight(pip, player, 0, pn);
4546 mapScrollRight(pip, player, 1, pn);
@@ -47,7 +48,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
4748 ScrollRight(pip, player, 3, pn); }
4849 if(!pageflipflop) modexShowPage(pip[1].page);
4950 player[pn].q++;
50- } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; }
51+ } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; pip[0].video->clk = (float)((*clockw)-pip[0].video->startclk)/18.2; }
5152 }
5253 else if(player[pn].tx < pip[0].map->width && !(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))
5354 {
@@ -84,6 +85,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
8485 {
8586 INC_PER_FRAME;
8687 animatePlayer(pip, player, pn, 1);
88+ pip[0].video->startclk = (*clockw);
8789 if(!pageflipflop) mapScrollLeft(pip, player, !(pip[0].video->p), pn); else{
8890 mapScrollLeft(pip, player, 0, pn);
8991 mapScrollLeft(pip, player, 1, pn);
@@ -91,7 +93,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
9193 ScrollLeft(pip, player, 3, pn); }
9294 if(!pageflipflop) modexShowPage(pip[1].page);
9395 player[pn].q++;
94- } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; }
96+ } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; pip[0].video->clk = (float)((*clockw)-pip[0].video->startclk)/18.2; }
9597 }
9698 else if(player[pn].tx > 1 && !(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))
9799 {
@@ -128,6 +130,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
128130 {
129131 INC_PER_FRAME;
130132 animatePlayer(pip, player, pn, 1);
133+ pip[0].video->startclk = (*clockw);
131134 if(!pageflipflop) mapScrollDown(pip, player, !(pip[0].video->p), pn); else{
132135 mapScrollDown(pip, player, 0, pn);
133136 mapScrollDown(pip, player, 1, pn);
@@ -135,7 +138,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
135138 ScrollDown(pip, player, 3, pn); }
136139 if(!pageflipflop) modexShowPage(pip[1].page);
137140 player[pn].q++;
138- } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; }
141+ } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; pip[0].video->clk = (float)((*clockw)-pip[0].video->startclk)/18.2; }
139142 }
140143 else if(player[pn].ty < pip[0].map->height && !(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))
141144 {
@@ -172,6 +175,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
172175 {
173176 INC_PER_FRAME;
174177 animatePlayer(pip, player, pn, 1);
178+ pip[0].video->startclk = (*clockw);
175179 if(!pageflipflop) mapScrollUp(pip, player, !(pip[0].video->p), pn); else{
176180 mapScrollUp(pip, player, 0, pn);
177181 mapScrollUp(pip, player, 1, pn);
@@ -179,7 +183,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
179183 ScrollUp(pip, player, 3, pn); }
180184 if(!pageflipflop) modexShowPage(pip[1].page);
181185 player[pn].q++;
182- } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; }
186+ } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; pip[0].video->clk = (float)((*clockw)-pip[0].video->startclk)/18.2; }
183187 }
184188 else if(player[pn].ty > 1 && !(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))
185189 {
@@ -775,8 +779,8 @@ void shinku(global_game_variables_t *gv)
775779 break;
776780 case 1:
777781 //turn this off if XT
778- modexWaitBorder();
779- //vga_wait_for_vsync();
782+ //modexWaitBorder();
783+ vga_wait_for_vsync();
780784 gv->kurokku.frames_per_second=60;
781785 break;
782786 }
--- a/src/lib/typdefst.h
+++ b/src/lib/typdefst.h
@@ -117,6 +117,7 @@ typedef struct
117117 boolean __near p; //render page number
118118 boolean __near r; //page flip if true
119119 word pr[MAXPAGE][4]; //render sections of pages
120+ word startclk; float clk; //timer
120121 } video_t;
121122
122123 typedef struct
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -322,7 +322,8 @@ void main(int argc, char *argv[])
322322 printf("middle tile position: %dx", gvar.video.page[0].tilemidposscreenx); printf("%d\n", gvar.video.page[0].tilemidposscreeny);
323323 modexprintmeminfo(&gvar.video);
324324 printf("mv[%u].tx: %d", pan.pn, mv[pan.pn].tx); printf(" mv[%u].ty: %d ", pan.pn, mv[pan.pn].ty); printf("gvar.video.p=%u\n", gvar.video.p);
325- //printf("player[1].q: %d", player[1].q); printf(" player[1].d: %d\n", player[1].d);
325+ printf("\ngvar.video.startclk=%u ", gvar.video.startclk);
326+ printf("gvar.video.clk=%f\n", (float)((*clockw)-gvar.video.startclk)/18.2);
326327 printf("\n");
327328 //printf("map.width=%d map.height=%d map.data[0]=%d\n", mv[0].map->width, mv[0].map->height, mv[0].map->data[0]);
328329