aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/intern.h13
-rw-r--r--scumm/script_v6he.cpp22
2 files changed, 19 insertions, 16 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index a3bb48451a..78016c9b6f 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -553,16 +553,6 @@ protected:
OpcodeProcv60he proc;
const char *desc;
};
- struct vsUnpackCtx {
- uint8 size;
- uint8 type;
- uint8 b;
- uint8 *ptr;
- };
- struct vsPackCtx {
- int size;
- uint8 buf[256];
- };
const OpcodeEntryv60he *_opcodesv60he;
@@ -584,10 +574,7 @@ protected:
void writeFileFromArray(int slot, int resID);
int virtScreenSave(byte *dst, int x1, int y1, int x2, int y2);
int virtScreenSavePack(byte *dst, byte *src, int len, int unk);
- void virtScreenSavePackBuf(vsPackCtx *ctx, uint8 *&dst, int len);
- void virtScreenSavePackByte(vsPackCtx *ctx, uint8 *&dst, int len, uint8 b);
void virtScreenLoad(int resIdx, int x1, int y1, int x2, int y2);
- uint8 virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data);
void seekFilePos(int slot, int offset, int mode);
virtual void decodeParseString(int a, int b);
void swapObjects(int object1, int object2);
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index 58966507c4..7f93989cf3 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -40,6 +40,22 @@
namespace Scumm {
+struct vsUnpackCtx {
+ uint8 size;
+ uint8 type;
+ uint8 b;
+ uint8 *ptr;
+};
+
+struct vsPackCtx {
+ int size;
+ uint8 buf[256];
+};
+
+static void virtScreenSavePackBuf(vsPackCtx *ctx, uint8 *&dst, int len);
+static void virtScreenSavePackByte(vsPackCtx *ctx, uint8 *&dst, int len, uint8 b);
+static uint8 virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data);
+
// Compatibility notes:
//
// FBEAR (fbear, fbeardemo)
@@ -832,7 +848,7 @@ void ScummEngine_v60he::virtScreenLoad(int resIdx, int x1, int y1, int x2, int y
markRectAsDirty(kMainVirtScreen, x1, x2, y1, y2 + 1); // XXX , 0x4000);
}
-uint8 ScummEngine_v60he::virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data) {
+uint8 virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data) {
uint8 decByte;
if (data != 0) {
ctx->type = 0;
@@ -965,7 +981,7 @@ int ScummEngine_v60he::virtScreenSavePack(byte *dst, byte *src, int len, int unk
return ctx.size;
}
-void ScummEngine_v60he::virtScreenSavePackBuf(vsPackCtx *ctx, uint8 *&dst, int len) {
+void virtScreenSavePackBuf(vsPackCtx *ctx, uint8 *&dst, int len) {
if (dst) {
*dst++ = (len - 1) * 2;
}
@@ -979,7 +995,7 @@ void ScummEngine_v60he::virtScreenSavePackBuf(vsPackCtx *ctx, uint8 *&dst, int l
}
}
-void ScummEngine_v60he::virtScreenSavePackByte(vsPackCtx *ctx, uint8 *&dst, int len, uint8 b) {
+void virtScreenSavePackByte(vsPackCtx *ctx, uint8 *&dst, int len, uint8 b) {
if (dst) {
*dst++ = ((len - 1) * 2) | 1;
}