DREAMWEB: 'geteitherad' ported to C++

This commit is contained in:
Bertrand Augereau 2011-08-23 15:03:28 +02:00
parent 5efba92b8e
commit 266af3b089
2 changed files with 8 additions and 0 deletions

View File

@ -1101,6 +1101,13 @@ DynObject *DreamGenContext::getexad(uint8 index) {
return (DynObject *)segRef(data.word(kExtras)).ptr(kExdata, 0) + index;
}
DynObject *DreamGenContext::geteitheradCPP() {
if (data.byte(kObjecttype) == 4)
return getexad(data.byte(kItemframe));
else
return getfreead(data.byte(kItemframe));
}
SetObject *DreamGenContext::getsetad(uint8 index) {
return (SetObject *)segRef(data.word(kSetdat)).ptr(0, 0) + index;
}

View File

@ -157,6 +157,7 @@
void findormake(uint8 index, uint8 value, uint8 type);
DynObject *getfreead(uint8 index);
DynObject *getexad(uint8 index);
DynObject *geteitheradCPP();
SetObject *getsetad(uint8 index);
void setallchanges();
void dochange();