From 9b46f1102cd96194395cb2b43180638fa0c9372d Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 15 Feb 2017 15:58:09 -0600 Subject: [PATCH] ==== INITIAL LAYER MAP STUFF DONE, added mapdraw layer ontop of bg, going to implement actors [objects and shit] into the code next, then make support for tilesets, i added a checker so it will not draw junk==== --- src/lib/16_tdef.h | 1 + src/lib/scroll16.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 58b4e01a..24552c73 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -320,6 +320,7 @@ typedef struct nibble __near *p; // pointer to video's render page num nibble __near *sp; // pointer to video's show page num int dx, dy; // draw row and col var + word dxt,dyt; //newer vars! int delta, d; } map_view_t; diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index c466be41..c50ebb4a 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -603,7 +603,7 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv[id].dx); mod if(i>=0){ mapDrawTile(mv[id].map->MAPTILESPTR, mv[id].map->layerdata[0].data[i], mv[id].page, mv[id].dx, y); for(z=1;z<=2;z++){ - if(mv[id].map->layerdata[z].data[i] && (mv[id].page->sw+mv[id].dxThresh)){ + if(mv[id].map->layerdata[z].data[i] && mv->dymap->height){ sprintf(global_temp_status_text2, "%u", mv[id].map->layerdata[z].data[i]); modexprint(mv[id].page, mv[id].dx, y, 1, 0, PALMAPDRAWW, z+2, global_temp_status_text2); //mapDrawTile(mv[id].map->MAPTILESPTR, mv[id].map->layerdata[z].data[i], mv[id].page, mv[id].dx, y); } @@ -629,7 +629,7 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv[id].dy); mod if(i>=0){ mapDrawTile(mv[id].map->MAPTILESPTR, mv[id].map->layerdata[0].data[i], mv[id].page, x, mv[id].dy); for(z=1;z<=2;z++){ - if(mv[id].map->layerdata[z].data[i] && (mv[id].page->sh+mv[id].dyThresh)){ + if(mv[id].map->layerdata[z].data[i] && mv->dxmap->width){ sprintf(global_temp_status_text2, "%u", mv[id].map->layerdata[z].data[i]); modexprint(mv[id].page, x, mv[id].dy, 1, 0, PALMAPDRAWW, z+2, global_temp_status_text2); //mapDrawTile(mv[id].map->MAPTILESPTR, mv[id].map->layerdata[z].data[i], mv[id].page, x, mv[id].dy); } -- 2.39.5