SCI: detecting hires for SCI2+ games, qfg4cd is sci2.1 but still 320x200
svn-id: r47651
This commit is contained in:
parent
3c46bc33aa
commit
9e511e0751
3 changed files with 43 additions and 6 deletions
|
@ -1859,6 +1859,35 @@ void ResourceManager::detectSciVersion() {
|
|||
}
|
||||
}
|
||||
|
||||
bool ResourceManager::detectHires() {
|
||||
// SCI 1.1 and prior is never hires
|
||||
if (getSciVersion() <= SCI_VERSION_1_1)
|
||||
return false;
|
||||
|
||||
#ifdef ENABLE_SCI32
|
||||
for (int i = 0; i < 32768; i++) {
|
||||
Resource *res = findResource(ResourceId(kResourceTypePic, i), 0);
|
||||
|
||||
if (res) {
|
||||
if (READ_LE_UINT16(res->data) == 0x0e) {
|
||||
// SCI32 picture
|
||||
uint16 width = READ_LE_UINT16(res->data + 14);
|
||||
uint16 height = READ_LE_UINT16(res->data + 16);
|
||||
if ((width == 320) && ((height == 190) || (height == 200)))
|
||||
return false;
|
||||
if ((width >= 600) || (height >= 400))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
warning("resMan: Couldn't detect hires");
|
||||
return false;
|
||||
#else
|
||||
error("no sci32 support");
|
||||
#endif
|
||||
}
|
||||
|
||||
// Functions below are based on PD code by Brian Provinciano (SCI Studio)
|
||||
bool ResourceManager::hasOldScriptHeader() {
|
||||
Resource *res = findResource(ResourceId(kResourceTypeScript, 0), 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue