1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Filesystem handling is now more flexible

- removed CResourceLoader class in favor of one that implements resource loader interface
- removed global pool of files, in favour of more dynamic approach
- renamed some files to match current situation
All these changes are needed mostly for future mod manager + .zip support
This commit is contained in:
Ivan Savenko
2013-07-28 14:49:50 +00:00
parent aa6626bc35
commit b87897096c
64 changed files with 1203 additions and 1521 deletions

View File

@ -1,8 +1,7 @@
#include "StdInc.h"
#include "CGeneralTextHandler.h"
#include "filesystem/CResourceLoader.h"
#include "filesystem/CInputStream.h"
#include "filesystem/Filesystem.h"
#include "GameConstants.h"
#include "CModHandler.h"
#include "VCMI_Lib.h"
@ -322,7 +321,7 @@ CGeneralTextHandler::CGeneralTextHandler()
}
std::string buffer;
std::ifstream ifs(CResourceHandler::get()->getResourceName(ResourceID("config/threatlevel.txt")), std::ios::binary);
std::ifstream ifs(*CResourceHandler::get()->getResourceName(ResourceID("config/threatlevel.txt")), std::ios::binary);
getline(ifs, buffer); //skip 1st line
for (int i = 0; i < 13; ++i)
{