当前位置: 首页>>代码示例>>C++>>正文


C++ setScriptReturn函数代码示例

本文整理汇总了C++中setScriptReturn函数的典型用法代码示例。如果您正苦于以下问题:C++ setScriptReturn函数的具体用法?C++ setScriptReturn怎么用?C++ setScriptReturn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setScriptReturn函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: varval

void AGOSEngine_PN::opn_opcode32() {
	Common::String bf;
	int a, slot;

	a = varval();
	if (a > 2) {
		setScriptReturn(true);
		return;
	}

	uint16 curSlot = countSaveGames();
	switch (a) {
		case 0:
			getFilename();
			slot = matchSaveGame(_saveFile, curSlot);
			if (slot != -1)
				bf = genSaveName(slot);
			else
				bf = genSaveName(curSlot);
			break;
		case 1:
			bf = "pn.sav";
			break;
		case 2:
			// NOTE: Is this case ever used?
			error("opn_opcode32: case 2");
			break;
	}

	a = saveFile(bf);
	setScriptReturn(a);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:32,代码来源:script_pn.cpp

示例2: while

void AGOSEngine_PN::opn_opcode36() {
	for (int i = 0; i < _dataBase[57] + 1; ++i)
		_wordcp[i] = 0;
	if (Common::isSpace(*_inpp))
		while ((*_inpp) && (Common::isSpace(*_inpp)))
			_inpp++;
	if (*_inpp == 0) {
		setScriptReturn(false);
		return;
	}
	_curwrdptr = _inpp;
	_wordcp[0] = *_inpp++;
	if ((_wordcp[0] == '.') || (_wordcp[0] == ',') || (_wordcp[0] == '"')) {
		setScriptReturn(true);
		return;
	}

	int ct = 1;
	while ((*_inpp != '.') && (*_inpp != ',') && (!Common::isSpace(*_inpp)) && (*_inpp != '\0') &&
		(*_inpp!='"')) {
		if (ct < _dataBase[57])
			_wordcp[ct++] = *_inpp;
		_inpp++;
	}
	setScriptReturn(true);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:26,代码来源:script_pn.cpp

示例3: setScriptReturn

void AGOSEngine_PN::opn_opcode31() {
	int a, slot = 0;
	Common::String bf;

	if ((a = varval()) > 2) {
		setScriptReturn(false);
		return;
	}

	switch (a) {
		case 0:
			getFilename();
			slot = matchSaveGame(_saveFile, countSaveGames());
			bf = genSaveName(slot);
			break;
		case 1:
			bf = "pn.sav";
			break;
		case 2:
			// NOTE: Is this case ever used?
			error("opn_opcode31: case 2");
			break;
	}

	if (slot == -1) {
		setScriptReturn(false);
	} else {
		a = loadFile(bf);
		if (a)
			setScriptReturn(badload(a));
		else
			setScriptReturn(true);
	}
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:34,代码来源:script_pn.cpp

示例4: readfromline

void AGOSEngine_PN::opn_opcode63() {
	int a = readfromline();
	switch (a) {
		case 65:
			setScriptReturn(inventoryOn(varval()));
			break;
		case 64:
			setScriptReturn((_videoLockOut & 0x10) != 0);
			break;
		case 63:
			setScriptReturn(inventoryOff());
			break;
		default:
			error("opn_opcode63: unknown code %d", a);
	}
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:16,代码来源:script_pn.cpp

示例5: doaction

void AGOSEngine_PN::opn_opcode42() {
	int a = doaction();
	if (_dolineReturnVal != 0)
		return;
	int b = doaction();
	setScriptReturn(a ^ b);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:7,代码来源:script_pn.cpp

示例6: sprintf

void AGOSEngine_PN::opn_opcode12() {
	char bf[8];
	int a = 0;
	sprintf(bf,"%d", varval());
	while (bf[a])
		pcf(bf[a++]);
	setScriptReturn(true);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:8,代码来源:script_pn.cpp

示例7: clearInputLine

void AGOSEngine_PN::opn_opcode38() {
	_noScanFlag = 1;
	clearInputLine();
	writeval(_workptr, _keyPressed.ascii);
	_keyPressed.reset();
	_noScanFlag = 0;
	varval();
	setScriptReturn(true);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:9,代码来源:script_pn.cpp

示例8: interact

void AGOSEngine_PN::opn_opcode37() {
	_curwrdptr = NULL;

	_inputReady = true;
	interact(_inputline, 49);

	if ((_inpp = strchr(_inputline,'\n')) != NULL)
		*_inpp = '\0';
	_inpp = _inputline;
	setScriptReturn(true);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:11,代码来源:script_pn.cpp

示例9: endCutscene

void AGOSEngine_Simon2::os2_rescan() {
	// 83: restart subroutine
	if (_exitCutscene) {
		if (getBitFlag(9)) {
			endCutscene();
		}
	} else {
		processSpecialKeys();
	}

	setScriptReturn(-10);
}
开发者ID:AdamRi,项目名称:scummvm-pink,代码行数:12,代码来源:script_s2.cpp

示例10: dumpOpcode

int AGOSEngine::runScript() {
	bool flag;

	if (shouldQuit())
		return 1;

	do {
		if (DebugMan.isDebugChannelEnabled(kDebugOpcode))
			dumpOpcode(_codePtr);

		if (getGameType() == GType_ELVIRA1) {
			_opcode = getVarOrWord();
			if (_opcode == 10000)
				return 0;
		} else {
			_opcode = getByte();
			if (_opcode == 0xFF)
				return 0;
		}

		if (_runScriptReturn1)
			return 1;

		/* Invert condition? */
		flag = false;
		if (getGameType() == GType_ELVIRA1) {
			if (_opcode == 203) {
				flag = true;
				_opcode = getVarOrWord();
				if (_opcode == 10000)
					return 0;
			}
		} else {
			if (_opcode == 0) {
				flag = true;
				_opcode = getByte();
				if (_opcode == 0xFF)
					return 0;
			}
		}

		setScriptCondition(true);
		setScriptReturn(0);

		if (_opcode > _numOpcodes)
			error("Invalid opcode '%d' encountered", _opcode);

		executeOpcode(_opcode);
	} while (getScriptCondition() != flag && !getScriptReturn() && !shouldQuit());

	return (shouldQuit()) ? 1 : getScriptReturn();
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:52,代码来源:script.cpp

示例11: vc27_resetSprite

void AGOSEngine_PN::opn_opcode53() {
	vc27_resetSprite();
	setScriptReturn(true);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:4,代码来源:script_pn.cpp

示例12: stopAnimate

void AGOSEngine_PN::opn_opcode54() {
	stopAnimate(varval());
	setScriptReturn(true);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:4,代码来源:script_pn.cpp

示例13: pmesd

void AGOSEngine_PN::opn_opcode47() {
	pmesd(varval() * 256 + varval());
	setScriptReturn(true);
}
开发者ID:0xf1sh,项目名称:scummvm,代码行数:4,代码来源:script_pn.cpp


注:本文中的setScriptReturn函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。