mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Mostly implemented Scenario Information and Save Game windows. Adventure Options Window (crash after closing it is known, will be soon fixed). Several minor improvements for pregame. Arrogance will be selected by default when starting a new game.
This commit is contained in:
20
lib/map.cpp
20
lib/map.cpp
@@ -256,6 +256,13 @@ void CMapHeader::initFromMemory( unsigned char *bufor, int &i )
|
||||
players[rr].team = bufor[i++];
|
||||
}
|
||||
}
|
||||
else//no alliances
|
||||
{
|
||||
for(int i=0;i<PLAYER_LIMIT;i++)
|
||||
if(players[i].canComputerPlay || players[i].canHumanPlay)
|
||||
players[i].team = howManyTeams++;
|
||||
}
|
||||
|
||||
|
||||
pom = i;
|
||||
allowedHeroes.resize(HEROES_QUANTITY,false);
|
||||
@@ -465,6 +472,11 @@ void CMapHeader::loadViCLossConditions( unsigned char * bufor, int &i)
|
||||
}
|
||||
}
|
||||
|
||||
CMapHeader::~CMapHeader()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Mapa::initFromBytes(unsigned char * bufor)
|
||||
{
|
||||
int i=0;
|
||||
@@ -2106,14 +2118,6 @@ void CMapInfo::countPlayers()
|
||||
playerAmnt++;
|
||||
}
|
||||
}
|
||||
|
||||
if(!howManyTeams) //no alliances
|
||||
{
|
||||
//howManyTeams = playerAmnt;
|
||||
for(int i=0;i<PLAYER_LIMIT;i++)
|
||||
if(players[i].canComputerPlay || players[i].canHumanPlay)
|
||||
players[i].team = howManyTeams++;
|
||||
}
|
||||
}
|
||||
|
||||
CMapInfo::CMapInfo(const std::string &fname, unsigned char *map )
|
||||
|
||||
Reference in New Issue
Block a user