aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent/surface.cpp
diff options
context:
space:
mode:
authorMax Horn2009-09-15 08:54:06 +0000
committerMax Horn2009-09-15 08:54:06 +0000
commita8e5df433f5ea5c51c612a8962894add46f239e8 (patch)
treeacd245985f82e1d105f3e1106befbd6af0b0b432 /engines/teenagent/surface.cpp
parent9369d6b772f0a97ffca7639ba22fa07eee03549a (diff)
downloadscummvm-rg350-a8e5df433f5ea5c51c612a8962894add46f239e8.tar.gz
scummvm-rg350-a8e5df433f5ea5c51c612a8962894add46f239e8.tar.bz2
scummvm-rg350-a8e5df433f5ea5c51c612a8962894add46f239e8.zip
TEEN: More code formatting & whitespace changes (automatically generated with astyle)
svn-id: r44101
Diffstat (limited to 'engines/teenagent/surface.cpp')
-rw-r--r--engines/teenagent/surface.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp
index 0679aa28da..d253b40076 100644
--- a/engines/teenagent/surface.cpp
+++ b/engines/teenagent/surface.cpp
@@ -36,24 +36,24 @@ Surface::Surface() : x(0), y(0) {
void Surface::load(Common::SeekableReadStream *stream, Type type) {
//debug(0, "load()");
free();
-
+
x = y = 0;
memset(flags, 0, sizeof(flags));
-
+
if (type == TypeOn) {
byte fn = stream->readByte();
if (stream->eos())
return;
-
+
for (byte i = 0; i < fn; ++i) {
flags[i] = stream->readUint16LE();
debug(0, "flags[%u] = %u (0x%04x)", i, flags[i], flags[i]);
}
}
-
+
uint16 w_ = stream->readUint16LE();
uint16 h_ = stream->readUint16LE();
-
+
if (type != TypeLan) {
uint16 pos = stream->readUint16LE();
x = pos % 320;
@@ -63,7 +63,7 @@ void Surface::load(Common::SeekableReadStream *stream, Type type) {
//debug(0, "declared info: %ux%u (%04xx%04x) -> %u,%u", w_, h_, w_, h_, x, y);
if (stream->eos() || w_ == 0)
return;
-
+
if (w_ * h_ > stream->size()) {//rough but working
debug(0, "invalid surface %ux%u -> %u,%u", w_, h_, x, y);
return;
@@ -81,7 +81,7 @@ void Surface::render(Graphics::Surface *surface, int dx, int dy, bool mirror) {
byte *src = (byte *)pixels;
byte *dst = (byte *)surface->getBasePtr(dx + x, dy + y);
-
+
for (int i = 0; i < h; ++i) {
for (int j = 0; j < w; ++j) {
byte p = src[j];