aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/disk_br.cpp34
-rw-r--r--engines/parallaction/parallaction.h2
-rw-r--r--engines/parallaction/parallaction_br.cpp44
3 files changed, 78 insertions, 2 deletions
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index 256b364eea..900a025756 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -92,10 +92,37 @@ Cnv* DosDisk_br::loadObjects(const char *name) {
return 0;
}
+void genSlidePath(char *path, const char* name) {
+ sprintf(path, "%s.bmp", name);
+}
Graphics::Surface* DosDisk_br::loadStatic(const char* name) {
debugC(5, kDebugDisk, "DosDisk_br::loadStatic");
- return 0;
+
+ char path[PATH_LEN];
+ genSlidePath(path, name);
+
+ Common::File stream;
+ if (!stream.open(path))
+ errorFileNotFound(path);
+
+ stream.skip(4);
+ uint width = stream.readUint32BE();
+ uint height = stream.readUint32BE();
+ stream.skip(20);
+
+ byte rgb[768];
+ stream.read(rgb, 768);
+
+ for (uint i = 0; i < 256; i++) {
+ _vm->_gfx->_palette.setEntry(i, rgb[i] >> 2, rgb[i+256] >> 2, rgb[i+512] >> 2);
+ }
+
+ Graphics::Surface *surf = new Graphics::Surface;
+ surf->create(width, height, 1);
+ stream.read(surf->pixels, width*height);
+
+ return surf;
}
Cnv* DosDisk_br::loadFrames(const char* name) {
@@ -103,9 +130,12 @@ Cnv* DosDisk_br::loadFrames(const char* name) {
return 0;
}
+
+
// there are no Slide resources in Big Red Adventure
-void DosDisk_br::loadSlide(const char *filename) {
+void DosDisk_br::loadSlide(const char *name) {
debugC(5, kDebugDisk, "DosDisk_br::loadSlide");
+
return;
}
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index 88c80bbf7b..5c134ec3e7 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -543,6 +543,7 @@ public:
~Parallaction_br() { }
int init();
+ int go();
public:
typedef void (Parallaction_br::*Callable)(void*);
@@ -554,6 +555,7 @@ public:
private:
void initResources();
+ void initGame();
static const Callable _dosCallables[6];
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 7dcc94d7c6..fbf424c41e 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -24,6 +24,8 @@
*/
#include "common/stdafx.h"
+#include "common/system.h"
+
#include "parallaction/parallaction.h"
#include "parallaction/sound.h"
@@ -63,4 +65,46 @@ void Parallaction_br::callFunction(uint index, void* parm) {
(this->*_callables[index])(parm);
}
+int Parallaction_br::go() {
+
+ initGame();
+
+ return 0;
+}
+
+void Parallaction_br::initGame() {
+
+ Graphics::Surface* surf = _disk->loadStatic("dyna");
+ _gfx->setPalette(_gfx->_palette);
+ _gfx->flatBlitCnv(surf, (640 - surf->w) >> 1, (400 - surf->h) >> 1, Gfx::kBitFront);
+ _gfx->updateScreen();
+ _system->delayMillis(600);
+
+ Palette pal;
+ for (uint i = 0; i < 64; i++) {
+ _gfx->_palette.fadeTo(pal, 1);
+ _gfx->setPalette(_gfx->_palette);
+ _gfx->updateScreen();
+ _system->delayMillis(30);
+ }
+ surf->free();
+ _gfx->clearScreen(Gfx::kBitFront);
+
+ surf = _disk->loadStatic("core");
+ _gfx->setPalette(_gfx->_palette);
+ _gfx->flatBlitCnv(surf, (640 - surf->w) >> 1, (400 - surf->h) >> 1, Gfx::kBitFront);
+ _gfx->updateScreen();
+ _system->delayMillis(2000);
+
+ for (uint i = 0; i < 64; i++) {
+ _gfx->_palette.fadeTo(pal, 1);
+ _gfx->setPalette(_gfx->_palette);
+ _gfx->updateScreen();
+ _system->delayMillis(30);
+ }
+ surf->free();
+ _gfx->clearScreen(Gfx::kBitFront);
+
+}
+
} // namespace Parallaction