From 60954319feada480d81dfce61e57028c56dba524 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Tue, 1 Jun 2004 17:56:33 +0000 Subject: minor changes svn-id: r13916 --- scumm/intern.h | 4 ++-- scumm/script_v6he.cpp | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'scumm') diff --git a/scumm/intern.h b/scumm/intern.h index 6436219fa0..f720757342 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -544,8 +544,8 @@ protected: const char *desc; }; struct vsUnpackCtx { - uint8 mask; - uint8 num; + uint8 size; + uint8 type; uint8 b; uint8 *ptr; }; diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index cd2e8892ec..24c2810578 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -924,30 +924,30 @@ void ScummEngine_v6he::virtScreenLoad(int resIdx, int x1, int y1, int x2, int y2 uint8 ScummEngine_v6he::virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data) { uint8 decByte; if (data != 0) { - ctx->num = 0; + ctx->type = 0; ctx->ptr = data; decByte = 0; } else { uint8 a; - if (ctx->num == 0) { + if (ctx->type == 0) { a = *(ctx->ptr)++; if (a & 1) { - ctx->num = 1; + ctx->type = 1; ctx->b = *(ctx->ptr)++; } else { - ctx->num = 2; + ctx->type = 2; } - ctx->mask = a; + ctx->size = a; a = (a >> 1) + 1; } else { - a = ctx->mask; + a = ctx->size; } - if (ctx->num == 2) { + if (ctx->type == 2) { ctx->b = *(ctx->ptr)++; } - ctx->mask = a - 1; - if (ctx->mask == 0) { - ctx->num = 0; + ctx->size = a - 1; + if (ctx->size == 0) { + ctx->type = 0; } decByte = ctx->b; } @@ -1029,7 +1029,7 @@ int ScummEngine_v6he::virtScreenSavePack(byte *dst, byte *src, int len, int unk) if (prevByte != curByte) { ibeg = iend - 1; } - if (iend - ibeg < 3) { + else if (iend - ibeg < 3) { if (ibeg != 0) pass = true; else flag = 1; } -- cgit v1.2.3