aboutsummaryrefslogtreecommitdiff
path: root/engines/made/screenfx.h
blob: 912eb8e0f7e69733554cd42938fea16788873a93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* 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 MADE_SCREENFX_H
#define MADE_SCREENFX_H

#include "common/endian.h"
#include "common/util.h"
#include "common/rect.h"

#include "graphics/surface.h"

#include "made/made.h"
#include "made/screen.h"

namespace Made {

class ScreenEffects {
public:
	ScreenEffects(Screen *screen);
	~ScreenEffects();
	void run(int16 effectNum, Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void flash(int count, byte *palette, int colorCount);
private:
	Screen *_screen;
	byte *_fxPalette;
	static const byte vfxOffsTable[64];
	static const byte vfxOffsIndexTable[8];
	const byte *vfxOffsTablePtr;
	int16 vfxX1, vfxY1, vfxWidth, vfxHeight;
	void setPalette(byte *palette);
	void setBlendedPalette(byte *palette, byte *newPalette, int colorCount, int16 value, int16 maxValue);
	void copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2);

	void vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx01(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx02(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx03(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx04(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx05(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx06(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx07(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx08(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx09(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx10(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx11(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx12(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx13(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx15(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx16(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx17(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx18(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx19(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
	void vfx20(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
};

} // End of namespace Made

#endif /* MADE_H */