From 266af3b0893d482971d483e18f9815ac7efbbccb Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Tue, 23 Aug 2011 15:03:28 +0200 Subject: [PATCH] DREAMWEB: 'geteitherad' ported to C++ --- engines/dreamweb/stubs.cpp | 7 +++++++ engines/dreamweb/stubs.h | 1 + 2 files changed, 8 insertions(+) diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 0afa755d66b..67f8c81f632 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1101,6 +1101,13 @@ DynObject *DreamGenContext::getexad(uint8 index) { return (DynObject *)segRef(data.word(kExtras)).ptr(kExdata, 0) + index; } +DynObject *DreamGenContext::geteitheradCPP() { + if (data.byte(kObjecttype) == 4) + return getexad(data.byte(kItemframe)); + else + return getfreead(data.byte(kItemframe)); +} + SetObject *DreamGenContext::getsetad(uint8 index) { return (SetObject *)segRef(data.word(kSetdat)).ptr(0, 0) + index; } diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index ed77e26ef2c..e3afbab073f 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -157,6 +157,7 @@ void findormake(uint8 index, uint8 value, uint8 type); DynObject *getfreead(uint8 index); DynObject *getexad(uint8 index); + DynObject *geteitheradCPP(); SetObject *getsetad(uint8 index); void setallchanges(); void dochange();