[Scummvm-cvs-logs] scummvm master -> b5498bc31462e9e055339447aaddd221c99ad7e3

sev- sev at scummvm.org
Wed Jan 15 14:40:23 CET 2014


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
659fe85716 FULLPIPE: Implement FullpipeEngine::openMap() and stub ModalMap class
f6ebae63cd FULLPIPE: More code to ModalMap
f3ca6b2626 FULLPIPE: Implement ModalMap::handleMessage()
db4c5eb2c0 FULLPIPE: Implement ModalMap::init()
4a79295379 FULLPIPE: Implement ModalMap::initMap()
b5498bc314 FULLPIPE: Implement ModalMap::getScenePicture()


Commit: 659fe857162d157f7076293360b85115fa8f40d8
    https://github.com/scummvm/scummvm/commit/659fe857162d157f7076293360b85115fa8f40d8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-15T05:39:29-08:00

Commit Message:
FULLPIPE: Implement FullpipeEngine::openMap() and stub ModalMap class

Changed paths:
    engines/fullpipe/modal.cpp
    engines/fullpipe/modal.h



diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 729b403..813820d 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -267,8 +267,62 @@ void ModalVideoPlayer::play(const char *filename) {
 	}
 }
 
+ModalMap::ModalMap() {
+	_mapScene = 0;
+	_pic = 0;
+	_isRunning = false;
+	_rect1 = g_fp->_sceneRect;
+	_x = g_fp->_currentScene->_x;
+	_y = g_fp->_currentScene->_y;
+	_flag = 0;
+	_mouseX = 0;
+	_mouseY = 0;
+	_field_38 = 0;
+	_field_3C = 0;
+	_field_40 = 12;
+	_rect2.top = 0;
+	_rect2.left = 0;
+	_rect2.bottom = 600;
+	_rect2.right = 800;
+}
+
+ModalMap::~ModalMap() {
+}
+
+bool ModalMap::init(int counterdiff) {
+	warning("STUB: ModalMap::init()");
+
+	return false;
+}
+
+void ModalMap::update() {
+	warning("STUB: ModalMap::update()");
+}
+
+bool ModalMap::handleMessage(ExCommand *cmd) {
+	warning("STUB: ModalMap::handleMessage()");
+
+	return true;
+}
+
+void ModalMap::initMap() {
+	warning("STUB: ModalMap::initMap()");
+}
+
+PictureObject *ModalMap::getScenePicture() {
+	warning("STUB: ModalMap::getScenePicture()");
+
+	return 0;
+}
+
 void FullpipeEngine::openMap() {
-	warning("STUB: FullpipeEngine::openMap()");
+	if (!_modalObject) {
+		ModalMap *map = new ModalMap;
+
+		_modalObject = map;
+
+		map->initMap();
+	}
 }
 
 void FullpipeEngine::openHelp() {
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index b57d1fb..f4f075b 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -25,6 +25,8 @@
 
 namespace Fullpipe {
 
+class Picture;
+
 class BaseModalObject {
  public:
 
@@ -75,6 +77,35 @@ public:
 	void play(const char *fname);
 };
 
+class ModalMap : public BaseModalObject {
+	Scene *_mapScene;
+	Picture *_pic;
+	bool _isRunning;
+	Common::Rect _rect1;
+	int _x;
+	int _y;
+	int _flag;
+	int _mouseX;
+	int _mouseY;
+	int _field_38;
+	int _field_3C;
+	int _field_40;
+	Common::Rect _rect2;
+
+ public:
+	ModalMap();
+	virtual ~ModalMap();
+
+	virtual bool pollEvent() { return true; }
+	virtual bool handleMessage(ExCommand *message);
+	virtual bool init(int counterdiff);
+	virtual void update();
+	virtual void saveload() {}
+
+	void initMap();
+	PictureObject *getScenePicture();
+};
+
 } // End of namespace Fullpipe
 
 #endif /* FULLPIPE_MODAL_H */


Commit: f6ebae63cd84a3ebb1a95865de11243743cd9871
    https://github.com/scummvm/scummvm/commit/f6ebae63cd84a3ebb1a95865de11243743cd9871
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-15T05:39:29-08:00

Commit Message:
FULLPIPE: More code to ModalMap

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/modal.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 00ae425..25f69b5 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -199,7 +199,6 @@ namespace Fullpipe {
 #define SC_38 2072
 #define SC_COMMON 321
 #define SC_DBGMENU 726
-#define SC_LDR 635
 #define SC_FINAL1 4999
 #define SC_FINAL2 5000
 #define SC_FINAL3 5001
@@ -207,6 +206,8 @@ namespace Fullpipe {
 #define SC_INTRO1 3896
 #define SC_INTRO2 3907
 #define SC_INV 858
+#define SC_LDR 635
+#define SC_MAP 5222
 #define SND_CMN_031 3516
 #define SND_CMN_060 4921
 #define SND_CMN_061 4922
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 813820d..a5b70f0 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -28,6 +28,8 @@
 #include "fullpipe/scenes.h"
 #include "fullpipe/gameloader.h"
 
+#include "fullpipe/constants.h"
+
 #include "graphics/palette.h"
 #include "video/avi_decoder.h"
 
@@ -287,6 +289,12 @@ ModalMap::ModalMap() {
 }
 
 ModalMap::~ModalMap() {
+	g_fp->_gameLoader->unloadScene(SC_MAP);
+
+	g_fp->_sceneRect = _rect1;
+
+	g_fp->_currentScene->_x = _x;
+	g_fp->_currentScene->_y = _y;
 }
 
 bool ModalMap::init(int counterdiff) {
@@ -296,7 +304,11 @@ bool ModalMap::init(int counterdiff) {
 }
 
 void ModalMap::update() {
-	warning("STUB: ModalMap::update()");
+	g_fp->_sceneRect = _rect2;
+
+	_mapScene->draw();
+
+	g_fp->drawArcadeOverlay(1);
 }
 
 bool ModalMap::handleMessage(ExCommand *cmd) {


Commit: f3ca6b2626501195bc6d4ec9babf324afdcb530d
    https://github.com/scummvm/scummvm/commit/f3ca6b2626501195bc6d4ec9babf324afdcb530d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-15T05:39:29-08:00

Commit Message:
FULLPIPE: Implement ModalMap::handleMessage()

Changed paths:
    engines/fullpipe/modal.cpp



diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index a5b70f0..c790ef2 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -312,7 +312,38 @@ void ModalMap::update() {
 }
 
 bool ModalMap::handleMessage(ExCommand *cmd) {
-	warning("STUB: ModalMap::handleMessage()");
+	if (cmd->_messageKind != 17)
+		return false;
+
+	switch (cmd->_messageNum) {
+	case 29:
+		_flag = 1;
+		_mouseX = g_fp->_mouseScreenPos.x;
+		_mouseY = g_fp->_mouseScreenPos.x;
+
+		_field_3C = _rect2.top;
+		_field_38 = _rect2.left;
+
+		break;
+
+	case 30:
+		_flag = 0;
+		break;
+
+	case 36:
+		if (cmd->_keyCode != 9 && cmd->_keyCode != 27 )
+			return false;
+
+		break;
+
+	case 107:
+		break;
+
+	default:
+		return false;
+	}
+
+	_isRunning = 0;
 
 	return true;
 }


Commit: db4c5eb2c0e13d7c4081674f3d3487ef5b9205a3
    https://github.com/scummvm/scummvm/commit/db4c5eb2c0e13d7c4081674f3d3487ef5b9205a3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-15T05:39:29-08:00

Commit Message:
FULLPIPE: Implement ModalMap::init()

Changed paths:
    engines/fullpipe/modal.cpp
    engines/fullpipe/modal.h



diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index c790ef2..cf4a937 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -298,9 +298,31 @@ ModalMap::~ModalMap() {
 }
 
 bool ModalMap::init(int counterdiff) {
-	warning("STUB: ModalMap::init()");
+	g_fp->setCursor(PIC_CSR_ITN);
 
-	return false;
+	if (_flag) {
+		_rect2.left = _mouseX + _field_38 - g_fp->_mouseScreenPos.x;
+		_rect2.top = _mouseY + _field_3C - g_fp->_mouseScreenPos.y;;
+		_rect2.right = _rect2.left + 800;
+		_rect2.bottom = _rect2.top + 600;
+
+		g_fp->_sceneRect =_rect2;
+
+		_mapScene->updateScrolling2();
+
+		_rect2 = g_fp->_sceneRect;
+	}
+
+	_field_40--;
+
+	if (_field_40 <= 0) {
+		_field_40 = 12;
+
+		if (_pic)
+			_pic->_flags ^= 4;
+	}
+
+	return _isRunning;
 }
 
 void ModalMap::update() {
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index f4f075b..af52e1b 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -25,7 +25,7 @@
 
 namespace Fullpipe {
 
-class Picture;
+class PictureObject;
 
 class BaseModalObject {
  public:
@@ -79,7 +79,7 @@ public:
 
 class ModalMap : public BaseModalObject {
 	Scene *_mapScene;
-	Picture *_pic;
+	PictureObject *_pic;
 	bool _isRunning;
 	Common::Rect _rect1;
 	int _x;


Commit: 4a792953796819d37ce86320a407ea86dca584dc
    https://github.com/scummvm/scummvm/commit/4a792953796819d37ce86320a407ea86dca584dc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-15T05:39:29-08:00

Commit Message:
FULLPIPE: Implement ModalMap::initMap()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/modal.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 25f69b5..1a6ecbb 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -100,6 +100,8 @@ namespace Fullpipe {
 #define PIC_MAP_A12 5274
 #define PIC_MAP_A13 5275
 #define PIC_MAP_A14 5276
+#define PIC_MAP_I01 5295
+#define PIC_MAP_I02 5296
 #define PIC_MAP_P01 5277
 #define PIC_MAP_P02 5278
 #define PIC_MAP_P03 5279
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index cf4a937..4806f23 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -371,7 +371,56 @@ bool ModalMap::handleMessage(ExCommand *cmd) {
 }
 
 void ModalMap::initMap() {
-	warning("STUB: ModalMap::initMap()");
+	_isRunning = 1;
+
+	_mapScene = g_fp->accessScene(SC_MAP);
+
+	if (!_mapScene)
+		error("ModalMap::initMap(): error accessing scene SC_MAP");
+
+	PictureObject *pic;
+
+	for (int i = 0; i < 200; i++) {
+		if (!g_fp->_mapTable[i] >> 16)
+			break;
+
+		pic = _mapScene->getPictureObjectById(g_fp->_mapTable[i] >> 16, 0);
+
+		if ((g_fp->_mapTable[i] & 0xffff) == 1)
+			pic->_flags |= 4;
+		else
+			pic->_flags &= 0xfffb;
+	}
+
+	pic = getScenePicture();
+
+	Common::Point point;
+	Common::Point point2;
+
+	if (pic) {
+		pic->getDimensions(&point);
+
+		_rect2.left = point.x / 2 + pic->_ox - 400;
+		_rect2.top = point.y / 2 + pic->_oy - 300;
+		_rect2.right = _rect2.left + 800;
+		_rect2.bottom = _rect2.top + 600;
+
+		_mapScene->updateScrolling2();
+
+		_pic = _mapScene->getPictureObjectById(PIC_MAP_I02, 0);
+		_pic->getDimensions(&point2);
+
+		_pic->setOXY(pic->_ox + point.x / 2 - point2.x / 2, point.y - point2.y / 2 + pic->_oy - 24);
+		_pic->_flags |= 4;
+
+		_pic = _mapScene->getPictureObjectById(PIC_MAP_I01, 0);
+		_pic->getDimensions(&point2);
+
+		_pic->setOXY(pic->_ox + point.x / 2 - point2.x / 2, point.y - point2.y / 2 + pic->_oy - 25);
+		_pic->_flags |= 4;
+	}
+
+	g_fp->setArcadeOverlay(PIC_CSR_MAP);
 }
 
 PictureObject *ModalMap::getScenePicture() {


Commit: b5498bc31462e9e055339447aaddd221c99ad7e3
    https://github.com/scummvm/scummvm/commit/b5498bc31462e9e055339447aaddd221c99ad7e3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-15T05:39:29-08:00

Commit Message:
FULLPIPE: Implement ModalMap::getScenePicture()

Changed paths:
    engines/fullpipe/modal.cpp



diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 4806f23..ddb5b63 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -424,9 +424,130 @@ void ModalMap::initMap() {
 }
 
 PictureObject *ModalMap::getScenePicture() {
-	warning("STUB: ModalMap::getScenePicture()");
+	int picId = 0;
+
+	switch (g_fp->_currentScene->_sceneId) {
+	case SC_1:
+        picId = PIC_MAP_S01;
+        break;
+	case SC_2:
+        picId = PIC_MAP_S02;
+        break;
+	case SC_3:
+        picId = PIC_MAP_S03;
+        break;
+	case SC_4:
+        picId = PIC_MAP_S04;
+        break;
+	case SC_5:
+        picId = PIC_MAP_S05;
+        break;
+	case SC_6:
+		picId = PIC_MAP_S06;
+		break;
+	case SC_7:
+		picId = PIC_MAP_S07;
+		break;
+	case SC_8:
+		picId = PIC_MAP_S08;
+		break;
+	case SC_9:
+		picId = PIC_MAP_S09;
+		break;
+	case SC_10:
+		picId = PIC_MAP_S10;
+		break;
+	case SC_11:
+		picId = PIC_MAP_S11;
+		break;
+	case SC_12:
+		picId = PIC_MAP_S12;
+		break;
+	case SC_13:
+		picId = PIC_MAP_S13;
+		break;
+	case SC_14:
+		picId = PIC_MAP_S14;
+		break;
+	case SC_15:
+		picId = PIC_MAP_S15;
+		break;
+	case SC_16:
+		picId = PIC_MAP_S16;
+		break;
+	case SC_17:
+		picId = PIC_MAP_S17;
+		break;
+	case SC_18:
+	case SC_19:
+		picId = PIC_MAP_S1819;
+		break;
+	case SC_20:
+		picId = PIC_MAP_S20;
+		break;
+	case SC_21:
+        picId = PIC_MAP_S21;
+		break;
+	case SC_22:
+		picId = PIC_MAP_S22;
+		break;
+	case SC_23:
+		picId = PIC_MAP_S23_1;
+		break;
+	case SC_24:
+		picId = PIC_MAP_S24;
+		break;
+	case SC_25:
+		picId = PIC_MAP_S25;
+		break;
+	case SC_26:
+		picId = PIC_MAP_S26;
+		break;
+	case SC_27:
+		picId = PIC_MAP_S27;
+		break;
+	case SC_28:
+		picId = PIC_MAP_S28;
+		break;
+	case SC_29:
+		picId = PIC_MAP_S29;
+		break;
+	case SC_30:
+		picId = PIC_MAP_S30;
+		break;
+	case SC_31:
+		picId = PIC_MAP_S31_1;
+		break;
+	case SC_32:
+		picId = PIC_MAP_S32_1;
+		break;
+	case SC_33:
+		picId = PIC_MAP_S33;
+		break;
+	case SC_34:
+		picId = PIC_MAP_S34;
+		break;
+	case SC_35:
+		picId = PIC_MAP_S35;
+		break;
+	case SC_36:
+		picId = PIC_MAP_S36;
+		break;
+	case SC_37:
+		picId = PIC_MAP_S37;
+		break;
+	case SC_38:
+		picId = PIC_MAP_S38;
+		break;
+	case SC_FINAL1:
+		picId = PIC_MAP_S38;
+		break;
+	}
+
+	if (picId)
+		return _mapScene->getPictureObjectById(picId, 0);
 
-	return 0;
+	error("ModalMap::getScenePicture(): Unknown scene id: %d", g_fp->_currentScene->_sceneId);
 }
 
 void FullpipeEngine::openMap() {






More information about the Scummvm-git-logs mailing list