DREAMWEB: Remove the now unused ASM style versions of getanyad, getexad, getfreead and getsetad

This commit is contained in:
Filippos Karapetis 2011-12-26 16:53:28 +02:00
parent 3b9b4cb6ba
commit 8c3488a973
5 changed files with 8 additions and 59 deletions

View File

@ -500,6 +500,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'gamer',
'gates',
'generalerror',
'getanyad',
'getanyaddir',
'getback1',
'getbackfromob',
@ -509,8 +510,10 @@ generator = cpp(context, "DreamGen", blacklist = [
'getdestinfo',
'getdimension',
'geteitherad',
'getexad',
'getexpos',
'getflagunderp',
'getfreead',
'getkeyandlogo',
'getlocation',
'getmapad',
@ -534,6 +537,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'getridoftemptext',
'getroomdata',
'getroomspaths',
'getsetad',
'gettime',
'gettingshot',
'getundercentre',

View File

@ -73,57 +73,6 @@ void DreamGenContext::transferMap() {
_add(data.word(kExframepos), cx);
}
void DreamGenContext::getFreeAd() {
STACK_CHECK;
ah = 0;
cl = 4;
_shl(ax, cl);
bx = ax;
es = data.word(kFreedat);
}
void DreamGenContext::getExAd() {
STACK_CHECK;
ah = 0;
bx = 16;
_mul(bx);
bx = ax;
es = data.word(kExtras);
_add(bx, (0+2080+30000));
}
void DreamGenContext::getAnyAd() {
STACK_CHECK;
_cmp(data.byte(kObjecttype), 4);
if (flags.z())
goto isex;
_cmp(data.byte(kObjecttype), 2);
if (flags.z())
goto isfree;
al = data.byte(kCommand);
getSetAd();
ax = es.word(bx+4);
return;
isfree:
al = data.byte(kCommand);
getFreeAd();
ax = es.word(bx+7);
return;
isex:
al = data.byte(kCommand);
getExAd();
ax = es.word(bx+7);
}
void DreamGenContext::getSetAd() {
STACK_CHECK;
ah = 0;
bx = 64;
_mul(bx);
bx = ax;
es = data.word(kSetdat);
}
void DreamGenContext::pickupConts() {
STACK_CHECK;
al = ds.byte(si+7);

View File

@ -428,16 +428,12 @@ public:
#include "stubs.h" // Allow hand-reversed functions to have a signature different than void f()
void dirCom();
void getAnyAd();
void getFreeAd();
void dirFile();
void pickupConts();
void transferMap();
void getSetAd();
void dreamweb();
void read();
void searchForString();
void getExAd();
void parser();
void transferConToEx();
};

View File

@ -2725,7 +2725,8 @@ void DreamGenContext::pickupOb(uint8 command, uint8 pos) {
data.byte(kObjecttype) = kFreeObjectType;
data.byte(kItemframe) = command;
data.byte(kCommand) = command;
getAnyAd();
//uint8 dummy;
//getAnyAd(&dummy, &dummy); // was in the original source, seems useless here
transferToEx();
}

View File

@ -127,9 +127,8 @@ void DreamGenContext::useRoutine() {
data.byte(kPointerpower) = 0;
}
getAnyAd();
// CHECKME: Do the callbacks use es:bx ?
void *obj = es.ptr(bx, 15);
uint8 dummy;
void *obj = getAnyAd(&dummy, &dummy);
for (size_t i = 0; i < sizeof(kUseList)/sizeof(UseListEntry); ++i) {
const UseListEntry &entry = kUseList[i];