DIRECTOR: LINGO: Implement c_before and c_after

This commit is contained in:
Scott Percival
2020-02-06 19:41:46 +08:00
parent 7bf340427c
commit 00a59570be
2 changed files with 24 additions and 12 deletions
+22
View File
@@ -259,6 +259,28 @@ void LC::cb_v4assign() {
LC::c_assign();
}
break;
case 0x26:
// put value after field textVar
{
LB::b_field(1);
Datum field = g_lingo->pop();
g_lingo->push(field);
LC::c_after();
g_lingo->push(field);
LC::c_assign();
}
break;
case 0x36:
// put value before field textVar
{
LB::b_field(1);
Datum field = g_lingo->pop();
g_lingo->push(field);
LC::c_before();
g_lingo->push(field);
LC::c_assign();
}
break;
default:
warning("cb_v4assign: unknown operator %d", op);
break;
+2 -12
View File
@@ -566,17 +566,7 @@ void LC::c_ampersand() {
}
void LC::c_after() {
Datum d2 = g_lingo->pop();
Datum d1 = g_lingo->pop();
d1.toString();
d2.toString();
warning("STUB: c_after");
delete d2.u.s;
g_lingo->push(d1);
LC::c_ampersand();
}
void LC::c_before() {
@@ -586,7 +576,7 @@ void LC::c_before() {
d1.toString();
d2.toString();
warning("STUB: c_before");
*d1.u.s = *d2.u.s + *d1.u.s;
delete d2.u.s;