Beispiel #1
0
void Lingo::c_whencode() {
	Datum d;
	uint start = g_lingo->_pc;
	uint end = READ_UINT32(&(*g_lingo->_currentScript)[start]) + start - 1;
	Common::String eventname((char *)&(*g_lingo->_currentScript)[start + 1]);

	start += g_lingo->calcStringAlignment(eventname.c_str()) + 1;

	debugC(1, kDebugLingoExec, "c_whencode([%5d][%5d], %s)", start, end, eventname.c_str());

	int entity = g_lingo->_currentEntityId;
	g_lingo->_currentEntityId = 0;

	g_lingo->define(eventname, start, 0, NULL, end);

	g_lingo->_currentEntityId = entity;

	if (debugChannelSet(1, kDebugLingoExec)) {
		uint pc = start;
		while (pc <= end) {
			Common::String instr = g_lingo->decodeInstruction(pc, &pc);
			debugC(1, kDebugLingoExec, "[%5d] %s", pc, instr.c_str());
		}
	}

	g_lingo->_pc = end;
}
Beispiel #2
0
void Lingo::c_whencode() {
	Datum d;
	int start = g_lingo->_pc;
	int end = READ_UINT32(&(*g_lingo->_currentScript)[start]);
	Common::String eventname((char *)&(*g_lingo->_currentScript)[start]);

	start += g_lingo->calcStringAlignment(eventname.c_str());

	warning("STUB: c_whencode([%5d][%5d], %s)", start, end, eventname.c_str());

	g_lingo->_pc = end;
}