1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

* small bugfix for hiding tiles

* minor changes
This commit is contained in:
mateuszb 2010-08-26 12:06:36 +00:00
parent c7f8f0a967
commit c45d037bc8
2 changed files with 8 additions and 8 deletions

View File

@ -511,7 +511,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, const std::vect
//blit terrain with river/road
if(tile.terbitmap) //if custom terrain graphic - use it
SDL_BlitSurface(tile.terbitmap, &genRect(sr.h, sr.w, 0, 0), extSurf, &sr);
CSDL_Ext::blitSurface(tile.terbitmap, &genRect(sr.h, sr.w, 0, 0), extSurf, &sr);
else //use default terrain graphic
blitterWithRotation(terrainGraphics[tinfo.tertype][tinfo.terview],rtile, extSurf, sr, tinfo.siodmyTajemniczyBajt%4);
if(tinfo.nuine) //print river if present
@ -602,7 +602,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, const std::vect
//printing flag
pp.y+=IMGVAL*2-32;
sr2.y-=16;
SDL_BlitSurface((graphics->*flg)[color]->ourImages[gg+heroAnim%IMGVAL+35].bitmap, &pp, extSurf, &sr2);
CSDL_Ext::blitSurface((graphics->*flg)[color]->ourImages[gg+heroAnim%IMGVAL+35].bitmap, &pp, extSurf, &sr2);
}
else //hero / boat stands still
{
@ -628,7 +628,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, const std::vect
bufr.h = 64;
bufr.w = 96;
if(bufr.x-extRect->x>-64)
SDL_BlitSurface((graphics->*flg)[color]->ourImages[getHeroFrameNum(dir, false) *8+(heroAnim/4)%IMGVAL].bitmap, NULL, extSurf, &bufr);
CSDL_Ext::blitSurface((graphics->*flg)[color]->ourImages[getHeroFrameNum(dir, false) *8+(heroAnim/4)%IMGVAL].bitmap, NULL, extSurf, &bufr);
}
}
}
@ -644,7 +644,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, const std::vect
if( obj->hasShadowAt(obj->pos.x - (top_tile.x + bx), top_tile.y + by - obj->pos.y + 5) )
CSDL_Ext::blit8bppAlphaTo24bpp(bitmap,&pp,extSurf,&sr2);
else
SDL_BlitSurface(bitmap,&pp,extSurf,&sr2);
CSDL_Ext::blitSurface(bitmap,&pp,extSurf,&sr2);
}
}
//objects blitted
@ -674,7 +674,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, const std::vect
{
SDL_BlitSurface(ttiles[pos.x][pos.y][top_tile.z].terbitmap,
CSDL_Ext::blitSurface(ttiles[pos.x][pos.y][top_tile.z].terbitmap,
&genRect(sr.h, sr.w, 0, 0),extSurf,&sr);
}
else
@ -706,7 +706,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, const std::vect
sr.h=sr.w=32;
memset(rSurf->pixels, 128, rSurf->pitch * rSurf->h);
SDL_BlitSurface(rSurf,&genRect(sr.h, sr.w, 0, 0),extSurf,&sr);
CSDL_Ext::blitSurface(rSurf,&genRect(sr.h, sr.w, 0, 0),extSurf,&sr);
}
#endif
#ifdef MARK_VISITABLE_POSITIONS
@ -719,7 +719,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, const std::vect
sr.h=sr.w=32;
memset(rSurf->pixels, 128, rSurf->pitch * rSurf->h);
SDL_BlitSurface(rSurf,&genRect(sr.h, sr.w, 0, 0),extSurf,&sr);
CSDL_Ext::blitSurface(rSurf,&genRect(sr.h, sr.w, 0, 0),extSurf,&sr);
}
#endif
}

View File

@ -451,7 +451,7 @@ void CGObjectInstance::hideTiles(int ourplayer, int radius) const
{
FoWChange fw;
fw.mode = 0;
fw.player = i->first;
fw.player = *j;
cb->getTilesInRange (fw.tiles, pos, radius, (*j), -1);
cb->sendAndApply (&fw);
break;