[Scummvm-git-logs] scummvm master -> 817211b2edb94961b65ed7424e886a4609951c0e

sev- sev at scummvm.org
Mon Sep 5 23:38:20 CEST 2016


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

Summary:
817211b2ed DIRECTOR: Lingo: Implemented and documented 'the key' and 'the machineType'


Commit: 817211b2edb94961b65ed7424e886a4609951c0e
    https://github.com/scummvm/scummvm/commit/817211b2edb94961b65ed7424e886a4609951c0e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-05T23:38:11+02:00

Commit Message:
DIRECTOR: Lingo: Implemented and documented 'the key' and 'the machineType'

Changed paths:
    engines/director/director.cpp
    engines/director/director.h
    engines/director/lingo/lingo-the.cpp
    engines/director/score.cpp



diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index a80ca1c..a0a96d6 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -71,8 +71,10 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
 	SearchMan.addSubDirectoryMatching(gameDataDir, "data");
 	SearchMan.addSubDirectoryMatching(gameDataDir, "install");
 
-	_colorDepth = 8;	// FIXME. Check if it is 8-bit
+	_colorDepth = 8;	// 256-color
+	_key = 0;
 	_keyCode = 0;
+	_machineType = 9; // Macintosh IIci
 }
 
 DirectorEngine::~DirectorEngine() {
diff --git a/engines/director/director.h b/engines/director/director.h
index eabb93f..484e7f6 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -98,7 +98,9 @@ public:
 
 public:
 	int _colorDepth;
+	unsigned char _key;
 	int _keyCode;
+	int _machineType;
 
 protected:
 	virtual Common::Error run();
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 9751d06..13471fd 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -227,6 +227,8 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
 		break;
 	case kTheColorDepth:
 		_vm->_colorDepth = d.toInt();
+
+		// bpp. 1, 2, 4, 8, 32
 		warning("STUB: Set color depth to %d", _vm->_colorDepth);
 		break;
 	default:
@@ -365,6 +367,10 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
 		d.type = FLOAT;
 		d.u.f = sqrt(id.u.f);
 		break;
+	case kTheKey:
+		d.type = STRING;
+		d.u.s = new Common::String(_vm->_key);
+		break;
 	case kTheKeyCode:
 		d.type = INT;
 		d.u.i = _vm->_keyCode;
@@ -374,9 +380,53 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
 		d.u.i = 1;
 		break;
 	case kTheColorDepth:
+		// bpp. 1, 2, 4, 8, 32
 		d.type = INT;
 		d.u.i = _vm->_colorDepth;
 		break;
+	case kTheMachineType:
+		// 1 - Macintosh 512Ke			D2
+		// 2 - Macintosh Plus			D2
+		// 3 - Macintosh SE				D2
+		// 4 - Macintosh II				D2
+		// 5 - Macintosh IIx			D2
+		// 6 - Macintosh IIcx			D2
+		// 7 - Macintosh SE/30			D2
+		// 8 - Macintosh Portable		D2
+		// 9 - Macintosh IIci			D2
+		// 11 - Macintosh IIfx			D3
+		// 15 - Macintosh Classic		D3
+		// 16 - Macintosh IIsi			D3
+		// 17 - Macintosh LC			D3
+		// 18 - Macintosh Quadra 900	D3
+		// 19 - PowerBook 170			D3
+		// 20 - Macintosh Quadra 700	D3
+		// 21 - Classic II				D3
+		// 22 - PowerBook 100			D3
+		// 23 - PowerBook 140			D3
+		// 24 - Macintosh Quadra 950	D4
+		// 25 - Macintosh LCIII			D4
+		// 27 - PowerBook Duo 210		D4
+		// 28 - Macintosh Centris 650	D4
+		// 30 - PowerBook Duo 230		D4
+		// 31 - PowerBook 180			D4
+		// 32 - PowerBook 160			D4
+		// 33 - Macintosh Quadra 800	D4
+		// 35 - Macintosh LC II			D4
+		// 42 - Macintosh IIvi			D4
+		// 45 - Power Macintosh 7100/70	D5
+		// 46 - Macintosh IIvx			D4
+		// 47 - Macintosh Color Classic	D4
+		// 48 - PowerBook 165c			D4
+		// 50 - Macintosh Centris 610	D4
+		// 52 - PowerBook 145			D4
+		// 53 - PowerComputing 8100/100	D5
+		// 73 - Power Macintosh 6100/60	D5
+		// 76 - Macintosh Quadra 840av	D4
+		// 256 - IBM PC-type machine	D3
+		d.type = INT;
+		d.u.i = _vm->_machineType;
+		break;
 	default:
 		warning("Unprocessed getting field %d of entity %d", field, entity);
 		d.type = VOID;
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index fa4f434..ccba78e 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -842,6 +842,8 @@ void Score::processEvents() {
 
 			if (event.type == Common::EVENT_KEYDOWN) {
 				_vm->_keyCode = event.kbd.keycode;
+				_vm->_key = (unsigned char)(event.kbd.ascii & 0xff);
+
 				switch (_vm->_keyCode) {
 				case Common::KEYCODE_LEFT:
 					_vm->_keyCode = 123;





More information about the Scummvm-git-logs mailing list