[Scummvm-cvs-logs] scummvm master -> 5a3deea58ebab2a443e48c91cfff7ca5ecab349c
bluegr
md5 at scummvm.org
Mon Dec 19 22:49:32 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5a3deea58e DREAMWEB: More work on inToInv and outOfInv
Commit: 5a3deea58ebab2a443e48c91cfff7ca5ecab349c
https://github.com/scummvm/scummvm/commit/5a3deea58ebab2a443e48c91cfff7ca5ecab349c
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-19T13:48:13-08:00
Commit Message:
DREAMWEB: More work on inToInv and outOfInv
Changed paths:
engines/dreamweb/object.cpp
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 9fe94c4..1cdbca0 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -568,21 +568,19 @@ void DreamGenContext::inToInv() {
return;
}
- findInvPos();
- ax = es.word(bx);
+ uint16 subject = getSegment(data.word(kBuffers)).word(findInvPosCPP());
- if (al != 255) {
+ if ((subject & 0xFF) != 255) {
swapWithInv();
return;
}
- al = data.byte(kItemframe);
- ah = data.byte(kObjecttype);
+ subject = (data.byte(kObjecttype) << 8) | data.byte(kItemframe);
- if (ax == data.word(kOldsubject) && data.byte(kCommandtype) != 220)
+ if (subject == data.word(kOldsubject) && data.byte(kCommandtype) != 220)
data.byte(kCommandtype) = 220;
- data.word(kOldsubject) = ax;
+ data.word(kOldsubject) = subject;
commandWithOb(35, data.byte(kObjecttype), data.byte(kItemframe));
if (data.word(kMousebutton) == data.word(kOldbutton) || !(data.word(kMousebutton) & 1))
@@ -603,10 +601,9 @@ void DreamGenContext::inToInv() {
}
void DreamGenContext::outOfInv() {
- findInvPos();
- ax = es.word(bx);
+ uint16 subject = getSegment(data.word(kBuffers)).word(findInvPosCPP());
- if (al == 255) {
+ if ((subject & 0xFF) == 255) {
blank();
return;
}
@@ -616,11 +613,13 @@ void DreamGenContext::outOfInv() {
return;
}
- if (ax == data.word(kOldsubject) && data.byte(kCommandtype) != 221)
+ if (subject == data.word(kOldsubject) && data.byte(kCommandtype) != 221)
data.byte(kCommandtype) = 221;
- data.word(kOldsubject) = ax;
- commandWithOb(36, ah, al);
+ data.word(kOldsubject) = subject;
+ byte type = subject >> 8;
+ byte frame = subject & 0xFF;
+ commandWithOb(36, type, frame);
if (data.word(kMousebutton) == data.word(kOldbutton))
return; // notletgo
@@ -630,10 +629,9 @@ void DreamGenContext::outOfInv() {
delPointer();
data.byte(kPickup) = 1;
- findInvPos();
- ax = es.word(bx);
- data.byte(kItemframe) = al;
- data.byte(kObjecttype) = ah;
+ subject = getSegment(data.word(kBuffers)).word(findInvPosCPP());
+ data.byte(kObjecttype) = subject >> 8;
+ data.byte(kItemframe) = subject & 0xFF;
DynObject *object = getExAd(data.byte(kItemframe));
object->mapad[0] = 20;
object->mapad[1] = 255;
More information about the Scummvm-git-logs
mailing list