Add config file support. Thanks |Pixel| :)

svn-id: r4111
This commit is contained in:
James Brown 2002-04-27 16:58:29 +00:00
parent d2fe8ce153
commit 2b50dd2742
8 changed files with 196 additions and 64 deletions

27
sys.cpp
View file

@ -184,6 +184,33 @@ void Scumm::free(void *mem)
}
}
byte *Scumm::realloc(void *mem, int size)
{
byte * me = (byte *) mem;
if (mem) {
if (size) {
me = (byte *) ::realloc((me - 4), size + 4);
return me + 4;
} else {
free(me);
return NULL;
}
} else {
return alloc(size);
}
}
char *Scumm::Strdup(const char *s)
{
if (s) {
int l = strlen(s) + 1;
char * r = (char *) alloc(l);
memcpy(r, s, l);
return r;
}
return NULL;
}
bool Scumm::checkFixedDisk()
{
return true;