void RenderMap() { char *src; //char rs[2]; curlayer=0; src=rstring; /* rs[1]=0; // aen for (; *src; ++src) { rs[0]=*src; BlitLayer(atoi(rs) -1); } */ while (*src) { switch (*src) { case '1': BlitLayer(0); break; case '2': BlitLayer(1); break; case '3': BlitLayer(2); break; case '4': BlitLayer(3); break; case '5': BlitLayer(4); break; case '6': BlitLayer(5); break; } src++; } if (!curlayer) memset(screen+5648,0,84480); if (layertoggle[6]) DrawObstructions(); if (layertoggle[7]) DrawZones(); if (layertoggle[8]) DrawEntities(); if (shifted) DrawSelection(); }
void CMapView::Render(const RECT& r) { char *s; char renderstring[50]; int laycount=0; strcpy(renderstring,pMap->GetRString().c_str()); s=renderstring; pGraph->Clear(); if (xwin<0) xwin=0; if (ywin<0) ywin=0; while (*s!='\0') { switch (*s) { case '1': case '2': case '3': case '4': case '5': case '6': RenderLayer(*s-'1',laycount!=0?true:false,r); laycount++; break; } s++; } DrawObstructions(r); DrawZones(r); DrawEntities(r); DrawSelection(r); }