Renamed SCI_VERSION_AUTODETECT to SCI_VERSION_NONE to signify its actual purpose
svn-id: r46959
This commit is contained in:
parent
b2355cac9f
commit
c0aad0508c
4 changed files with 17 additions and 17 deletions
|
@ -101,10 +101,10 @@ EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc,
|
||||||
_lastAnimateCounter = 0;
|
_lastAnimateCounter = 0;
|
||||||
_lastAnimateTime = 0;
|
_lastAnimateTime = 0;
|
||||||
|
|
||||||
_setCursorType = SCI_VERSION_AUTODETECT;
|
_setCursorType = SCI_VERSION_NONE;
|
||||||
_doSoundType = SCI_VERSION_AUTODETECT;
|
_doSoundType = SCI_VERSION_NONE;
|
||||||
_lofsType = SCI_VERSION_AUTODETECT;
|
_lofsType = SCI_VERSION_NONE;
|
||||||
_gfxFunctionsType = SCI_VERSION_AUTODETECT;
|
_gfxFunctionsType = SCI_VERSION_NONE;
|
||||||
_moveCountType = kMoveCountUninitialized;
|
_moveCountType = kMoveCountUninitialized;
|
||||||
|
|
||||||
_usesCdTrack = Common::File::exists("cdaudio.map");
|
_usesCdTrack = Common::File::exists("cdaudio.map");
|
||||||
|
@ -328,7 +328,7 @@ bool EngineState::autoDetectFeature(FeatureDetection featureDetection, int metho
|
||||||
if ((signed)offset + (int16)lofs >= (signed)script->_bufSize)
|
if ((signed)offset + (int16)lofs >= (signed)script->_bufSize)
|
||||||
_lofsType = SCI_VERSION_1_MIDDLE;
|
_lofsType = SCI_VERSION_1_MIDDLE;
|
||||||
|
|
||||||
if (_lofsType != SCI_VERSION_AUTODETECT)
|
if (_lofsType != SCI_VERSION_NONE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// If we reach here, we haven't been able to deduce the lofs parameter
|
// If we reach here, we haven't been able to deduce the lofs parameter
|
||||||
|
@ -434,7 +434,7 @@ bool EngineState::autoDetectFeature(FeatureDetection featureDetection, int metho
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_doSoundType != SCI_VERSION_AUTODETECT)
|
if (_doSoundType != SCI_VERSION_NONE)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -482,7 +482,7 @@ bool EngineState::autoDetectFeature(FeatureDetection featureDetection, int metho
|
||||||
}
|
}
|
||||||
|
|
||||||
SciVersion EngineState::detectDoSoundType() {
|
SciVersion EngineState::detectDoSoundType() {
|
||||||
if (_doSoundType == SCI_VERSION_AUTODETECT) {
|
if (_doSoundType == SCI_VERSION_NONE) {
|
||||||
if (getSciVersion() == SCI_VERSION_0_EARLY) {
|
if (getSciVersion() == SCI_VERSION_0_EARLY) {
|
||||||
// This game is using early SCI0 sound code (different headers than SCI0 late)
|
// This game is using early SCI0 sound code (different headers than SCI0 late)
|
||||||
_doSoundType = SCI_VERSION_0_EARLY;
|
_doSoundType = SCI_VERSION_0_EARLY;
|
||||||
|
@ -513,7 +513,7 @@ SciVersion EngineState::detectDoSoundType() {
|
||||||
}
|
}
|
||||||
|
|
||||||
SciVersion EngineState::detectSetCursorType() {
|
SciVersion EngineState::detectSetCursorType() {
|
||||||
if (_setCursorType == SCI_VERSION_AUTODETECT) {
|
if (_setCursorType == SCI_VERSION_NONE) {
|
||||||
if (getSciVersion() <= SCI_VERSION_01) {
|
if (getSciVersion() <= SCI_VERSION_01) {
|
||||||
// SCI0/SCI01 games never use cursor views
|
// SCI0/SCI01 games never use cursor views
|
||||||
_setCursorType = SCI_VERSION_0_EARLY;
|
_setCursorType = SCI_VERSION_0_EARLY;
|
||||||
|
@ -554,7 +554,7 @@ SciVersion EngineState::detectSetCursorType() {
|
||||||
}
|
}
|
||||||
|
|
||||||
SciVersion EngineState::detectLofsType() {
|
SciVersion EngineState::detectLofsType() {
|
||||||
if (_lofsType == SCI_VERSION_AUTODETECT) {
|
if (_lofsType == SCI_VERSION_NONE) {
|
||||||
// This detection only works (and is only needed) for SCI 1
|
// This detection only works (and is only needed) for SCI 1
|
||||||
if (getSciVersion() <= SCI_VERSION_01) {
|
if (getSciVersion() <= SCI_VERSION_01) {
|
||||||
_lofsType = SCI_VERSION_0_EARLY;
|
_lofsType = SCI_VERSION_0_EARLY;
|
||||||
|
@ -594,7 +594,7 @@ SciVersion EngineState::detectLofsType() {
|
||||||
}
|
}
|
||||||
|
|
||||||
SciVersion EngineState::detectGfxFunctionsType() {
|
SciVersion EngineState::detectGfxFunctionsType() {
|
||||||
if (_gfxFunctionsType == SCI_VERSION_AUTODETECT) {
|
if (_gfxFunctionsType == SCI_VERSION_NONE) {
|
||||||
// This detection only works (and is only needed) for SCI0 games
|
// This detection only works (and is only needed) for SCI0 games
|
||||||
if (getSciVersion() >= SCI_VERSION_01) {
|
if (getSciVersion() >= SCI_VERSION_01) {
|
||||||
_gfxFunctionsType = SCI_VERSION_0_LATE;
|
_gfxFunctionsType = SCI_VERSION_0_LATE;
|
||||||
|
|
|
@ -73,7 +73,7 @@ static const SelectorRemap sciSelectorRemap[] = {
|
||||||
{ SCI_VERSION_1_EARLY, SCI_VERSION_1_1, "flags", 102 },
|
{ SCI_VERSION_1_EARLY, SCI_VERSION_1_1, "flags", 102 },
|
||||||
{ SCI_VERSION_1_1, SCI_VERSION_1_1, "scaleX", 104 },
|
{ SCI_VERSION_1_1, SCI_VERSION_1_1, "scaleX", 104 },
|
||||||
{ SCI_VERSION_1_1, SCI_VERSION_1_1, "scaleY", 105 },
|
{ SCI_VERSION_1_1, SCI_VERSION_1_1, "scaleY", 105 },
|
||||||
{ SCI_VERSION_AUTODETECT, SCI_VERSION_AUTODETECT, 0, 0 }
|
{ SCI_VERSION_NONE, SCI_VERSION_NONE, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
Common::StringList Kernel::checkStaticSelectorNames() {
|
Common::StringList Kernel::checkStaticSelectorNames() {
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
|
|
||||||
namespace Sci {
|
namespace Sci {
|
||||||
|
|
||||||
static SciVersion s_sciVersion = SCI_VERSION_AUTODETECT;
|
static SciVersion s_sciVersion = SCI_VERSION_NONE;
|
||||||
|
|
||||||
SciVersion getSciVersion() {
|
SciVersion getSciVersion() {
|
||||||
assert(s_sciVersion != SCI_VERSION_AUTODETECT);
|
assert(s_sciVersion != SCI_VERSION_NONE);
|
||||||
return s_sciVersion;
|
return s_sciVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1771,7 +1771,7 @@ void ResourceManager::detectSciVersion() {
|
||||||
s_sciVersion = SCI_VERSION_1_1;
|
s_sciVersion = SCI_VERSION_1_1;
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
s_sciVersion = SCI_VERSION_AUTODETECT;
|
s_sciVersion = SCI_VERSION_NONE;
|
||||||
error("detectSciVersion(): Unable to detect the game's SCI version");
|
error("detectSciVersion(): Unable to detect the game's SCI version");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ extern const char *versionNames[];
|
||||||
|
|
||||||
/** SCI versions */
|
/** SCI versions */
|
||||||
enum SciVersion {
|
enum SciVersion {
|
||||||
SCI_VERSION_AUTODETECT,
|
SCI_VERSION_NONE,
|
||||||
SCI_VERSION_0_EARLY, // Early KQ4, 1988 xmas card
|
SCI_VERSION_0_EARLY, // Early KQ4, 1988 xmas card
|
||||||
SCI_VERSION_0_LATE, // KQ4, LSL2, LSL3, SQ3 etc
|
SCI_VERSION_0_LATE, // KQ4, LSL2, LSL3, SQ3 etc
|
||||||
SCI_VERSION_01, // KQ1 and multilingual games (S.old.*)
|
SCI_VERSION_01, // KQ1 and multilingual games (S.old.*)
|
||||||
|
@ -165,8 +165,8 @@ SciVersion getSciVersion();
|
||||||
|
|
||||||
inline static Common::String getSciVersionDesc(SciVersion version) {
|
inline static Common::String getSciVersionDesc(SciVersion version) {
|
||||||
switch (version) {
|
switch (version) {
|
||||||
case SCI_VERSION_AUTODETECT:
|
case SCI_VERSION_NONE:
|
||||||
return "Autodetect";
|
return "Invalid SCI version";
|
||||||
case SCI_VERSION_0_EARLY:
|
case SCI_VERSION_0_EARLY:
|
||||||
return "Early SCI0";
|
return "Early SCI0";
|
||||||
case SCI_VERSION_0_LATE:
|
case SCI_VERSION_0_LATE:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue