o added blip variation for comm minimap

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@399 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2006-04-18 18:13:40 +00:00
parent b1cc0c7f41
commit 50b2f03297
2 changed files with 40 additions and 4 deletions

View file

@ -93,15 +93,51 @@ void AvHOverviewMap::Clear()
this->Init(); this->Init();
} }
bool getIsStructure(int user3) {
return user3 == AVH_USER3_HIVE ||
user3 == AVH_USER3_COMMANDER_STATION ||
user3 == AVH_USER3_TURRET_FACTORY ||
user3 == AVH_USER3_ARMORY ||
user3 == AVH_USER3_ADVANCED_ARMORY ||
user3 == AVH_USER3_ARMSLAB ||
user3 == AVH_USER3_PROTOTYPE_LAB ||
user3 == AVH_USER3_OBSERVATORY ||
user3 == AVH_USER3_TURRET ||
user3 == AVH_USER3_SIEGETURRET ||
user3 == AVH_USER3_RESTOWER ||
user3 == AVH_USER3_INFANTRYPORTAL ||
user3 == AVH_USER3_PHASEGATE ||
user3 == AVH_USER3_DEFENSE_CHAMBER ||
user3 == AVH_USER3_MOVEMENT_CHAMBER ||
user3 == AVH_USER3_OFFENSE_CHAMBER ||
user3 == AVH_USER3_SENSORY_CHAMBER ||
user3 == AVH_USER3_ALIENRESTOWER ||
user3 == AVH_USER3_ADVANCED_TURRET_FACTORY;
}
void AvHOverviewMap::GetSpriteForEntity(const DrawableEntity& entity, int& outSprite, int& outFrame, int& outRenderMode) void AvHOverviewMap::GetSpriteForEntity(const DrawableEntity& entity, int& outSprite, int& outFrame, int& outRenderMode)
{ {
outRenderMode = kRenderTransTexture; outRenderMode = kRenderTransTexture;
if ((this->mUser3 == AVH_USER3_COMMANDER_PLAYER) || (entity.mUser3 == AVH_USER3_UNKNOWN)) if (entity.mUser3 == AVH_USER3_UNKNOWN)
{
outSprite = Safe_SPR_Load(kCommBlipSprite);
outFrame=1;
}
else if (this->mUser3 == AVH_USER3_COMMANDER_PLAYER)
{ {
bool isStructure=getIsStructure(entity.mUser3);
bool isFriendly=entity.mTeam == mTeam;
outSprite = Safe_SPR_Load(kCommBlipSprite); outSprite = Safe_SPR_Load(kCommBlipSprite);
outFrame = 0; outFrame=1;
if ( entity.mUser3 == AVH_USER3_HIVE ) {
outFrame=4;
}
else if ( (entity.mUser3 == AVH_USER3_RESTOWER) || (entity.mUser3 == AVH_USER3_ALIENRESTOWER) || (entity.mUser3 == AVH_USER3_FUNC_RESOURCE) ) {
outFrame=3;
}
else if ( isStructure ) {
outFrame=isFriendly? 0 : 2;
}
} }
else else
{ {

Binary file not shown.