diff --git a/CAdvmapInterface.cpp b/CAdvmapInterface.cpp index fc5ca257f..aba6fd616 100644 --- a/CAdvmapInterface.cpp +++ b/CAdvmapInterface.cpp @@ -650,8 +650,10 @@ void CMinimap::draw() for (int i=0; igetPosition(false); - float zawx = ((float)hpos.x/CGI->mh->sizes.x), zawy = ((float)hpos.y/CGI->mh->sizes.y); - int3 maplgp ( zawx*mw, zawy*mh, hpos.z ); + if(hpos.z!=LOCPLINT->adventureInt->position.z) + continue; + //float zawx = ((float)hpos.x/CGI->mh->sizes.x), zawy = ((float)hpos.y/CGI->mh->sizes.y); + int3 maplgp ( (hpos.x*mw)/CGI->mh->sizes.x, (hpos.y*mh)/CGI->mh->sizes.y, hpos.z ); for (int ii=0; iipos.w-1) && (pos.y*ho+jjpos.h-1)) + if ((pos.x*wo+iipos.w) && (pos.y*ho+jjpos.h)) CSDL_Ext::SDL_PutPixel(FoW[pos.z],pos.x*wo+ii,pos.y*ho+jj,0,0,0,0,0); } @@ -1336,7 +1338,7 @@ void CAdvMapInt::show() infoBar.draw(); - SDL_Flip(ekran); + CSDL_Ext::update(ekran); } void CAdvMapInt::hide() { diff --git a/CMT.cpp b/CMT.cpp index b84bba4ec..0c73ed7f6 100644 --- a/CMT.cpp +++ b/CMT.cpp @@ -768,21 +768,11 @@ int _tmain(int argc, _TCHAR* argv[]) { for (int j=0; jmh->sizes.x), (((float)j/mh)*CGI->mh->sizes.y), d); - /*pp.x = (((float)i/mw)*CGI->mh->sizes.x); - pp.y = (((float)j/mh)*CGI->mh->sizes.y); - pp.z = LOCPLINT->adventureInt->position.z;*/ + int3 pp( ((i*CGI->mh->sizes.x)/mw), ((j*CGI->mh->sizes.y)/mh), d ); + if ( !((CPlayerInterface*)cgi->playerint[g])->cb->isVisible(pp) ) { - for (int ii=0; iishow(); - SDL_Flip(ekran); + //SDL_Flip(ekran); + CSDL_Ext::update(ekran); SDL_Delay(5); //give time for other apps SDL_framerateDelay(mainFPSmng); } @@ -935,7 +936,7 @@ void CPlayerInterface::heroMoved(const HeroMoveDetails & details) std::stable_sort(CGI->mh->ttiles[hp.x][hp.y][hp.z].objects.begin(), CGI->mh->ttiles[hp.x][hp.y][hp.z].objects.end(), ocmptwo_cgin);*/ } LOCPLINT->adventureInt->update(); //updating screen - SDL_Flip(ekran); + CSDL_Ext::update(ekran); CGI->screenh->updateScreen(); LOCPLINT->adventureInt->anim++; SDL_framerateDelay(mainFPSmng); //for animation purposes diff --git a/CPreGame.cpp b/CPreGame.cpp index 20d12a5a0..935a03da3 100644 Binary files a/CPreGame.cpp and b/CPreGame.cpp differ