char *__thiscall Battle_GetBackgroundPcxName(_BattleMgr_ *this)
{
_BattleMgr_ *BattleMgr; // esi
char *result; // eax
int SpecialGround; // ecx
_Hero_ *HeroA; // eax
_Hero_ *HeroD; // eax
__int64 v6; // [esp-4h] [ebp-Ch]
BattleMgr = this;
if ( this->HasShootTowers <= 0 )
{
SpecialGround = this->Special_Ground;
if ( SpecialGround != -1 && SpecialGround )
{
result = SpecialGroundNames[SpecialGround];
}
else
{
HeroA = BattleMgr->Hero[0];
if ( HeroA && HeroA->TempMod & 0x40000 && (HeroD = BattleMgr->Hero[1]) != 0 && HeroD->TempMod & 0x40000 )
{
result = aCmbkboat_pcx;
}
else if ( *(&BattleMgr->isBank + 1) )
{
result = aCmbkdeck_pcx;
}
else if ( SpecialGround )
{
LODWORD(v6) = *&BattleMgr->gap13F64[140];
result = off_0063D2F0[Select_Terr_Battlefield(o_AdvMgr, v6) + 2 * BattleMgr->LandType + BattleMgr->LandType];
}
else
{
result = aCmbkbch_pcx;
}
}
}
else
{
result = TownSiegeBackground[this->Town->type];
}
*&BattleMgr->gap5398[4] = 1;
*BattleMgr->gap5398 = -1;
return result;
}