2008-07-31 10:47:15 +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$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-03-04 11:53:25 +00:00
|
|
|
#ifdef ENABLE_LOL
|
|
|
|
|
2008-07-31 10:47:15 +00:00
|
|
|
#ifndef KYRA_SCREEN_LOL_H
|
|
|
|
#define KYRA_SCREEN_LOL_H
|
|
|
|
|
|
|
|
#include "kyra/screen_v2.h"
|
|
|
|
|
|
|
|
namespace Kyra {
|
|
|
|
|
|
|
|
class LoLEngine;
|
|
|
|
|
|
|
|
class Screen_LoL : public Screen_v2 {
|
|
|
|
public:
|
|
|
|
Screen_LoL(LoLEngine *vm, OSystem *system);
|
2009-01-18 17:04:24 +00:00
|
|
|
~Screen_LoL();
|
2009-01-01 15:06:43 +00:00
|
|
|
|
2009-04-25 13:15:05 +00:00
|
|
|
bool init();
|
|
|
|
|
2008-07-31 10:47:15 +00:00
|
|
|
void setScreenDim(int dim);
|
|
|
|
const ScreenDim *getScreenDim(int dim);
|
2009-02-01 19:27:01 +00:00
|
|
|
int curDimIndex() { return _curDimIndex; }
|
2009-01-18 17:04:24 +00:00
|
|
|
void modifyScreenDim(int dim, int x, int y, int w, int h);
|
2008-07-31 10:47:15 +00:00
|
|
|
|
2008-12-29 14:37:51 +00:00
|
|
|
void fprintString(const char *format, int x, int y, uint8 col1, uint8 col2, uint16 flags, ...);
|
2008-07-31 10:47:15 +00:00
|
|
|
void fprintStringIntro(const char *format, int x, int y, uint8 c1, uint8 c2, uint8 c3, uint16 flags, ...);
|
2009-01-18 17:04:24 +00:00
|
|
|
|
|
|
|
void drawGridBox(int x, int y, int w, int h, int col);
|
2009-02-01 19:27:01 +00:00
|
|
|
void fadeClearSceneWindow(int delay);
|
2009-01-18 17:04:24 +00:00
|
|
|
|
2009-02-14 00:51:07 +00:00
|
|
|
// smooth scrolling
|
|
|
|
void backupSceneWindow(int srcPageNum, int dstPageNum);
|
|
|
|
void restoreSceneWindow(int srcPageNum, int dstPageNum);
|
2009-05-25 22:58:05 +00:00
|
|
|
void clearGuiShapeMemory(int pageNum);
|
2009-05-30 15:52:09 +00:00
|
|
|
void copyGuiShapeFromSceneBackupBuffer(int srcPageNum, int dstPageNum);
|
|
|
|
void copyGuiShapeToSurface(int srcPageNum, int dstPageNum);
|
2009-02-14 00:51:07 +00:00
|
|
|
void smoothScrollZoomStepTop(int srcPageNum, int dstPageNum, int x, int y);
|
|
|
|
void smoothScrollZoomStepBottom(int srcPageNum, int dstPageNum, int x, int y);
|
|
|
|
void smoothScrollHorizontalStep(int pageNum, int x, int u2, int w);
|
|
|
|
void smoothScrollTurnStep1(int srcPage1Num, int srcPage2Num, int dstPageNum);
|
|
|
|
void smoothScrollTurnStep2(int srcPage1Num, int srcPage2Num, int dstPageNum);
|
|
|
|
void smoothScrollTurnStep3(int srcPage1Num, int srcPage2Num, int dstPageNum);
|
|
|
|
|
2009-05-15 06:29:08 +00:00
|
|
|
void copyRegionSpecial(int page1, int w1, int h1, int x1, int y1, int page2, int w2, int h2, int x2, int y2, int w3, int h3, int mode, ...);
|
|
|
|
|
2009-02-14 00:51:07 +00:00
|
|
|
// palette stuff
|
2009-01-18 17:04:24 +00:00
|
|
|
void fadeToBlack(int delay=0x54, const UpdateFunctor *upFunc = 0);
|
2009-05-10 23:08:32 +00:00
|
|
|
void fadeToPalette1(int delay);
|
2009-06-29 16:08:16 +00:00
|
|
|
void loadSpecialColors(Palette &dst);
|
2009-05-10 13:40:28 +00:00
|
|
|
void copyColor(int dstColorIndex, int srcColorIndex);
|
|
|
|
bool fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedTime, uint32 targetTime);
|
2009-05-21 16:46:40 +00:00
|
|
|
bool fadePaletteStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime);
|
2009-06-07 00:37:30 +00:00
|
|
|
uint8 *generateFadeTable(uint8 *dst, uint8 *src1, uint8 *src2, int numTabs);
|
2009-01-18 17:04:24 +00:00
|
|
|
|
2009-06-25 19:59:06 +00:00
|
|
|
void generateGrayOverlay(const Palette &Pal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool skipSpecialColors);
|
|
|
|
uint8 *generateLevelOverlay(const Palette &Pal, uint8 *ovl, int opColor, int weight);
|
2009-01-18 17:04:24 +00:00
|
|
|
uint8 *getLevelOverlay(int index) { return _levelOverlays[index]; }
|
|
|
|
|
2009-05-16 12:53:05 +00:00
|
|
|
void copyBlockAndApplyOverlay(int page1, int x1, int y1, int page2, int x2, int y2, int w, int h, int dim, uint8 *ovl);
|
2009-04-25 13:15:05 +00:00
|
|
|
void applyOverlaySpecial(int page1, int x1, int y1, int page2, int x2, int y2, int w, int h, int dim, int flag, uint8 *ovl);
|
|
|
|
|
2009-05-31 00:42:44 +00:00
|
|
|
void copyBlockAndApplyOverlayOutro(int srcPage, int dstPage, const uint8 *ovl);
|
|
|
|
|
2009-01-18 17:04:24 +00:00
|
|
|
uint8 getShapePaletteSize(const uint8 *shp);
|
|
|
|
|
|
|
|
uint8 *_paletteOverlay1;
|
|
|
|
uint8 *_paletteOverlay2;
|
|
|
|
uint8 *_grayOverlay;
|
|
|
|
int _fadeFlag;
|
|
|
|
|
2009-06-25 15:22:08 +00:00
|
|
|
// PC98 specific
|
|
|
|
static void convertPC98Gfx(uint8 *data, int w, int h, int pitch);
|
|
|
|
|
2008-07-31 10:47:15 +00:00
|
|
|
private:
|
|
|
|
LoLEngine *_vm;
|
|
|
|
|
2009-04-25 13:15:05 +00:00
|
|
|
const ScreenDim *_screenDimTable;
|
2008-07-31 10:47:15 +00:00
|
|
|
static const int _screenDimTableCount;
|
2009-01-18 17:04:24 +00:00
|
|
|
|
2009-04-25 13:15:05 +00:00
|
|
|
static const ScreenDim _screenDimTable256C[];
|
|
|
|
static const ScreenDim _screenDimTable16C[];
|
|
|
|
|
2009-01-18 17:04:24 +00:00
|
|
|
ScreenDim **_customDimTable;
|
2009-02-01 19:27:01 +00:00
|
|
|
int _curDimIndex;
|
2009-01-18 17:04:24 +00:00
|
|
|
|
|
|
|
uint8 *_levelOverlays[8];
|
2009-04-03 21:32:50 +00:00
|
|
|
|
2009-06-25 15:22:08 +00:00
|
|
|
static const uint8 _paletteConvTable[256];
|
|
|
|
void mergeOverlay(int x, int y, int w, int h);
|
2009-06-29 18:00:18 +00:00
|
|
|
void postProcessCursor(uint8 *data, int width, int height, int pitch);
|
2009-06-25 15:22:08 +00:00
|
|
|
|
2009-04-03 21:32:50 +00:00
|
|
|
// magic atlas
|
2009-05-15 06:29:08 +00:00
|
|
|
void calcBoundariesIntern(int dstX, int dstY, int c, int d);
|
2009-04-03 21:32:50 +00:00
|
|
|
|
2009-04-25 13:15:05 +00:00
|
|
|
int _internDimX;
|
|
|
|
int _internDimY;
|
|
|
|
int _internDimW;
|
|
|
|
int _internDimH;
|
|
|
|
int _internDimDstX;
|
|
|
|
int _internBlockWidth;
|
|
|
|
int _internDimDstY;
|
|
|
|
int _internBlockHeight;
|
|
|
|
int _internDimU5;
|
|
|
|
int _internDimU6;
|
|
|
|
int _internBlockWidth2;
|
|
|
|
int _internDimU8;
|
2008-07-31 10:47:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end of namespace Kyra
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2009-03-04 11:53:25 +00:00
|
|
|
#endif // ENABLE_LOL
|
|
|
|
|