diff options
author | Paul Gilbert | 2016-03-16 07:56:26 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-03-16 07:56:26 -0400 |
commit | eaead0c6aee10f1fdd347a723bd9b816f80abff6 (patch) | |
tree | 697a10d9ea3b8601d7a4f61d3c72add359f11a2e | |
parent | 6a26539abbf7951f4783935b336dcabfbf548055 (diff) | |
download | scummvm-rg350-eaead0c6aee10f1fdd347a723bd9b816f80abff6.tar.gz scummvm-rg350-eaead0c6aee10f1fdd347a723bd9b816f80abff6.tar.bz2 scummvm-rg350-eaead0c6aee10f1fdd347a723bd9b816f80abff6.zip |
TITANIC: Starting to implement game view loading
-rw-r--r-- | engines/titanic/core/resource_key.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/game_view.cpp | 3 | ||||
-rw-r--r-- | engines/titanic/game_view.h | 5 | ||||
-rw-r--r-- | engines/titanic/main_game_window.cpp | 3 |
4 files changed, 12 insertions, 4 deletions
diff --git a/engines/titanic/core/resource_key.cpp b/engines/titanic/core/resource_key.cpp index 685e026d23..4788f7a493 100644 --- a/engines/titanic/core/resource_key.cpp +++ b/engines/titanic/core/resource_key.cpp @@ -60,11 +60,10 @@ void CResourceKey::setValue(const CString &name) { CString CResourceKey::exists() { CString name = _key; - // Check for the resource being within an ST container file + // Check for a resource being specified within an ST container int idx = name.indexOf('#'); if (idx >= 0) { - CString str = name.left(idx); - name = name.mid(idx + 1); + name = name.left(idx); name += ".st"; } diff --git a/engines/titanic/game_view.cpp b/engines/titanic/game_view.cpp index a8b8a02530..a2905d148c 100644 --- a/engines/titanic/game_view.cpp +++ b/engines/titanic/game_view.cpp @@ -47,6 +47,9 @@ void CGameView::deleteView(int roomNumber, int nodeNumber, int viewNumber) { delete view; } +void CGameView::createSurface(const CResourceKey &key) { + +} /*------------------------------------------------------------------------*/ 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 { diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp index bf5ec6efd1..6bde296453 100644 --- a/engines/titanic/main_game_window.cpp +++ b/engines/titanic/main_game_window.cpp @@ -101,7 +101,8 @@ void CMainGameWindow::setActiveView(CViewItem *viewItem) { CResourceKey key; if (viewItem->getResourceKey(&key)) { - // TODO + // Create a surface based on the key + _gameView->createSurface(key); } } |