diff options
author | Willem Jan Palenstijn | 2011-11-26 17:46:50 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-26 18:21:15 +0100 |
commit | 18b8d25696ccfa64fc9336e0b96482a8567fbf15 (patch) | |
tree | 919168fa9334847f8eaea1e6b3f7367eadb83351 /engines | |
parent | 8c830ce1b98a5cd9ab011d2c6599e5f3d9659c80 (diff) | |
download | scummvm-rg350-18b8d25696ccfa64fc9336e0b96482a8567fbf15.tar.gz scummvm-rg350-18b8d25696ccfa64fc9336e0b96482a8567fbf15.tar.bz2 scummvm-rg350-18b8d25696ccfa64fc9336e0b96482a8567fbf15.zip |
DREAMWEB: Convert 'actualload'
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/saveload.cpp | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index ba338cb297..76ae5034da 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -409,33 +409,20 @@ void DreamGenContext::actualsave() { } void DreamGenContext::actualload() { - STACK_CHECK; - _cmp(data.byte(kCommandtype), 221); - if (flags.z()) - goto alreadyactload; - data.byte(kCommandtype) = 221; - al = 41; - commandonly(); -alreadyactload: - ax = data.word(kMousebutton); - _cmp(ax, data.word(kOldbutton)); - if (flags.z()) - return /* (notactload) */; - _cmp(ax, 1); - if (!flags.z()) - return /* (notactload) */; - dx = data; - ds = dx; - si = 8579; - al = data.byte(kCurrentslot); - ah = 0; - cx = 17; - _mul(cx); - _add(si, ax); - _inc(si); - _cmp(ds.byte(si), 0); - if (flags.z()) - return /* (notactload) */; + if (data.byte(kCommandtype) != 221) { + data.byte(kCommandtype) = 221; + commandonly(41); + } + + if (data.word(kMousebutton) == data.word(kOldbutton) || data.word(kMousebutton) != 1) + return; + + unsigned int slot = data.byte(kCurrentslot); + + const char *desc = (const char *)data.ptr(kSavenames + 17*slot + 1, 16); + if (desc[0] == 0) + return; + loadposition(); data.byte(kGetback) = 1; } |