1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-25 00:37:24 +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 //blit terrain with river/road
if(tile.terbitmap) //if custom terrain graphic - use it 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 else //use default terrain graphic
blitterWithRotation(terrainGraphics[tinfo.tertype][tinfo.terview],rtile, extSurf, sr, tinfo.siodmyTajemniczyBajt%4); blitterWithRotation(terrainGraphics[tinfo.tertype][tinfo.terview],rtile, extSurf, sr, tinfo.siodmyTajemniczyBajt%4);
if(tinfo.nuine) //print river if present 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 //printing flag
pp.y+=IMGVAL*2-32; pp.y+=IMGVAL*2-32;
sr2.y-=16; 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 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.h = 64;
bufr.w = 96; bufr.w = 96;
if(bufr.x-extRect->x>-64) 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) ) 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); CSDL_Ext::blit8bppAlphaTo24bpp(bitmap,&pp,extSurf,&sr2);
else else
SDL_BlitSurface(bitmap,&pp,extSurf,&sr2); CSDL_Ext::blitSurface(bitmap,&pp,extSurf,&sr2);
} }
} }
//objects blitted //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); &genRect(sr.h, sr.w, 0, 0),extSurf,&sr);
} }
else else
@ -706,7 +706,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, const std::vect
sr.h=sr.w=32; sr.h=sr.w=32;
memset(rSurf->pixels, 128, rSurf->pitch * rSurf->h); 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 #endif
#ifdef MARK_VISITABLE_POSITIONS #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; sr.h=sr.w=32;
memset(rSurf->pixels, 128, rSurf->pitch * rSurf->h); 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 #endif
} }

View File

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