diff options
author | Willem Jan Palenstijn | 2011-11-14 21:38:40 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-14 21:44:10 +0100 |
commit | b53a2997909d04ae3d3b87607f336d97d123eeb8 (patch) | |
tree | b39116ce9970a4e35050684cdbb16372ec8a094a /engines/dreamweb/object.cpp | |
parent | e254e549293b8b13e8d1765b553a448e73169de9 (diff) | |
download | scummvm-rg350-b53a2997909d04ae3d3b87607f336d97d123eeb8.tar.gz scummvm-rg350-b53a2997909d04ae3d3b87607f336d97d123eeb8.tar.bz2 scummvm-rg350-b53a2997909d04ae3d3b87607f336d97d123eeb8.zip |
DREAMWEB: Unhardcode checkcoords tables
This patch makes __dispatch_call (even more) superfluous,
but does not yet remove it.
Diffstat (limited to 'engines/dreamweb/object.cpp')
-rw-r--r-- | engines/dreamweb/object.cpp | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 1e5646d340..2712bc965b 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -148,19 +148,45 @@ void DreamGenContext::examineob(bool examineAgain) { delpointer(); data.byte(kGetback) = 0; switch (data.byte(kInvopen)) { - case 0: - bx = offset_examlist; - checkcoords(); + case 0: { + RectWithCallback examlist[] = { + { 273,320,157,198,&DreamGenContext::getbackfromob }, + { 260,300,0,44,&DreamGenContext::useobject }, + { 210,254,0,44,&DreamGenContext::selectopenob }, + { 144,176,64,96,&DreamGenContext::setpickup }, + { 0,50,50,200,&DreamGenContext::examinventory }, + { 0,320,0,200,&DreamGenContext::blank }, + { 0xFFFF,0,0,0,0 } + }; + checkcoords(examlist); break; - case 1: - bx = offset_invlist1; - checkcoords(); + } + case 1: { + // NB: This table contains the non-constant openchangesize! + RectWithCallback invlist1[] = { + { 273,320,157,198,&DreamGenContext::getbackfromob }, + { 255,294,0,24,&DreamGenContext::dropobject }, + { kInventx+167,kInventx+167+(18*3),kInventy-18,kInventy-2,&DreamGenContext::incryanpage }, + { kInventx, cs.word(offset_openchangesize),kInventy+100,kInventy+100+kItempicsize,&DreamGenContext::useopened }, + { kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamGenContext::intoinv }, + { 0,320,0,200,&DreamGenContext::blank }, + { 0xFFFF,0,0,0,0 } + }; + checkcoords(invlist1); break; - default: - bx = offset_withlist1; - checkcoords(); + } + default: { + RectWithCallback withlist1[] = { + { 273,320,157,198,&DreamGenContext::getbackfromob }, + { kInventx+167,kInventx+167+(18*3),kInventy-18,kInventy-2,&DreamGenContext::incryanpage }, + { kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamGenContext::selectob }, + { 0,320,0,200,&DreamGenContext::blank }, + { 0xFFFF,0,0,0,0 } + }; + checkcoords(withlist1); break; } + } if (data.byte(kQuitrequested) != 0) break; if (data.byte(kExamagain) != 0) |