From 0be53a88d626b484b9db30f3d89534d5d237a073 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 27 Dec 2011 01:43:54 +0100 Subject: DREAMWEB: Move remaining use functions to DreamBase --- engines/dreamweb/dreambase.h | 4 ++++ engines/dreamweb/object.cpp | 12 ++++++------ engines/dreamweb/stubs.h | 4 ---- engines/dreamweb/use.cpp | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index e22a2777d9..5625b28215 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -245,6 +245,8 @@ public: void useOpened(); void setPickup(); void selectOpenOb(); + void examineOb(bool examineAgain = true); + void selectOb(); // from pathfind.cpp void turnPathOn(uint8 param); @@ -638,6 +640,8 @@ public: uint8 getExPos(); // from use.cpp + void useRoutine(); + void useObject(); void placeFreeObject(uint8 index); void removeFreeObject(uint8 index); void setupTimedUse(uint16 offset, uint16 countToTimed, uint16 timeCount, byte x, byte y); diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 31a5af0bb5..65f45bd499 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -116,7 +116,7 @@ void DreamBase::obIcons() { showFrame(engine->icons2(), 260, 1, 1, 0); } -void DreamGenContext::examineOb(bool examineAgain) { +void DreamBase::examineOb(bool examineAgain) { data.byte(kPointermode) = 0; data.word(kTimecount) = 0; @@ -156,9 +156,9 @@ void DreamGenContext::examineOb(bool examineAgain) { switch (data.byte(kInvopen)) { case 0: { - RectWithCallback examList[] = { + RectWithCallback examList[] = { { 273,320,157,198,&DreamBase::getBackFromOb }, - { 260,300,0,44,&DreamGenContext::useObject }, + { 260,300,0,44,&DreamBase::useObject }, { 210,254,0,44,&DreamBase::selectOpenOb }, { 144,176,64,96,&DreamBase::setPickup }, { 0,50,50,200,&DreamBase::examineInventory }, @@ -183,10 +183,10 @@ void DreamGenContext::examineOb(bool examineAgain) { break; } default: { - RectWithCallback withList1[] = { + RectWithCallback withList1[] = { { 273,320,157,198,&DreamBase::getBackFromOb }, { kInventx+167,kInventx+167+(18*3),kInventy-18,kInventy-2,&DreamBase::incRyanPage }, - { kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamGenContext::selectOb }, + { kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamBase::selectOb }, { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; @@ -354,7 +354,7 @@ ObjectRef DreamBase::findInvPos() { return _ryanInvList[invPos]; } -void DreamGenContext::selectOb() { +void DreamBase::selectOb() { ObjectRef objectId = findInvPos(); if (objectId._index == 255) { blank(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index c749693b60..785e737310 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -53,13 +53,10 @@ void obToInv(uint8 index, uint8 flag, uint16 x, uint16 y) { DreamBase::obToInv(index, flag, x, y); } - void useRoutine(); - void examineOb(bool examineAgain = true); void readSetData(); void look(); void autoLook(); void doLook(); - void useObject(); void inventory(); void mainScreen(); void zoomOnOff(); @@ -69,6 +66,5 @@ void madmanRun(); void showGun(); void identifyOb(); - void selectOb(); #endif diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index 34c68cfd34..dc76cf30fd 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -35,7 +35,7 @@ struct UseListEntry { const char *id; }; -void DreamGenContext::useRoutine() { +void DreamBase::useRoutine() { static const UseListEntry kUseList[] = { { &DreamBase::useMon, "NETW" }, @@ -973,7 +973,7 @@ void DreamBase::useElvDoor() { data.byte(kGetback) = 1; } -void DreamGenContext::useObject() { +void DreamBase::useObject() { data.byte(kWithobject) = 255; if (data.byte(kCommandtype) != 229) { -- cgit v1.2.3