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

Strangerke arnaud.boutonne at gmail.com
Wed May 25 23:42:30 CEST 2011


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

Summary:
472d45aa2b TSAGE: Add a couple of comments
bb4df3f115 HUGO: Add listscreens() and gotoscreen() to console
65a9ef7639 HUGO: Cosmetic modification, for consistency
be3306a9eb TSAGE: Cosmetic modification, for consistency
fe41da83ad HUGO: Add boundaries() to the console. God mode no longer shows boundaries, as in the original
dceaa08e69 TSAGE: Add scene description in scene groups 8 and 10
c6ef39dcf2 HUGO: Add 3 object related functions to the console


Commit: 472d45aa2b726d05c66299cbe93c515dca79a037
    https://github.com/scummvm/scummvm/commit/472d45aa2b726d05c66299cbe93c515dca79a037
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-05-25T14:38:39-07:00

Commit Message:
TSAGE: Add a couple of comments

Changed paths:
    engines/tsage/ringworld_scenes3.cpp



diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp
index 53b02a7..8a1e103 100644
--- a/engines/tsage/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld_scenes3.cpp
@@ -5594,6 +5594,7 @@ void Scene2320::Hotspot8::doAction(int action) {
 }
 
 void Scene2320::Hotspot10::doAction(int action) {
+	// Seeker
 	Scene2320 *scene = (Scene2320 *)_globals->_sceneManager._scene;
 
 	switch (action) {
@@ -5687,6 +5688,7 @@ void Scene2320::Hotspot12::doAction(int action) {
 }
 
 void Scene2320::Hotspot14::doAction(int action) {
+	// Right Console
 	Scene2320 *scene = (Scene2320 *)_globals->_sceneManager._scene;
 
 	switch (action) {


Commit: bb4df3f115634ba2f719a4ef342879fc73aef246
    https://github.com/scummvm/scummvm/commit/bb4df3f115634ba2f719a4ef342879fc73aef246
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-05-25T14:38:47-07:00

Commit Message:
HUGO: Add listscreens() and gotoscreen() to console

Changed paths:
    engines/hugo/console.cpp
    engines/hugo/console.h



diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 3d7449e..0afd991 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -22,13 +22,61 @@
 
 #include "hugo/console.h"
 #include "hugo/hugo.h"
+#include "hugo/schedule.h"
+#include "hugo/text.h"
 
 namespace Hugo {
 
 HugoConsole::HugoConsole(HugoEngine *vm) : GUI::Debugger(), _vm(vm) {
+	DCmd_Register("listscreens", WRAP_METHOD(HugoConsole, Cmd_listScreens));
+	DCmd_Register("gotoscreen",  WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
 }
 
 HugoConsole::~HugoConsole() {
 }
 
+static int strToInt(const char *s) {
+	if (!*s)
+		// No string at all
+		return 0;
+	else if (toupper(s[strlen(s) - 1]) != 'H')
+		// Standard decimal string
+		return atoi(s);
+
+	// Hexadecimal string
+	uint tmp = 0;
+	int read = sscanf(s, "%xh", &tmp);
+	if (read < 1)
+		error("strToInt failed on string \"%s\"", s);
+	return (int)tmp;
+}
+
+/**
+ * This command loads up the specified screen number
+ */
+bool HugoConsole::Cmd_gotoScreen(int argc, const char **argv) {
+	if (argc != 2) {
+		DebugPrintf("Usage: %s <screen number>\n", argv[0]);
+		return true;
+	} else {
+		_vm->_scheduler->newScreen(strToInt(argv[1]));
+		return false;
+	}
+}
+
+/**
+ * This command lists all the screens available
+ */
+bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
+	if (argc != 1) {
+		DebugPrintf("Usage: %s\n", argv[0]);
+		return true;
+	}
+	
+	DebugPrintf("Available screens for this game are:\n");
+	for (int i = 0; i < _vm->_numScreens; i++)
+		DebugPrintf("%2d - %s\n", i, _vm->_text->getScreenNames(i));
+	return true;
+}
+
 } // End of namespace Hugo
diff --git a/engines/hugo/console.h b/engines/hugo/console.h
index 4743b79..1c715a0 100644
--- a/engines/hugo/console.h
+++ b/engines/hugo/console.h
@@ -36,6 +36,8 @@ public:
 
 private:
 	HugoEngine *_vm;
+	bool Cmd_listScreens(int argc, const char **argv);
+	bool Cmd_gotoScreen(int argc, const char **argv);
 };
 
 } // End of namespace Hugo


Commit: 65a9ef7639c65afa685b2805f52df567e044810b
    https://github.com/scummvm/scummvm/commit/65a9ef7639c65afa685b2805f52df567e044810b
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-05-25T14:38:55-07:00

Commit Message:
HUGO: Cosmetic modification, for consistency

Changed paths:
    engines/hugo/console.cpp



diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 0afd991..a6acb63 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -58,10 +58,10 @@ bool HugoConsole::Cmd_gotoScreen(int argc, const char **argv) {
 	if (argc != 2) {
 		DebugPrintf("Usage: %s <screen number>\n", argv[0]);
 		return true;
-	} else {
-		_vm->_scheduler->newScreen(strToInt(argv[1]));
-		return false;
-	}
+	} 
+	
+	_vm->_scheduler->newScreen(strToInt(argv[1]));
+	return false;
 }
 
 /**


Commit: be3306a9eb2bff80fc1f9bdc858ac4d759d926e4
    https://github.com/scummvm/scummvm/commit/be3306a9eb2bff80fc1f9bdc858ac4d759d926e4
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-05-25T14:39:03-07:00

Commit Message:
TSAGE: Cosmetic modification, for consistency

Changed paths:
    engines/tsage/debugger.cpp



diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index 42ae366..5288c98 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -63,13 +63,13 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) {
 	if (argc < 2) {
 		DebugPrintf("Usage: %s <scene number> [prior scene #]\n", argv[0]);
 		return true;
-	} else {
-		if (argc == 3)
-			_globals->_sceneManager._sceneNumber = strToInt(argv[2]);
+	} 
 
-		_globals->_sceneManager.changeScene(strToInt(argv[1]));
-		return false;
-	}
+	if (argc == 3)
+		_globals->_sceneManager._sceneNumber = strToInt(argv[2]);
+
+	_globals->_sceneManager.changeScene(strToInt(argv[1]));
+	return false;
 }
 
 /**
@@ -377,7 +377,8 @@ bool Debugger::Cmd_MoveObject(int argc, const char **argv) {
 		RING_INVENTORY._jar._sceneNumber = sceneNum;
 		break;
 	default:
-		DebugPrintf("Invlid object Id %s\n", argv[1]);
+		DebugPrintf("Invalid object Id %s\n", argv[1]);
+		break;
 	}
 
 	return true;


Commit: fe41da83ad8d59062f9188414cf4759d1d42f25a
    https://github.com/scummvm/scummvm/commit/fe41da83ad8d59062f9188414cf4759d1d42f25a
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-05-25T14:39:10-07:00

Commit Message:
HUGO: Add boundaries() to the console. God mode no longer shows boundaries, as in the original

Changed paths:
    engines/hugo/console.cpp
    engines/hugo/console.h
    engines/hugo/display.cpp
    engines/hugo/hugo.cpp
    engines/hugo/hugo.h



diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index a6acb63..5c7b5ce 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -30,6 +30,7 @@ namespace Hugo {
 HugoConsole::HugoConsole(HugoEngine *vm) : GUI::Debugger(), _vm(vm) {
 	DCmd_Register("listscreens", WRAP_METHOD(HugoConsole, Cmd_listScreens));
 	DCmd_Register("gotoscreen",  WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
+	DCmd_Register("Boundaries",  WRAP_METHOD(HugoConsole, Cmd_boundaries));
 }
 
 HugoConsole::~HugoConsole() {
@@ -79,4 +80,17 @@ bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
 	return true;
 }
 
+/**
+ * This command shows and hides boundaries
+ */
+bool HugoConsole::Cmd_boundaries(int argc, const char **argv) {
+	if (argc != 1) {
+		DebugPrintf("Usage: %s\n", argv[0]);
+		return true;
+	}
+
+	_vm->getGameStatus().showBoundariesFl = !_vm->getGameStatus().showBoundariesFl;
+	return false;
+}
+
 } // End of namespace Hugo
diff --git a/engines/hugo/console.h b/engines/hugo/console.h
index 1c715a0..150bc2e 100644
--- a/engines/hugo/console.h
+++ b/engines/hugo/console.h
@@ -38,6 +38,7 @@ private:
 	HugoEngine *_vm;
 	bool Cmd_listScreens(int argc, const char **argv);
 	bool Cmd_gotoScreen(int argc, const char **argv);
+	bool Cmd_boundaries(int argc, const char **argv);
 };
 
 } // End of namespace Hugo
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index c731b23..c716e80 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -644,13 +644,13 @@ bool Screen::isOverlapping(const rect_t *rectA, const rect_t *rectB) const {
 }
 
 /**
- * Display active boundaries in God Mode ('PPG')
+ * Display active boundaries (activated in the console)
  * Light Red   = Exit hotspots
  * Light Green = Visible objects
- * White       = Fixed objects, parts of background
+ * White       = Fix objects, parts of background
  */
 void Screen::drawBoundaries() {
-	if (!_vm->getGameStatus().godModeFl)
+	if (!_vm->getGameStatus().showBoundariesFl)
 		return;
 
 	_vm->_mouse->drawHotspots();
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 6a0eaac..abde0fb 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -527,15 +527,16 @@ void HugoEngine::initPlaylist(bool playlist[kMaxTunes]) {
  */
 void HugoEngine::initStatus() {
 	debugC(1, kDebugEngine, "initStatus");
-	_status.storyModeFl   = false;                  // Not in story mode
-	_status.gameOverFl    = false;                  // Hero not knobbled yet
-	_status.lookFl        = false;                  // Toolbar "look" button
-	_status.recallFl      = false;                  // Toolbar "recall" button
-	_status.newScreenFl   = false;                  // Screen not just loaded
-	_status.godModeFl     = false;                  // No special cheats allowed
-	_status.doQuitFl      = false;
-	_status.skipIntroFl   = false;
-	_status.helpFl        = false;
+	_status.storyModeFl      = false;               // Not in story mode
+	_status.gameOverFl       = false;               // Hero not knobbled yet
+	_status.lookFl           = false;               // Toolbar "look" button
+	_status.recallFl         = false;               // Toolbar "recall" button
+	_status.newScreenFl      = false;               // Screen not just loaded
+	_status.godModeFl        = false;               // No special cheats allowed
+	_status.showBoundariesFl = false;               // No special cheats allowed
+	_status.doQuitFl         = false;               // Boundaries hidden by default
+	_status.skipIntroFl      = false;
+	_status.helpFl           = false;
 
 	// Initialize every start of new game
 	_status.tick            = 0;                    // Tick count
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 61b002a..b5b8d5e 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -177,6 +177,8 @@ struct status_t {                                   // Game status (not saved)
 	bool     recallFl;                              // Toolbar "recall" button pressed
 	bool     newScreenFl;                           // New screen just loaded in dib_a
 	bool     godModeFl;                             // Allow DEBUG features in live version
+	bool     showBoundariesFl;                      // Flag used to show and hide boundaries, 
+	                                                // used by the console
 	bool     doQuitFl;
 	bool     skipIntroFl;
 	bool     helpFl;


Commit: dceaa08e69f820b4901cc5b690c1c63487e8063d
    https://github.com/scummvm/scummvm/commit/dceaa08e69f820b4901cc5b690c1c63487e8063d
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-05-25T14:39:19-07:00

Commit Message:
TSAGE: Add scene description in scene groups 8 and 10

Changed paths:
    engines/tsage/ringworld_scenes10.cpp
    engines/tsage/ringworld_scenes8.cpp



diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp
index f8844ec..0b41865 100644
--- a/engines/tsage/ringworld_scenes10.cpp
+++ b/engines/tsage/ringworld_scenes10.cpp
@@ -49,7 +49,7 @@ void Object9350::draw() {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9100
+ * Scene 9100 - Near beach: Slave washing clothes
  *
  *--------------------------------------------------------------------------*/
 void Scene9100::SceneHotspot1::doAction(int action) {
@@ -174,7 +174,7 @@ void Scene9100::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9150
+ * Scene 9150 - Castle: Outside the bulwarks
  *
  *--------------------------------------------------------------------------*/
 void Scene9150::Object3::signal() {
@@ -294,7 +294,7 @@ void Scene9150::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9200
+ * Scene 9200 - Castle: Near the fountain
  *
  *--------------------------------------------------------------------------*/
 void Scene9200::SceneHotspot1::doAction(int action) {
@@ -470,7 +470,7 @@ void Scene9200::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9300
+ * Scene 9300 - Castle: In front of a large guarded door
  *
  *--------------------------------------------------------------------------*/
 void Scene9300::signal() {
@@ -537,7 +537,7 @@ void Scene9300::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9350
+ * Scene 9350 - Castle: In a hallway
  *
  *--------------------------------------------------------------------------*/
 
@@ -623,7 +623,7 @@ void Scene9350::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9360
+ * Scene 9360 - Castle: In a hallway
  *
  *--------------------------------------------------------------------------*/
 
@@ -701,7 +701,7 @@ void Scene9360::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9400
+ * Scene 9400 - Castle: Black-Smith room
  *
  *--------------------------------------------------------------------------*/
 Scene9400::Scene9400() {
@@ -826,7 +826,7 @@ void Scene9400::synchronize(Serializer &s) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9450
+ * Scene 9450 - Castle: Dining room
  *
  *--------------------------------------------------------------------------*/
 void Scene9450::Object2::signal() {
@@ -1009,7 +1009,7 @@ void Scene9450::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9500
+ * Scene 9500 - Castle: Bedroom
  *
  *--------------------------------------------------------------------------*/
 void Scene9500::Hotspot1::doAction(int action) {
@@ -1230,7 +1230,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9700
+ * Scene 9700 - Castle: Balcony
  *
  *--------------------------------------------------------------------------*/
 void Scene9700::signal() {
@@ -1302,7 +1302,7 @@ void Scene9700::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9750
+ * Scene 9750 - Castle: In the garden
  *
  *--------------------------------------------------------------------------*/
 void Scene9750::signal() {
@@ -1338,7 +1338,7 @@ void Scene9750::postInit(SceneObjectList *OwnerList) {
 
 
 /*--------------------------------------------------------------------------
- * Scene 9850
+ * Scene 9850 - Castle: Dressing room
  *
  *--------------------------------------------------------------------------*/
 void Scene9850::Object6::doAction(int action) {
@@ -1642,7 +1642,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9900
+ * Scene 9900 - Ending
  *
  *--------------------------------------------------------------------------*/
 void Scene9900::strAction1::signal() {
@@ -1997,7 +1997,7 @@ void Scene9900::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 9999
+ * Scene 9999 - Space travel
  *
  *--------------------------------------------------------------------------*/
 
diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp
index 05306fb..8fa3582 100644
--- a/engines/tsage/ringworld_scenes8.cpp
+++ b/engines/tsage/ringworld_scenes8.cpp
@@ -43,7 +43,7 @@ void SceneObject7700::synchronize(Serializer &s) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 7000
+ * Scene 7000 - Landing near beach
  *
  *--------------------------------------------------------------------------*/
 
@@ -652,7 +652,7 @@ void Scene7000::signal() {
 
 
 /*--------------------------------------------------------------------------
- * Scene 7100
+ * Scene 7100 - Underwater: swimming
  *
  *--------------------------------------------------------------------------*/
 
@@ -1136,7 +1136,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
 	_globals->_soundHandler.startSound(270);
 }
 /*--------------------------------------------------------------------------
- * Scene 7200
+ * Scene 7200 - Underwater: Entering the cave
  *
  *--------------------------------------------------------------------------*/
 
@@ -1302,7 +1302,7 @@ void Scene7200::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 7300
+ * Scene 7300 - Underwater: Lord Poria
  *
  *--------------------------------------------------------------------------*/
 
@@ -1497,7 +1497,7 @@ void Scene7300::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 7600
+ * Scene 7600 - Floating Buildings: Outside
  *
  *--------------------------------------------------------------------------*/
 
@@ -1602,7 +1602,7 @@ void Scene7600::postInit(SceneObjectList *OwnerList) {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 7700
+ * Scene 7700 - Floating Buildings: In the lab
  *
  *--------------------------------------------------------------------------*/
 


Commit: c6ef39dcf20cecef3639d686fd188fc9c7118421
    https://github.com/scummvm/scummvm/commit/c6ef39dcf20cecef3639d686fd188fc9c7118421
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-05-25T14:39:28-07:00

Commit Message:
HUGO: Add 3 object related functions to the console

Changed paths:
    engines/hugo/console.cpp
    engines/hugo/console.h
    engines/hugo/parser.h



diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 5c7b5ce..0a67b5c 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -22,15 +22,20 @@
 
 #include "hugo/console.h"
 #include "hugo/hugo.h"
+#include "hugo/object.h"
+#include "hugo/parser.h"
 #include "hugo/schedule.h"
 #include "hugo/text.h"
 
 namespace Hugo {
 
 HugoConsole::HugoConsole(HugoEngine *vm) : GUI::Debugger(), _vm(vm) {
-	DCmd_Register("listscreens", WRAP_METHOD(HugoConsole, Cmd_listScreens));
-	DCmd_Register("gotoscreen",  WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
-	DCmd_Register("Boundaries",  WRAP_METHOD(HugoConsole, Cmd_boundaries));
+	DCmd_Register("listscreens",   WRAP_METHOD(HugoConsole, Cmd_listScreens));
+	DCmd_Register("listobjects",   WRAP_METHOD(HugoConsole, Cmd_listObjects));
+	DCmd_Register("getobject",     WRAP_METHOD(HugoConsole, Cmd_getObject));
+	DCmd_Register("getallobjects", WRAP_METHOD(HugoConsole, Cmd_getAllObjects));
+	DCmd_Register("gotoscreen",    WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
+	DCmd_Register("Boundaries",    WRAP_METHOD(HugoConsole, Cmd_boundaries));
 }
 
 HugoConsole::~HugoConsole() {
@@ -56,7 +61,7 @@ static int strToInt(const char *s) {
  * This command loads up the specified screen number
  */
 bool HugoConsole::Cmd_gotoScreen(int argc, const char **argv) {
-	if (argc != 2) {
+	if ((argc != 2) || (strToInt(argv[1]) > _vm->_numScreens)){
 		DebugPrintf("Usage: %s <screen number>\n", argv[0]);
 		return true;
 	} 
@@ -81,6 +86,57 @@ bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
 }
 
 /**
+ * This command lists all the objects available
+ */
+bool HugoConsole::Cmd_listObjects(int argc, const char **argv) {
+	if (argc != 1) {
+		DebugPrintf("Usage: %s\n", argv[0]);
+		return true;
+	}
+	
+	DebugPrintf("Available objects for this game are:\n");
+	for (int i = 0; i < _vm->_object->_numObj; i++) {
+		if (_vm->_object->_objects[i].genericCmd & TAKE)
+			DebugPrintf("%2d - %s\n", i, _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 2));
+	}
+	return true;
+}
+
+/**
+ * This command puts an object in the inventory
+ */
+bool HugoConsole::Cmd_getObject(int argc, const char **argv) {
+	if ((argc != 2) || (strToInt(argv[1]) > _vm->_object->_numObj)) {
+		DebugPrintf("Usage: %s <object number>\n", argv[0]);
+		return true;
+	}
+	
+	if (_vm->_object->_objects[strToInt(argv[1])].genericCmd & TAKE)
+		_vm->_parser->takeObject(&_vm->_object->_objects[strToInt(argv[1])]);
+	else
+		DebugPrintf("Object not available\n");
+
+	return true;
+}
+
+/**
+ * This command puts all the available objects in the inventory
+ */
+bool HugoConsole::Cmd_getAllObjects(int argc, const char **argv) {
+	if (argc != 1) {
+		DebugPrintf("Usage: %s\n", argv[0]);
+		return true;
+	}
+	
+	for (int i = 0; i < _vm->_object->_numObj; i++) {
+		if (_vm->_object->_objects[i].genericCmd & TAKE)
+			_vm->_parser->takeObject(&_vm->_object->_objects[i]);
+	}
+
+	return false;
+}
+
+/**
  * This command shows and hides boundaries
  */
 bool HugoConsole::Cmd_boundaries(int argc, const char **argv) {
diff --git a/engines/hugo/console.h b/engines/hugo/console.h
index 150bc2e..16317e8 100644
--- a/engines/hugo/console.h
+++ b/engines/hugo/console.h
@@ -37,6 +37,9 @@ public:
 private:
 	HugoEngine *_vm;
 	bool Cmd_listScreens(int argc, const char **argv);
+	bool Cmd_listObjects(int argc, const char **argv);
+	bool Cmd_getObject(int argc, const char **argv);
+	bool Cmd_getAllObjects(int argc, const char **argv);
 	bool Cmd_gotoScreen(int argc, const char **argv);
 	bool Cmd_boundaries(int argc, const char **argv);
 };
diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h
index 6ad2b38..faa6dc2 100644
--- a/engines/hugo/parser.h
+++ b/engines/hugo/parser.h
@@ -97,6 +97,7 @@ public:
 
 	virtual void lineHandler() = 0;
 	virtual void showInventory() const = 0;
+	virtual void takeObject(object_t *obj) = 0;
 
 protected:
 	HugoEngine *_vm;
@@ -135,10 +136,10 @@ public:
 
 	virtual void lineHandler();
 	virtual void showInventory() const;
+	virtual void takeObject(object_t *obj);
 
 protected:
-	virtual void  dropObject(object_t *obj);
-	virtual void  takeObject(object_t *obj);
+	virtual void dropObject(object_t *obj);
 
 	const char *findNextNoun(const char *noun) const;
 	bool  isBackgroundWord_v1(const char *noun, const char *verb, objectList_t obj) const;






More information about the Scummvm-git-logs mailing list