[Scummvm-cvs-logs] SF.net SVN: scummvm:[33357] scummvm/trunk/engines/parallaction
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Mon Jul 28 09:20:55 CEST 2008
Revision: 33357
http://scummvm.svn.sourceforge.net/scummvm/?rev=33357&view=rev
Author: Kirben
Date: 2008-07-28 07:20:55 +0000 (Mon, 28 Jul 2008)
Log Message:
-----------
Add basic support for running Amiga and PC demos of BRA.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/detection.cpp
scummvm/trunk/engines/parallaction/disk.h
scummvm/trunk/engines/parallaction/disk_br.cpp
scummvm/trunk/engines/parallaction/gfxbase.cpp
scummvm/trunk/engines/parallaction/parallaction_br.cpp
Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp 2008-07-28 06:18:39 UTC (rev 33356)
+++ scummvm/trunk/engines/parallaction/detection.cpp 2008-07-28 07:20:55 UTC (rev 33357)
@@ -154,9 +154,25 @@
Common::ADGF_NO_FLAGS
},
GType_BRA,
- GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT | GF_LANG_MULT
+ GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT | GF_LANG_MULT,
},
+ {
+ {
+ "bra",
+ "Demo",
+ {
+ { "russia.fnt", 0, "0dd55251d2886d6783718df2b184bf97", 10649 },
+ { NULL, 0, NULL, 0}
+ },
+ Common::UNK_LANG,
+ Common::kPlatformPC,
+ Common::ADGF_DEMO
+ },
+ GType_BRA,
+ GF_LANG_EN | GF_DEMO,
+ },
+
// TODO: Base the detection of Amiga BRA on actual data file, not executable file.
{
{
@@ -171,9 +187,25 @@
Common::ADGF_NO_FLAGS
},
GType_BRA,
- GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT | GF_LANG_MULT
+ GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT | GF_LANG_MULT,
},
+ // TODO: Base the detection of Amiga BRA demo on actual data file, not executable file.
+ {
+ {
+ "bra",
+ "Demo",
+ {
+ { "bigred", 0, "b62a7b589fb5e9071f021227640893bf", 97004 },
+ { NULL, 0, NULL, 0}
+ },
+ Common::UNK_LANG,
+ Common::kPlatformAmiga,
+ Common::ADGF_DEMO
+ },
+ GType_BRA,
+ GF_LANG_EN | GF_DEMO,
+ },
{ AD_TABLE_END_MARKER, 0, 0 }
};
Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h 2008-07-28 06:18:39 UTC (rev 33356)
+++ scummvm/trunk/engines/parallaction/disk.h 2008-07-28 07:20:55 UTC (rev 33357)
@@ -250,6 +250,16 @@
Common::ReadStream* loadSound(const char* name);
};
+class DosDemo_br : public DosDisk_br {
+
+public:
+ DosDemo_br(Parallaction *vm);
+ virtual ~DosDemo_br();
+
+ Common::String selectArchive(const Common::String& name);
+
+};
+
class AmigaDisk_br : public DosDisk_br {
protected:
Modified: scummvm/trunk/engines/parallaction/disk_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk_br.cpp 2008-07-28 06:18:39 UTC (rev 33356)
+++ scummvm/trunk/engines/parallaction/disk_br.cpp 2008-07-28 07:20:55 UTC (rev 33357)
@@ -443,6 +443,43 @@
+DosDemo_br::DosDemo_br(Parallaction *vm) : DosDisk_br(vm) {
+
+}
+
+
+DosDemo_br::~DosDemo_br() {
+
+}
+
+Common::String DosDemo_br::selectArchive(const Common::String& name) {
+ debugC(5, kDebugDisk, "DosDemo_br::selectArchive");
+
+ Common::String oldPath;
+ if (_partDir.exists()) {
+ oldPath = _partDir.getDisplayName();
+ }
+
+ _partDir = _baseDir;
+
+ _aniDir = _partDir.getChild("ani");
+ _bkgDir = _partDir.getChild("bkg");
+ _mscDir = _partDir.getChild("msc");
+ _mskDir = _partDir.getChild("msk");
+ _pthDir = _partDir.getChild("pth");
+ _rasDir = _partDir.getChild("ras");
+ _scrDir = _partDir.getChild("scripts");
+ _sfxDir = _partDir.getChild("sfx");
+ _talDir = _partDir.getChild("tal");
+
+ return oldPath;
+}
+
+
+
+
+
+
AmigaDisk_br::AmigaDisk_br(Parallaction *vm) : DosDisk_br(vm) {
_fntDir = _baseDir.getChild("fonts");
Modified: scummvm/trunk/engines/parallaction/gfxbase.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/gfxbase.cpp 2008-07-28 06:18:39 UTC (rev 33356)
+++ scummvm/trunk/engines/parallaction/gfxbase.cpp 2008-07-28 07:20:55 UTC (rev 33357)
@@ -204,6 +204,10 @@
void Gfx::drawText(Font *font, Graphics::Surface* surf, uint16 x, uint16 y, const char *text, byte color) {
+ // TODO: Add support for difference in font data
+ if (_vm->getGameType() == GType_BRA && _vm->getPlatform() == Common::kPlatformPC && (_vm->getFeatures() & GF_DEMO))
+ return;
+
byte *dst = (byte*)surf->getBasePtr(x, y);
font->setColor(color);
font->drawString(dst, surf->w, text);
Modified: scummvm/trunk/engines/parallaction/parallaction_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_br.cpp 2008-07-28 06:18:39 UTC (rev 33356)
+++ scummvm/trunk/engines/parallaction/parallaction_br.cpp 2008-07-28 07:20:55 UTC (rev 33357)
@@ -56,7 +56,11 @@
if (getGameType() == GType_BRA) {
if (getPlatform() == Common::kPlatformPC) {
- _disk = new DosDisk_br(this);
+ if (getFeatures() & GF_DEMO) {
+ _disk = new DosDemo_br(this);
+ } else {
+ _disk = new DosDisk_br(this);
+ }
_disk->setLanguage(2); // NOTE: language is now hardcoded to English. Original used command-line parameters.
_soundMan = new DummySoundMan(this);
} else {
@@ -109,7 +113,11 @@
int Parallaction_br::go() {
- startGui();
+ if (getFeatures() & GF_DEMO) {
+ startPart(1);
+ } else {
+ startGui();
+ }
while ((_engineFlags & kEngineQuit) == 0) {
@@ -200,7 +208,11 @@
initPart();
- strcpy(_location._name, partFirstLocation[_part]);
+ if (getFeatures() & GF_DEMO) {
+ strcpy(_location._name, "camalb");
+ } else {
+ strcpy(_location._name, partFirstLocation[_part]);
+ }
parseLocation("common");
changeLocation(_location._name);
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