From cf82bef02ee2941ddad6664e34f3c94e35e015a3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 8 Oct 2010 22:30:39 +0000 Subject: TOON: Merged Toon engine to ScummVM trunk svn-id: r53087 --- engines/toon/picture.h | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 engines/toon/picture.h (limited to 'engines/toon/picture.h') diff --git a/engines/toon/picture.h b/engines/toon/picture.h new file mode 100644 index 0000000000..b01981b917 --- /dev/null +++ b/engines/toon/picture.h @@ -0,0 +1,66 @@ +/* ScummVM - Graphic Adventure Engine +* +* ScummVM is the legal property of its developers, whose names +* are too numerous to list here. Please refer to the COPYRIGHT +* file distributed with this source distribution. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. + +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. + +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* $URL$ +* $Id$ +* +*/ + +#ifndef PICTURE_H +#define PICTURE_H + +#include "common/stream.h" +#include "common/array.h" +#include "common/func.h" +#include "common/str.h" + +#include "toon.h" + +namespace Toon { + +class ToonEngine; +class Picture { + +public: + Picture(ToonEngine *vm); + bool loadPicture(Common::String file, bool totalPalette = false); + void setupPalette(); + void draw(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy); + void drawMask(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy); + void drawLineOnMask(int32 x, int32 y, int32 x2, int32 y2, bool walkable); + void floodFillNotWalkableOnMask( int32 x, int32 y ); + uint8 getData(int32 x, int32 y); + uint8 *getDataPtr() { return _data; } + int32 getWidth() const { return _width; } + int32 getHeight() const { return _height; } +protected: + int32 _width; + int32 _height; + uint8 *_data; + uint8 *_palette; // need to be copied at 3-387 + int32 _paletteEntries; + bool _useFullPalette; + + ToonEngine *_vm; +}; + +} // End of namespace Toon + +#endif -- cgit v1.2.3 From 3aa0345ab3e609f84ba09461a5c89fca0fcc4107 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 8 Oct 2010 22:33:58 +0000 Subject: TOON: Fixed guard defines svn-id: r53088 --- engines/toon/picture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/toon/picture.h') diff --git a/engines/toon/picture.h b/engines/toon/picture.h index b01981b917..ae67bf4e30 100644 --- a/engines/toon/picture.h +++ b/engines/toon/picture.h @@ -23,8 +23,8 @@ * */ -#ifndef PICTURE_H -#define PICTURE_H +#ifndef TOON_PICTURE_H +#define TOON_PICTURE_H #include "common/stream.h" #include "common/array.h" -- cgit v1.2.3 From e11637c7bc41d59dc6a666d3f0399b9a699b2443 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 8 Oct 2010 22:45:28 +0000 Subject: TOON: Normalized include paths svn-id: r53089 --- engines/toon/picture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/toon/picture.h') diff --git a/engines/toon/picture.h b/engines/toon/picture.h index ae67bf4e30..917c66cb93 100644 --- a/engines/toon/picture.h +++ b/engines/toon/picture.h @@ -31,7 +31,7 @@ #include "common/func.h" #include "common/str.h" -#include "toon.h" +#include "toon/toon.h" namespace Toon { -- cgit v1.2.3 From eef9f7b57b493cfb7712fd47cb961d16e8ce878d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 9 Oct 2010 11:11:26 +0000 Subject: TOON: Ran astyle over the toon engine (+ some manual corrections). svn-id: r53098 --- engines/toon/picture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/toon/picture.h') diff --git a/engines/toon/picture.h b/engines/toon/picture.h index 917c66cb93..5065843b3c 100644 --- a/engines/toon/picture.h +++ b/engines/toon/picture.h @@ -45,7 +45,7 @@ public: void draw(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy); void drawMask(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy); void drawLineOnMask(int32 x, int32 y, int32 x2, int32 y2, bool walkable); - void floodFillNotWalkableOnMask( int32 x, int32 y ); + void floodFillNotWalkableOnMask(int32 x, int32 y); uint8 getData(int32 x, int32 y); uint8 *getDataPtr() { return _data; } int32 getWidth() const { return _width; } -- cgit v1.2.3