From 68bcaa61b9eb1108028b3db072ade95431b9f14f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 30 Apr 2012 23:16:19 +1000 Subject: TONY: More header files and functionality added --- engines/tony/window.h | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 engines/tony/window.h (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h new file mode 100644 index 0000000000..d248ffb871 --- /dev/null +++ b/engines/tony/window.h @@ -0,0 +1,134 @@ +/* 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. + * + */ +/************************************************************************** + * 様様様様様様様様様様様様様様様様様 * + * Nayma Software srl * + * e -= We create much MORE than ALL =- * + * u- z$$$c '. 様様様様様様様様様様様様様様様様様 * + * .d" d$$$$$b "b. * + * .z$* d$$$$$$$L ^*$c. * + * #$$$. $$$$$$$$$ .$$$" Project: Roasted Moths........ * + * ^*$b 4$$$$$$$$$F .d$*" * + * ^$$. 4$$$$$$$$$F .$P" Module: Window.HPP........... * + * *$. '$$$$$$$$$ 4$P 4 * + * J *$ "$$$$$$$" $P r Author: Giovanni Bajo........ * + * z$ '$$$P*4c.*$$$*.z@*R$$$ $. * + * z$" "" #$F^ "" '$c Desc: Classi per la gestione * + * z$$beu .ue=" $ "=e.. .zed$$c di una finestra Direct + * "#$e z$*" . `. ^*Nc e$"" Draw................. * + * "$$". .r" ^4. .^$$" ..................... * + * ^.@*"6L=\ebu^+C$"*b." * + * "**$. "c 4$$$ J" J$P*" OS: [ ] DOS [X] WIN95 [ ] PORT * + * ^"--.^ 9$" .--"" COMP: [ ] WATCOM [X] VISUAL C++ * + * " [ ] EIFFEL [ ] GCC/GXX/DJGPP * + * * + * This source code is Copyright (C) Nayma Software. ALL RIGHTS RESERVED * + * * + **************************************************************************/ + +#ifndef TONY_WINDOW_H +#define TONY_WINDOW_H + +#include "common/scummsys.h" +#include "common/rect.h" + +namespace Tony { + +typedef uint32 HWND; + +class RMWindow { +private: + bool Lock(/*DDSURFACEDESC& ddsd */); + void Unlock(/*DDSURFACEDESC& ddsd */); + + // Inizializza DirectDraw + void DDInit(void); + + // Chiude DirectDraw + void DDClose(void); + + // Repaint grafico tramite DirectDraw + void Repaint(void); + + // Window Proc principale che richiama la WindowProc dentro la classe +// friend LRESULT CALLBACK GlobalWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + + // Procedura di gestione messaggi +// LRESULT WindowProc(UINT msg, WPARAM wParam, LPARAM lParam); + +protected: + HWND m_hWnd; + bool m_bFullscreen; + + void * /*LPDIRECTDRAW*/ m_DD; + void * /*LPDIRECTDRAWSURFACE*/ m_Primary; + void * /*LPDIRECTDRAWSURFACE*/ m_Back; + void * /*LPDIRECTDRAWCLIPPER*/ m_MainClipper; + void * /*LPDIRECTDRAWCLIPPER*/ m_BackClipper; + + int fps, fcount; + int lastsecond, lastfcount; + + int mskRed, mskGreen, mskBlue; + + bool m_bGrabScreenshot; + bool m_bGrabThumbnail; + bool m_bGrabMovie; + uint16 *m_wThumbBuf; + + void CreateBWPrecalcTable(void); + void UpdatePixelFormat(void); + void WipeEffect(Common::Rect &rcBoundEllipse); + + public: + RMWindow() { m_Primary = NULL; m_Back = NULL; }; + ~RMWindow() { Close(); } + + // Inizializzazione + void Init(/*HINSTANCE hInst*/); + void InitDirectDraw(void); + void Close(void); + + // Switch tra windowed e fullscreen + void SwitchFullscreen(bool bFull); + + // Legge il prossimo frame + void GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); + + // Avverte di grabbare un thumbnail per il salvataggio +// void GrabThumbnail(uint16 *buf); + + operator HWND() { return m_hWnd; } + + // Modi pixel format + // MODE1: 1555 + // MODE2: 5515 + // MODE3: 5551 + bool ISMODE1() { return (mskRed == 0x7C00 && mskGreen == 0x3E0 && mskBlue== 0x1F); } + bool ISMODE2() { return (mskRed == 0xF800 && mskGreen == 0x7E0 && mskBlue== 0x1F); } + bool ISMODE3() { return (mskRed == 0xF800 && mskGreen == 0x7C0 && mskBlue== 0x3E); } + bool ISMODE4() { return (mskBlue == 0xF800 && mskGreen == 0x7E0 && mskRed== 0x1F); } +}; + +} // End of namespace Tony + +#endif /* TONY_WINDOW_H */ -- cgit v1.2.3 From a2982a0b20027f658c9b47266a8ddbec74a15878 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 3 May 2012 22:49:30 +1000 Subject: TONY: Engine is now compiling and linking again --- engines/tony/window.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index d248ffb871..25aef5c619 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -50,15 +50,36 @@ #include "common/scummsys.h" #include "common/rect.h" +#include "tony/adv.h" namespace Tony { typedef uint32 HWND; +struct DDSURFACEDESC { +}; + +class RMSnapshot { +private: + // Buffer per la creazione dei path + static char bufDrive[_MAX_DRIVE], bufDir[_MAX_DIR], bufName[_MAX_FNAME], bufExt[_MAX_EXT]; + static char filename[512]; + + // Buffer per la conversione a RGB + static byte rgb[RM_SX * RM_SY * 3]; + +private: + bool GetFreeSnapName(char *fn); + +public: + // Prende uno screenshot + void GrabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL); +}; + class RMWindow { private: - bool Lock(/*DDSURFACEDESC& ddsd */); - void Unlock(/*DDSURFACEDESC& ddsd */); + bool Lock(DDSURFACEDESC &ddsd); + void Unlock(DDSURFACEDESC &ddsd); // Inizializza DirectDraw void DDInit(void); @@ -115,7 +136,7 @@ protected: void GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); // Avverte di grabbare un thumbnail per il salvataggio -// void GrabThumbnail(uint16 *buf); + void GrabThumbnail(uint16 *buf); operator HWND() { return m_hWnd; } -- cgit v1.2.3 From 557c43c2dbd6d830332be8c8b69c7660d53d665f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 4 May 2012 21:40:44 +1000 Subject: TONY: Converted anonymous structs to have explicit names --- engines/tony/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 25aef5c619..da8c5dc824 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -61,7 +61,7 @@ struct DDSURFACEDESC { class RMSnapshot { private: // Buffer per la creazione dei path - static char bufDrive[_MAX_DRIVE], bufDir[_MAX_DIR], bufName[_MAX_FNAME], bufExt[_MAX_EXT]; + static char bufDrive[MAX_DRIVE], bufDir[MAX_DIR], bufName[MAX_FNAME], bufExt[MAX_EXT]; static char filename[512]; // Buffer per la conversione a RGB -- cgit v1.2.3 From aa603d5a6719764e785e4bd096f16493f7ec7f6c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 5 May 2012 20:29:37 +1000 Subject: TONY: Fix a crash from objects being destroyed in the wrong order --- engines/tony/window.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index da8c5dc824..5949450e8f 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -121,8 +121,8 @@ protected: void WipeEffect(Common::Rect &rcBoundEllipse); public: - RMWindow() { m_Primary = NULL; m_Back = NULL; }; - ~RMWindow() { Close(); } + RMWindow(); + ~RMWindow(); // Inizializzazione void Init(/*HINSTANCE hInst*/); -- cgit v1.2.3 From 07c1369f98009a2d9f8b49a9f68ace7354469cba Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 5 May 2012 20:54:21 +1000 Subject: TONY: Created dummy event loop and started work on converting RMWindow class --- engines/tony/window.h | 67 ++++++++++++++++++--------------------------------- 1 file changed, 23 insertions(+), 44 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 5949450e8f..2edf409ad0 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -81,28 +81,7 @@ private: bool Lock(DDSURFACEDESC &ddsd); void Unlock(DDSURFACEDESC &ddsd); - // Inizializza DirectDraw - void DDInit(void); - - // Chiude DirectDraw - void DDClose(void); - - // Repaint grafico tramite DirectDraw - void Repaint(void); - - // Window Proc principale che richiama la WindowProc dentro la classe -// friend LRESULT CALLBACK GlobalWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); - - // Procedura di gestione messaggi -// LRESULT WindowProc(UINT msg, WPARAM wParam, LPARAM lParam); - protected: - HWND m_hWnd; - bool m_bFullscreen; - - void * /*LPDIRECTDRAW*/ m_DD; - void * /*LPDIRECTDRAWSURFACE*/ m_Primary; - void * /*LPDIRECTDRAWSURFACE*/ m_Back; void * /*LPDIRECTDRAWCLIPPER*/ m_MainClipper; void * /*LPDIRECTDRAWCLIPPER*/ m_BackClipper; @@ -117,37 +96,37 @@ protected: uint16 *m_wThumbBuf; void CreateBWPrecalcTable(void); - void UpdatePixelFormat(void); void WipeEffect(Common::Rect &rcBoundEllipse); - public: - RMWindow(); - ~RMWindow(); +public: + RMWindow(); + ~RMWindow(); - // Inizializzazione - void Init(/*HINSTANCE hInst*/); - void InitDirectDraw(void); - void Close(void); + // Inizializzazione + void Init(/*HINSTANCE hInst*/); + void InitDirectDraw(void); + void Close(void); - // Switch tra windowed e fullscreen - void SwitchFullscreen(bool bFull); + // Repaint grafico tramite DirectDraw + void Repaint(void); - // Legge il prossimo frame - void GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); + // Switch tra windowed e fullscreen + void SwitchFullscreen(bool bFull) {} - // Avverte di grabbare un thumbnail per il salvataggio - void GrabThumbnail(uint16 *buf); + // Legge il prossimo frame + void GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); - operator HWND() { return m_hWnd; } + // Avverte di grabbare un thumbnail per il salvataggio + void GrabThumbnail(uint16 *buf); - // Modi pixel format - // MODE1: 1555 - // MODE2: 5515 - // MODE3: 5551 - bool ISMODE1() { return (mskRed == 0x7C00 && mskGreen == 0x3E0 && mskBlue== 0x1F); } - bool ISMODE2() { return (mskRed == 0xF800 && mskGreen == 0x7E0 && mskBlue== 0x1F); } - bool ISMODE3() { return (mskRed == 0xF800 && mskGreen == 0x7C0 && mskBlue== 0x3E); } - bool ISMODE4() { return (mskBlue == 0xF800 && mskGreen == 0x7E0 && mskRed== 0x1F); } + // Modi pixel format + // MODE1: 1555 + // MODE2: 5515 + // MODE3: 5551 + bool ISMODE1() { return (mskRed == 0x7C00 && mskGreen == 0x3E0 && mskBlue== 0x1F); } + bool ISMODE2() { return (mskRed == 0xF800 && mskGreen == 0x7E0 && mskBlue== 0x1F); } + bool ISMODE3() { return (mskRed == 0xF800 && mskGreen == 0x7C0 && mskBlue== 0x3E); } + bool ISMODE4() { return (mskBlue == 0xF800 && mskGreen == 0x7E0 && mskRed== 0x1F); } }; } // End of namespace Tony -- cgit v1.2.3 From 5625846bf2a0015e212ea2f1d97543cbba81e0c7 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 5 May 2012 22:32:40 +1000 Subject: TONY: Further conversion work on window conversion --- engines/tony/window.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 2edf409ad0..5190fc4d16 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -78,8 +78,8 @@ public: class RMWindow { private: - bool Lock(DDSURFACEDESC &ddsd); - void Unlock(DDSURFACEDESC &ddsd); + bool Lock(); + void Unlock(); protected: void * /*LPDIRECTDRAWCLIPPER*/ m_MainClipper; @@ -119,14 +119,7 @@ public: // Avverte di grabbare un thumbnail per il salvataggio void GrabThumbnail(uint16 *buf); - // Modi pixel format - // MODE1: 1555 - // MODE2: 5515 - // MODE3: 5551 - bool ISMODE1() { return (mskRed == 0x7C00 && mskGreen == 0x3E0 && mskBlue== 0x1F); } - bool ISMODE2() { return (mskRed == 0xF800 && mskGreen == 0x7E0 && mskBlue== 0x1F); } - bool ISMODE3() { return (mskRed == 0xF800 && mskGreen == 0x7C0 && mskBlue== 0x3E); } - bool ISMODE4() { return (mskBlue == 0xF800 && mskGreen == 0x7E0 && mskRed== 0x1F); } + int getFps() const { return fps; } }; } // End of namespace Tony -- cgit v1.2.3 From 724deb6b84b8a5f5a3aa96adc2a512c962f7081a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 May 2012 08:44:50 +1000 Subject: TONY: Bugfixes for showing the credits screen. --- engines/tony/window.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 5190fc4d16..06f684a15b 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -97,6 +97,7 @@ protected: void CreateBWPrecalcTable(void); void WipeEffect(Common::Rect &rcBoundEllipse); + void GetNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse); public: RMWindow(); -- cgit v1.2.3 From 67c47e9045cab111ff9daadf9968553106f14bfe Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 May 2012 23:36:13 +1000 Subject: TONY: First attempt at simulating the circular fade in/out effect engine uses The engine uses DirectX drawing functionality to do drawing of partial frames within an ellipsis, so we need to replicate that manually in code. --- engines/tony/window.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 06f684a15b..56f48d7698 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -80,6 +80,8 @@ class RMWindow { private: bool Lock(); void Unlock(); + void plotSplices(const byte *lpBuf, const Common::Point ¢er, int x, int y); + void plotLines(const byte *lpBuf, const Common::Point ¢er, int x, int y); protected: void * /*LPDIRECTDRAWCLIPPER*/ m_MainClipper; -- cgit v1.2.3 From 099fe1e9e62ada666a312e08d7dca5cd2083de0b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 14 May 2012 07:43:50 +0200 Subject: TONY: Remove original header --- engines/tony/window.h | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 56f48d7698..ea26df3920 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -19,31 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -/************************************************************************** - * 様様様様様様様様様様様様様様様様様 * - * Nayma Software srl * - * e -= We create much MORE than ALL =- * - * u- z$$$c '. 様様様様様様様様様様様様様様様様様 * - * .d" d$$$$$b "b. * - * .z$* d$$$$$$$L ^*$c. * - * #$$$. $$$$$$$$$ .$$$" Project: Roasted Moths........ * - * ^*$b 4$$$$$$$$$F .d$*" * - * ^$$. 4$$$$$$$$$F .$P" Module: Window.HPP........... * - * *$. '$$$$$$$$$ 4$P 4 * - * J *$ "$$$$$$$" $P r Author: Giovanni Bajo........ * - * z$ '$$$P*4c.*$$$*.z@*R$$$ $. * - * z$" "" #$F^ "" '$c Desc: Classi per la gestione * - * z$$beu .ue=" $ "=e.. .zed$$c di una finestra Direct - * "#$e z$*" . `. ^*Nc e$"" Draw................. * - * "$$". .r" ^4. .^$$" ..................... * - * ^.@*"6L=\ebu^+C$"*b." * - * "**$. "c 4$$$ J" J$P*" OS: [ ] DOS [X] WIN95 [ ] PORT * - * ^"--.^ 9$" .--"" COMP: [ ] WATCOM [X] VISUAL C++ * - * " [ ] EIFFEL [ ] GCC/GXX/DJGPP * - * * - * This source code is Copyright (C) Nayma Software. ALL RIGHTS RESERVED * - * * - **************************************************************************/ + +/* + * This code is based on original Tony Tough source code + * + * Copyright (c) 1997-2003 Nayma Software + */ #ifndef TONY_WINDOW_H #define TONY_WINDOW_H @@ -60,18 +41,18 @@ struct DDSURFACEDESC { class RMSnapshot { private: - // Buffer per la creazione dei path + // Buffer used to create a path static char bufDrive[MAX_DRIVE], bufDir[MAX_DIR], bufName[MAX_FNAME], bufExt[MAX_EXT]; static char filename[512]; - // Buffer per la conversione a RGB + // Buffer used to convert a RGB static byte rgb[RM_SX * RM_SY * 3]; private: bool GetFreeSnapName(char *fn); public: - // Prende uno screenshot + // Take a screenshot void GrabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL); }; @@ -105,7 +86,7 @@ public: RMWindow(); ~RMWindow(); - // Inizializzazione + // Initialization void Init(/*HINSTANCE hInst*/); void InitDirectDraw(void); void Close(void); -- cgit v1.2.3 From 333c30b8c7f6781605f517f2a7150f78a77556fc Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 20 May 2012 11:37:33 +1000 Subject: TONY: Removed unused drive & folder defines and code --- engines/tony/window.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index ea26df3920..9483f693ab 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -41,16 +41,8 @@ struct DDSURFACEDESC { class RMSnapshot { private: - // Buffer used to create a path - static char bufDrive[MAX_DRIVE], bufDir[MAX_DIR], bufName[MAX_FNAME], bufExt[MAX_EXT]; - static char filename[512]; - - // Buffer used to convert a RGB + // Buffer used to convert to RGB static byte rgb[RM_SX * RM_SY * 3]; - -private: - bool GetFreeSnapName(char *fn); - public: // Take a screenshot void GrabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL); -- cgit v1.2.3 From 0450275c44c8c001d56cf37c78db6951ecaa4314 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 20 May 2012 13:54:59 +1000 Subject: TONY: Converting Italian comments to English and formatting --- engines/tony/window.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 9483f693ab..73cc6d2005 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -78,21 +78,21 @@ public: RMWindow(); ~RMWindow(); - // Initialization + // Initialisation void Init(/*HINSTANCE hInst*/); void InitDirectDraw(void); void Close(void); - // Repaint grafico tramite DirectDraw + // Drawing void Repaint(void); - // Switch tra windowed e fullscreen + // Switch between windowed and fullscreen void SwitchFullscreen(bool bFull) {} - // Legge il prossimo frame + // Reads the next frame void GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); - // Avverte di grabbare un thumbnail per il salvataggio + // Request a thumbnail be grabbed during the next frame void GrabThumbnail(uint16 *buf); int getFps() const { return fps; } -- cgit v1.2.3 From 94d3c8ebb29699a6c7a76c08986b984523761d63 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 21 May 2012 23:53:13 +0200 Subject: TONY: Some more code formatting --- engines/tony/window.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 73cc6d2005..0f614fca97 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -42,7 +42,7 @@ struct DDSURFACEDESC { class RMSnapshot { private: // Buffer used to convert to RGB - static byte rgb[RM_SX * RM_SY * 3]; + static byte rgb[RM_SX *RM_SY * 3]; public: // Take a screenshot void GrabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL); @@ -95,7 +95,9 @@ public: // Request a thumbnail be grabbed during the next frame void GrabThumbnail(uint16 *buf); - int getFps() const { return fps; } + int getFps() const { + return fps; + } }; } // End of namespace Tony -- cgit v1.2.3 From 23c95d7014ee9875bb1b55c696d0245d7f114ba8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 5 Jun 2012 08:39:55 +0200 Subject: TONY: Some more renaming --- engines/tony/window.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 0f614fca97..70e74eb54d 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -79,8 +79,8 @@ public: ~RMWindow(); // Initialisation - void Init(/*HINSTANCE hInst*/); - void InitDirectDraw(void); + void init(/*HINSTANCE hInst*/); + void initDirectDraw(void); void Close(void); // Drawing -- cgit v1.2.3 From f1ac5d5acdbc0349850377619d8056be22871b42 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 6 Jun 2012 08:04:33 +0200 Subject: TONY: More renaming --- engines/tony/window.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 70e74eb54d..3d1199482f 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -45,14 +45,14 @@ private: static byte rgb[RM_SX *RM_SY * 3]; public: // Take a screenshot - void GrabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL); + void grabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL); }; class RMWindow { private: - bool Lock(); - void Unlock(); + bool lock(); + void unlock(); void plotSplices(const byte *lpBuf, const Common::Point ¢er, int x, int y); void plotLines(const byte *lpBuf, const Common::Point ¢er, int x, int y); @@ -65,14 +65,14 @@ protected: int mskRed, mskGreen, mskBlue; - bool m_bGrabScreenshot; - bool m_bGrabThumbnail; - bool m_bGrabMovie; - uint16 *m_wThumbBuf; + bool _bGrabScreenshot; + bool _bGrabThumbnail; + bool _bGrabMovie; + uint16 *_wThumbBuf; - void CreateBWPrecalcTable(void); - void WipeEffect(Common::Rect &rcBoundEllipse); - void GetNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse); + void createBWPrecalcTable(void); + void wipeEffect(Common::Rect &rcBoundEllipse); + void getNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse); public: RMWindow(); @@ -81,19 +81,19 @@ public: // Initialisation void init(/*HINSTANCE hInst*/); void initDirectDraw(void); - void Close(void); + void close(void); // Drawing - void Repaint(void); + void repaint(void); // Switch between windowed and fullscreen - void SwitchFullscreen(bool bFull) {} + void switchFullscreen(bool bFull) {} // Reads the next frame - void GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); + void getNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); // Request a thumbnail be grabbed during the next frame - void GrabThumbnail(uint16 *buf); + void grabThumbnail(uint16 *buf); int getFps() const { return fps; -- cgit v1.2.3 From f12ab3e521b01ed2b40e7d517753dd14bc6e6f0f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 7 Jun 2012 08:42:35 +0200 Subject: TONY: Rename variables and functions in utils.h --- engines/tony/window.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 3d1199482f..34f0c1cb51 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -57,8 +57,8 @@ private: void plotLines(const byte *lpBuf, const Common::Point ¢er, int x, int y); protected: - void * /*LPDIRECTDRAWCLIPPER*/ m_MainClipper; - void * /*LPDIRECTDRAWCLIPPER*/ m_BackClipper; +// void * /*LPDIRECTDRAWCLIPPER*/ _MainClipper; +// void * /*LPDIRECTDRAWCLIPPER*/ _BackClipper; int fps, fcount; int lastsecond, lastfcount; -- cgit v1.2.3 From cdbc4aa28b5c47392369879b209f9635ff431195 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 16 Jun 2012 10:57:35 +1000 Subject: TONY: Initial commit of in progress dirty rect handling --- engines/tony/window.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 34f0c1cb51..6189dd391f 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -64,6 +64,7 @@ protected: int lastsecond, lastfcount; int mskRed, mskGreen, mskBlue; + bool _wiping; bool _bGrabScreenshot; bool _bGrabThumbnail; @@ -90,7 +91,7 @@ public: void switchFullscreen(bool bFull) {} // Reads the next frame - void getNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); + void getNewFrame(RMGfxTargetBuffer &lpBuf, Common::Rect *rcBoundEllipse); // Request a thumbnail be grabbed during the next frame void grabThumbnail(uint16 *buf); -- cgit v1.2.3 From a46b06a587cc0b5e5767b55ba0d56264a8078f0c Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 17 Jun 2012 19:39:58 +0200 Subject: TONY: Move functions comment to doxygen format --- engines/tony/window.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 34f0c1cb51..876bbf6973 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -44,7 +44,9 @@ private: // Buffer used to convert to RGB static byte rgb[RM_SX *RM_SY * 3]; public: - // Take a screenshot + /** + * Take a screenshot + */ void grabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL); }; @@ -78,21 +80,31 @@ public: RMWindow(); ~RMWindow(); - // Initialisation + /** + * Initialization + */ void init(/*HINSTANCE hInst*/); void initDirectDraw(void); void close(void); - // Drawing + /** + * Drawing + */ void repaint(void); - // Switch between windowed and fullscreen + /** + * Switch between windowed and fullscreen + */ void switchFullscreen(bool bFull) {} - // Reads the next frame + /** + * Reads the next frame + */ void getNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse); - // Request a thumbnail be grabbed during the next frame + /** + * Request a thumbnail be grabbed during the next frame + */ void grabThumbnail(uint16 *buf); int getFps() const { -- cgit v1.2.3 From e8a6f61f8815fcf36e7a43383695c74b8925993f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 18 Jun 2012 08:24:33 +0200 Subject: TONY: Remove useless void in function declaration --- engines/tony/window.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 876bbf6973..0d4c20b0fe 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -72,7 +72,7 @@ protected: bool _bGrabMovie; uint16 *_wThumbBuf; - void createBWPrecalcTable(void); + void createBWPrecalcTable(); void wipeEffect(Common::Rect &rcBoundEllipse); void getNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse); @@ -84,13 +84,13 @@ public: * Initialization */ void init(/*HINSTANCE hInst*/); - void initDirectDraw(void); - void close(void); + void initDirectDraw(); + void close(); /** * Drawing */ - void repaint(void); + void repaint(); /** * Switch between windowed and fullscreen -- cgit v1.2.3 From eef6b444df766b90d1323941c7ff9bd8355c111b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 22 Jun 2012 23:47:39 +1000 Subject: TONY: Created a debugger command 'dirty_rects' to show dirty rect areas on-screen --- engines/tony/window.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 6189dd391f..562e5fe062 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -57,14 +57,12 @@ private: void plotLines(const byte *lpBuf, const Common::Point ¢er, int x, int y); protected: -// void * /*LPDIRECTDRAWCLIPPER*/ _MainClipper; -// void * /*LPDIRECTDRAWCLIPPER*/ _BackClipper; - int fps, fcount; int lastsecond, lastfcount; int mskRed, mskGreen, mskBlue; bool _wiping; + bool _showDirtyRects; bool _bGrabScreenshot; bool _bGrabThumbnail; @@ -99,6 +97,7 @@ public: int getFps() const { return fps; } + void showDirtyRects(bool v) { _showDirtyRects = v; } }; } // End of namespace Tony -- cgit v1.2.3 From 65a8799f9653956cfced0b77e8c638be7c805824 Mon Sep 17 00:00:00 2001 From: Torbj旦rn Andersson Date: Sun, 24 Jun 2012 11:09:08 +0200 Subject: TONY: Added "sepia mode". This works by adding a wrapper function for copyRectToScreen(). As far as the engine is concerned, it still draws everything in color. The mouse cursors are still in color, but that can be fixed later. --- engines/tony/window.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 571a02829a..c72a3afd8e 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -70,8 +70,10 @@ protected: bool _bGrabThumbnail; bool _bGrabMovie; uint16 *_wThumbBuf; + uint16 *_precalcTable; void createBWPrecalcTable(); + void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); void wipeEffect(Common::Rect &rcBoundEllipse); void getNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse); -- cgit v1.2.3 From 58b03ec446737164782867aedc324cce3b491218 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 2 Jul 2012 20:53:31 +1000 Subject: TONY: Refactored the Sepia (B & W) mode so the cursor is converted as well --- engines/tony/window.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index c72a3afd8e..6528060f17 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -70,9 +70,7 @@ protected: bool _bGrabThumbnail; bool _bGrabMovie; uint16 *_wThumbBuf; - uint16 *_precalcTable; - void createBWPrecalcTable(); void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); void wipeEffect(Common::Rect &rcBoundEllipse); void getNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse); -- cgit v1.2.3 From addca5d8567717bec3015f7fd0d99a707f96288a Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 27 Aug 2012 06:51:29 +0200 Subject: TONY: _rgb buffer is no longer static --- engines/tony/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 6528060f17..25ec349196 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -42,7 +42,7 @@ struct DDSURFACEDESC { class RMSnapshot { private: // Buffer used to convert to RGB - static byte rgb[RM_SX *RM_SY * 3]; + byte _rgb[RM_SX *RM_SY * 3]; public: /** * Take a screenshot -- cgit v1.2.3 From 7b4dd0a682bf79cc86024d77d16411a6e2681f47 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Mon, 27 Aug 2012 12:39:58 +0200 Subject: TONY: Remove various bits of unused code. --- engines/tony/window.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 25ec349196..4dfd63a3d8 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -53,8 +53,6 @@ public: class RMWindow { private: - bool lock(); - void unlock(); void plotSplices(const byte *lpBuf, const Common::Point ¢er, int x, int y); void plotLines(const byte *lpBuf, const Common::Point ¢er, int x, int y); @@ -83,7 +81,6 @@ public: * Initialization */ void init(/*HINSTANCE hInst*/); - void initDirectDraw(); void close(); /** @@ -91,11 +88,6 @@ public: */ void repaint(); - /** - * Switch between windowed and fullscreen - */ - void switchFullscreen(bool bFull) {} - /** * Reads the next frame */ -- cgit v1.2.3 From 28681a32eeaeba6029d6040da89bd810a0dd2b35 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Mon, 27 Aug 2012 23:41:23 +0200 Subject: TONY: Remove more unused bits. --- engines/tony/window.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 4dfd63a3d8..9aaca16d3e 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -35,10 +35,6 @@ namespace Tony { -typedef uint32 HWND; -struct DDSURFACEDESC { -}; - class RMSnapshot { private: // Buffer used to convert to RGB @@ -57,10 +53,6 @@ private: void plotLines(const byte *lpBuf, const Common::Point ¢er, int x, int y); protected: - int fps, fcount; - int lastsecond, lastfcount; - - int mskRed, mskGreen, mskBlue; bool _wiping; bool _showDirtyRects; @@ -98,9 +90,6 @@ public: */ void grabThumbnail(uint16 *buf); - int getFps() const { - return fps; - } void showDirtyRects(bool v) { _showDirtyRects = v; } }; -- cgit v1.2.3 From 825e0896dc52c26e7e31447a434619e190e5c183 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 29 Aug 2012 23:25:14 +0200 Subject: TONY: Replace C-style comments by C++-style ones. Also translate some more Italian comments --- engines/tony/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index 9aaca16d3e..c4cbcb6643 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -72,7 +72,7 @@ public: /** * Initialization */ - void init(/*HINSTANCE hInst*/); + void init(); void close(); /** -- cgit v1.2.3 From 3ab8ebc4f72e54a5ffcabaa22d3cf8e250062457 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 1 Sep 2012 02:27:31 +0200 Subject: TONY: Move some more code from .h to .cpp files --- engines/tony/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index c4cbcb6643..b2732a3f0c 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -90,7 +90,7 @@ public: */ void grabThumbnail(uint16 *buf); - void showDirtyRects(bool v) { _showDirtyRects = v; } + void showDirtyRects(bool v); }; } // End of namespace Tony -- cgit v1.2.3 From 1f41e5573175fb712e829a9c72b3e4f75afa8fdf Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 1 Sep 2012 02:36:54 +0200 Subject: TONY: Remove adv.h --- engines/tony/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony/window.h') diff --git a/engines/tony/window.h b/engines/tony/window.h index b2732a3f0c..2e8769707f 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -31,7 +31,7 @@ #include "common/scummsys.h" #include "common/rect.h" -#include "tony/adv.h" +#include "tony/game.h" namespace Tony { -- cgit v1.2.3