示例#1
0
文件: timer_rpg.cpp 项目: 33d/scummvm
void KyraRpgEngine::timerProcessDoors(int timerNum) {
	for (int i = 0; i < 3; i++) {
		uint16 b = _openDoorState[i].block;
		if (!b)
			continue;

		int v = _openDoorState[i].state;
		int c = _openDoorState[i].wall;

		_levelBlockProperties[b].walls[c] += v;
		_levelBlockProperties[b].walls[c ^ 2] += v;

		int snd = 3;
		int flg = _wllWallFlags[_levelBlockProperties[b].walls[c]];
		if (flg & 0x20)
			snd = 5;
		else if (v == -1)
			snd = 4;

		if (_flags.gameID == GI_LOL) {
			if (!(_updateFlags & 1)) {
				snd_processEnvironmentalSoundEffect(snd + 28, b);
				if (!checkSceneUpdateNeed(b))
					updateEnvironmentalSfx(0);
			}
		} else {
			checkSceneUpdateNeed(b);
			updateEnvironmentalSfx(snd);
		}

		if (flg & 0x30)
			_openDoorState[i].block = 0;
	}
}
示例#2
0
void KyraRpgEngine::updateEnvironmentalSfx(int soundId) {
	snd_processEnvironmentalSoundEffect(soundId, _currentBlock);
}