X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fscroll16.c;h=be058acba0b1bbb3718b9ecf7c0c56f399303a0c;hb=f99bde8f168f1af79c556eb3b88bade0665a2219;hp=5f7ae115358fb296d562b2170bcfb9a9597c34dc;hpb=7031d5f155ecad6c38b9ea4c256d31417ced6839;p=16.git diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 5f7ae115..be058acb 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -459,7 +459,7 @@ void ZC_mapScroll(map_view_t *mv, player_t *player, word pn) //=========================================================================== //TODO: put player in starting position of assigned spot on map //default player position on the viewable map -void ZC_playerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw) +void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw) { player[pn].enti.tx = x + pip[0].tx; player[pn].enti.ty = y + pip[0].ty; @@ -568,8 +568,6 @@ void near mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) { word rx, ry; - //word textx=0, texty=0; - //if(i==0) i=2; // printf("%02d ", i); if(x >= page->width - t->tileWidth) printf("\n"); switch(i) { @@ -578,8 +576,8 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 1); //currently the over scan color! break; default: - rx = (((i-1) % ((t->pcximg->width)/t->tileWidth)) * t->tileWidth); - ry = (((i-1) / ((t->pcximg->height)/t->tileHeight)) * t->tileHeight); + rx = (((i-1) % ((t->spri->sprite_vrl_cont->vrl_header->width)/t->tileWidth)) * t->tileWidth); + ry = (((i-1) / ((t->spri->sprite_vrl_cont->vrl_header->height)/t->tileHeight)) * t->tileHeight); #ifndef TILERENDER if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1); #else @@ -695,7 +693,7 @@ void shinku(global_game_variables_t *gv) // NTS: For some bizarre reason, gv->pee is not initialized, but the pointer is not NULL even // though it should be. Instead it's NULL as a neAr pointer but contains a non-null // segment value, so testing against NULL doesn't work. It is initialized properly if - // you call start_timer() though which uses neAr malloc. Rather than fight with that, + // you call start_timer() though which uses neAr mAlloc. Rather than fight with that, // I decided it would be better to declare a temp buffer statically and sprintf to that. // // This fixes *** Null pointer assignment detected error message in ZCROLL.EXE on exit. @@ -743,6 +741,7 @@ void shinku(global_game_variables_t *gv) gv->video.dorender =!gv->video.dorender ; //0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2; } + PM_NextFrame(gv); } void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn) @@ -796,13 +795,13 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn) } player[pn].enti.dire+=dd; //setting xy position - player[pn].enti.spri->x = x; - player[pn].enti.spri->y = y; + player[pn].enti.spri.x = x; + player[pn].enti.spri.y = y; if((player[pn].enti.q==1 && player[pn].enti.pred != player[pn].enti.d) || !dd)//when dir changed OR when player change face direction { //0000printf(" q=%u pred=%u d=%u dd=%u\n", player[pn].enti.q, player[pn].enti.pred, player[pn].enti.d, dd); - set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire); //pip->video->sprifilei = set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire); if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; } + set_anim_by_id(&player[pn].enti.spri, player[pn].enti.dire); //pip->video->sprifilei = set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire); if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; } player[pn].enti.pred = player[pn].enti.d; if(!dd)//changed direction while NOT moving! {