1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

gcc fixes(bad idea to call global vars such as log2, this name used by math function). Colored log support on some non-win32 platforms. Small Automake project update

This commit is contained in:
Vadim Glazunov
2008-09-18 20:24:53 +00:00
parent 5ee37eeb3d
commit a1dd7f22f9
16 changed files with 227 additions and 179 deletions

View File

@@ -12,12 +12,12 @@
class CLodHandler;
LibClasses * VLC = NULL;
CLodHandler * bitmaph=NULL;
CLogger<0> log0;
CLogger<1> log1;
CLogger<2> log2;
CLogger<3> log3;
CLogger<4> log4;
CLogger<5> log5;
CLogger<0> _log0;
CLogger<1> _log1;
CLogger<2> _log2;
CLogger<3> _log3;
CLogger<4> _log4;
CLogger<5> _log5;
CConsoleHandler *console = NULL;
std::ostream *logfile = NULL;
DLL_EXPORT void initDLL(CLodHandler *b, CConsoleHandler *Console, std::ostream *Logfile)
@@ -32,39 +32,39 @@ DLL_EXPORT void initDLL(CLodHandler *b, CConsoleHandler *Console, std::ostream *
heroh->loadHeroes();
heroh->loadPortraits();
VLC->heroh = heroh;
log0 <<"\tHero handler: "<<pomtime.getDif()<<std::endl;
_log0 <<"\tHero handler: "<<pomtime.getDif()<<std::endl;
CArtHandler * arth = new CArtHandler;
arth->loadArtifacts();
VLC->arth = arth;
log0<<"\tArtifact handler: "<<pomtime.getDif()<<std::endl;
_log0<<"\tArtifact handler: "<<pomtime.getDif()<<std::endl;
CCreatureHandler * creh = new CCreatureHandler();
creh->loadCreatures();
VLC->creh = creh;
log0<<"\tCreature handler: "<<pomtime.getDif()<<std::endl;
_log0<<"\tCreature handler: "<<pomtime.getDif()<<std::endl;
VLC->townh = new CTownHandler;
VLC->townh->loadNames();
log0<<"\tTown handler: "<<pomtime.getDif()<<std::endl;
_log0<<"\tTown handler: "<<pomtime.getDif()<<std::endl;
CObjectHandler * objh = new CObjectHandler;
objh->loadObjects();
VLC->objh = objh;
log0<<"\tObject handler: "<<pomtime.getDif()<<std::endl;
_log0<<"\tObject handler: "<<pomtime.getDif()<<std::endl;
VLC->dobjinfo = new CDefObjInfoHandler;
VLC->dobjinfo->load();
log0<<"\tDef information handler: "<<pomtime.getDif()<<std::endl;
_log0<<"\tDef information handler: "<<pomtime.getDif()<<std::endl;
VLC->buildh = new CBuildingHandler;
VLC->buildh->loadBuildings();
log0<<"\tBuilding handler: "<<pomtime.getDif()<<std::endl;
_log0<<"\tBuilding handler: "<<pomtime.getDif()<<std::endl;
CSpellHandler * spellh = new CSpellHandler;
spellh->loadSpells();
VLC->spellh = spellh;
log0<<"\tSpell handler: "<<pomtime.getDif()<<std::endl;
_log0<<"\tSpell handler: "<<pomtime.getDif()<<std::endl;
}
DLL_EXPORT void loadToIt(std::string &dest, std::string &src, int &iter, int mode)
@@ -180,4 +180,4 @@ DLL_EXPORT void loadToIt(si32 &dest, std::string &src, int &iter, int mode)
std::string pom;
loadToIt(pom,src,iter,mode);
dest = atol(pom.c_str());
}
}