Revert "DREAMWEB: Remove dead code and move most functions to DreamBase"

This reverts commit 4c66f74b58.

These functions aren't ready to be moved yet till the remaining two are
finished, and they're so crossreferenced that the safest thing to do is
revert this commit and break it down to smaller chunks
This commit is contained in:
Filippos Karapetis 2011-12-26 22:31:50 +02:00
parent 4c66f74b58
commit 1ba4f0a1a8
8 changed files with 162 additions and 79 deletions

View file

@ -78,6 +78,10 @@ void DreamBase::makeWorn(DynObject *object) {
object->id[1] = 'E'-'A';
}
void DreamGenContext::obToInv() {
obToInv(al, ah, di, bx);
}
void DreamBase::obToInv(uint8 index, uint8 flag, uint16 x, uint16 y) {
showFrame(engine->icons1(), x - 2, y - 1, 10, 0);
if (index == 0xff)
@ -116,7 +120,7 @@ void DreamBase::obIcons() {
showFrame(engine->icons2(), 260, 1, 1, 0);
}
void DreamBase::examineOb(bool examineAgain) {
void DreamGenContext::examineOb(bool examineAgain) {
data.byte(kPointermode) = 0;
data.word(kTimecount) = 0;
@ -213,7 +217,7 @@ void DreamBase::examineOb(bool examineAgain) {
data.byte(kOpenedob) = 255;
}
void DreamBase::inventory() {
void DreamGenContext::inventory() {
if (data.byte(kMandead) == 1 || data.word(kWatchingtime) != 0) {
blank();
return;
@ -308,7 +312,7 @@ void DreamBase::openOb() {
_openChangeSize = getOpenedSlotCount() * kItempicsize + kInventx;
}
void DreamBase::identifyOb() {
void DreamGenContext::identifyOb() {
if (data.word(kWatchingtime) != 0) {
blank();
return;