[Scummvm-cvs-logs] SF.net SVN: scummvm:[36044] scummvm/trunk/engines/tucker
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Sat Jan 24 22:03:45 CET 2009
Revision: 36044
http://scummvm.svn.sourceforge.net/scummvm/?rev=36044&view=rev
Author: cyx
Date: 2009-01-24 21:03:44 +0000 (Sat, 24 Jan 2009)
Log Message:
-----------
added detection entry for playable demo and some code differences
Modified Paths:
--------------
scummvm/trunk/engines/tucker/detection.cpp
scummvm/trunk/engines/tucker/resource.cpp
scummvm/trunk/engines/tucker/tucker.cpp
scummvm/trunk/engines/tucker/tucker.h
Modified: scummvm/trunk/engines/tucker/detection.cpp
===================================================================
--- scummvm/trunk/engines/tucker/detection.cpp 2009-01-24 20:59:53 UTC (rev 36043)
+++ scummvm/trunk/engines/tucker/detection.cpp 2009-01-24 21:03:44 UTC (rev 36044)
@@ -87,6 +87,14 @@
Common::kPlatformPC,
Tucker::kGameFlagEncodedData
},
+ {
+ "tucker",
+ "Demo",
+ AD_ENTRY1s("infobar.txt", "010b055de42097b140d5bcb6e95a5c7c", 203),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ Common::ADGF_DEMO | Tucker::kGameFlagDemo,
+ },
AD_TABLE_END_MARKER
};
@@ -103,11 +111,11 @@
static const Common::ADGameDescription tuckerDemoGameDescription = {
"tucker",
- "Demo",
+ "Non-Interactive Demo",
AD_ENTRY1(0, 0),
Common::EN_ANY,
Common::kPlatformPC,
- Common::ADGF_DEMO | Tucker::kGameFlagDemo
+ Common::ADGF_DEMO | Tucker::kGameFlagDemo | Tucker::kGameFlagIntroOnly
};
class TuckerMetaEngine : public Common::AdvancedMetaEngine {
Modified: scummvm/trunk/engines/tucker/resource.cpp
===================================================================
--- scummvm/trunk/engines/tucker/resource.cpp 2009-01-24 20:59:53 UTC (rev 36043)
+++ scummvm/trunk/engines/tucker/resource.cpp 2009-01-24 21:03:44 UTC (rev 36044)
@@ -342,7 +342,11 @@
char filename[40];
switch (_flagsTable[137]) {
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;
case 1:
sprintf(filename, "peg_%d.pcx", frame + 1);
@@ -411,7 +415,8 @@
}
int start = 0;
_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();
_spriteAnimationFramesTable[i] = start;
++i;
@@ -447,7 +452,7 @@
copyLocBitmap(filename, 0, false);
Graphics::copyRect(_quadBackgroundGfxBuf + 89600, 320, _locationBackgroundGfxBuf, 640, 320, 140);
}
- if (_locationNum == 1) {
+ if ((_gameFlags & kGameFlagDemo) == 0 && _locationNum == 1) {
_loadLocBufPtr = _quadBackgroundGfxBuf + 89600;
loadImage("rochpath.pcx", _loadLocBufPtr, 0);
}
@@ -477,7 +482,9 @@
return;
}
debug(2, "loadObj() partNum %d locationNum %d", _partNum, _locationNum);
- handleNewPartSequence();
+ if ((_gameFlags & kGameFlagDemo) == 0) {
+ handleNewPartSequence();
+ }
_currentPartNum = _partNum;
char filename[40];
@@ -651,16 +658,20 @@
void TuckerEngine::loadActionFile() {
char filename[40];
- switch (_partNum) {
- case 1:
- strcpy(filename, "action1.c");
- break;
- case 2:
- strcpy(filename, "action2.c");
- break;
- default:
- strcpy(filename, "action3.c");
- break;
+ if ((_gameFlags & kGameFlagDemo) != 0) {
+ strcpy(filename, "action.c");
+ } else {
+ switch (_partNum) {
+ case 1:
+ strcpy(filename, "action1.c");
+ break;
+ case 2:
+ strcpy(filename, "action2.c");
+ break;
+ default:
+ strcpy(filename, "action3.c");
+ break;
+ }
}
loadFile(filename, _loadTempBuf);
Modified: scummvm/trunk/engines/tucker/tucker.cpp
===================================================================
--- scummvm/trunk/engines/tucker/tucker.cpp 2009-01-24 20:59:53 UTC (rev 36043)
+++ scummvm/trunk/engines/tucker/tucker.cpp 2009-01-24 21:03:44 UTC (rev 36044)
@@ -60,7 +60,7 @@
Common::Error TuckerEngine::go() {
handleIntroSequence();
- if ((_gameFlags & kGameFlagDemo) == 0 && !shouldQuit()) {
+ if ((_gameFlags & kGameFlagIntroOnly) == 0 && !shouldQuit()) {
mainLoop();
}
return Common::kNoError;
@@ -130,7 +130,7 @@
_locationNum = 0;
_nextLocationNum = ConfMan.getInt("boot_param");
if (_nextLocationNum == 0) {
- _nextLocationNum = kStartupLocation;
+ _nextLocationNum = (_gameFlags & kGameFlagDemo) == 0 ? kStartupLocationGame : kStartupLocationDemo;
}
_gamePaused = _gamePaused2 = false;
_gameDebug = false;
@@ -329,6 +329,10 @@
openCompressedSoundFile();
loadCharSizeDta();
+ if ((_gameFlags & kGameFlagDemo) != 0) {
+ addObjectToInventory(30);
+ addObjectToInventory(12);
+ }
loadCharset();
loadPanel();
loadFile("infobar.txt", _infoBarBuf);
@@ -1523,7 +1527,9 @@
void TuckerEngine::execData3PreUpdate() {
switch (_locationNum) {
case 1:
- execData3PreUpdate_locationNum1();
+ if ((_gameFlags & kGameFlagDemo) == 0) {
+ execData3PreUpdate_locationNum1();
+ }
break;
case 2:
execData3PreUpdate_locationNum2();
Modified: scummvm/trunk/engines/tucker/tucker.h
===================================================================
--- scummvm/trunk/engines/tucker/tucker.h 2009-01-24 20:59:53 UTC (rev 36043)
+++ scummvm/trunk/engines/tucker/tucker.h 2009-01-24 21:03:44 UTC (rev 36044)
@@ -175,7 +175,8 @@
kScreenHeight = 200,
kScreenPitch = 640,
kFadePaletteStep = 5,
- kStartupLocation = 1,
+ kStartupLocationDemo = 9,
+ kStartupLocationGame = 1,
kDefaultCharSpeechSoundCounter = 1,
kMaxSoundVolume = 127,
kLastSaveSlot = 99
@@ -205,7 +206,8 @@
enum GameFlag {
kGameFlagDemo = 1 << 0,
kGameFlagEncodedData = 1 << 1,
- kGameFlagNoSubtitles = 1 << 2
+ kGameFlagNoSubtitles = 1 << 2,
+ kGameFlagIntroOnly = 1 << 3
};
inline int scaleMixerVolume(int volume, int max = 100) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list