From 572fc8fc9ee65ec29c346f00cb34da482dda8d90 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 22 Feb 2016 20:43:14 -0500 Subject: TITANIC: Implemented bulk of applicationStarting --- engines/titanic/game_view.h | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 engines/titanic/game_view.h (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h new file mode 100644 index 0000000000..588cf938e3 --- /dev/null +++ b/engines/titanic/game_view.h @@ -0,0 +1,56 @@ +/* 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. + * + */ + +#ifndef TITANIC_GAME_VIEW_H +#define TITANIC_GAME_VIEW_H + +#include "common/scummsys.h" + +namespace Titanic { + +class CMainGameWindow; +class CGameManager; + +class CGameView { +protected: + CGameManager *_gameManager; + int _field8; + int _fieldC; +public: + CGameView(); + + /** + * Set the game manager + */ + void setGameManager(CGameManager *gameManager); +}; + +class CTitanicGameView: public CGameView { +private: + CMainGameWindow *_gameWindow; +public: + CTitanicGameView(CMainGameWindow *gameWindow); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_GAME_VIEW_H */ -- cgit v1.2.3 From bad72e2ae491cb99843f3af971725231e3defb2e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 12 Mar 2016 19:23:00 -0500 Subject: TITANIC: Implement various post-load methods --- engines/titanic/game_view.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index 588cf938e3..5a2c04a9c8 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -24,6 +24,7 @@ #define TITANIC_GAME_VIEW_H #include "common/scummsys.h" +#include "titanic/core/view_item.h" namespace Titanic { @@ -34,7 +35,8 @@ class CGameView { protected: CGameManager *_gameManager; int _field8; - int _fieldC; +public: + void *_fieldC; public: CGameView(); @@ -42,13 +44,26 @@ public: * Set the game manager */ void setGameManager(CGameManager *gameManager); + + /** + * Called after loading a game has finished + */ + void postLoad(); + + virtual void deleteView(int roomNumber, int nodeNumber, int viewNumber); + + virtual void proc3(int v) = 0; + virtual void proc4() = 0; }; -class CTitanicGameView: public CGameView { +class CSTGameView: public CGameView { private: CMainGameWindow *_gameWindow; public: - CTitanicGameView(CMainGameWindow *gameWindow); + CSTGameView(CMainGameWindow *gameWindow); + + virtual void proc3(int v); + virtual void proc4(); }; } // End of namespace Titanic -- cgit v1.2.3 From c92bf22f0331fbdbc7e440b43ae1973b679befb3 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 13 Mar 2016 15:07:27 -0400 Subject: TITANIC: Changed CGameStateSub to CGameLocation, properly implemented it --- engines/titanic/game_view.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index 5a2c04a9c8..2e4f700ad5 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -52,7 +52,11 @@ public: virtual void deleteView(int roomNumber, int nodeNumber, int viewNumber); - virtual void proc3(int v) = 0; + /** + * Set the currently active view + */ + virtual void setView(CViewItem *item) = 0; + virtual void proc4() = 0; }; @@ -62,7 +66,11 @@ private: public: CSTGameView(CMainGameWindow *gameWindow); - virtual void proc3(int v); + /** + * Set the currently active view + */ + virtual void setView(CViewItem *item); + virtual void proc4(); }; -- cgit v1.2.3 From eaead0c6aee10f1fdd347a723bd9b816f80abff6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 16 Mar 2016 07:56:26 -0400 Subject: TITANIC: Starting to implement game view loading --- engines/titanic/game_view.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index 2e4f700ad5..bf406b5acc 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -58,6 +58,11 @@ public: virtual void setView(CViewItem *item) = 0; virtual void proc4() = 0; + + /** + * Creates a surface from a specified resource + */ + void createSurface(const CResourceKey &key); }; class CSTGameView: public CGameView { -- cgit v1.2.3 From 8ec499c177d88e11930b8550c47c352d65dc603a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 16 Mar 2016 19:05:16 -0400 Subject: TITANIC: Implementing setActiveView, surface clearing --- engines/titanic/game_view.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index bf406b5acc..9ede9d6c36 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -25,6 +25,7 @@ #include "common/scummsys.h" #include "titanic/core/view_item.h" +#include "titanic/video_surface.h" namespace Titanic { @@ -34,9 +35,8 @@ class CGameManager; class CGameView { protected: CGameManager *_gameManager; - int _field8; public: - void *_fieldC; + CVideoSurface *_surface; public: CGameView(); -- cgit v1.2.3 From c6b239bdac7c193bc4d0fe8cfc6fbb610d1ca1ca Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 19 Mar 2016 22:43:02 -0400 Subject: TITANIC: Implemented CGameManager::update --- engines/titanic/game_view.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index 9ede9d6c36..be4d934a33 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -57,7 +57,7 @@ public: */ virtual void setView(CViewItem *item) = 0; - virtual void proc4() = 0; + virtual void proc4(const Common::Rect &bounds) = 0; /** * Creates a surface from a specified resource @@ -76,7 +76,7 @@ public: */ virtual void setView(CViewItem *item); - virtual void proc4(); + virtual void proc4(const Common::Rect &bounds); }; } // End of namespace Titanic -- cgit v1.2.3 From ea54e6244e75c609e6886ba210f80fb22c479d3f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 20 Mar 2016 00:01:40 -0400 Subject: TITANIC: Fixes/renames for files manager --- engines/titanic/game_view.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index be4d934a33..a3e1fe7720 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -57,7 +57,7 @@ public: */ virtual void setView(CViewItem *item) = 0; - virtual void proc4(const Common::Rect &bounds) = 0; + virtual void draw(const Common::Rect &bounds) = 0; /** * Creates a surface from a specified resource @@ -76,7 +76,10 @@ public: */ virtual void setView(CViewItem *item); - virtual void proc4(const Common::Rect &bounds); + /** + * Handles drawing the view + */ + virtual void draw(const Common::Rect &bounds); }; } // End of namespace Titanic -- cgit v1.2.3 From fbc46ed5b41633c1a8dc6e54591fe4dd028dbc04 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 20 Mar 2016 17:29:58 -0400 Subject: TITANIC: Starting on frame rendering --- engines/titanic/game_view.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index a3e1fe7720..14412032dc 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -63,6 +63,8 @@ public: * Creates a surface from a specified resource */ void createSurface(const CResourceKey &key); + + void draw1(); }; class CSTGameView: public CGameView { -- cgit v1.2.3 From 217360d0c5a0b8289c16b22fc46782c475fcc9f5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 21 Mar 2016 20:53:49 -0400 Subject: TITANIC: Add new derived Rect and Point classes --- engines/titanic/game_view.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index 14412032dc..c1d1a001d3 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -57,14 +57,17 @@ public: */ virtual void setView(CViewItem *item) = 0; - virtual void draw(const Common::Rect &bounds) = 0; + virtual void draw(const Rect &bounds) = 0; /** * Creates a surface from a specified resource */ void createSurface(const CResourceKey &key); - void draw1(); + /** + * Draws the background of a view + */ + void drawView(); }; class CSTGameView: public CGameView { @@ -81,7 +84,7 @@ public: /** * Handles drawing the view */ - virtual void draw(const Common::Rect &bounds); + virtual void draw(const Rect &bounds); }; } // End of namespace Titanic -- cgit v1.2.3 From 1efbed540948edcbf3ac2c72c0984def044274cf Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 3 Apr 2016 16:16:35 -0400 Subject: TITANIC: Move most of the root classes into new support/ folder --- engines/titanic/game_view.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index c1d1a001d3..0bba5cfa86 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -25,7 +25,7 @@ #include "common/scummsys.h" #include "titanic/core/view_item.h" -#include "titanic/video_surface.h" +#include "titanic/support/video_surface.h" namespace Titanic { -- cgit v1.2.3 From ebb60288716bc4876183989d04d7bb2208b9fceb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 4 Jun 2016 15:32:45 -0400 Subject: TITANIC: gcc compilation fixes --- engines/titanic/game_view.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/titanic/game_view.h') diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index 0bba5cfa86..74ab207d36 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -39,6 +39,7 @@ public: CVideoSurface *_surface; public: CGameView(); + virtual ~CGameView() {} /** * Set the game manager -- cgit v1.2.3