mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-25 04:01:03 +00:00
DIRECTOR: Move humanVersion to util.cpp
This commit is contained in:
parent
d6b6cc6f18
commit
d91e3d5148
@ -363,38 +363,6 @@ bool Cast::loadArchive() {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint16 humanVersion(uint16 ver) {
|
||||
if (ver >= kFileVer1201)
|
||||
return 1201;
|
||||
if (ver >= kFileVer1200)
|
||||
return 1200;
|
||||
if (ver >= kFileVer1150)
|
||||
return 1150;
|
||||
if (ver >= kFileVer1100)
|
||||
return 1100;
|
||||
if (ver >= kFileVer1000)
|
||||
return 1000;
|
||||
if (ver >= kFileVer850)
|
||||
return 850;
|
||||
if (ver >= kFileVer800)
|
||||
return 800;
|
||||
if (ver >= kFileVer700)
|
||||
return 700;
|
||||
if (ver >= kFileVer600)
|
||||
return 600;
|
||||
if (ver >= kFileVer500)
|
||||
return 500;
|
||||
if (ver >= kFileVer404)
|
||||
return 404;
|
||||
if (ver >= kFileVer400)
|
||||
return 400;
|
||||
if (ver >= kFileVer310)
|
||||
return 310;
|
||||
if (ver >= kFileVer300)
|
||||
return 300;
|
||||
return 200;
|
||||
}
|
||||
|
||||
void Cast::loadConfig(Common::SeekableReadStreamEndian &stream) {
|
||||
debugC(1, kDebugLoading, "****** Loading Config VWCF");
|
||||
|
||||
|
@ -693,4 +693,36 @@ Common::SeekableReadStreamEndian *readZlibData(Common::SeekableReadStream &strea
|
||||
# endif
|
||||
}
|
||||
|
||||
uint16 humanVersion(uint16 ver) {
|
||||
if (ver >= kFileVer1201)
|
||||
return 1201;
|
||||
if (ver >= kFileVer1200)
|
||||
return 1200;
|
||||
if (ver >= kFileVer1150)
|
||||
return 1150;
|
||||
if (ver >= kFileVer1100)
|
||||
return 1100;
|
||||
if (ver >= kFileVer1000)
|
||||
return 1000;
|
||||
if (ver >= kFileVer850)
|
||||
return 850;
|
||||
if (ver >= kFileVer800)
|
||||
return 800;
|
||||
if (ver >= kFileVer700)
|
||||
return 700;
|
||||
if (ver >= kFileVer600)
|
||||
return 600;
|
||||
if (ver >= kFileVer500)
|
||||
return 500;
|
||||
if (ver >= kFileVer404)
|
||||
return 404;
|
||||
if (ver >= kFileVer400)
|
||||
return 400;
|
||||
if (ver >= kFileVer310)
|
||||
return 310;
|
||||
if (ver >= kFileVer300)
|
||||
return 300;
|
||||
return 200;
|
||||
}
|
||||
|
||||
} // End of namespace Director
|
||||
|
@ -80,6 +80,8 @@ uint32 readVarInt(Common::SeekableReadStream &stream);
|
||||
|
||||
Common::SeekableReadStreamEndian *readZlibData(Common::SeekableReadStream &stream, unsigned long len, unsigned long *outLen, bool bigEndian);
|
||||
|
||||
uint16 humanVersion(uint16 ver);
|
||||
|
||||
} // End of namespace Director
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user