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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
/* 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.
*
*/
/*
* This file is based on WME Lite.
* http://dead-code.org/redir.php?target=wmelite
* Copyright (c) 2011 Jan Nedoma
*/
#ifndef WINTERMUTE_BRENDERER_H
#define WINTERMUTE_BRENDERER_H
#include "coll_templ.h"
#include "BBase.h"
namespace WinterMute {
class CBImage;
class CBActiveRect;
class CBObject;
class CBRenderer: public CBBase {
public:
int _realWidth;
int _realHeight;
int _drawOffsetX;
int _drawOffsetY;
virtual void DumpData(char *Filename) {};
virtual CBImage *TakeScreenshot();
virtual HRESULT SetViewport(int left, int top, int right, int bottom);
virtual HRESULT SetViewport(RECT *Rect);
virtual HRESULT SetScreenViewport();
virtual HRESULT Fade(WORD Alpha);
virtual HRESULT FadeToColor(uint32 Color, RECT *rect = NULL);
virtual HRESULT DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color);
virtual HRESULT DrawRect(int X1, int Y1, int X2, int Y2, uint32 Color, int Width = 1);
CBRenderer(CBGame *inGame = NULL);
virtual ~CBRenderer();
virtual HRESULT SetProjection() {
return S_OK;
};
virtual HRESULT WindowedBlt();
virtual HRESULT Fill(byte r, byte g, byte b, RECT *rect = NULL);
virtual void OnWindowChange();
virtual HRESULT InitRenderer(int width, int height, bool windowed);
virtual HRESULT Flip();
virtual void InitLoop();
virtual HRESULT SwitchFullscreen();
virtual HRESULT Setup2D(bool Force = false);
virtual HRESULT SetupLines();
virtual const char *GetName() {
return "";
};
virtual HRESULT DisplayDebugInfo() {
return E_FAIL;
};
virtual HRESULT DrawShaderQuad() {
return E_FAIL;
}
virtual float GetScaleRatioX() const {
return 1.0f;
}
virtual float GetScaleRatioY() const {
return 1.0f;
}
HRESULT ClipCursor();
HRESULT UnclipCursor();
CBObject *GetObjectAt(int X, int Y);
void DeleteRectList();
virtual HRESULT StartSpriteBatch() {
return S_OK;
};
virtual HRESULT EndSpriteBatch() {
return S_OK;
};
bool PointInViewport(POINT *P);
uint32 _forceAlphaColor;
HINSTANCE _instance;
HWND _window;
HWND _clipperWindow;
bool _active;
bool _ready;
bool _windowed;
RECT _windowRect;
RECT _viewportRect;
RECT _screenRect;
RECT _monitorRect;
int _bPP;
int _height;
int _width;
CBArray<CBActiveRect *, CBActiveRect *> _rectList;
};
} // end of namespace WinterMute
#endif
|