2008-05-02 14:48:19 +00:00
|
|
|
/* 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 KYRA_SCREEN_V2_H
|
|
|
|
#define KYRA_SCREEN_V2_H
|
|
|
|
|
|
|
|
#include "kyra/screen.h"
|
|
|
|
#include "kyra/kyra_v2.h"
|
|
|
|
|
|
|
|
namespace Kyra {
|
|
|
|
|
|
|
|
class Screen_v2 : public Screen {
|
|
|
|
public:
|
2008-05-11 23:16:50 +00:00
|
|
|
Screen_v2(KyraEngine_v1 *vm, OSystem *system);
|
2008-05-11 15:57:50 +00:00
|
|
|
~Screen_v2();
|
2008-05-02 14:48:19 +00:00
|
|
|
|
|
|
|
// screen page handling
|
2008-07-31 10:47:15 +00:00
|
|
|
void checkedPageUpdate(int srcPage, int dstPage);
|
|
|
|
|
2008-05-02 14:48:19 +00:00
|
|
|
// palette handling
|
2009-06-25 19:57:06 +00:00
|
|
|
uint8 *generateOverlay(const Palette &pal, uint8 *buffer, int color, uint16 factor);
|
2008-05-02 14:48:19 +00:00
|
|
|
void applyOverlay(int x, int y, int w, int h, int pageNum, const uint8 *overlay);
|
2009-06-25 20:00:52 +00:00
|
|
|
int findLeastDifferentColor(const uint8 *paletteEntry, const Palette &pal, uint8 firstColor, uint16 numColors, bool skipSpecialColors = false);
|
2009-01-01 15:06:43 +00:00
|
|
|
|
2009-06-22 02:36:54 +00:00
|
|
|
virtual void getFadeParams(const Palette &pal, int delay, int &delayInc, int &diff);
|
2008-05-02 14:48:19 +00:00
|
|
|
|
|
|
|
// shape handling
|
|
|
|
uint8 *getPtrToShape(uint8 *shpFile, int shape);
|
|
|
|
const uint8 *getPtrToShape(const uint8 *shpFile, int shape);
|
|
|
|
|
|
|
|
int getShapeScaledWidth(const uint8 *shpFile, int scale);
|
|
|
|
int getShapeScaledHeight(const uint8 *shpFile, int scale);
|
|
|
|
|
|
|
|
uint16 getShapeSize(const uint8 *shp);
|
|
|
|
|
|
|
|
uint8 *makeShapeCopy(const uint8 *src, int index);
|
|
|
|
|
|
|
|
// rect handling
|
|
|
|
int getRectSize(int w, int h);
|
2008-05-11 15:57:50 +00:00
|
|
|
bool calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, int &x2, int &y2, int &w2);
|
2008-05-02 14:48:19 +00:00
|
|
|
|
|
|
|
// text display
|
|
|
|
void setTextColorMap(const uint8 *cmap);
|
|
|
|
|
|
|
|
// layer handling
|
|
|
|
virtual int getLayer(int x, int y);
|
2008-05-11 15:57:50 +00:00
|
|
|
|
|
|
|
// special WSA handling
|
2009-05-18 19:53:57 +00:00
|
|
|
void wsaFrameAnimationStep(int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim);
|
2008-05-02 14:48:19 +00:00
|
|
|
protected:
|
2008-05-11 15:57:50 +00:00
|
|
|
uint8 *_wsaFrameAnimBuffer;
|
2008-05-02 14:48:19 +00:00
|
|
|
};
|
|
|
|
|
2009-10-04 21:26:33 +00:00
|
|
|
} // End of namespace Kyra
|
2008-05-02 14:48:19 +00:00
|
|
|
|
2009-01-01 15:06:43 +00:00
|
|
|
#endif
|
2008-05-02 14:48:19 +00:00
|
|
|
|