1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Fixed exchanging artifacts between heroes. Fixed def visibility issues. Refactored alphaTransform.

This commit is contained in:
Michał W. Urbańczyk
2009-07-27 12:29:10 +00:00
parent 898d266580
commit aad61c8ac8
3 changed files with 10 additions and 54 deletions

View File

@ -422,9 +422,9 @@ static void processDef (CGDefInfo* def)
}
void CMapHandler::initHeroDef(CGHeroInstance * h)
{
//h->defInfo->handler = graphics->flags1[0];
//h->defInfo->width = h->defInfo->handler->ourImages[0].bitmap->w/32;
//h->defInfo->height = h->defInfo->handler->ourImages[0].bitmap->h/32;
h->defInfo->handler = graphics->flags1[0];
h->defInfo->width = h->defInfo->handler->ourImages[0].bitmap->w/32;
h->defInfo->height = h->defInfo->handler->ourImages[0].bitmap->h/32;
}
void CMapHandler::init()
{
@ -723,7 +723,7 @@ void CMapHandler::terrainRect(int3 top_tile, unsigned char anim, std::vector< st
const CGObjectInstance *obj = objects[h].first;
ui8 color = obj->tempOwner;
//checking if object has non-empty graphic on this tile
if(!obj->coveringAt(obj->pos.x - (top_tile.x + bx), top_tile.y + by - obj->pos.y + 5))
if(obj->ID != HEROI_TYPE && !obj->coveringAt(obj->pos.x - (top_tile.x + bx), top_tile.y + by - obj->pos.y + 5))
continue;
SDL_Rect sr;