mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
* basic structure of ERM interpreter
* SHOW_FPS moved to settings.txt * minor changes
This commit is contained in:
@@ -11,10 +11,7 @@
|
||||
#include "CBuildingHandler.h"
|
||||
#include "CSpellHandler.h"
|
||||
#include "CGeneralTextHandler.h"
|
||||
#include "ERMParser.h"
|
||||
|
||||
#include <boost/filesystem.hpp> //for erm parser testing
|
||||
#include <boost/algorithm/string.hpp> //for erm parser testing
|
||||
#include "ERMInterpreter.h"
|
||||
|
||||
/*
|
||||
* VCMI_Lib.cpp, part of VCMI engine
|
||||
@@ -55,28 +52,9 @@ DLL_EXPORT void initDLL(CConsoleHandler *Console, std::ostream *Logfile)
|
||||
} HANDLE_EXCEPTION;
|
||||
|
||||
|
||||
using namespace boost::filesystem;
|
||||
//parser checking
|
||||
if(!exists(DATA_DIR "/Data/s/"))
|
||||
{
|
||||
tlog3 << "Warning: Folder " DATA_DIR "/Data/s/ doesn't exist!\n";
|
||||
return;
|
||||
}
|
||||
directory_iterator enddir;
|
||||
for (directory_iterator dir(DATA_DIR "/Data/s"); dir!=enddir; dir++)
|
||||
{
|
||||
if(is_regular(dir->status()))
|
||||
{
|
||||
std::string name = dir->path().leaf();
|
||||
if( boost::algorithm::ends_with(name, ".erm") ||
|
||||
boost::algorithm::ends_with(name, ".verm") )
|
||||
{
|
||||
|
||||
ERMParser ep(dir->path().string());
|
||||
ep.parseFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
// ERMInterpreter ei;
|
||||
// ei.scanForScripts();
|
||||
// ei.printScripts();
|
||||
}
|
||||
|
||||
DLL_EXPORT void loadToIt(std::string &dest, const std::string &src, int &iter, int mode)
|
||||
|
||||
Reference in New Issue
Block a user