Skip to content

Commit

Permalink
SCI: Remove old SCI32 hires detection heuristic
Browse files Browse the repository at this point in the history
  • Loading branch information
csnover committed Nov 2, 2016
1 parent e8c4298 commit ee4b172
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 38 deletions.
5 changes: 0 additions & 5 deletions engines/sci/graphics/screen.cpp
Expand Up @@ -84,11 +84,6 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
}
}

if (_resMan->detectHires()) {
_scriptWidth = 640;
_scriptHeight = 480;
}

// if not yet set, set those to script-width/height
if (!_width)
_width = _scriptWidth;
Expand Down
32 changes: 0 additions & 32 deletions engines/sci/resource.cpp
Expand Up @@ -2459,38 +2459,6 @@ 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_SCI11ENDIAN_UINT16(res->data) == 0x0e) {
// SCI32 picture
uint16 width = READ_SCI11ENDIAN_UINT16(res->data + 10);
uint16 height = READ_SCI11ENDIAN_UINT16(res->data + 12);
// Surely lowres (e.g. QFG4CD)
if ((width == 320) && ((height == 190) || (height == 200)))
return false;
// Surely hires
if ((width >= 600) || (height >= 400))
return true;
}
}
}

// We haven't been able to find hires content

return false;
#else
error("no sci32 support");
#endif
}

bool ResourceManager::detectFontExtended() {

Resource *res = findResource(ResourceId(kResourceTypeFont, 0), 0);
Expand Down
1 change: 0 additions & 1 deletion engines/sci/resource.h
Expand Up @@ -424,7 +424,6 @@ class ResourceManager {
public:
#endif

bool detectHires();
// Detects, if standard font of current game includes extended characters (>0x80)
bool detectFontExtended();
// Detects, if SCI1.1 game uses palette merging
Expand Down

0 comments on commit ee4b172

Please sign in to comment.