aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/files.cpp
diff options
context:
space:
mode:
authorStrangerke2012-12-12 08:05:04 +0100
committerStrangerke2012-12-12 08:05:04 +0100
commiteece86d78e6821638772da0a5198e690c0f08745 (patch)
tree0048366ac767af1593a7b38e00f5c40d76d38235 /engines/hopkins/files.cpp
parent3b3a28e27f038207b72f03b478b7bf93357d1c25 (diff)
downloadscummvm-rg350-eece86d78e6821638772da0a5198e690c0f08745.tar.gz
scummvm-rg350-eece86d78e6821638772da0a5198e690c0f08745.tar.bz2
scummvm-rg350-eece86d78e6821638772da0a5198e690c0f08745.zip
HOPKINS: Homogenization of memory management
Diffstat (limited to 'engines/hopkins/files.cpp')
-rw-r--r--engines/hopkins/files.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp
index f251d51388..998ab57fc5 100644
--- a/engines/hopkins/files.cpp
+++ b/engines/hopkins/files.cpp
@@ -64,7 +64,7 @@ byte *FileManager::loadFile(const Common::String &file) {
// Allocate space for the file contents
size_t filesize = f.size();
- byte *data = _vm->_globals.dos_malloc2(filesize);
+ byte *data = _vm->_globals.allocMemory(filesize);
if (!data)
error("Error allocating space for file being loaded - %s", file.c_str());
@@ -273,14 +273,14 @@ byte *FileManager::searchCat(const Common::String &file, int a2) {
}
if (name == "FINIS") {
- _vm->_globals.dos_free2(ptr);
+ _vm->_globals.freeMemory(ptr);
return g_PTRNUL;
}
offsetVal += 23;
}
- _vm->_globals.dos_free2(ptr);
+ _vm->_globals.freeMemory(ptr);
// TODO: Double check whether this really should be an unsigned int comparison
if ((uint16)(a2 - 6) > 1 && (uint16)(a2 - 8) > 1) {
@@ -289,7 +289,7 @@ byte *FileManager::searchCat(const Common::String &file, int a2) {
f.seek(_vm->_globals.CAT_POSI);
- byte *catData = _vm->_globals.dos_malloc2(_vm->_globals.CAT_TAILLE);
+ byte *catData = _vm->_globals.allocMemory(_vm->_globals.CAT_TAILLE);
if (catData == g_PTRNUL)
error("CHARGE_FICHIER");