DIRECTOR: fix loading cursor from main archive

Fixes a bug introduced in 9aa0958736.
That commit limited reading cursors to open res files, not all
*seen* res files. However, that broke the custom cursor in Small
Stories for Sleepless Nights for Mac (nemurenu-mac-ja), which stores
its cursor in the game's main archive which is already closed at the
time the cursor gets loaded.
This commit is contained in:
Misty De Meo 2023-09-08 16:51:26 -07:00 committed by Eugene Sandulenko
parent 9afa18c133
commit 2c05c5bdfa

View File

@ -190,6 +190,12 @@ void Cursor::readFromResource(Datum resourceId) {
break;
}
// Cursors can be located in the main archive, which may not
// be in _allOpenResFiles
if (!readSuccessful && g_director->getPlatform() == Common::kPlatformMacintosh) {
readSuccessful = readFromArchive(g_director->getMainArchive(), resourceId.asInt());
}
// TODO: figure out where to read custom cursor in windows platform
// currently, let's just set arrow for default one.
if (g_director->getPlatform() == Common::kPlatformWindows) {