aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/disk_br.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-08-09 19:26:20 +0000
committerNicola Mettifogo2007-08-09 19:26:20 +0000
commita6448179663cb6ea6e38ed5888992c3f9116bde6 (patch)
tree223f24006f6f29fd8280453b9b32485c04baf9b0 /engines/parallaction/disk_br.cpp
parentdf7bd6f41c63b8f8ce2cb39838c1a2e4dc6ada16 (diff)
downloadscummvm-rg350-a6448179663cb6ea6e38ed5888992c3f9116bde6.tar.gz
scummvm-rg350-a6448179663cb6ea6e38ed5888992c3f9116bde6.tar.bz2
scummvm-rg350-a6448179663cb6ea6e38ed5888992c3f9116bde6.zip
Added code to load and display splash screens for BRA. The game crashes afterwards.
svn-id: r28511
Diffstat (limited to 'engines/parallaction/disk_br.cpp')
-rw-r--r--engines/parallaction/disk_br.cpp34
1 files changed, 32 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;
}