mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
DREAMWEB: Use ObjectType enums in more places
This commit is contained in:
parent
dc4af2afc2
commit
9f99fb5f8a
@ -30,7 +30,7 @@ void DreamWebEngine::showRyanPage() {
|
||||
}
|
||||
|
||||
void DreamWebEngine::findAllRyan() {
|
||||
memset(_ryanInvList, 0xff, 60);
|
||||
memset(_ryanInvList, 0xff, sizeof(_ryanInvList));
|
||||
for (size_t i = 0; i < kNumexobjects; ++i) {
|
||||
const DynObject *extra = getExAd(i);
|
||||
if (extra->mapad[0] != kExObjectType)
|
||||
@ -683,12 +683,12 @@ void DreamWebEngine::dropObject() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (compare(_itemFrame, 4, "GUNA") || compare(_itemFrame, 4, "SHLD")) {
|
||||
if (compare(_itemFrame, kExObjectType, "GUNA") || compare(_itemFrame, kExObjectType, "SHLD")) {
|
||||
cantDrop();
|
||||
return;
|
||||
}
|
||||
|
||||
_objectType = 4;
|
||||
_objectType = kExObjectType;
|
||||
DynObject *object = getExAd(_itemFrame);
|
||||
object->mapad[0] = 0;
|
||||
object->mapad[1] = ((_ryanX + 4) >> 4) + _mapX;
|
||||
|
@ -1185,16 +1185,16 @@ bool DreamWebEngine::checkIfEx(uint8 x, uint8 y) {
|
||||
}
|
||||
|
||||
const uint8 *DreamWebEngine::findObName(uint8 type, uint8 index) {
|
||||
if (type == 5) {
|
||||
uint16 i = 64 * (index & 127);
|
||||
return (const uint8 *)_personText.getString(i);
|
||||
} else if (type == 4) {
|
||||
switch (type) {
|
||||
case 5:
|
||||
return (const uint8 *)_personText.getString(64 * (index & 127));
|
||||
case kExObjectType:
|
||||
return (const uint8 *)_exText.getString(index);
|
||||
} else if (type == 2) {
|
||||
case kFreeObjectType:
|
||||
return (const uint8 *)_freeDesc.getString(index);
|
||||
} else if (type == 1) {
|
||||
case kSetObjectType1:
|
||||
return (const uint8 *)_setDesc.getString(index);
|
||||
} else {
|
||||
default:
|
||||
return (const uint8 *)_blockDesc.getString(index);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user