[Scummvm-git-logs] scummvm master -> f20d13fa626455d67284c3a55740073ed21c835c

bluegr bluegr at gmail.com
Sun May 30 23:34:15 UTC 2021


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

Summary:
b59a10606d TRECISION: Add a console command, "say", to hear sentences from Joshua
f20d13fa62 TRECISION: Start documenting the hardcoded lines from Joshua


Commit: b59a10606dd3eb6b5de7c9f05bc87171b5aaf521
    https://github.com/scummvm/scummvm/commit/b59a10606dd3eb6b5de7c9f05bc87171b5aaf521
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-05-31T02:33:52+03:00

Commit Message:
TRECISION: Add a console command, "say", to hear sentences from Joshua

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


diff --git a/engines/trecision/console.cpp b/engines/trecision/console.cpp
index c304ba08e4..c1e9f47818 100644
--- a/engines/trecision/console.cpp
+++ b/engines/trecision/console.cpp
@@ -24,8 +24,9 @@
 #include "gui/debugger.h"
 
 #include "trecision/console.h"
-#include "trecision/scheduler.h"
 #include "trecision/dialog.h"
+#include "trecision/scheduler.h"
+#include "trecision/text.h"
 #include "trecision/trecision.h"
 
 namespace Trecision {
@@ -35,6 +36,7 @@ Console::Console(TrecisionEngine *vm) : GUI::Debugger(), _vm(vm) {
 	registerCmd("filedump",		WRAP_METHOD(Console, Cmd_DumpFile));
 	registerCmd("dialog",		WRAP_METHOD(Console, Cmd_Dialog));
 	registerCmd("item",			WRAP_METHOD(Console, Cmd_Item));
+	registerCmd("say",			WRAP_METHOD(Console, Cmd_Say));
 }
 
 Console::~Console() {
@@ -102,4 +104,16 @@ bool Console::Cmd_Item(int argc, const char **argv) {
 	return false;
 }
 
+bool Console::Cmd_Say(int argc, const char **argv) {
+	if (argc < 2) {
+		debugPrintf("Use %s <sentenceId> to hear a sentence from Joshua\n", argv[0]);
+		return true;
+	}
+
+	const uint16 sentenceId = (uint16)atoi(argv[1]);
+	_vm->_textMgr->characterSay(sentenceId);
+
+	return false;
+}
+
 } // End of namespace Trecision
diff --git a/engines/trecision/console.h b/engines/trecision/console.h
index 8957504a2e..5c8f84ca32 100644
--- a/engines/trecision/console.h
+++ b/engines/trecision/console.h
@@ -41,6 +41,7 @@ private:
 	bool Cmd_DumpFile(int argc, const char **argv);
 	bool Cmd_Dialog(int argc, const char **argv);
 	bool Cmd_Item(int argc, const char **argv);
+	bool Cmd_Say(int argc, const char **argv);
 };
 
 } // End of namespace Trecision


Commit: f20d13fa626455d67284c3a55740073ed21c835c
    https://github.com/scummvm/scummvm/commit/f20d13fa626455d67284c3a55740073ed21c835c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-05-31T02:33:52+03:00

Commit Message:
TRECISION: Start documenting the hardcoded lines from Joshua

Changed paths:
    engines/trecision/defines.h
    engines/trecision/dialog.cpp
    engines/trecision/inventory.cpp
    engines/trecision/script.cpp


diff --git a/engines/trecision/defines.h b/engines/trecision/defines.h
index 047ef68e74..3c468c7bab 100644
--- a/engines/trecision/defines.h
+++ b/engines/trecision/defines.h
@@ -245,6 +245,20 @@ enum RoomId {
 	kRoomControlPanel = 96
 };
 
+enum SentenceId {
+	kSentenceMapZoo = 334,	// According to the map, the zoo should be along the passageway, ...
+	kSentenceGoodDeterrent = 621,	// Damn! Mechanical or not, that's a pretty good deterrent
+	kSentenceHopeDidntWasteTheKid = 659,	// Damn! I hope I didn't waste the kid
+	kSentenceItWorked = 1502,	// Jeez, it worked
+	kSentenceWastedCritter = 1561,	// OK I wasted the critter but I used all the charges in the gun
+	kSentenceOnlyGotOne = 1565,	// I'd better not. I've only got one, and I don't want to waste it here
+	kSentenceItDidntWork = 1707,	// Damn! It didn't work
+	kSentenceTakeThatWolfman = 1708,	// Take that wolfman! I kicked his virtual ass
+	kSentenceTheSpiderHasEscaped = 1712,	// The spider has escaped
+	kSentenceSecretPassage = 1997,	// Interesting, there's a secret passage in the warehouse
+	kSentencePutHimOutOfAction = 2003	// I've got to put him out of action first
+};
+
 /*-------------------------------------------------------------------------*/
 /*                                 OBJECTS           					   */
 /*-------------------------------------------------------------------------*/
diff --git a/engines/trecision/dialog.cpp b/engines/trecision/dialog.cpp
index 2b65376f3e..b6f92dbd63 100644
--- a/engines/trecision/dialog.cpp
+++ b/engines/trecision/dialog.cpp
@@ -334,20 +334,20 @@ void DialogManager::afterChoice() {
 			break;
 
 		case dF1C1:
-			_vm->_textMgr->characterSay(334);
+			_vm->_textMgr->characterSay(kSentenceMapZoo);
 			break;
 
 		case dF1D1:
-			_vm->_textMgr->characterSay(1502);
+			_vm->_textMgr->characterSay(kSentenceItWorked);
 			break;
 
 		case dF2E1:
-			_vm->_textMgr->characterSay(621);
+			_vm->_textMgr->characterSay(kSentenceGoodDeterrent);
 			_vm->_obj[oCATWALKA2E]._action = 622;
 			break;
 
 		case dF2E2:
-			_vm->_textMgr->characterSay(1561);
+			_vm->_textMgr->characterSay(kSentenceWastedCritter);
 			_vm->_inventoryObj[kItemMicrowaveGun]._examine = 1562;
 			break;
 
@@ -366,7 +366,7 @@ void DialogManager::afterChoice() {
 
 		case dF2G1:
 			_vm->_obj[oPANELM2G]._action = 660;
-			_vm->_textMgr->characterSay(659);
+			_vm->_textMgr->characterSay(kSentenceHopeDidntWasteTheKid);
 			break;
 
 		case dF2G2:
@@ -380,7 +380,7 @@ void DialogManager::afterChoice() {
 
 		case dF331:
 			_vm->_obj[oTUBET33]._lim = Common::Rect(0, 0, 0, 0);
-			_vm->_textMgr->characterSay(1997);
+			_vm->_textMgr->characterSay(kSentenceSecretPassage);
 			break;
 
 		case dF362:
@@ -411,7 +411,7 @@ void DialogManager::afterChoice() {
 
 		case dF451:
 			_vm->_obj[od44TO45]._goRoom = kRoom45S;
-			_vm->_textMgr->characterSay(1712);
+			_vm->_textMgr->characterSay(kSentenceTheSpiderHasEscaped);
 			break;
 
 		case dF491:
@@ -461,11 +461,11 @@ void DialogManager::afterChoice() {
 			break;
 
 		case dF4P1:
-			_vm->_textMgr->characterSay(1707);
+			_vm->_textMgr->characterSay(kSentenceItDidntWork);
 			break;
 
 		case dF4P2:
-			_vm->_textMgr->characterSay(1708);
+			_vm->_textMgr->characterSay(kSentenceTakeThatWolfman);
 			break;
 
 		case dF562:
diff --git a/engines/trecision/inventory.cpp b/engines/trecision/inventory.cpp
index 8c95743e6d..32c79de2b6 100644
--- a/engines/trecision/inventory.cpp
+++ b/engines/trecision/inventory.cpp
@@ -140,8 +140,8 @@ void TrecisionEngine::useItem() {
 	if (_flagUseWithStarted) {
 		endUseWith();
 	} else if (_inventoryObj[_curInventory].isUseWith()) {
-		if ((_curInventory == kItemFlare) && (_curRoom == kRoom29)) {
-			_textMgr->characterSay(1565);
+		if (_curInventory == kItemFlare && _curRoom == kRoom29) {
+			_textMgr->characterSay(kSentenceOnlyGotOne);
 			return;
 		}
 		_animMgr->startSmkAnim(_inventoryObj[_curInventory]._anim);
diff --git a/engines/trecision/script.cpp b/engines/trecision/script.cpp
index b8cecb80d4..0c6b83dae2 100644
--- a/engines/trecision/script.cpp
+++ b/engines/trecision/script.cpp
@@ -138,7 +138,7 @@ void TrecisionEngine::doAction() {
 		// Action in the game area
 		_curObj = _curMessage->_u32Param;
 		if (_curObj == oLASTLEV5)
-			_textMgr->characterSay(2003);
+			_textMgr->characterSay(kSentencePutHimOutOfAction);
 
 		if (!_curObj || !isObjectVisible(_curObj))
 			return;




More information about the Scummvm-git-logs mailing list