mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-31 22:05:10 +02:00
Several minor cleanups.
This commit is contained in:
parent
91dc7a0dd4
commit
f7a4bb906c
@ -1981,7 +1981,7 @@ void OptionsTab::flagPressed( int color )
|
|||||||
playerToRestore.reset();
|
playerToRestore.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
int newPlayer = clickedNameID; //which player will take clicked position
|
int newPlayer; //which player will take clicked position
|
||||||
|
|
||||||
//who will be put here?
|
//who will be put here?
|
||||||
if(!clickedNameID) //AI player clicked -> if possible replace computer with unallocated player
|
if(!clickedNameID) //AI player clicked -> if possible replace computer with unallocated player
|
||||||
|
@ -127,7 +127,7 @@ public:
|
|||||||
void deserializationFix();
|
void deserializationFix();
|
||||||
|
|
||||||
friend class CArtifactInstance;
|
friend class CArtifactInstance;
|
||||||
friend class AssembledArtifact;
|
friend struct AssembledArtifact;
|
||||||
template <typename Handler> void serialize(Handler &h, const int version)
|
template <typename Handler> void serialize(Handler &h, const int version)
|
||||||
{
|
{
|
||||||
h & static_cast<CArtifactInstance&>(*this);
|
h & static_cast<CArtifactInstance&>(*this);
|
||||||
|
@ -605,7 +605,6 @@ void CCreatureHandler::loadCreatures()
|
|||||||
ifs.open(DATA_DIR "/config/bonusnames.txt");
|
ifs.open(DATA_DIR "/config/bonusnames.txt");
|
||||||
{
|
{
|
||||||
std::string buf2, buf3, line;
|
std::string buf2, buf3, line;
|
||||||
int i;
|
|
||||||
std::map<std::string,int>::const_iterator it;
|
std::map<std::string,int>::const_iterator it;
|
||||||
getline(ifs, line); //skip 1st line
|
getline(ifs, line); //skip 1st line
|
||||||
while(!ifs.eof())
|
while(!ifs.eof())
|
||||||
@ -1026,7 +1025,7 @@ void CCreatureHandler::loadMindImmunity(Bonus & b, BonusList & bl, std::string &
|
|||||||
|
|
||||||
b.type = Bonus::SPELL_IMMUNITY;
|
b.type = Bonus::SPELL_IMMUNITY;
|
||||||
b.val = Bonus::BASE_NUMBER;
|
b.val = Bonus::BASE_NUMBER;
|
||||||
si32 lastVal, curVal, lastLev = 0;
|
si32 curVal;
|
||||||
|
|
||||||
b.val = 0; //on-off ability, no value specified
|
b.val = 0; //on-off ability, no value specified
|
||||||
loadToIt (curVal, src, it, 4); // 0 level is never active
|
loadToIt (curVal, src, it, 4); // 0 level is never active
|
||||||
@ -1132,4 +1131,4 @@ void CCreatureHandler::buildBonusTreeForTiers()
|
|||||||
void CCreatureHandler::deserializationFix()
|
void CCreatureHandler::deserializationFix()
|
||||||
{
|
{
|
||||||
buildBonusTreeForTiers();
|
buildBonusTreeForTiers();
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ struct DLL_EXPORT DuelParameters
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class BattleInfo;
|
struct BattleInfo;
|
||||||
|
|
||||||
class DLL_EXPORT CGameState
|
class DLL_EXPORT CGameState
|
||||||
{
|
{
|
||||||
@ -409,4 +409,4 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
#endif // __CGAMESTATE_H__
|
#endif // __CGAMESTATE_H__
|
||||||
|
|
||||||
|
@ -392,7 +392,6 @@ void CHeroHandler::loadHeroes()
|
|||||||
ballistics.push_back(bli);
|
ballistics.push_back(bli);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
it = 0;
|
|
||||||
std::ifstream inp;
|
std::ifstream inp;
|
||||||
dump.clear();
|
dump.clear();
|
||||||
inp.open(DATA_DIR "/config/specials.txt"); //loading hero specials
|
inp.open(DATA_DIR "/config/specials.txt"); //loading hero specials
|
||||||
|
@ -933,11 +933,9 @@ void Mapa::readRumors( const unsigned char * bufor, int &i)
|
|||||||
void Mapa::readHeader( const unsigned char * bufor, int &i)
|
void Mapa::readHeader( const unsigned char * bufor, int &i)
|
||||||
{
|
{
|
||||||
//reading allowed heroes (20 bytes)
|
//reading allowed heroes (20 bytes)
|
||||||
int ist = i;
|
int ist = i; //starting i for loop
|
||||||
|
|
||||||
ist=i; //starting i for loop
|
|
||||||
|
|
||||||
unsigned char disp = 0;
|
unsigned char disp = 0;
|
||||||
|
|
||||||
if(version>=SoD)
|
if(version>=SoD)
|
||||||
{
|
{
|
||||||
disp = bufor[i++];
|
disp = bufor[i++];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user