1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Added hero selection (buggy)

This commit is contained in:
Michał W. Urbańczyk 2007-07-24 00:25:46 +00:00
parent 8cb1c3ff90
commit 40607240b4
4 changed files with 12 additions and 8 deletions

17
CMT.cpp
View File

@ -268,6 +268,15 @@ int _tmain(int argc, _TCHAR* argv[])
cgi->townh = new CTownHandler;
cgi->townh->loadNames();
CAbilityHandler * abilh = new CAbilityHandler;
abilh->loadAbilities();
cgi->abilh = abilh;
CHeroHandler * heroh = new CHeroHandler;
heroh->loadHeroes();
heroh->loadPortraits();
cgi->heroh = heroh;
THC std::cout<<"Loading .lods: "<<tmh.getDif()<<std::endl;
CPreGame * cpg = new CPreGame(); //main menu and submenus
THC std::cout<<"Initialization CPreGame (together): "<<tmh.getDif()<<std::endl;
@ -311,13 +320,7 @@ int _tmain(int argc, _TCHAR* argv[])
CCreatureHandler * creh = new CCreatureHandler;
creh->loadCreatures();
cgi->creh = creh;
CAbilityHandler * abilh = new CAbilityHandler;
abilh->loadAbilities();
cgi->abilh = abilh;
CHeroHandler * heroh = new CHeroHandler;
heroh->loadHeroes();
heroh->loadPortraits();
cgi->heroh = heroh;
CSpellHandler * spellh = new CSpellHandler;
spellh->loadSpells();
cgi->spellh = spellh;

Binary file not shown.

View File

@ -60,7 +60,7 @@ class Options : public PreGameTab
PlayerOptions(int serial, int player);
Ecolor color;
//SDL_Surface * bg;
OptionSwitch left, right;
OptionSwitch left, right, Hleft, Hright;
int nr;
};
public:

View File

@ -19,6 +19,7 @@ enum ElossCon {lossCastle, lossHero, timeExpires, lossStandard=255};
const int F_NUMBER = 9; //factions quantity
const int PLAYER_LIMIT = 8; //player limit per map
const int HEROES_PER_TYPE=8; //amount of heroes of each type
#define DEFBYPASS
#endif //GLOBAL_H