aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/decompress_lzo.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-10-03 12:38:43 +0200
committerEugene Sandulenko2016-10-03 12:38:43 +0200
commit281c19ab036f387a99192594aa645e696009f40b (patch)
treee4de335067b68ee83b76de33c9b7f86b4f016d35 /engines/bladerunner/decompress_lzo.cpp
parent77be430824ad0cafb0de9952ecb352ba4ad18571 (diff)
downloadscummvm-rg350-281c19ab036f387a99192594aa645e696009f40b.tar.gz
scummvm-rg350-281c19ab036f387a99192594aa645e696009f40b.tar.bz2
scummvm-rg350-281c19ab036f387a99192594aa645e696009f40b.zip
BLADERUNNER: Code formatting fixes
Diffstat (limited to 'engines/bladerunner/decompress_lzo.cpp')
-rw-r--r--engines/bladerunner/decompress_lzo.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/engines/bladerunner/decompress_lzo.cpp b/engines/bladerunner/decompress_lzo.cpp
index aa4ebc74dd..c2c9712e8b 100644
--- a/engines/bladerunner/decompress_lzo.cpp
+++ b/engines/bladerunner/decompress_lzo.cpp
@@ -24,10 +24,9 @@
namespace BladeRunner {
-static inline
-uint32 decode_count(const uint8 **pp) {
+static inline uint32 decode_count(const uint8 **pp) {
uint32 v = 0;
- for (;!**pp;(*pp)++)
+ for (; !**pp; (*pp)++)
v += 255;
v += **pp;
@@ -36,8 +35,7 @@ uint32 decode_count(const uint8 **pp) {
return v;
}
-static inline
-void copy(uint8 **dst, const uint8 **src, int count) {
+static inline void copy(uint8 **dst, const uint8 **src, int count) {
assert(count > 0);
uint8 *d = *dst;
@@ -87,22 +85,17 @@ first_literal_run:
for (;;) {
match:
- if (t >= 64)
- {
+ if (t >= 64) {
m_pos = op - 1 - ((t >> 2) & 7) - (*ip++ << 3);
t = (t >> 5) - 1;
goto copy_match;
- }
- else if (t >= 32)
- {
+ } else if (t >= 32) {
t &= 31;
if (t == 0)
t = 31 + decode_count(&ip);
m_pos = op - 1 - (ip[0] >> 2) - (ip[1] << 6);
ip += 2;
- }
- else if (t >= 16)
- {
+ } else if (t >= 16) {
m_pos = op - ((t & 8) << 11);
t &= 7;
if (t == 0)
@@ -112,9 +105,7 @@ match:
if (m_pos == op)
goto eof_found;
m_pos -= 0x4000;
- }
- else
- {
+ } else {
m_pos = op - 1 - (t >> 2) - (*ip++ << 2);
copy(&op, &m_pos, 2);
goto match_done;