aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/scicore
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/scicore')
-rw-r--r--engines/sci/scicore/resource.cpp1
-rw-r--r--engines/sci/scicore/sciconsole.cpp3
-rw-r--r--engines/sci/scicore/vocab_debug.cpp8
-rw-r--r--engines/sci/scicore/vocabulary.cpp2
4 files changed, 6 insertions, 8 deletions
diff --git a/engines/sci/scicore/resource.cpp b/engines/sci/scicore/resource.cpp
index 488ed2e33b..192632a55b 100644
--- a/engines/sci/scicore/resource.cpp
+++ b/engines/sci/scicore/resource.cpp
@@ -31,7 +31,6 @@
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
#include "sci/tools.h"
-#include "sci/sci_memory.h"
#include "sci/scicore/resource.h"
#include "sci/scicore/vocabulary.h"
#include "sci/scicore/decompressor.h"
diff --git a/engines/sci/scicore/sciconsole.cpp b/engines/sci/scicore/sciconsole.cpp
index 863bf990b1..7f56eef7b8 100644
--- a/engines/sci/scicore/sciconsole.cpp
+++ b/engines/sci/scicore/sciconsole.cpp
@@ -26,7 +26,6 @@
/* First part of the console implmentation: VM independent stuff */
/* Remember, it doesn't have to be fast. */
-#include "sci/sci_memory.h"
#include "sci/engine/state.h"
#include "sci/scicore/sciconsole.h"
@@ -53,7 +52,7 @@ int sciprintf(const char *fmt, ...) {
va_end(argp);
// Allocate buffer for the full printed string
- char *buf = (char *)sci_malloc(bufsize + 1);
+ char *buf = (char *)malloc(bufsize + 1);
assert(buf);
// Print everything according to fmt into buf
diff --git a/engines/sci/scicore/vocab_debug.cpp b/engines/sci/scicore/vocab_debug.cpp
index 058c81c337..d626983058 100644
--- a/engines/sci/scicore/vocab_debug.cpp
+++ b/engines/sci/scicore/vocab_debug.cpp
@@ -289,7 +289,7 @@ int *vocabulary_get_classes(ResourceManager *resmgr, int* count) {
if ((r = resmgr->findResource(kResourceTypeVocab, 996, 0)) == NULL)
return 0;
- c = (int *)sci_malloc(sizeof(int) * r->size / 2);
+ c = (int *)malloc(sizeof(int) * r->size / 2);
for (i = 2; i < r->size; i += 4) {
c[i/4] = READ_LE_UINT16(r->data + i);
}
@@ -356,13 +356,13 @@ opcode* vocabulary_get_opcodes(ResourceManager *resmgr) {
count = READ_LE_UINT16(r->data);
- o = (opcode*)sci_malloc(sizeof(opcode) * 256);
+ o = (opcode*)malloc(sizeof(opcode) * 256);
for (i = 0; i < count; i++) {
int offset = READ_LE_UINT16(r->data + 2 + i * 2);
int len = READ_LE_UINT16(r->data + offset) - 2;
o[i].type = READ_LE_UINT16(r->data + offset + 2);
o[i].number = i;
- o[i].name = (char *)sci_malloc(len + 1);
+ o[i].name = (char *)malloc(len + 1);
memcpy(o[i].name, r->data + offset + 4, len);
o[i].name[len] = '\0';
#ifdef VOCABULARY_DEBUG
@@ -372,7 +372,7 @@ opcode* vocabulary_get_opcodes(ResourceManager *resmgr) {
for (i = count; i < 256; i++) {
o[i].type = 0;
o[i].number = i;
- o[i].name = (char *)sci_malloc(strlen("undefined") + 1);
+ o[i].name = (char *)malloc(strlen("undefined") + 1);
strcpy(o[i].name, "undefined");
}
return o;
diff --git a/engines/sci/scicore/vocabulary.cpp b/engines/sci/scicore/vocabulary.cpp
index 3a55e95e5c..af63a9803a 100644
--- a/engines/sci/scicore/vocabulary.cpp
+++ b/engines/sci/scicore/vocabulary.cpp
@@ -458,7 +458,7 @@ bool vocab_tokenize_string(ResultWordList &retval, const char *sentence, const W
// Look it up
if (lookup_result._class == -1) { // Not found?
- *error = (char *)sci_calloc(wordlen + 1, 1);
+ *error = (char *)calloc(wordlen + 1, 1);
strncpy(*error, lastword, wordlen); // Set the offending word
retval.clear();
return false; // And return with error