aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/BRenderer.h
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-03-06 03:09:12 +0100
committerEinar Johan Trøan Sømåen2012-06-02 12:12:22 +0200
commitb602b511607ac7bae911a5306bbe8301fdad4708 (patch)
tree9d58ffb57d434d8330e22c059239f7f0b1849487 /engines/wintermute/BRenderer.h
parent72a44cdc7b2040037a97f00c0c218b7f6bd9cd31 (diff)
downloadscummvm-rg350-b602b511607ac7bae911a5306bbe8301fdad4708.tar.gz
scummvm-rg350-b602b511607ac7bae911a5306bbe8301fdad4708.tar.bz2
scummvm-rg350-b602b511607ac7bae911a5306bbe8301fdad4708.zip
WINTERMUTE: Add the files for the rest of the B-classes.
Diffstat (limited to 'engines/wintermute/BRenderer.h')
-rw-r--r--engines/wintermute/BRenderer.h124
1 files changed, 124 insertions, 0 deletions
diff --git a/engines/wintermute/BRenderer.h b/engines/wintermute/BRenderer.h
new file mode 100644
index 0000000000..c1180a5ef5
--- /dev/null
+++ b/engines/wintermute/BRenderer.h
@@ -0,0 +1,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 m_RealWidth;
+ int m_RealHeight;
+ int m_DrawOffsetX;
+ int m_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 m_ForceAlphaColor;
+ HINSTANCE m_Instance;
+ HWND m_Window;
+ HWND m_ClipperWindow;
+ bool m_Active;
+ bool m_Ready;
+ bool m_Windowed;
+ RECT m_WindowRect;
+ RECT m_ViewportRect;
+ RECT m_ScreenRect;
+ RECT m_MonitorRect;
+ int m_BPP;
+ int m_Height;
+ int m_Width;
+
+ CBArray<CBActiveRect *, CBActiveRect *> m_RectList;
+};
+
+} // end of namespace WinterMute
+
+#endif