From b602b511607ac7bae911a5306bbe8301fdad4708 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Tue, 6 Mar 2012 03:09:12 +0100 Subject: WINTERMUTE: Add the files for the rest of the B-classes. --- engines/wintermute/BRenderer.h | 124 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 engines/wintermute/BRenderer.h (limited to 'engines/wintermute/BRenderer.h') 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 m_RectList; +}; + +} // end of namespace WinterMute + +#endif -- cgit v1.2.3