[Scummvm-git-logs] scummvm master -> f6213c2641dc7d3a61467dd12960f5eb78119605
sev-
sev at scummvm.org
Tue Jan 14 19:41:25 UTC 2020
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:
f6213c2641 DIRECTOR: LINGO: Refactor cb_v4theentityassign()
Commit: f6213c2641dc7d3a61467dd12960f5eb78119605
https://github.com/scummvm/scummvm/commit/f6213c2641dc7d3a61467dd12960f5eb78119605
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-01-14T20:40:56+01:00
Commit Message:
DIRECTOR: LINGO: Refactor cb_v4theentityassign()
Changed paths:
engines/director/lingo/lingo-bytecode.cpp
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index 9bf66a7..cb60347 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -362,50 +362,55 @@ void LC::cb_v4theentityassign() {
result.type = VOID;
int key = (bank << 8) + firstArg.u.i;
- if (g_lingo->_lingoV4TheEntity.contains(key)) {
- debugC(3, kDebugLingoExec, "cb_v4theentityassign: mapping 0x%02x, 0x%02x", bank, firstArg.u.i);
- if (g_lingo->_lingoV4TheEntity[key]->writable) {
- int entity = g_lingo->_lingoV4TheEntity[key]->entity;
- int field = g_lingo->_lingoV4TheEntity[key]->field;
- switch (g_lingo->_lingoV4TheEntity[key]->type) {
- case kTEANOArgs:
- {
- Datum id;
- id.u.s = NULL;
- id.type = VOID;
- debugC(3, kDebugLingoExec, "cb_v4theentityassign: calling setTheEntity(0x%02x, NULL, 0x%02x, value)", entity, field);
- g_lingo->setTheEntity(entity, id, field, value);
- }
- break;
- case kTEAItemId:
- {
- Datum id = g_lingo->pop();
- debugC(3, kDebugLingoExec, "cb_v4theentityassign: calling setTheEntity(0x%02x, id, 0x%02x, value)", entity, field);
- g_lingo->setTheEntity(entity, id, field, value);
- }
- break;
- case kTEAString:
- {
- /*Datum stringArg = */g_lingo->pop();
- warning("cb_v4theentityassign: STUB: kTEAString");
- }
- break;
- case kTEAMenuIdItemId:
- {
- /*Datum menuId = */g_lingo->pop();
- /*Datum itemId = */g_lingo->pop();
- warning("cb_v4theentityassign: STUB: kTEAMenuIdItemId");
- }
- break;
- default:
- warning("cb_v4theentityassign: unknown call type %d", g_lingo->_lingoV4TheEntity[key]->type);
- break;
- }
- } else {
- warning("cb_v4theentityassign: non-writable mapping 0x%02x 0x%02x", bank, firstArg.u.i);
- }
- } else {
+ if (!g_lingo->_lingoV4TheEntity.contains(key)) {
warning("cb_v4theentityassign: unhandled mapping 0x%02x 0x%02x", bank, firstArg.u.i);
+
+ return;
+ }
+
+ debugC(3, kDebugLingoExec, "cb_v4theentityassign: mapping 0x%02x, 0x%02x", bank, firstArg.u.i);
+
+ if (!g_lingo->_lingoV4TheEntity[key]->writable) {
+ warning("cb_v4theentityassign: non-writable mapping 0x%02x 0x%02x", bank, firstArg.u.i);
+
+ return;
+ }
+
+ int entity = g_lingo->_lingoV4TheEntity[key]->entity;
+ int field = g_lingo->_lingoV4TheEntity[key]->field;
+ switch (g_lingo->_lingoV4TheEntity[key]->type) {
+ case kTEANOArgs:
+ {
+ Datum id;
+ id.u.s = NULL;
+ id.type = VOID;
+ debugC(3, kDebugLingoExec, "cb_v4theentityassign: calling setTheEntity(0x%02x, NULL, 0x%02x, value)", entity, field);
+ g_lingo->setTheEntity(entity, id, field, value);
+ }
+ break;
+ case kTEAItemId:
+ {
+ Datum id = g_lingo->pop();
+ debugC(3, kDebugLingoExec, "cb_v4theentityassign: calling setTheEntity(0x%02x, id, 0x%02x, value)", entity, field);
+ g_lingo->setTheEntity(entity, id, field, value);
+ }
+ break;
+ case kTEAString:
+ {
+ /*Datum stringArg = */g_lingo->pop();
+ warning("cb_v4theentityassign: STUB: kTEAString");
+ }
+ break;
+ case kTEAMenuIdItemId:
+ {
+ /*Datum menuId = */g_lingo->pop();
+ /*Datum itemId = */g_lingo->pop();
+ warning("cb_v4theentityassign: STUB: kTEAMenuIdItemId");
+ }
+ break;
+ default:
+ warning("cb_v4theentityassign: unknown call type %d", g_lingo->_lingoV4TheEntity[key]->type);
+ break;
}
}
More information about the Scummvm-git-logs
mailing list