#define VCMI_DLL #include "../global.h" #include "VCMI_Lib.h" #include "../hch/CArtHandler.h" #include "../hch/CCreatureHandler.h" #include "../hch/CDefObjInfoHandler.h" #include "../hch/CHeroHandler.h" #include "../hch/CLodHandler.h" #include "../hch/CObjectHandler.h" #include "../hch/CTownHandler.h" #include "../hch/CBuildingHandler.h" #include "../hch/CSpellHandler.h" #include "../hch/CGeneralTextHandler.h" /* * VCMI_Lib.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * * License: GNU General Public License v2.0 or later * Full text of license available in license.txt file, in main folder * */ class CLodHandler; LibClasses * VLC = NULL; DLL_EXPORT CLodHandler *bitmaph = NULL, *spriteh = NULL; DLL_EXPORT CLogger tlog0(0); DLL_EXPORT CLogger tlog1(1); DLL_EXPORT CLogger tlog2(2); DLL_EXPORT CLogger tlog3(3); DLL_EXPORT CLogger tlog4(4); DLL_EXPORT CLogger tlog5(5); DLL_EXPORT CConsoleHandler *console = NULL; DLL_EXPORT std::ostream *logfile = NULL ; DLL_EXPORT void initDLL(CConsoleHandler *Console, std::ostream *Logfile) { console = Console; logfile = Logfile; VLC = new LibClasses; try { VLC->init(); } HANDLE_EXCEPTION } DLL_EXPORT void loadToIt(std::string &dest, const std::string &src, int &iter, int mode) { switch(mode) { case 0: { int hmcr = 0; for(iter; iterload(); tlog0<<"\tGeneral text handler: "<loadHeroes(); heroh->loadObstacles(); heroh->loadWallPositions(); heroh->loadPuzzleInfo(); tlog0 <<"\tHero handler: "<loadArtifacts(false); tlog0<<"\tArtifact handler: "<loadCreatures(); tlog0<<"\tCreature handler: "<loadNames(); tlog0<<"\tTown handler: "<loadObjects(); tlog0<<"\tObject handler: "<load(); tlog0<<"\tDef information handler: "<loadBuildings(); tlog0<<"\tBuilding handler: "<loadSpells(); tlog0<<"\tSpell handler: "<init(DATA_DIR "/Data/H3sprite.lod", DATA_DIR "/Sprites"); bitmaph = new CLodHandler; bitmaph->init(DATA_DIR "/Data/H3bitmap.lod", DATA_DIR "/Data"); tlog0<<"Loading .lod files: "<load(); arth->loadArtifacts(true); }