From 41230fa999b40b6ecaa42e133f468e23effaaba1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 Jan 2004 16:49:52 +0000 Subject: [PATCH] cleanup (len == size) svn-id: r12688 --- scumm/bomp.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/scumm/bomp.cpp b/scumm/bomp.cpp index f69a31ff24b..1626493105b 100644 --- a/scumm/bomp.cpp +++ b/scumm/bomp.cpp @@ -47,14 +47,13 @@ void decompressBomp(byte *dst, const byte *src, int w, int h) { } while (--h); } -void bompDecodeLine(byte *dst, const byte *src, int size) { - assert(size > 0); +void bompDecodeLine(byte *dst, const byte *src, int len) { + assert(len > 0); - int len, num; + int num; byte code, color; - len = size; - while (len) { + while (len > 0) { code = *src++; num = (code >> 1) + 1; if (num > len) @@ -71,16 +70,15 @@ void bompDecodeLine(byte *dst, const byte *src, int size) { } } -void bompDecodeLineReverse(byte *dst, const byte *src, int size) { - assert(size > 0); +void bompDecodeLineReverse(byte *dst, const byte *src, int len) { + assert(len > 0); - dst += size; + dst += len; - int len, num; + int num; byte code, color; - len = size; - while (len) { + while (len > 0) { code = *src++; num = (code >> 1) + 1; if (num > len)