diff options
| -rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 68 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-the.cpp | 3 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-the.h | 3 | ||||
| -rw-r--r-- | engines/director/lingo/lingo.h | 3 | 
4 files changed, 58 insertions, 19 deletions
| diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 54481aedb6..d8a8f2d2f5 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -32,26 +32,27 @@ static struct BuiltinProto {  	bool parens;  } builtins[] = {  	// Math -	{ "abs",	Lingo::b_abs,		1, 1, true },	// D2 -	{ "atan",	Lingo::b_atan,		1, 1, true },	// 		D4 -	{ "cos",	Lingo::b_cos,		1, 1, true },	// 		D4 -	{ "exp",	Lingo::b_exp,		1, 1, true },	// 		D4 -	{ "float",	Lingo::b_float,		1, 1, true },	// 		D4 -	{ "integer",Lingo::b_integer,	1, 1, true }, -	{ "integerp",Lingo::b_integerp,	1, 1, true }, -	{ "log",	Lingo::b_log,		1, 1, true },	// 		D4 -	{ "pi",		Lingo::b_pi,		0, 0, true },	// 		D4 -	{ "power",	Lingo::b_power,		2, 2, true },	// 		D4 -	{ "random",	Lingo::b_random,	1, 1, true },	// D2 -	{ "sin",	Lingo::b_sin,		1, 1, true }, -	{ "sqrt",	Lingo::b_sqrt,		1, 1, true },	// D2 -	{ "tan",	Lingo::b_tan,		1, 1, true },	// 		D4 +	{ "abs",			Lingo::b_abs,			1, 1, true },	// D2 +	{ "atan",			Lingo::b_atan,			1, 1, true },	// 		D4 +	{ "cos",			Lingo::b_cos,			1, 1, true },	// 		D4 +	{ "exp",			Lingo::b_exp,			1, 1, true },	// 		D4 +	{ "float",			Lingo::b_float,			1, 1, true },	// 		D4 +	{ "integer",		Lingo::b_integer,		1, 1, true }, +	{ "integerp",		Lingo::b_integerp,		1, 1, true }, +	{ "log",			Lingo::b_log,			1, 1, true },	// 		D4 +	{ "pi",				Lingo::b_pi,			0, 0, true },	// 		D4 +	{ "power",			Lingo::b_power,			2, 2, true },	// 		D4 +	{ "random",			Lingo::b_random,		1, 1, true },	// D2 +	{ "sin",			Lingo::b_sin,			1, 1, true }, +	{ "sqrt",			Lingo::b_sqrt,			1, 1, true },	// D2 +	{ "tan",			Lingo::b_tan,			1, 1, true },	// 		D4  	// String -	{ "chars",		Lingo::b_chars,		3, 3, true },	// D2 -	{ "charToNum",	Lingo::b_charToNum,	1, 1, true },	// D2 -	{ "length",		Lingo::b_length,	1, 1, true },	// D2 -	{ "numToChar",	Lingo::b_numToChar,	1, 1, true },	// D2 -	{ "string",		Lingo::b_string,	1, 1, true },	// D2 +	{ "chars",			Lingo::b_chars,			3, 3, true },	// D2 +	{ "charToNum",		Lingo::b_charToNum,		1, 1, true },	// D2 +	{ "length",			Lingo::b_length,		1, 1, true },	// D2 +	{ "numToChar",		Lingo::b_numToChar,		1, 1, true },	// D2 +	{ "offset",			Lingo::b_offset,		2, 2, true },	// D2 +	{ "string",			Lingo::b_string,		1, 1, true },	// D2  	// Files  	{ "closeDA",	 	Lingo::b_closeDA, 		0, 0, false },	// D2  	{ "closeResFile",	Lingo::b_closeResFile,	0, 1, false },	// D2 @@ -87,6 +88,7 @@ static struct BuiltinProto {  	{ "ilk",	 		Lingo::b_ilk,			1, 2, true },	// 		D4  		// put													// D2  		// set													// D2 +	{ "objectp",		Lingo::b_objectp,		1, 1, true },  	{ "showGlobals",	Lingo::b_showGlobals,	0, 0, false },	// D2  	{ "showLocals",		Lingo::b_showLocals,	0, 0, false },	// D2  	// Score @@ -103,6 +105,7 @@ static struct BuiltinProto {  	{ "puppetSprite",	Lingo::b_puppetSprite,	-1,0, false },	// D2  	{ "puppetTempo",	Lingo::b_puppetTempo,	1, 1, false },	// D2  	{ "puppetTransition",Lingo::b_puppetTransition,-1,0, false },// D2 +	{ "rollOver",		Lingo::b_rollOver,		1, 1, true },	// D2  	{ "spriteBox",		Lingo::b_spriteBox,		-1,0, false },	// D2  	{ "updateStage",	Lingo::b_updateStage,	0, 0, false },	// D2  	{ "zoomBox",		Lingo::b_zoomBox,		-1,0, false },	// D2 @@ -353,6 +356,18 @@ void Lingo::b_numToChar(int nargs) {  	g_lingo->push(Datum((char)d.u.i));  } +void Lingo::b_offset(int nargs) { +	Datum target = g_lingo->pop(); +	Datum source = g_lingo->pop(); + +	target.toString(); +	source.toString(); + +	warning("STUB: b_offset()"); + +	g_lingo->push(Datum(0)); +} +  void Lingo::b_string(int nargs) {  	Datum d = g_lingo->pop();  	d.toString(); @@ -522,6 +537,14 @@ void Lingo::b_cursor(int nargs) {  	warning("STUB: b_cursor(%d)", d.u.i);  } +void Lingo::b_objectp(int nargs) { +	Datum d = g_lingo->pop(); +	int res = (d.type == OBJECT) ? 1 : 0; +	d.toInt(); +	d.u.i = res; +	g_lingo->push(d); +} +  void Lingo::b_showGlobals(int nargs) {  	warning("STUB: b_showGlobals");  } @@ -622,6 +645,13 @@ void Lingo::b_puppetTransition(int nargs) {  	g_lingo->dropStack(nargs);  } +void Lingo::b_rollOver(int nargs) { +	Datum d = g_lingo->pop(); +	warning("STUB: b_puppetTempo(%d)", d.u.i); + +	g_lingo->push(Datum(0)); +} +  void Lingo::b_spriteBox(int nargs) {  	g_lingo->printStubWithArglist("b_spriteBox", nargs); diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index e6dbb9cac6..20bccf35ac 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -63,11 +63,14 @@ TheEntity entities[] = {  	{ kTheMultiSound,		"multiSound",		false },  	{ kTheOptionDown,		"optionDown",		false },  	{ kThePathName,			"pathname",			false }, +	{ kThePauseState,		"pauseState",		false },  	{ kThePerFrameHook,		"perframehook",		false },  	{ kThePreloadEventAbort,"preloadEventAbort",false }, +	{ kTheResult,			"result",			false },  	{ kTheRightMouseDown,	"rightMouseDown",	false },  	{ kTheRightMouseUp,		"rightMouseUp",		false },  	{ kTheRomanLingo,		"romanLingo",		false }, +	{ kTheSelection,		"selection",		false },  	{ kTheShiftDown,		"shiftDown",		false },  	{ kTheSprite,			"sprite",			true  },  	{ kTheStage,			"stage",			false }, diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h index 17ccb2f8e1..0649ebe0b0 100644 --- a/engines/director/lingo/lingo-the.h +++ b/engines/director/lingo/lingo-the.h @@ -60,6 +60,7 @@ enum TheEntityType {  	kTheMemorySize,  	kTheMouseDown,  	kTheMouseUp, +	kThePauseState,  	kTheRightMouseUp,  	kTheRightMouseDown,  	kTheStillDown, @@ -67,6 +68,8 @@ enum TheEntityType {  	kTheKeyCode,  	kTheControlDown,  	kTheCommandDown, +	kTheResult, +	kTheSelection,  	kTheShiftDown,  	kTheOptionDown, diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 53722d7995..105719e41c 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -315,11 +315,13 @@ public:  	static void b_charToNum(int nargs);  	static void b_length(int nargs);  	static void b_numToChar(int nargs); +	static void b_offset(int nargs);  	static void b_string(int nargs);  	static void b_ilk(int nargs);  	static void b_alert(int nargs);  	static void b_cursor(int nargs); +	static void b_objectp(int nargs);  	static void b_printFrom(int nargs);  	static void b_showGlobals(int nargs);  	static void b_showLocals(int nargs); @@ -336,6 +338,7 @@ public:  	static void b_puppetSprite(int nargs);  	static void b_puppetTempo(int nargs);  	static void b_puppetTransition(int nargs); +	static void b_rollOver(int nargs);  	static void b_spriteBox(int nargs);  	static void b_updateStage(int nargs);  	static void b_zoomBox(int nargs); | 
