aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/support/files_manager.cpp8
-rw-r--r--engines/titanic/support/files_manager.h8
-rw-r--r--engines/titanic/support/font.cpp5
3 files changed, 10 insertions, 11 deletions
diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp
index 179d77f24f..6cd6bfb5f2 100644
--- a/engines/titanic/support/files_manager.cpp
+++ b/engines/titanic/support/files_manager.cpp
@@ -93,14 +93,14 @@ void CFilesManager::fn5(const CString &name) {
warning("TODO: CFilesManager::fn5");
}
-Common::SeekableReadStream *CFilesManager::getResource(const CString &name,
- const CString &area) {
+Common::SeekableReadStream *CFilesManager::getResource(
+ Common::WinResourceID area, Common::WinResourceID name) {
if (!_exeResources) {
- _exeResources = new Common::NEResources();
+ _exeResources = new Common::PEResources();
_exeResources->loadFromEXE("st.exe");
}
- return nullptr;
+ return _exeResources->getResource(area, name);
}
} // End of namespace Titanic
diff --git a/engines/titanic/support/files_manager.h b/engines/titanic/support/files_manager.h
index 7915149412..ae664698ac 100644
--- a/engines/titanic/support/files_manager.h
+++ b/engines/titanic/support/files_manager.h
@@ -23,7 +23,7 @@
#ifndef TITANIC_FILES_MANAGER_H
#define TITANIC_FILES_MANAGER_H
-#include "common/winexe_ne.h"
+#include "common/winexe_pe.h"
#include "titanic/core/list.h"
#include "titanic/support/screen_manager.h"
@@ -37,7 +37,7 @@ class CFilesManagerList : public List<ListItem> {
class CFilesManager {
private:
CGameManager *_gameManager;
- Common::NEResources *_exeResources;
+ Common::PEResources *_exeResources;
CFilesManagerList _list;
CString _string1;
CString _string2;
@@ -87,8 +87,8 @@ public:
/**
* Get a resource from the executable
*/
- Common::SeekableReadStream *getResource(const CString &name,
- const CString &area);
+ Common::SeekableReadStream *getResource(Common::WinResourceID area,
+ Common::WinResourceID name);
};
} // End of namespace Titanic
diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp
index 6862baf79f..3b48e5e301 100644
--- a/engines/titanic/support/font.cpp
+++ b/engines/titanic/support/font.cpp
@@ -43,11 +43,10 @@ STFont::~STFont() {
void STFont::load(int fontNumber) {
assert(!_dataPtr);
- CString fontNumStr = CString::format("%d", fontNumber);
Common::SeekableReadStream *stream = g_vm->_filesManager.getResource(
- fontNumStr, "STFont");
+ Common::WinResourceID("STFONT"), fontNumber);
if (!stream)
- return;
+ error("Could not locate the specified font");
_field8 = stream->readUint32LE();
_maxCharWidth = stream->readUint32LE();