aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-20 17:29:58 -0400
committerPaul Gilbert2016-03-20 17:29:58 -0400
commitfbc46ed5b41633c1a8dc6e54591fe4dd028dbc04 (patch)
tree178ffb34b6e2e99042fcf8e4cddc9faec4c9a355
parent6ebb0312ffa87316e816c4ebc31e17564450d48e (diff)
downloadscummvm-rg350-fbc46ed5b41633c1a8dc6e54591fe4dd028dbc04.tar.gz
scummvm-rg350-fbc46ed5b41633c1a8dc6e54591fe4dd028dbc04.tar.bz2
scummvm-rg350-fbc46ed5b41633c1a8dc6e54591fe4dd028dbc04.zip
TITANIC: Starting on frame rendering
-rw-r--r--engines/titanic/game_view.cpp11
-rw-r--r--engines/titanic/game_view.h2
-rw-r--r--engines/titanic/main_game_window.cpp26
-rw-r--r--engines/titanic/main_game_window.h9
-rw-r--r--engines/titanic/pet_control/pet_control.cpp4
-rw-r--r--engines/titanic/pet_control/pet_control.h2
-rw-r--r--engines/titanic/screen_manager.cpp5
-rw-r--r--engines/titanic/screen_manager.h23
8 files changed, 76 insertions, 6 deletions
diff --git a/engines/titanic/game_view.cpp b/engines/titanic/game_view.cpp
index d04c3e1cfc..88ad095f7b 100644
--- a/engines/titanic/game_view.cpp
+++ b/engines/titanic/game_view.cpp
@@ -57,6 +57,17 @@ void CGameView::createSurface(const CResourceKey &key) {
_surface->_field3C = true;
}
+void CGameView::draw1() {
+ CScreenManager::setCurrent();
+ Common::Rect rect1 = _gameManager->_bounds;
+ Common::Rect rect2(0, 0, 600, 340);
+ rect2.translate(20, 10);
+
+
+
+ warning("TODO: CGameView_Draw1");
+}
+
/*------------------------------------------------------------------------*/
CSTGameView::CSTGameView(CMainGameWindow *gameWindow) :
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 {
diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp
index 6a6a46ea65..c282787ade 100644
--- a/engines/titanic/main_game_window.cpp
+++ b/engines/titanic/main_game_window.cpp
@@ -25,6 +25,7 @@
#include "titanic/game_manager.h"
#include "titanic/game_view.h"
#include "titanic/messages/messages.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
@@ -125,8 +126,12 @@ void CMainGameWindow::draw() {
case GSMODE_1:
case GSMODE_2:
if (_gameManager->_gameState._field18)
- warning("TODO: Field18_fn1(this)");
- warning("TODO: Stuff");
+ drawPet(scrManager);
+
+ draw1();
+ draw2(scrManager);
+ scrManager->drawCursors();
+ break;
case GSMODE_5:
g_vm->_filesManager.debug(scrManager);
@@ -138,6 +143,23 @@ void CMainGameWindow::draw() {
}
}
+void CMainGameWindow::drawPet(CScreenManager *screenManager) {
+ if (_gameView && _gameView->_surface) {
+ CPetControl *petControl = _gameManager->_project->getPetControl();
+ if (petControl)
+ petControl->proc26();
+ }
+}
+
+void CMainGameWindow::draw1() {
+ if (_gameView->_surface)
+ _gameView->draw1();
+}
+
+void CMainGameWindow::draw2(CScreenManager *screenManager) {
+
+}
+
void CMainGameWindow::mouseChanged() {
if (_gameManager->_gameState._mode != GSMODE_5)
_gameManager->update();
diff --git a/engines/titanic/main_game_window.h b/engines/titanic/main_game_window.h
index 8f6fb81228..549637b5dd 100644
--- a/engines/titanic/main_game_window.h
+++ b/engines/titanic/main_game_window.h
@@ -49,6 +49,15 @@ private:
* to use
*/
int selectSavegame();
+
+ /**
+ * Used for drawing the PET fullscreen? maybe
+ */
+ void drawPet(CScreenManager *screenManager);
+
+ void draw1();
+
+ void draw2(CScreenManager *screenManager);
public:
CGameView *_gameView;
CGameManager *_gameManager;
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index f5498887e3..5886ce4169 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -80,6 +80,10 @@ void CPetControl::saveSubObjects(SimpleFile *file, int indent) const {
_sub8.save(file, indent);
}
+void CPetControl::proc26() {
+ warning("TODO: CPetControl::proc26");
+}
+
void CPetControl::postLoad() {
warning("TODO: CPetControl::postLoad");
}
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index f1e4bb2a10..df529aed6a 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -78,6 +78,8 @@ public:
*/
virtual void load(SimpleFile *file);
+ virtual void proc26();
+
/**
* Called after loading a game has finished
*/
diff --git a/engines/titanic/screen_manager.cpp b/engines/titanic/screen_manager.cpp
index fe15d9aec0..f87ad66b9a 100644
--- a/engines/titanic/screen_manager.cpp
+++ b/engines/titanic/screen_manager.cpp
@@ -105,7 +105,10 @@ void OSScreenManager::setMode(int width, int height, int bpp, uint numBackSurfac
loadCursors();
}
-void OSScreenManager::proc5() {}
+void OSScreenManager::drawCursors() {
+ warning("OSScreenManager::drawCursors");
+}
+
void OSScreenManager::proc6() {}
void OSScreenManager::proc7() {}
diff --git a/engines/titanic/screen_manager.h b/engines/titanic/screen_manager.h
index a5fa562bc8..8fe51c57b0 100644
--- a/engines/titanic/screen_manager.h
+++ b/engines/titanic/screen_manager.h
@@ -68,8 +68,17 @@ public:
virtual void setWindowHandle(int v);
virtual bool resetWindowHandle(int v);
+
+ /**
+ * Sets the video mode
+ */
virtual void setMode(int width, int height, int bpp, uint numBackSurfaces, bool flag2) = 0;
- virtual void proc5() = 0;
+
+ /**
+ * Handles drawing the cursors
+ */
+ virtual void drawCursors() = 0;
+
virtual void proc6() = 0;
virtual void proc7() = 0;
virtual CVideoSurface *getSurface(int surfaceNum) const = 0;
@@ -136,8 +145,16 @@ public:
OSScreenManager(TitanicEngine *vm);
virtual ~OSScreenManager();
- virtual void setMode(int width, int height, int bpp, uint numBackSurfaces, bool flag2);
- virtual void proc5();
+ /**
+ * Sets the video mode
+ */
+ virtual void setMode(int width, int height, int bpp, uint numBackSurfaces, bool flag2) = 0;
+
+ /**
+ * Handles drawing the cursors
+ */
+ virtual void drawCursors();
+
virtual void proc6();
virtual void proc7();
virtual CVideoSurface *getSurface(int surfaceNum) const;