DREAMWEB: Remove some dead code

This commit is contained in:
Max Horn 2011-12-26 00:58:37 +01:00
parent 9ba55105fc
commit d015f5d446
6 changed files with 3 additions and 70 deletions

View File

@ -58,10 +58,6 @@ void DreamBase::fillRyan() {
showRyanPage();
}
void DreamGenContext::isItWorn() {
flags._z = isItWorn((const DynObject *)es.ptr(bx, sizeof(DynObject)));
}
bool DreamBase::isItWorn(const DynObject *object) {
return (object->id[0] == 'W'-'A') && (object->id[1] == 'E'-'A');
}
@ -604,7 +600,7 @@ void DreamGenContext::inToInv() {
readMouse();
showPointer();
outOfInv();
workToScreen();
workToScreenCPP();
delPointer();
}
@ -645,7 +641,7 @@ void DreamGenContext::outOfInv() {
readMouse();
showPointer();
inToInv();
workToScreen();
workToScreenCPP();
delPointer();
}
@ -780,10 +776,6 @@ void DreamBase::dropObject() {
object->currentLocation = data.byte(kReallocation);
}
void DreamGenContext::checkObjectSize() {
al = checkObjectSizeCPP() ? 0 : 1;
}
bool DreamGenContext::checkObjectSizeCPP() {
byte containerSize = getOpenedSlotSize();
DynObject *object = getEitherAdCPP();

View File

@ -30,10 +30,6 @@
namespace DreamGen {
void DreamGenContext::loadSpeech() {
loadSpeech((uint8)dl, (uint8)dh, (uint8)cl, (uint16)ax);
}
bool DreamBase::loadSpeech(byte type1, int idx1, byte type2, int idx2) {
cancelCh1();
@ -87,10 +83,6 @@ void DreamBase::playChannel1(uint8 index) {
data.word(kCh1blockstocopy) = soundBank[index].blockCount();
}
void DreamGenContext::playChannel1() {
playChannel1(al);
}
void DreamBase::cancelCh0() {
data.byte(kCh0repeat) = 0;
data.word(kCh0blockstocopy) = 0;

View File

@ -1235,10 +1235,6 @@ void DreamBase::copyName(uint8 type, uint8 index, uint8 *dst) {
dst[i] = 0;
}
void DreamGenContext::commandWithOb() {
commandWithOb(al, bh, bl);
}
void DreamBase::commandWithOb(uint8 command, uint8 type, uint8 index) {
uint8 commandLine[64] = "OBJECT NAME ONE ";
delTextLine();
@ -1752,10 +1748,6 @@ bool DreamGenContext::checkIfSet(uint8 x, uint8 y) {
return false;
}
void DreamGenContext::hangOn() {
hangOn(cx);
}
void DreamBase::hangOn(uint16 frameCount) {
while (frameCount) {
vSync();

View File

@ -24,7 +24,6 @@
void screenUpdate();
void startup1();
void workToScreen();
void multiGet();
void multiGet(uint8 *dst, uint16 x, uint16 y, uint8 width, uint8 height) {
DreamBase::multiGet(dst, x, y, width, height);
@ -48,21 +47,10 @@
uint8 printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
return DreamBase::printDirect(string, x, y, maxWidth, centered);
}
void showFrame();
void showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) {
DreamBase::showFrame(frameData, x, y, frameNumber, effectsFlag, width, height);
}
void showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag) {
DreamBase::showFrame(frameData, x, y, frameNumber, effectsFlag);
}
void width160();
bool checkIfPerson(uint8 x, uint8 y);
bool checkIfFree(uint8 x, uint8 y);
bool checkIfEx(uint8 x, uint8 y);
void commandWithOb();
void commandWithOb(uint8 command, uint8 type, uint8 index) {
DreamBase::commandWithOb(command, type, index);
}
DynObject *getFreeAd(uint8 index) {
return DreamBase::getFreeAd(index);
}
@ -80,19 +68,11 @@
void getExPos();
bool checkIfSet(uint8 x, uint8 y);
void isItWorn();
bool isItWorn(const DynObject *object) {
return DreamBase::isItWorn(object);
}
void obToInv();
void obToInv(uint8 index, uint8 flag, uint16 x, uint16 y) {
DreamBase::obToInv(index, flag, x, y);
}
void useRoutine();
void hangOn();
void hangOn(uint16 frameCount) {
DreamBase::hangOn(frameCount);
}
void examineOb(bool examineAgain = true);
void dumpWatch();
void transferText();
@ -115,10 +95,6 @@
void monMessage(uint8 index) {
DreamBase::monMessage(index);
}
void playChannel1();
void playChannel1(uint8 index) {
DreamBase::playChannel1(index);
}
void look();
void autoLook();
void doLook();
@ -148,10 +124,6 @@
void errorMessage1();
void errorMessage2();
void errorMessage3();
void loadSpeech();
bool loadSpeech(byte type1, int idx1, byte type2, int idx2) {
return DreamBase::loadSpeech(type1, idx1, type2, idx2);
}
void set16ColPalette();
void afterNewRoom();
void madmanRun();
@ -169,7 +141,6 @@
void getOpenedSize();
byte getOpenedSlotSize();
byte getOpenedSlotCount();
void checkObjectSize();
bool checkObjectSizeCPP();
void openOb();
uint8 findFirstPath(uint16 param);

View File

@ -43,7 +43,7 @@ void DreamGenContext::monkSpeaking() {
loadIntoTemp("DREAMWEB.G15");
clearWork();
showFrame(tempGraphics(), 160, 72, 0, 128); // show monk
workToScreen();
workToScreenCPP();
data.byte(kVolume) = 7;
data.byte(kVolumedirection) = (byte)-1;
data.byte(kVolumeto) = 5;

View File

@ -90,13 +90,6 @@ void DreamBase::workToScreenCPP() {
engine->blit(workspace(), 320, 0, 0, 320, 200);
}
void DreamGenContext::workToScreen() {
workToScreenCPP();
uint size = 320 * 200;
di = si = size;
cx = 0;
}
void DreamBase::printUnderMon() {
engine->printUnderMonitor();
}
@ -360,13 +353,6 @@ void DreamBase::showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 fra
return;
}
void DreamGenContext::showFrame() {
uint8 width, height;
showFrame((Frame *)ds.ptr(0, 0), di, bx, ax & 0x1ff, ah & 0xfe, &width, &height);
cl = width;
ch = height;
}
void DreamBase::clearWork() {
memset(workspace(), 0, 320*200);
}