//===========================================================================\r
//TODO: put player in starting position of assigned spot on map\r
//default player position on the viewable map\r
-void ZC_playerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw)\r
+void ZC_PlayerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn, boolean defaultsw)\r
{\r
player[pn].enti.tx = x + pip[0].tx;\r
player[pn].enti.ty = y + pip[0].ty;\r
//initiate a null map!\r
map->width=MAPW;///2;\r
map->height=MAPH;///2;\r
-// map->layerdata[0].data = malloc(((map->width*map->height)+1)*sizeof(byte));\r
+// map->layerdata[0].data = fmfaflflfofcf(((map->width*map->height)+1)*sizeof(byte));\r
map->layerdata[0].data = &x;\r
- map->tiles = malloc(sizeof(tiles_t));\r
+ //map->tiles = fmfafflflfofc(sizeof(tiles_t));\r
//fix this to be far~\r
// bp = bitmapLoadPcx("data/ed.pcx");\r
// map->tiles->data = &bp;\r
mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)\r
{\r
word rx, ry;\r
- //word textx=0, texty=0;\r
- //if(i==0) i=2;\r
// printf("%02d ", i); if(x >= page->width - t->tileWidth) printf("\n");\r
switch(i)\r
{\r
modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 1); //currently the over scan color!\r
break;\r
default:\r
- rx = (((i-1) % ((t->pcximg->width)/t->tileWidth)) * t->tileWidth);\r
- ry = (((i-1) / ((t->pcximg->height)/t->tileHeight)) * t->tileHeight);\r
+ rx = (((i-1) % ((t->spri->sprite_vrl_cont.vrl_header->width)/t->tileWidth)) * t->tileWidth);\r
+ ry = (((i-1) / ((t->spri->sprite_vrl_cont.vrl_header->height)/t->tileHeight)) * t->tileHeight);\r
#ifndef TILERENDER\r
if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
#else\r
// NTS: For some bizarre reason, gv->pee is not initialized, but the pointer is not NULL even\r
// though it should be. Instead it's NULL as a neAr pointer but contains a non-null\r
// segment value, so testing against NULL doesn't work. It is initialized properly if\r
- // you call start_timer() though which uses neAr malloc. Rather than fight with that,\r
+ // you call start_timer() though which uses neAr mAlloc. Rather than fight with that,\r
// I decided it would be better to declare a temp buffer statically and sprintf to that.\r
//\r
// This fixes *** Null pointer assignment detected error message in ZCROLL.EXE on exit.\r
gv->video.dorender =!gv->video.dorender ;\r
//0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2;\r
}\r
+ PM_NextFrame(gv);\r
}\r
\r
void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn)\r
}\r
player[pn].enti.dire+=dd;\r
//setting xy position\r
- player[pn].enti.spri->x = x;\r
- player[pn].enti.spri->y = y;\r
+ player[pn].enti.spri.x = x;\r
+ player[pn].enti.spri.y = y;\r
\r
if((player[pn].enti.q==1 && player[pn].enti.pred != player[pn].enti.d) || !dd)//when dir changed OR when player change face direction\r
{\r
//0000printf(" q=%u pred=%u d=%u dd=%u\n", player[pn].enti.q, player[pn].enti.pred, player[pn].enti.d, dd);\r
- 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; }\r
+ 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; }\r
player[pn].enti.pred = player[pn].enti.d;\r
if(!dd)//changed direction while NOT moving!\r
{\r