diff options
author | Vladimir | 2011-06-09 02:00:41 +0400 |
---|---|---|
committer | Alyssa Milburn | 2011-06-15 17:33:27 +0200 |
commit | 3bd7cb1902b7a01d622cc8ccdfc54bc5b50f164c (patch) | |
tree | e70ea5deeb687971ab02a3e0167d2fcb8f53a164 /engines | |
parent | 978d17454b4fad024939320a1e45b1a66e41b3ea (diff) | |
download | scummvm-rg350-3bd7cb1902b7a01d622cc8ccdfc54bc5b50f164c.tar.gz scummvm-rg350-3bd7cb1902b7a01d622cc8ccdfc54bc5b50f164c.tar.bz2 scummvm-rg350-3bd7cb1902b7a01d622cc8ccdfc54bc5b50f164c.zip |
DREAMWEB: fixed loadfromfile
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 21 | ||||
-rw-r--r-- | engines/dreamweb/dreamweb.h | 2 |
2 files changed, 16 insertions, 7 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index b5be2a63c1..340c916b41 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -170,11 +170,11 @@ void DreamWebEngine::openFile(const Common::String &name) { } } -void DreamWebEngine::readFromFile(uint8 *dst, unsigned size) { +uint32 DreamWebEngine::readFromFile(uint8 *dst, unsigned size) { processEvents(); if (!_file.isOpen()) error("file was not opened (read before open)"); - _file.read(dst, size); + return _file.read(dst, size); } void DreamWebEngine::closeFile() { @@ -248,7 +248,7 @@ void readfromfile(Context &context) { uint16 dst_offset = context.dx; uint16 size = context.cx; debug(1, "readfromfile(%04x:%u, %u)", (uint16)context.ds, dst_offset, size); - engine()->readFromFile(context.ds.ptr(dst_offset, size), size); + context.ax = engine()->readFromFile(context.ds.ptr(dst_offset, size), size); context.flags._c = false; //fixme: add return args } @@ -459,8 +459,17 @@ void mode640x480(Context &context) { } void showgroup(Context &context) { - warning("showgroup: STUB"); - context.cx = 0; + debug(1, "setting palette entries %u, %u colors, ds: %04x", (uint8)context.al, (uint16)context.cx, (uint16)context.ds); + unsigned idx = context.al; + while(context.cx--) { + context._lodsb(); + unsigned r = context.al; + context._lodsb(); + unsigned g = context.al; + context._lodsb(); + unsigned b = context.al; + debug(1, "%u -> %u,%u,%u", idx, r, g, b); + } } void fadedos(Context &context) { @@ -484,7 +493,7 @@ void readoneblock(Context &context) { } void showpcx(Context &context) { - ::error("showpcx"); + warning("showpcx"); } } /*namespace dreamgen */ diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 1c2d1f6688..d2fc447fee 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -79,7 +79,7 @@ public: uint8 randomNumber() { return _rnd.getRandomNumber(255); } void openFile(const Common::String &name); - void readFromFile(uint8 *dst, unsigned size); + uint32 readFromFile(uint8 *dst, unsigned size); void closeFile(); void mouseCall(); //fill mouse pos and button state |