[Scummvm-git-logs] scummvm master -> fce9e495f93f47333cc75830986844244f1cce6f
sev-
sev at scummvm.org
Fri Sep 2 17:26:23 CEST 2016
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3f8eab1757 DIRECTOR: Lingo: Implement in-place macro calling
ed41bbaca7 DIRECTOR: Lingo: Fix c_when() execution
fce9e495f9 DIRECTOR: Added basic keycode mapping
Commit: 3f8eab1757fbf54939d53f9e84d274aa2659b189
https://github.com/scummvm/scummvm/commit/3f8eab1757fbf54939d53f9e84d274aa2659b189
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-02T17:25:31+02:00
Commit Message:
DIRECTOR: Lingo: Implement in-place macro calling
Changed paths:
engines/director/lingo/lingo-code.cpp
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 405489b..66f1653 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -216,6 +216,15 @@ void Lingo::c_varpush() {
char *name = (char *)&(*g_lingo->_currentScript)[g_lingo->_pc];
Datum d;
+ g_lingo->_pc += g_lingo->calcStringAlignment(name);
+
+ if (g_lingo->_handlers.contains(name)) {
+ d.type = HANDLER;
+ d.u.s = new Common::String(name);
+ g_lingo->push(d);
+ return;
+ }
+
d.u.sym = g_lingo->lookupVar(name);
if (d.u.sym->type == CASTREF) {
d.type = INT;
@@ -228,8 +237,6 @@ void Lingo::c_varpush() {
d.type = VAR;
}
- g_lingo->_pc += g_lingo->calcStringAlignment(name);
-
g_lingo->push(d);
}
@@ -298,6 +305,12 @@ void Lingo::c_eval() {
Datum d;
d = g_lingo->pop();
+ if (d.type == HANDLER) {
+ g_lingo->call(*d.u.s, 0);
+ delete d.u.s;
+ return;
+ }
+
if (d.type != VAR) { // It could be cast ref
g_lingo->push(d);
return;
Commit: ed41bbaca7c253d1e9b1f32e01b6cc767131e4c0
https://github.com/scummvm/scummvm/commit/ed41bbaca7c253d1e9b1f32e01b6cc767131e4c0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-02T17:25:31+02:00
Commit Message:
DIRECTOR: Lingo: Fix c_when() execution
Changed paths:
engines/director/lingo/lingo.cpp
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 8a084c7..30714de 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -277,6 +277,7 @@ void Lingo::processEvent(LEvent event, int entityId) {
executeScript(st, entityId + 1);
} else if (_handlers.contains(_eventHandlerTypes[event])) {
call(_eventHandlerTypes[event], 0);
+ pop();
} else {
warning("---- Handler %s is not set", _eventHandlerTypes[event]);
debugC(8, kDebugLingoExec, "STUB: processEvent(%s) for %d", _eventHandlerTypes[event], entityId);
Commit: fce9e495f93f47333cc75830986844244f1cce6f
https://github.com/scummvm/scummvm/commit/fce9e495f93f47333cc75830986844244f1cce6f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-02T17:25:31+02:00
Commit Message:
DIRECTOR: Added basic keycode mapping
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 69d974a..49ec050 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -842,6 +842,23 @@ void Score::processEvents() {
if (event.type == Common::EVENT_KEYDOWN) {
_vm->_keyCode = event.kbd.keycode;
+ switch (_vm->_keyCode) {
+ case Common::KEYCODE_LEFT:
+ _vm->_keyCode = 123;
+ break;
+ case Common::KEYCODE_RIGHT:
+ _vm->_keyCode = 124;
+ break;
+ case Common::KEYCODE_DOWN:
+ _vm->_keyCode = 125;
+ break;
+ case Common::KEYCODE_UP:
+ _vm->_keyCode = 126;
+ break;
+ default:
+ warning("Keycode: %d", _vm->_keyCode);
+ }
+
_lingo->processEvent(kEventKeyDown, 0);
}
}
More information about the Scummvm-git-logs
mailing list