diff options
author | Max Horn | 2002-08-31 13:29:10 +0000 |
---|---|---|
committer | Max Horn | 2002-08-31 13:29:10 +0000 |
commit | a39711e25670b366ed76534cc926ac70ea6c1edd (patch) | |
tree | 3fdba199dc0d93333d68dbb44a7e1bc571f78d93 /scumm/smush | |
parent | 0c7771a7062fc982cbaca53fee022d9538a44f70 (diff) | |
download | scummvm-rg350-a39711e25670b366ed76534cc926ac70ea6c1edd.tar.gz scummvm-rg350-a39711e25670b366ed76534cc926ac70ea6c1edd.tar.bz2 scummvm-rg350-a39711e25670b366ed76534cc926ac70ea6c1edd.zip |
fixed compilation on Mac OS X; some cleanup; moved header file scumm/smusH/rect.h to common/rect.h
svn-id: r4877
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/blitter.h | 5 | ||||
-rw-r--r-- | scumm/smush/brenderer.cpp | 2 | ||||
-rw-r--r-- | scumm/smush/channel.h | 1 | ||||
-rw-r--r-- | scumm/smush/chunk.cpp | 2 | ||||
-rw-r--r-- | scumm/smush/codec37.cpp | 2 | ||||
-rw-r--r-- | scumm/smush/config.h | 2 | ||||
-rw-r--r-- | scumm/smush/decoder.h | 4 | ||||
-rw-r--r-- | scumm/smush/frenderer.cpp | 2 | ||||
-rw-r--r-- | scumm/smush/frenderer.h | 2 | ||||
-rw-r--r-- | scumm/smush/player.cpp | 3 | ||||
-rw-r--r-- | scumm/smush/player.h | 2 | ||||
-rw-r--r-- | scumm/smush/rect.h | 100 | ||||
-rw-r--r-- | scumm/smush/renderer.h | 4 | ||||
-rw-r--r-- | scumm/smush/saud_channel.cpp | 1 | ||||
-rw-r--r-- | scumm/smush/scumm_renderer.cpp | 1 |
15 files changed, 25 insertions, 108 deletions
diff --git a/scumm/smush/blitter.h b/scumm/smush/blitter.h index 16c07f0296..a59644e777 100644 --- a/scumm/smush/blitter.h +++ b/scumm/smush/blitter.h @@ -34,7 +34,10 @@ # endif #endif -#include "rect.h" +#include "common/rect.h" + +using ScummVM::Point; +using ScummVM::Rect; class Chunk; /*! @brief class for handling blitting on a frame buffer diff --git a/scumm/smush/brenderer.cpp b/scumm/smush/brenderer.cpp index 64f97bb9c5..bba35fd3ad 100644 --- a/scumm/smush/brenderer.cpp +++ b/scumm/smush/brenderer.cpp @@ -22,6 +22,8 @@ #include <stdafx.h> #include "brenderer.h" +#include "common/engine.h" // for debug, warning, error + #include <assert.h> void BaseRenderer::clean() { diff --git a/scumm/smush/channel.h b/scumm/smush/channel.h index af5a078540..112ca5f1e7 100644 --- a/scumm/smush/channel.h +++ b/scumm/smush/channel.h @@ -23,6 +23,7 @@ #define CHANNEL_H #include "config.h" +#include "common/engine.h" // for debug, warning, error #ifdef DEBUG # ifndef NO_DEBUG_CHANNEL diff --git a/scumm/smush/chunk.cpp b/scumm/smush/chunk.cpp index 76163ebec2..f665c4db36 100644 --- a/scumm/smush/chunk.cpp +++ b/scumm/smush/chunk.cpp @@ -22,6 +22,8 @@ #include <stdafx.h> #include "chunk.h" +#include "common/engine.h" // for debug, warning, error + #include <stdio.h> // for FILE, fopen, fclose, fseek and ftell #include <string.h> // for memcpy diff --git a/scumm/smush/codec37.cpp b/scumm/smush/codec37.cpp index 16fe44a411..cc796ef48e 100644 --- a/scumm/smush/codec37.cpp +++ b/scumm/smush/codec37.cpp @@ -24,6 +24,8 @@ #include "chunk.h" #include "blitter.h" +#include "common/engine.h" // for debug, warning, error + #include <assert.h> #include <string.h> diff --git a/scumm/smush/config.h b/scumm/smush/config.h index 112b166e4d..7ad1bcff23 100644 --- a/scumm/smush/config.h +++ b/scumm/smush/config.h @@ -23,7 +23,7 @@ #define SMUSH_CONFIG_H #include <stdafx.h> -#include <scumm.h> +#include <scummsys.h> #ifndef NDEBUG #define DEBUG diff --git a/scumm/smush/decoder.h b/scumm/smush/decoder.h index cff839214d..8e4e9493f3 100644 --- a/scumm/smush/decoder.h +++ b/scumm/smush/decoder.h @@ -24,8 +24,10 @@ #include "config.h" -#include "rect.h" +#include "common/rect.h" +using ScummVM::Point; +using ScummVM::Rect; class Blitter; class Chunk; diff --git a/scumm/smush/frenderer.cpp b/scumm/smush/frenderer.cpp index 191235fb05..eb75a2bde4 100644 --- a/scumm/smush/frenderer.cpp +++ b/scumm/smush/frenderer.cpp @@ -21,9 +21,9 @@ #include <stdafx.h> #include "common/util.h" +#include "common/engine.h" // for debug, warning, error #include "frenderer.h" -#include "rect.h" #include <assert.h> #include <string.h> diff --git a/scumm/smush/frenderer.h b/scumm/smush/frenderer.h index 18d6bf5089..c0210ab4d7 100644 --- a/scumm/smush/frenderer.h +++ b/scumm/smush/frenderer.h @@ -35,7 +35,7 @@ #endif #include "brenderer.h" -#include "rect.h" +#include "common/util.h" #include "blitter.h" /*! @brief ::renderer implementation specifically designed for font files. diff --git a/scumm/smush/player.cpp b/scumm/smush/player.cpp index cbe6aae69d..829d4d9437 100644 --- a/scumm/smush/player.cpp +++ b/scumm/smush/player.cpp @@ -21,6 +21,8 @@ #include <stdafx.h> #include "common/util.h" +#include "common/engine.h" // for debug, warning, error + #include "player.h" #include "mixer.h" @@ -28,7 +30,6 @@ #include "frenderer.h" #include "channel.h" #include "chunk_type.h" -#include "rect.h" #include "blitter.h" #include <assert.h> diff --git a/scumm/smush/player.h b/scumm/smush/player.h index 79bc7f6874..f9decce7f0 100644 --- a/scumm/smush/player.h +++ b/scumm/smush/player.h @@ -24,7 +24,7 @@ #include "config.h" -#include "rect.h" +#include "common/util.h" #include "chunk.h" #include "palette.h" #include "codec1.h" diff --git a/scumm/smush/rect.h b/scumm/smush/rect.h deleted file mode 100644 index d1f061136f..0000000000 --- a/scumm/smush/rect.h +++ /dev/null @@ -1,100 +0,0 @@ -/* ScummVM - Scumm Interpreter - * Copyright (C) 2001/2002 The ScummVM project - * - * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Header$ - * - */ - -#ifndef SMUSH_RECT_H -#define SMUSH_RECT_H - -#include "config.h" - -/*! @brief simple class for handling both 2D position and size - - This small class is an helper for position and size values. -*/ -class Point { - friend class Rect; -private: - int32 _x; //!< The horizontal part of the point - int32 _y; //!< The vertical part of the point -public: - Point() : _x(0), _y(0) {}; - Point(const Point & p) : _x(p._x), _y(p._y) {}; - explicit Point(int32 x, int32 y) : _x(x), _y(y) {}; - Point & operator=(const Point & p) { _x = p._x; _y = p._y; return *this; }; - bool operator==(const Point & p) const { return _x == p._x && _y == p._y; }; - const int32 & getX() const { return _x; }; - const int32 & getY() const { return _y; }; - int32 & getX() { return _x; }; - int32 & getY() { return _y; }; - Point operator+(const Point & p) const { return Point(_x + p._x, _y+p._y); }; - Point operator-(const Point & p) const { return Point(_x - p._x, _y-p._y); }; - Point & operator+=(const Point & p) { _x += p._x; _y += p._y; return *this; }; - Point & operator-=(const Point & p) { _x -= p._x; _y -= p._y; return *this; }; - bool isOrigin() const { return _x == 0 && _y == 0; }; - void set(int32 x, int32 y) { _x = x; _y = y; } -}; - -/*! @brief simple class for handling a rectangular zone. - - This small class is an helper for rectangles. - It is mostly used by the blitter class. -*/ -class Rect { -private: - Point _topLeft; //!< The point at the top left of the rectangle - Point _bottomRight; //!< The point at the bottom right of the rectangle -public: - Rect() : _topLeft(0, 0), _bottomRight(0,0) {} - Rect(int32 x, int32 y) : _topLeft(0, 0), _bottomRight(x, y) {} - Rect(int32 x1, int32 y1, int32 x2, int32 y2) : _topLeft(x1, y1), _bottomRight(x2, y2) {} - Point size() const { return (_bottomRight - _topLeft); }; - int32 width() const { return size()._x; } - int32 height() const { return size()._y; } - int32 left() const { return _topLeft._x; } - int32 right() const { return _bottomRight._x; } - int32 top() const { return _topLeft._y; } - int32 bottom() const { return _bottomRight._y; } - const Point & topLeft() const { return _topLeft; } - const Point & bottomRight() const { return _bottomRight; } - - /*! @brief check if given position is inside the rectangle - - @param x the horizontal position to check - @param y the vertical position to check - - @return true if the given position is inside the rectangle, false otherwise - */ - bool isInside(int32 x, int32 y) const { - return (_topLeft._x <= x) && (_bottomRight._x > x) && (_topLeft._y <= y) && (_bottomRight._y > y); - } - /*! @brief check if given point is inside the rectangle - - @param p the point to check - - @return true if the given point is inside the rectangle, false otherwise - */ - bool isInside(const Point & p) const { - return (_topLeft._x <= p._x) && (_bottomRight._x > p._x) && (_topLeft._y <= p._y) && (_bottomRight._y > p._y); - } - - bool clip(Rect & r) const; -}; - -#endif diff --git a/scumm/smush/renderer.h b/scumm/smush/renderer.h index 7f8fd7e730..f9ccc04ac1 100644 --- a/scumm/smush/renderer.h +++ b/scumm/smush/renderer.h @@ -25,8 +25,10 @@ #include "config.h" #include "palette.h" -#include "rect.h" +#include "common/rect.h" +using ScummVM::Point; +using ScummVM::Rect; class Mixer; /*! @brief interface for general output (rendering) diff --git a/scumm/smush/saud_channel.cpp b/scumm/smush/saud_channel.cpp index c6a6aefd74..6eaa388ae7 100644 --- a/scumm/smush/saud_channel.cpp +++ b/scumm/smush/saud_channel.cpp @@ -20,6 +20,7 @@ */ #include <stdafx.h> + #include "channel.h" #include "chunk.h" #include "chunk_type.h" diff --git a/scumm/smush/scumm_renderer.cpp b/scumm/smush/scumm_renderer.cpp index 3375d275d9..e652d5a370 100644 --- a/scumm/smush/scumm_renderer.cpp +++ b/scumm/smush/scumm_renderer.cpp @@ -25,6 +25,7 @@ #include "channel.h" #include "mixer.h" #include "sound/mixer.h" +#include "scumm/scumm.h" #include "scumm/sound.h" class scumm_mixer : public Mixer { |