summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/chatwindow.cpp3
-rw-r--r--src/gui/windows/helpwindow.cpp3
-rw-r--r--src/gui/windows/minimap.cpp5
-rw-r--r--src/gui/windows/updaterwindow.cpp8
4 files changed, 11 insertions, 8 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 0ec192a89..fb7219ed9 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -73,6 +73,7 @@
#include "utils/copynpaste.h"
#include "utils/delete2.h"
+#include "utils/files.h"
#include "utils/gettext.h"
#include "resources/resourcemanager.h"
@@ -219,7 +220,7 @@ void ChatWindow::postInit()
void ChatWindow::loadCommandsFile(const std::string &name)
{
StringVect list;
- ResourceManager::loadTextFile(name, list);
+ Files::loadTextFile(name, list);
StringVectCIter it = list.begin();
const StringVectCIter it_end = list.end();
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 934e01359..e10900908 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -38,6 +38,7 @@
#include "resources/resourcemanager.h"
#include "utils/gettext.h"
+#include "utils/files.h"
#include "utils/paths.h"
#include "utils/process.h"
@@ -153,7 +154,7 @@ void HelpWindow::loadTags()
if (helpPath.empty())
helpPath = paths.getStringValue("help");
StringVect lines;
- ResourceManager::loadTextFile(helpPath.append("tags.idx"), lines);
+ Files::loadTextFile(helpPath.append("tags.idx"), lines);
FOR_EACH (StringVectCIter, it, lines)
{
const std::string &str = *it;
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index 3607d9584..5df1b60ce 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -44,6 +44,7 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include "utils/physfstools.h"
#include "utils/sdlcheckutils.h"
#include "debug.h"
@@ -169,14 +170,14 @@ void Minimap::setMap(const Map *const map)
std::string minimapName = map->getProperty("minimap");
- if (minimapName.empty() && resman->exists(tempname))
+ if (minimapName.empty() && PhysFs::exists(tempname.c_str()))
minimapName = tempname;
if (minimapName.empty())
{
tempname = std::string("graphics/minimaps/").append(
map->getFilename()).append(".png");
- if (resman->exists(tempname))
+ if (PhysFs::exists(tempname.c_str()))
minimapName = tempname;
}
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 45c18b21b..49b2e986f 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -46,6 +46,8 @@
#include "resources/db/moddb.h"
#include "utils/delete2.h"
+#include "utils/files.h"
+#include "utils/physfstools.h"
#include "utils/gettext.h"
#include "utils/mkdir.h"
#include "utils/paths.h"
@@ -1020,8 +1022,7 @@ bool UpdaterWindow::validateFile(const std::string &filePath,
unsigned long UpdaterWindow::getFileHash(const std::string &filePath)
{
int size = 0;
- char *const buf = static_cast<char*>(ResourceManager::loadFile(
- filePath, size));
+ char *const buf = static_cast<char*>(PhysFs::loadFile(filePath, size));
if (!buf)
return 0;
return Net::Download::adlerBuffer(buf, size);
@@ -1042,8 +1043,7 @@ void UpdaterWindow::loadFile(std::string file)
trim(file);
StringVect lines;
- const ResourceManager *const resman = ResourceManager::getInstance();
- resman->loadTextFileLocal(mUpdatesDir + "/local/help/news.txt", lines);
+ Files::loadTextFileLocal(mUpdatesDir + "/local/help/news.txt", lines);
for (size_t i = 0, sz = lines.size(); i < sz; ++i)
mBrowserBox->addRow(lines[i]);