aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/drascula/drascula.cpp17
-rw-r--r--engines/drascula/drascula.h3
2 files changed, 12 insertions, 8 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 7e041ce4c7..0b6b618487 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -107,6 +107,8 @@ int DrasculaEngine::init() {
_lang = 0;
}
+ _arj.registerArchive("packet.001");
+
return 0;
}
@@ -264,22 +266,21 @@ void DrasculaEngine::loadPic(const char *NamePcc) {
unsigned int con, x = 0;
unsigned int fExit = 0;
byte ch, rep;
- Common::File file;
byte *auxPun;
- file.open(NamePcc);
- if (!file.isOpen())
+ _arj.open(NamePcc);
+ if (!_arj.isOpen())
error("missing game data %s %c", NamePcc, 7);
pcxBuffer = (byte *)malloc(65000);
auxPun = pcxBuffer;
- file.seek(128);
+ _arj.seek(128);
while (!fExit) {
- ch = file.readByte();
+ ch = _arj.readByte();
rep = 1;
if ((ch & 192) == 192) {
rep = (ch & 63);
- ch = file.readByte();
+ ch = _arj.readByte();
}
for (con = 0; con < rep; con++) {
*auxPun++ = ch;
@@ -289,8 +290,8 @@ void DrasculaEngine::loadPic(const char *NamePcc) {
}
}
- file.read(cPal, 768);
- file.close();
+ _arj.read(cPal, 768);
+ _arj.close();
}
void DrasculaEngine::decompressPic(byte *targetSurface, int colorCount) {
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 2ddc006e71..4e8a43c6dc 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -35,6 +35,7 @@
#include "common/hash-str.h"
#include "common/events.h"
#include "common/keyboard.h"
+#include "common/unarj.h"
#include "sound/audiostream.h"
#include "sound/mixer.h"
@@ -230,6 +231,8 @@ public:
Common::File *ald, *sku;
+ Common::ArjFile _arj;
+
int hay_sb;
int nivel_osc, previousMusic, roomMusic;
int roomNumber;