diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/object.cpp | 7 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/use.cpp | 16 |
3 files changed, 9 insertions, 15 deletions
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 207f4889db..cdd612001f 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -79,10 +79,6 @@ void DreamGenContext::wornError() { workToScreenM(); } -void DreamGenContext::makeWorn() { - makeWorn((DynObject *)es.ptr(bx, sizeof(DynObject))); -} - void DreamGenContext::makeWorn(DynObject *object) { object->id[0] = 'W'-'A'; object->id[1] = 'E'-'A'; @@ -419,8 +415,7 @@ void DreamGenContext::selectOb() { void DreamGenContext::setPickup() { if (data.byte(kObjecttype) != kSetObjectType1 && data.byte(kObjecttype) != kSetObjectType3) { - // The original called getAnyAd() here. However, since object types - // 1 and 3 are excluded, the resulting object is a DynObject + // Object types 1 and 3 are excluded, so the resulting object is a DynObject uint8 dummy; DynObject *object = (DynObject *)getAnyAd(&dummy, &dummy); if (object->mapad[0] == 4) { diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index c94cb02a3c..a58bb259be 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -104,7 +104,6 @@ return DreamBase::isItWorn(object); } void wornError(); - void makeWorn(); void makeWorn(DynObject *object); void obToInv(); void obToInv(uint8 index, uint8 flag, uint16 x, uint16 y) { diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index d3dda0e0a0..b642598589 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -363,8 +363,8 @@ void DreamGenContext::wearWatch() { showFirstUse(); data.byte(kWatchon) = 1; data.byte(kGetback) = 1; - getAnyAd(); - makeWorn(); + uint8 dummy; + makeWorn((DynObject *)getAnyAd(&dummy, &dummy)); } } @@ -377,8 +377,8 @@ void DreamGenContext::wearShades() { data.byte(kShadeson) = 1; showFirstUse(); data.byte(kGetback) = 1; - getAnyAd(); - makeWorn(); + uint8 dummy; + makeWorn((DynObject *)getAnyAd(&dummy, &dummy)); } } @@ -1027,13 +1027,13 @@ void DreamGenContext::useCart() { } void DreamGenContext::useTrainer() { - // TODO: Use the C++ version of getAnyAd() - getAnyAd(); - if (es.byte(bx + 2) != 4) { + uint8 dummy; + DynObject *object = (DynObject *)getAnyAd(&dummy, &dummy); + if (object->mapad[0] != 4) { notHeldError(); } else { data.byte(kProgresspoints)++; - makeWorn(); + makeWorn(object); showSecondUse(); putBackObStuff(); } |