added detection entry for playable demo and some code differences
svn-id: r36044
This commit is contained in:
parent
454610ff5a
commit
e5feb689df
4 changed files with 48 additions and 21 deletions
|
@ -87,6 +87,14 @@ static const Common::ADGameDescription tuckerGameDescriptions[] = {
|
||||||
Common::kPlatformPC,
|
Common::kPlatformPC,
|
||||||
Tucker::kGameFlagEncodedData
|
Tucker::kGameFlagEncodedData
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"tucker",
|
||||||
|
"Demo",
|
||||||
|
AD_ENTRY1s("infobar.txt", "010b055de42097b140d5bcb6e95a5c7c", 203),
|
||||||
|
Common::EN_ANY,
|
||||||
|
Common::kPlatformPC,
|
||||||
|
Common::ADGF_DEMO | Tucker::kGameFlagDemo,
|
||||||
|
},
|
||||||
AD_TABLE_END_MARKER
|
AD_TABLE_END_MARKER
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -103,11 +111,11 @@ static const Common::ADParams detectionParams = {
|
||||||
|
|
||||||
static const Common::ADGameDescription tuckerDemoGameDescription = {
|
static const Common::ADGameDescription tuckerDemoGameDescription = {
|
||||||
"tucker",
|
"tucker",
|
||||||
"Demo",
|
"Non-Interactive Demo",
|
||||||
AD_ENTRY1(0, 0),
|
AD_ENTRY1(0, 0),
|
||||||
Common::EN_ANY,
|
Common::EN_ANY,
|
||||||
Common::kPlatformPC,
|
Common::kPlatformPC,
|
||||||
Common::ADGF_DEMO | Tucker::kGameFlagDemo
|
Common::ADGF_DEMO | Tucker::kGameFlagDemo | Tucker::kGameFlagIntroOnly
|
||||||
};
|
};
|
||||||
|
|
||||||
class TuckerMetaEngine : public Common::AdvancedMetaEngine {
|
class TuckerMetaEngine : public Common::AdvancedMetaEngine {
|
||||||
|
|
|
@ -342,7 +342,11 @@ void TuckerEngine::loadBudSpr(int startOffset) {
|
||||||
char filename[40];
|
char filename[40];
|
||||||
switch (_flagsTable[137]) {
|
switch (_flagsTable[137]) {
|
||||||
case 0:
|
case 0:
|
||||||
sprintf(filename, "bud_%d.pcx", frame + 1);
|
if ((_gameFlags & kGameFlagDemo) != 0) {
|
||||||
|
sprintf(filename, "budl00_%d.pcx", frame + 1);
|
||||||
|
} else {
|
||||||
|
sprintf(filename, "bud_%d.pcx", frame + 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sprintf(filename, "peg_%d.pcx", frame + 1);
|
sprintf(filename, "peg_%d.pcx", frame + 1);
|
||||||
|
@ -411,7 +415,8 @@ void TuckerEngine::loadCTable02(int fl) {
|
||||||
}
|
}
|
||||||
int start = 0;
|
int start = 0;
|
||||||
_spriteAnimationsTable[entry].firstFrameIndex = i;
|
_spriteAnimationsTable[entry].firstFrameIndex = i;
|
||||||
while (start != 999) {
|
// 9999 is also used as the end marker in the demo version
|
||||||
|
while (start != 999 && start != 9999) {
|
||||||
start = t.getNextInteger();
|
start = t.getNextInteger();
|
||||||
_spriteAnimationFramesTable[i] = start;
|
_spriteAnimationFramesTable[i] = start;
|
||||||
++i;
|
++i;
|
||||||
|
@ -447,7 +452,7 @@ void TuckerEngine::loadLoc() {
|
||||||
copyLocBitmap(filename, 0, false);
|
copyLocBitmap(filename, 0, false);
|
||||||
Graphics::copyRect(_quadBackgroundGfxBuf + 89600, 320, _locationBackgroundGfxBuf, 640, 320, 140);
|
Graphics::copyRect(_quadBackgroundGfxBuf + 89600, 320, _locationBackgroundGfxBuf, 640, 320, 140);
|
||||||
}
|
}
|
||||||
if (_locationNum == 1) {
|
if ((_gameFlags & kGameFlagDemo) == 0 && _locationNum == 1) {
|
||||||
_loadLocBufPtr = _quadBackgroundGfxBuf + 89600;
|
_loadLocBufPtr = _quadBackgroundGfxBuf + 89600;
|
||||||
loadImage("rochpath.pcx", _loadLocBufPtr, 0);
|
loadImage("rochpath.pcx", _loadLocBufPtr, 0);
|
||||||
}
|
}
|
||||||
|
@ -477,7 +482,9 @@ void TuckerEngine::loadObj() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
debug(2, "loadObj() partNum %d locationNum %d", _partNum, _locationNum);
|
debug(2, "loadObj() partNum %d locationNum %d", _partNum, _locationNum);
|
||||||
handleNewPartSequence();
|
if ((_gameFlags & kGameFlagDemo) == 0) {
|
||||||
|
handleNewPartSequence();
|
||||||
|
}
|
||||||
_currentPartNum = _partNum;
|
_currentPartNum = _partNum;
|
||||||
|
|
||||||
char filename[40];
|
char filename[40];
|
||||||
|
@ -651,16 +658,20 @@ void TuckerEngine::loadData4() {
|
||||||
|
|
||||||
void TuckerEngine::loadActionFile() {
|
void TuckerEngine::loadActionFile() {
|
||||||
char filename[40];
|
char filename[40];
|
||||||
switch (_partNum) {
|
if ((_gameFlags & kGameFlagDemo) != 0) {
|
||||||
case 1:
|
strcpy(filename, "action.c");
|
||||||
strcpy(filename, "action1.c");
|
} else {
|
||||||
break;
|
switch (_partNum) {
|
||||||
case 2:
|
case 1:
|
||||||
strcpy(filename, "action2.c");
|
strcpy(filename, "action1.c");
|
||||||
break;
|
break;
|
||||||
default:
|
case 2:
|
||||||
strcpy(filename, "action3.c");
|
strcpy(filename, "action2.c");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
strcpy(filename, "action3.c");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
loadFile(filename, _loadTempBuf);
|
loadFile(filename, _loadTempBuf);
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ bool TuckerEngine::hasFeature(EngineFeature f) const {
|
||||||
|
|
||||||
Common::Error TuckerEngine::go() {
|
Common::Error TuckerEngine::go() {
|
||||||
handleIntroSequence();
|
handleIntroSequence();
|
||||||
if ((_gameFlags & kGameFlagDemo) == 0 && !shouldQuit()) {
|
if ((_gameFlags & kGameFlagIntroOnly) == 0 && !shouldQuit()) {
|
||||||
mainLoop();
|
mainLoop();
|
||||||
}
|
}
|
||||||
return Common::kNoError;
|
return Common::kNoError;
|
||||||
|
@ -130,7 +130,7 @@ void TuckerEngine::restart() {
|
||||||
_locationNum = 0;
|
_locationNum = 0;
|
||||||
_nextLocationNum = ConfMan.getInt("boot_param");
|
_nextLocationNum = ConfMan.getInt("boot_param");
|
||||||
if (_nextLocationNum == 0) {
|
if (_nextLocationNum == 0) {
|
||||||
_nextLocationNum = kStartupLocation;
|
_nextLocationNum = (_gameFlags & kGameFlagDemo) == 0 ? kStartupLocationGame : kStartupLocationDemo;
|
||||||
}
|
}
|
||||||
_gamePaused = _gamePaused2 = false;
|
_gamePaused = _gamePaused2 = false;
|
||||||
_gameDebug = false;
|
_gameDebug = false;
|
||||||
|
@ -329,6 +329,10 @@ void TuckerEngine::mainLoop() {
|
||||||
|
|
||||||
openCompressedSoundFile();
|
openCompressedSoundFile();
|
||||||
loadCharSizeDta();
|
loadCharSizeDta();
|
||||||
|
if ((_gameFlags & kGameFlagDemo) != 0) {
|
||||||
|
addObjectToInventory(30);
|
||||||
|
addObjectToInventory(12);
|
||||||
|
}
|
||||||
loadCharset();
|
loadCharset();
|
||||||
loadPanel();
|
loadPanel();
|
||||||
loadFile("infobar.txt", _infoBarBuf);
|
loadFile("infobar.txt", _infoBarBuf);
|
||||||
|
@ -1523,7 +1527,9 @@ void TuckerEngine::drawData3() {
|
||||||
void TuckerEngine::execData3PreUpdate() {
|
void TuckerEngine::execData3PreUpdate() {
|
||||||
switch (_locationNum) {
|
switch (_locationNum) {
|
||||||
case 1:
|
case 1:
|
||||||
execData3PreUpdate_locationNum1();
|
if ((_gameFlags & kGameFlagDemo) == 0) {
|
||||||
|
execData3PreUpdate_locationNum1();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
execData3PreUpdate_locationNum2();
|
execData3PreUpdate_locationNum2();
|
||||||
|
|
|
@ -175,7 +175,8 @@ enum {
|
||||||
kScreenHeight = 200,
|
kScreenHeight = 200,
|
||||||
kScreenPitch = 640,
|
kScreenPitch = 640,
|
||||||
kFadePaletteStep = 5,
|
kFadePaletteStep = 5,
|
||||||
kStartupLocation = 1,
|
kStartupLocationDemo = 9,
|
||||||
|
kStartupLocationGame = 1,
|
||||||
kDefaultCharSpeechSoundCounter = 1,
|
kDefaultCharSpeechSoundCounter = 1,
|
||||||
kMaxSoundVolume = 127,
|
kMaxSoundVolume = 127,
|
||||||
kLastSaveSlot = 99
|
kLastSaveSlot = 99
|
||||||
|
@ -205,7 +206,8 @@ enum InputKey {
|
||||||
enum GameFlag {
|
enum GameFlag {
|
||||||
kGameFlagDemo = 1 << 0,
|
kGameFlagDemo = 1 << 0,
|
||||||
kGameFlagEncodedData = 1 << 1,
|
kGameFlagEncodedData = 1 << 1,
|
||||||
kGameFlagNoSubtitles = 1 << 2
|
kGameFlagNoSubtitles = 1 << 2,
|
||||||
|
kGameFlagIntroOnly = 1 << 3
|
||||||
};
|
};
|
||||||
|
|
||||||
inline int scaleMixerVolume(int volume, int max = 100) {
|
inline int scaleMixerVolume(int volume, int max = 100) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue