mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-01 15:55:45 +00:00
Add hasIcon difference in Elvira 1
svn-id: r24468
This commit is contained in:
parent
45965e3576
commit
80048e2327
@ -682,7 +682,7 @@ void AGOSEngine::setupGame() {
|
||||
_vgaMemSize = gVars->memory[kMemSimon1Games];
|
||||
#endif
|
||||
_itemMemSize = 64000;
|
||||
_tableMemSize = 50000;
|
||||
_tableMemSize = 100000;
|
||||
_frameRate = 4;
|
||||
_vgaBaseDelay = 1;
|
||||
_numVars = 255;
|
||||
|
@ -781,7 +781,7 @@ protected:
|
||||
void removeArrows(WindowBlock *window, uint num);
|
||||
|
||||
void draw_icon_c(WindowBlock *window, uint icon, uint x, uint y);
|
||||
bool has_item_childflag_0x10(Item *item);
|
||||
bool hasIcon(Item *item);
|
||||
uint itemGetIconNumber(Item *item);
|
||||
uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
|
||||
void drawIconArray(uint i, Item *item_ptr, int line, int classMask);
|
||||
|
@ -288,7 +288,7 @@ void AGOSEngine::drawIconArray_Simon(uint num, Item *itemRef, int line, int clas
|
||||
while (itemRef && line-- != 0) {
|
||||
curWidth = 0;
|
||||
while (itemRef && width > curWidth) {
|
||||
if ((classMask == 0 || itemRef->classFlags & classMask) && has_item_childflag_0x10(itemRef))
|
||||
if ((classMask == 0 || itemRef->classFlags & classMask) && hasIcon(itemRef))
|
||||
curWidth += iconSize;
|
||||
itemRef = derefItem(itemRef->next);
|
||||
}
|
||||
@ -306,7 +306,7 @@ void AGOSEngine::drawIconArray_Simon(uint num, Item *itemRef, int line, int clas
|
||||
showArrows = false;
|
||||
|
||||
while (itemRef) {
|
||||
if ((classMask == 0 || itemRef->classFlags & classMask) && has_item_childflag_0x10(itemRef)) {
|
||||
if ((classMask == 0 || itemRef->classFlags & classMask) && hasIcon(itemRef)) {
|
||||
if (item_again == false) {
|
||||
window->iconPtr->iconArray[k].item = itemRef;
|
||||
if (getGameType() == GType_SIMON2) {
|
||||
@ -389,7 +389,7 @@ void AGOSEngine::drawIconArray_FF(uint num, Item *itemRef, int line, int classMa
|
||||
uint16 ct = xp;
|
||||
while (itemRef && ct < iconperline) {
|
||||
if ((classMask == 0) || ((itemRef->classFlags & classMask) != 0)) {
|
||||
if (has_item_childflag_0x10(itemRef)) {
|
||||
if (hasIcon(itemRef)) {
|
||||
ct += 45;
|
||||
k++;
|
||||
}
|
||||
@ -410,7 +410,7 @@ void AGOSEngine::drawIconArray_FF(uint num, Item *itemRef, int line, int classMa
|
||||
while (itemRef) {
|
||||
if ((classMask != 0) && ((itemRef->classFlags & classMask) == 0))
|
||||
goto l1;
|
||||
if (has_item_childflag_0x10(itemRef) == 0)
|
||||
if (hasIcon(itemRef) == 0)
|
||||
goto l1;
|
||||
if (!idone) {
|
||||
/*
|
||||
|
@ -60,6 +60,15 @@ void AGOSEngine::allocItemHeap() {
|
||||
error("Out Of Memory - Items");
|
||||
}
|
||||
|
||||
bool AGOSEngine::hasIcon(Item *item) {
|
||||
if (getGameType() == GType_ELVIRA1) {
|
||||
return (getUserFlag(item, 7) != 0);
|
||||
} else {
|
||||
SubObject *child = (SubObject *)findChildOfType(item, 2);
|
||||
return (child && (child->objectFlags & kOFIcon) != 0);
|
||||
}
|
||||
}
|
||||
|
||||
uint AGOSEngine::itemGetIconNumber(Item *item) {
|
||||
if (getGameType() == GType_ELVIRA1) {
|
||||
return getUserFlag(item, 7);
|
||||
@ -341,11 +350,6 @@ void AGOSEngine::linkItem(Item *item, Item *parent) {
|
||||
}
|
||||
}
|
||||
|
||||
bool AGOSEngine::has_item_childflag_0x10(Item *item) {
|
||||
SubObject *child = (SubObject *)findChildOfType(item, 2);
|
||||
return child && (child->objectFlags & kOFIcon) != 0;
|
||||
}
|
||||
|
||||
int AGOSEngine::wordMatch(Item *item, int16 a, int16 n) {
|
||||
if ((a == -1) && (n == item->noun))
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user