diff options
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 1a2943043c..c2dfa6644f 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -208,6 +208,20 @@ static Common::String getFilename(Context &context) { return Common::String(name); } +uint16 DreamGenContext::standardload(const char *fileName) { + engine->openFile(fileName); + engine->readFromFile(cs.ptr(kFileheader, kHeaderlen), kHeaderlen); + uint16 sizeInBytes = cs.word(kFiledata); + uint16 result = allocatemem((sizeInBytes + 15) / 16); + engine->readFromFile(segRef(result).ptr(0, 0), sizeInBytes); + engine->closeFile(); + return result; +} + +void DreamGenContext::standardload() { + ax = standardload((const char *)cs.ptr(dx, 0)); +} + void DreamGenContext::seecommandtail() { data.word(kSoundbaseadd) = 0x220; data.byte(kSoundint) = 5; |