diff options
author | D G Turner | 2011-12-01 19:43:43 +0000 |
---|---|---|
committer | D G Turner | 2011-12-01 19:43:43 +0000 |
commit | 349cbc527f33858b6275daaa8f770cd6f7fcd42d (patch) | |
tree | 9e8b535ba79d699c408631419dd80965e6eb40c9 /engines/dreamweb/object.cpp | |
parent | d1144963da664891baae241b72d6cfc65ae8d216 (diff) | |
download | scummvm-rg350-349cbc527f33858b6275daaa8f770cd6f7fcd42d.tar.gz scummvm-rg350-349cbc527f33858b6275daaa8f770cd6f7fcd42d.tar.bz2 scummvm-rg350-349cbc527f33858b6275daaa8f770cd6f7fcd42d.zip |
DREAMWEB: Fix compilation due to dreamgen.* function renaming.
Diffstat (limited to 'engines/dreamweb/object.cpp')
-rw-r--r-- | engines/dreamweb/object.cpp | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 9378729665..a01da08700 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -24,71 +24,71 @@ namespace DreamGen { -void DreamGenContext::fillryan() { +void DreamGenContext::fillRyan() { uint8 *inv = segRef(data.word(kBuffers)).ptr(kRyaninvlist, 60); - findallryan(inv); + findAllRyan(inv); inv += data.byte(kRyanpage) * 2 * 10; for (size_t i = 0; i < 2; ++i) { for (size_t j = 0; j < 5; ++j) { uint8 objIndex = *inv++; uint8 objType = *inv++; - obtoinv(objIndex, objType, kInventx + j * kItempicsize, kInventy + i * kItempicsize); + obToInv(objIndex, objType, kInventx + j * kItempicsize, kInventy + i * kItempicsize); } } - showryanpage(); + showRyanPage(); } -void DreamGenContext::isitworn() { - flags._z = isitworn((const DynObject *)es.ptr(bx, sizeof(DynObject))); +void DreamGenContext::isItWorn() { + flags._z = isItWorn((const DynObject *)es.ptr(bx, sizeof(DynObject))); } -bool DreamGenContext::isitworn(const DynObject *object) { +bool DreamGenContext::isItWorn(const DynObject *object) { return (object->id[0] == 'W'-'A') && (object->id[1] == 'E'-'A'); } -void DreamGenContext::wornerror() { +void DreamGenContext::wornError() { data.byte(kCommandtype) = 255; - delpointer(); - printmessage(76, 21, 57, 240, false); - worktoscreenm(); - hangonp(50); - showpanel(); - showman(); - examicon(); + delPointer(); + printMessage(76, 21, 57, 240, false); + workToScreenM(); + hangOnP(50); + showPanel(); + showMan(); + examIcon(); data.byte(kCommandtype) = 255; - worktoscreenm(); + workToScreenM(); } -void DreamGenContext::makeworn() { - makeworn((DynObject *)es.ptr(bx, sizeof(DynObject))); +void DreamGenContext::makeWorn() { + makeWorn((DynObject *)es.ptr(bx, sizeof(DynObject))); } -void DreamGenContext::makeworn(DynObject *object) { +void DreamGenContext::makeWorn(DynObject *object) { object->id[0] = 'W'-'A'; object->id[1] = 'E'-'A'; } -void DreamGenContext::obtoinv() { - obtoinv(al, ah, di, bx); +void DreamGenContext::obToInv() { + obToInv(al, ah, di, bx); } -void DreamGenContext::obtoinv(uint8 index, uint8 flag, uint16 x, uint16 y) { +void DreamGenContext::obToInv(uint8 index, uint8 flag, uint16 x, uint16 y) { Frame *icons1 = (Frame *)segRef(data.word(kIcons1)).ptr(0, 0); - showframe(icons1, x - 2, y - 1, 10, 0); + showFrame(icons1, x - 2, y - 1, 10, 0); if (index == 0xff) return; Frame *extras = (Frame *)segRef(data.word(kExtras)).ptr(0, 0); Frame *frees = (Frame *)segRef(data.word(kFreeframes)).ptr(0, 0); Frame *frames = (flag == 4) ? extras : frees; - showframe(frames, x + 18, y + 19, 3 * index + 1, 128); - const DynObject *object = (const DynObject *)getanyaddir(index, flag); - bool worn = isitworn(object); + showFrame(frames, x + 18, y + 19, 3 * index + 1, 128); + const DynObject *object = (const DynObject *)getAnyAdDir(index, flag); + bool worn = isItWorn(object); if (worn) - showframe(icons1, x - 3, y - 2, 7, 0); + showFrame(icons1, x - 3, y - 2, 7, 0); } -void DreamGenContext::obpicture() { +void DreamGenContext::obPicture() { if (data.byte(kObjecttype) == 1) return; Frame *frames; @@ -97,21 +97,21 @@ void DreamGenContext::obpicture() { else frames = (Frame *)segRef(data.word(kFreeframes)).ptr(0, 0); uint8 frame = 3 * data.byte(kCommand) + 1; - showframe(frames, 160, 68, frame, 0x80); + showFrame(frames, 160, 68, frame, 0x80); } -void DreamGenContext::obicons() { +void DreamGenContext::obIcons() { uint8 value1, value2; - getanyad(&value1, &value2); + getAnyAd(&value1, &value2); if (value1 != 0xff) { // can open it - showframe((Frame *)segRef(data.word(kIcons2)).ptr(0, 0), 210, 1, 4, 0); + showFrame((Frame *)segRef(data.word(kIcons2)).ptr(0, 0), 210, 1, 4, 0); } - showframe((Frame *)segRef(data.word(kIcons2)).ptr(0, 0), 260, 1, 1, 0); + showFrame((Frame *)segRef(data.word(kIcons2)).ptr(0, 0), 260, 1, 1, 0); } -void DreamGenContext::examineob(bool examineAgain) { +void DreamGenContext::examineOb(bool examineAgain) { data.byte(kPointermode) = 0; data.word(kTimecount) = 0; while (true) { @@ -125,66 +125,66 @@ void DreamGenContext::examineob(bool examineAgain) { data.byte(kObjecttype) = al; data.byte(kItemframe) = 0; data.byte(kPointerframe) = 0; - createpanel(); - showpanel(); - showman(); - showexit(); - obicons(); - obpicture(); - describeob(); - undertextline(); + createPanel(); + showPanel(); + showMan(); + showExit(); + obIcons(); + obPicture(); + describeOb(); + underTextLine(); data.byte(kCommandtype) = 255; - readmouse(); - showpointer(); - worktoscreen(); - delpointer(); + readMouse(); + showPointer(); + workToScreen(); + delPointer(); examineAgain = false; } - readmouse(); - showpointer(); - vsync(); - dumppointer(); - dumptextline(); - delpointer(); + readMouse(); + showPointer(); + vSync(); + dumpPointer(); + dumpTextLine(); + delPointer(); data.byte(kGetback) = 0; switch (data.byte(kInvopen)) { 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 }, + 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::examineInventory }, { 0,320,0,200,&DreamGenContext::blank }, { 0xFFFF,0,0,0,0 } }; - checkcoords(examlist); + checkCoords(examList); break; } 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 }, + // 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); + checkCoords(invList1); break; } 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 }, + 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); + checkCoords(withList1); break; } } @@ -198,8 +198,8 @@ void DreamGenContext::examineob(bool examineAgain) { data.byte(kPickup) = 0; if (data.word(kWatchingtime) != 0 || data.byte(kNewlocation) == 255) { - // iswatching - makemainscreen(); + // isWatching + makeMainScreen(); } data.byte(kInvopen) = 0; @@ -215,7 +215,7 @@ void DreamGenContext::inventory() { if (data.byte(kCommandtype) != 239) { data.byte(kCommandtype) = 239; al = 32; - commandonly(); + commandOnly(); } if (data.word(kMousebutton) == data.word(kOldbutton)) @@ -227,25 +227,25 @@ void DreamGenContext::inventory() { data.word(kTimecount) = 0; data.byte(kPointermode) = 0; data.byte(kInmaparea) = 0; - animpointer(); - createpanel(); - showpanel(); - examicon(); - showman(); - showexit(); - undertextline(); + animPointer(); + createPanel(); + showPanel(); + examIcon(); + showMan(); + showExit(); + underTextLine(); data.byte(kPickup) = 0; data.byte(kInvopen) = 2; - openinv(); - readmouse(); - showpointer(); - worktoscreen(); - delpointer(); + openInv(); + readMouse(); + showPointer(); + workToScreen(); + delPointer(); data.byte(kOpenedob) = 255; - examineob(false); + examineOb(false); } -void DreamGenContext::transfertext() { +void DreamGenContext::transferText() { segRef(data.word(kExtras)).word(kExtextdat + data.byte(kExpos) * 2) = data.word(kExtextpos); uint16 freeTextOffset = data.byte(kItemtotran) * 2; uint16 srcOffset = segRef(data.word(kFreedesc)).word(kFreetextdat + freeTextOffset); @@ -257,9 +257,9 @@ void DreamGenContext::transfertext() { data.word(kExtextpos) += len + 1; } -void DreamGenContext::getbackfromob() { +void DreamGenContext::getBackFromOb() { if (data.byte(kPickup) != 1) - getback1(); + getBack1(); else blank(); } |