mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
Optimize a bit roomParse, though ideal would be a binary search, but I am
too lazy for that. svn-id: r32561
This commit is contained in:
parent
35cdc7aae4
commit
b7ac2f99f6
@ -154,8 +154,11 @@ void DrasculaEngine::setupRoomsTable() {
|
||||
}
|
||||
|
||||
bool DrasculaEngine::roomParse(int room, int fl) {
|
||||
bool seen = false;
|
||||
|
||||
for (int i = 0; i < ARRAYSIZE(roomActions); i++) {
|
||||
if (roomActions[i].room == room) {
|
||||
seen = true;
|
||||
if (roomActions[i].chapter == currentChapter ||
|
||||
roomActions[i].chapter == -1) {
|
||||
if (roomActions[i].action == pickedObject ||
|
||||
@ -168,7 +171,8 @@ bool DrasculaEngine::roomParse(int room, int fl) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (seen) // Stop searching down the list
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user