您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ syncSoundSettings函数代码示例

51自学网 2021-06-03 08:36:33
  C++
这篇教程C++ syncSoundSettings函数代码示例写得很实用,希望能帮到您。

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

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

示例1: Engine

LastExpressEngine::LastExpressEngine(OSystem *syst, const ADGameDescription *gd) :    Engine(syst), _gameDescription(gd), _debugger(NULL), _cursor(NULL),    _font(NULL), _logic(NULL), _menu(NULL), _frameCounter(0), _lastFrameCount(0),	_graphicsMan(NULL), _resMan(NULL), _sceneMan(NULL), _soundMan(NULL),	_eventMouse(NULL), _eventTick(NULL), _eventMouseBackup(NULL), _eventTickBackup(NULL) {	// Setup mixer	syncSoundSettings();	// Adding the default directories	const Common::FSNode gameDataDir(ConfMan.get("path"));	SearchMan.addSubDirectoryMatching(gameDataDir, "data");	// Initialize the custom debug levels	DebugMan.addDebugChannel(kLastExpressDebugAll, "All", "Debug everything");	DebugMan.addDebugChannel(kLastExpressDebugGraphics, "Graphics", "Debug graphics & animation/sequence playback");	DebugMan.addDebugChannel(kLastExpressDebugResource, "Resource", "Debug resource management");	DebugMan.addDebugChannel(kLastExpressDebugCursor, "Cursor", "Debug cursor handling");	DebugMan.addDebugChannel(kLastExpressDebugSound, "Sound", "Debug sound playback");	DebugMan.addDebugChannel(kLastExpressDebugSubtitle, "Subtitle", "Debug subtitles");	DebugMan.addDebugChannel(kLastExpressDebugSavegame, "Savegame", "Debug savegames");	DebugMan.addDebugChannel(kLastExpressDebugLogic, "Logic", "Debug logic");	DebugMan.addDebugChannel(kLastExpressDebugScenes, "Scenes", "Debug scenes & hotspots");	DebugMan.addDebugChannel(kLastExpressDebugUnknown, "Unknown", "Debug unknown data");	g_eventRec.registerRandomSource(_random, "lastexpress");}
开发者ID:St0rmcrow,项目名称:scummvm,代码行数:26,


示例2: Engine

MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {	const GameSettings *g;	const char *gameid = ConfMan.get("gameid").c_str();	for (g = madeSettings; g->gameid; ++g)		if (!scumm_stricmp(g->gameid, gameid))			_gameId = g->id;	_rnd = new Common::RandomSource();	syst->getEventManager()->registerRandomSource(*_rnd, "made");	int cd_num = ConfMan.getInt("cdrom");	if (cd_num >= 0)		_system->openCD(cd_num);	_pmvPlayer = new PmvPlayer(this, _mixer);	_res = new ResourceReader();	_screen = new Screen(this);	if (getGameID() == GID_LGOP2 || getGameID() == GID_MANHOLE || getGameID() == GID_RODNEY) {		_dat = new GameDatabaseV2(this);	} else if (getGameID() == GID_RTZ) {		_dat = new GameDatabaseV3(this);	} else {		error("Unknown GameID");	}	_script = new ScriptInterpreter(this);	int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);	bool native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32"));	//bool adlib = (midiDriver == MD_ADLIB);	MidiDriver *driver = MidiDriver::createMidi(midiDriver);	if (native_mt32)		driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);	_music = new MusicPlayer(driver);	_music->setNativeMT32(native_mt32);	//_music->setAdlib(adlib);	// Set default sound frequency	switch (getGameID()) {	case GID_RODNEY:		_soundRate = 11025;		break;	case GID_MANHOLE:		_soundRate = 11025;		break;	case GID_LGOP2:		_soundRate = 8000;		break;	case GID_RTZ:		// Return to Zork sets it itself via a script funtion		break;	}	syncSoundSettings();}
开发者ID:havlenapetr,项目名称:Scummvm,代码行数:60,


示例3: MainMenuDialog

void Engine::openMainMenuDialog() {	if (!_mainMenuDialog)		_mainMenuDialog = new MainMenuDialog(this);	setGameToLoadSlot(-1);	runDialog(*_mainMenuDialog);	// Load savegame after main menu execution	// (not from inside the menu loop to avoid	// mouse cursor glitches and simliar bugs,	// e.g. #2822778).	if (_saveSlotToLoad >= 0) {		Common::Error status = loadGameState(_saveSlotToLoad);		if (status.getCode() != Common::kNoError) {			Common::String failMessage = Common::String::format(_("Failed to load saved game (%s)! "				  "Please consult the README for basic information, and for "				  "instructions on how to obtain further assistance."), status.getDesc().c_str());			GUI::MessageDialog dialog(failMessage);			dialog.runModal();		}	}	syncSoundSettings();}
开发者ID:DouglasLiuGamer,项目名称:residualvm,代码行数:25,


示例4: FileManager

bool XeenEngine::initialize() {	// Create sub-objects of the engine	_files = new FileManager(this);	if (!_files->setup())		return false;	_resources = new Resources();	_combat = new Combat(this);	_debugger = new Debugger(this);	_events = new EventsManager(this);	_interface = new Interface(this);	_locations = new LocationManager();	_map = new Map(this);	_party = new Party(this);	_patcher = new Patcher();	_saves = new SavesManager(_targetName);	_screen = new Screen(this);	_scripts = new Scripts(this);	_sound = new Sound(_mixer);	_spells = new Spells(this);	_windows = new Windows();	// Set graphics mode	initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT);	// Setup mixer	syncSoundSettings();	// Load settings	loadSettings();	return true;}
开发者ID:lskovlun,项目名称:scummvm,代码行数:33,


示例5: Saver

void TSageEngine::initialize() {	_saver = new Saver();	// Set up the resource manager	_resourceManager = new ResourceManager();	if (_vm->getFeatures() & GF_DEMO) {		// Add the single library file associated with the demo		_resourceManager->addLib(getPrimaryFilename());	} else if (_vm->getGameID() == GType_Ringworld) {		_resourceManager->addLib("RING.RLB");		_resourceManager->addLib("TSAGE.RLB");	} else if (_vm->getGameID() == GType_BlueForce) {		_resourceManager->addLib("BLUE.RLB");		if (_vm->getFeatures() & GF_FLOPPY) {			_resourceManager->addLib("FILES.RLB");			_resourceManager->addLib("TSAGE.RLB");		}	}	_globals = new Globals();	_globals->gfxManager().setDefaults();	// Setup sound settings	syncSoundSettings();}
开发者ID:michailBs,项目名称:scummvm,代码行数:25,


示例6: initGraphics

Common::Error QueenEngine::run() {	initGraphics(GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT, false);	_resource = new Resource();	_bam = new BamScene(this);	_bankMan = new BankManager(_resource);	_command = new Command(this);	_debugger = new Debugger(this);	_display = new Display(this, _system);	_graphics = new Graphics(this);	_grid = new Grid(this);	_input = new Input(_resource->getLanguage(), _system, this);	if (_resource->isDemo()) {		_logic = new LogicDemo(this);	} else if (_resource->isInterview()) {		_logic = new LogicInterview(this);	} else {		_logic = new LogicGame(this);	}	_sound = Sound::makeSoundInstance(_mixer, this, _resource->getCompression());	_walk = new Walk(this);	//_talkspeedScale = (MAX_TEXT_SPEED - MIN_TEXT_SPEED) / 255.0;	registerDefaultSettings();	// Setup mixer	syncSoundSettings();	_logic->start();	if (ConfMan.hasKey("save_slot") && canLoadOrSave()) {		loadGameState(ConfMan.getInt("save_slot"));	}	_lastSaveTime = _lastUpdateTime = _system->getMillis();	while (!shouldQuit()) {		if (_logic->newRoom() > 0) {			_logic->update();			_logic->oldRoom(_logic->currentRoom());			_logic->currentRoom(_logic->newRoom());			_logic->changeRoom();			_display->fullscreen(false);			if (_logic->currentRoom() == _logic->newRoom()) {				_logic->newRoom(0);			}		} else if (_logic->joeWalk() == JWM_EXECUTE) {			_logic->joeWalk(JWM_NORMAL);			_command->executeCurrentAction();		} else {			_logic->joeWalk(JWM_NORMAL);			update(true);		}	}	return Common::kNoError;}
开发者ID:mauimauer,项目名称:scummvm,代码行数:59,


示例7: MusicPlayer

Common::Error MadeEngine::run() {	_music = new MusicPlayer(getGameID() == GID_RTZ);	syncSoundSettings();	// Initialize backend	initGraphics(320, 200, false);	resetAllTimers();	if (getGameID() == GID_RTZ) {		if (getFeatures() & GF_DEMO) {			_dat->open("demo.dat");			_res->open("demo.prj");		} else if (getFeatures() & GF_CD) {			_dat->open("rtzcd.dat");			_res->open("rtzcd.prj");		} else if (getFeatures() & GF_CD_COMPRESSED) {			_dat->openFromRed("rtzcd.red", "rtzcd.dat");			_res->open("rtzcd.prj");		} else if (getFeatures() & GF_FLOPPY) {			_dat->open("rtz.dat");			_res->open("rtz.prj");		} else {			error("Unknown RTZ game features");		}	} else if (getGameID() == GID_MANHOLE) {		_dat->open("manhole.dat");		if (getVersion() == 2) {			_res->open("manhole.prj");		} else {			_res->openResourceBlocks();		}	} else if (getGameID() == GID_LGOP2) {		_dat->open("lgop2.dat");		_res->open("lgop2.prj");	} else if (getGameID() == GID_RODNEY) {		_dat->open("rodneys.dat");		_res->open("rodneys.prj");	} else {		error ("Unknown MADE game");	}	if ((getFeatures() & GF_CD) || (getFeatures() & GF_CD_COMPRESSED))		checkCD();	_autoStopSound = false;	_eventNum = _eventKey = _eventMouseX = _eventMouseY = 0;#ifdef DUMP_SCRIPTS	_script->dumpAllScripts();#else	_screen->setDefaultMouseCursor();	_script->runScript(_dat->getMainCodeObjectIndex());#endif	return Common::kNoError;}
开发者ID:Cruel,项目名称:scummvm,代码行数:58,


示例8: AgiBase

AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBase(syst, gameDesc) {	// Setup mixer	syncSoundSettings();	parseFeatures();	DebugMan.addDebugChannel(kDebugLevelMain, "Main", "Generic debug level");	DebugMan.addDebugChannel(kDebugLevelResources, "Resources", "Resources debugging");	DebugMan.addDebugChannel(kDebugLevelSprites, "Sprites", "Sprites debugging");	DebugMan.addDebugChannel(kDebugLevelInventory, "Inventory", "Inventory debugging");	DebugMan.addDebugChannel(kDebugLevelInput, "Input", "Input events debugging");	DebugMan.addDebugChannel(kDebugLevelMenu, "Menu", "Menu debugging");	DebugMan.addDebugChannel(kDebugLevelScripts, "Scripts", "Scripts debugging");	DebugMan.addDebugChannel(kDebugLevelSound, "Sound", "Sound debugging");	DebugMan.addDebugChannel(kDebugLevelText, "Text", "Text output debugging");	DebugMan.addDebugChannel(kDebugLevelSavegame, "Savegame", "Saving & restoring game debugging");	memset(&_game, 0, sizeof(struct AgiGame));	memset(&_debug, 0, sizeof(struct AgiDebug));	memset(&_mouse, 0, sizeof(struct Mouse));	_game._vm = this;	_game.clockEnabled = false;	_game.state = STATE_INIT;	_keyQueueStart = 0;	_keyQueueEnd = 0;	_allowSynthetic = false;	_intobj = NULL;	_menu = NULL;	_menuSelected = false;	_lastSentence[0] = 0;	memset(&_stringdata, 0, sizeof(struct StringData));	_objects = NULL;	_restartGame = false;	_oldMode = INPUT_NONE;	_firstSlot = 0;	resetControllers();	setupOpcodes();	_game._curLogic = NULL;	_timerHack = 0;}
开发者ID:CatalystG,项目名称:scummvm,代码行数:55,


示例9: init

void TSageEngine::initialize() {	// Set up the correct graphics mode	init();	g_saver = new Saver();	// Set up the resource manager	g_resourceManager = new ResourceManager();	if (g_vm->getGameID() == GType_Ringworld) {		if (g_vm->getFeatures() & GF_DEMO) {			// Add the single library file associated with the demo			g_resourceManager->addLib(getPrimaryFilename());			g_globals = new Globals();		} else {			g_resourceManager->addLib("RING.RLB");			g_resourceManager->addLib("TSAGE.RLB");			g_globals = new Globals();		}	} else if (g_vm->getGameID() == GType_BlueForce) {		g_resourceManager->addLib("BLUE.RLB");		if (g_vm->getFeatures() & GF_FLOPPY) {			g_resourceManager->addLib("FILES.RLB");			g_resourceManager->addLib("TSAGE.RLB");		}		g_globals = new BlueForce::BlueForceGlobals();		// Setup the user interface		T2_GLOBALS._uiElements.setup(Common::Point(0, UI_INTERFACE_Y - 2));		// Reset all global variables		BF_GLOBALS.reset();	} else if (g_vm->getGameID() == GType_Ringworld2) {		g_resourceManager->addLib("R2RW.RLB");		g_globals = new Ringworld2::Ringworld2Globals();		// Setup the user interface		T2_GLOBALS._uiElements.setup(Common::Point(0, UI_INTERFACE_Y));		// Reset all global variables		R2_GLOBALS.reset();	} else if (g_vm->getGameID() == GType_Sherlock1) {#ifdef TSAGE_SHERLOCK_ENABLED		g_resourceManager->addLib("SF3.RLB");		g_globals = new Globals();		return;#endif	}	g_globals->gfxManager().setDefaults();	// Setup sound settings	syncSoundSettings();}
开发者ID:AReim1982,项目名称:scummvm,代码行数:54,


示例10: Engine

MohawkEngine::MohawkEngine(OSystem *syst, const MohawkGameDescription *gamedesc) : Engine(syst), _gameDescription(gamedesc) {	if (!_mixer->isReady())		error ("Sound initialization failed");	// Setup mixer	syncSoundSettings();	_video = 0;	_pauseDialog = 0;	_cursor = 0;}
开发者ID:86400,项目名称:scummvm,代码行数:11,


示例11: Engine

Sword25Engine::Sword25Engine(OSystem *syst, const ADGameDescription *gameDesc):	Engine(syst),	_gameDescription(gameDesc) {	// Setup mixer	syncSoundSettings();	DebugMan.addDebugChannel(kDebugScript, "Script", "Script debug level");	DebugMan.addDebugChannel(kDebugScript, "Scripts", "Script debug level");	DebugMan.addDebugChannel(kDebugSound, "Sound", "Sound debug level");	_console = new Sword25Console(this);}
开发者ID:AdamRi,项目名称:scummvm-pink,代码行数:12,


示例12: Engine

CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc)	: Engine(syst), _gameDescription(gameDesc), _rnd("cruise") {	DebugMan.addDebugChannel(kCruiseDebugScript, "scripts", "Scripts debug level");	DebugMan.addDebugChannel(kCruiseDebugSound, "sound", "Sound debug level");	_vm = this;	_debugger = new Debugger();	_sound = new PCSound(_mixer, this);	// Setup mixer	syncSoundSettings();}
开发者ID:33d,项目名称:scummvm,代码行数:13,


示例13: Engine

CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {	// Setup mixer	syncSoundSettings();	DebugMan.addDebugChannel(kCineDebugScript,    "Script",    "Script debug level");	DebugMan.addDebugChannel(kCineDebugPart,      "Part",      "Part debug level");	DebugMan.addDebugChannel(kCineDebugSound,     "Sound",     "Sound debug level");	DebugMan.addDebugChannel(kCineDebugCollision, "Collision", "Collision debug level");	_console = new CineConsole(this);	g_cine = this;	g_eventRec.registerRandomSource(_rnd, "cine");}
开发者ID:St0rmcrow,项目名称:scummvm,代码行数:14,


示例14: syncSoundSettings

void SherlockEngine::loadConfig() {	// Load sound settings	syncSoundSettings();	ConfMan.registerDefault("font", getGameID() == GType_SerratedScalpel ? 1 : 4);	_screen->setFont(ConfMan.getInt("font"));	if (getGameID() == GType_SerratedScalpel)		_screen->_fadeStyle = ConfMan.getBool("fade_style");	_ui->_helpStyle = ConfMan.getBool("help_style");	_ui->_slideWindows = ConfMan.getBool("window_style");	_people->_portraitsOn = ConfMan.getBool("portraits_on");}
开发者ID:Cruel,项目名称:scummvm,代码行数:14,


示例15: syncSoundSettings

void Engine::flipMute() {	// Mute will be set to true by default here. This has two reasons:	// - if the game already has an "mute" config entry, it will be overwritten anyway.	// - if it does not have a "mute" config entry, the sound is unmuted currently and should be muted now.	bool mute = true;	if (ConfMan.hasKey("mute")) {		mute = !ConfMan.getBool("mute");	}	ConfMan.setBool("mute", mute);	syncSoundSettings();}
开发者ID:Deledrius,项目名称:residual,代码行数:14,


示例16: initGraphics

Common::Error LureEngine::init() {	int_engine = this;	_initialized = false;	_saveLoadAllowed = false;	initGraphics(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT, false);	// Check the version of the lure.dat file	Common::File f;	VersionStructure version;	if (!f.open(SUPPORT_FILENAME)) {		GUIError("Could not locate Lure support file");		return Common::kUnknownError;	}	f.seek(0xbf * 8);	f.read(&version, sizeof(VersionStructure));	f.close();	if (READ_LE_UINT16(&version.id) != 0xffff) {		GUIError("Error validating %s - file is invalid or out of date", SUPPORT_FILENAME);		return Common::kUnknownError;	} else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR)) {		GUIError("Incorrect version of %s file - expected %d.%d but got %d.%d",			SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,			version.vMajor, version.vMinor);		return Common::kUnknownError;	}	_disk = new Disk();	_resources = new Resources();	_strings = new StringData();	_screen = new Screen(*_system);	_mouse = new Mouse();	_events = new Events();	_menu = new Menu();	Surface::initialize();	_room = new Room();	_fights = new FightsManager();	_gameToLoad = -1;	_initialized = true;	// Setup mixer	syncSoundSettings();	return Common::kNoError;}
开发者ID:AlbanBedel,项目名称:scummvm,代码行数:48,


示例17: syncSoundSettings

Common::Error DreamWebEngine::run() {	syncSoundSettings();	_console = new DreamWebConsole(this);	ConfMan.registerDefault("dreamweb_originalsaveload", "false");	_hasSpeech = Common::File::exists("speech/r01c0000.raw") && !ConfMan.getBool("speech_mute");	_timer->installTimerProc(vSyncInterrupt, 1000000 / 70, this, "dreamwebVSync");	dreamweb();	dreamwebFinalize();	_quitRequested = false;	_timer->removeTimerProc(vSyncInterrupt);	return Common::kNoError;}
开发者ID:rkmarvin,项目名称:scummvm,代码行数:16,


示例18: Engine

TonyEngine::TonyEngine(OSystem *syst, const TonyGameDescription *gameDesc) : Engine(syst),	_gameDescription(gameDesc), _randomSource("tony") {	g_vm = this;	_loadSlotNumber = -1;	// Set the up the debugger	_debugger = new Debugger();	DebugMan.addDebugChannel(kTonyDebugAnimations, "animations", "Animations debugging");	DebugMan.addDebugChannel(kTonyDebugActions, "actions", "Actions debugging");	DebugMan.addDebugChannel(kTonyDebugSound, "sound", "Sound debugging");	DebugMan.addDebugChannel(kTonyDebugMusic, "music", "Music debugging");	// Add folders to the search directory list	const Common::FSNode gameDataDir(ConfMan.get("path"));	SearchMan.addSubDirectoryMatching(gameDataDir, "Voices");	SearchMan.addSubDirectoryMatching(gameDataDir, "Roasted");	SearchMan.addSubDirectoryMatching(gameDataDir, "Music");	SearchMan.addSubDirectoryMatching(gameDataDir, "Music/utilsfx");	SearchMan.addSubDirectoryMatching(gameDataDir, "Music/Layer");	// Set up load slot number	_initialLoadSlotNumber = -1;	if (ConfMan.hasKey("save_slot")) {		int slotNumber = ConfMan.getInt("save_slot");		if (slotNumber >= 0 && slotNumber <= 99)			_initialLoadSlotNumber = slotNumber;	}	// Load the ScummVM sound settings	syncSoundSettings();	_hEndOfFrame = 0;	for (int i = 0; i < 6; i++)		_stream[i] = NULL;	for (int i = 0; i < MAX_SFX_CHANNELS; i++) {		_sfx[i] = NULL;		_utilSfx[i] = NULL;	}	_bPaused = false;	_bDrawLocation = false;	_startTime = 0;	_curThumbnail = NULL;	_bQuitNow = false;	_bTimeFreezed = false;	_nTimeFreezed = 0;	_vdbCodec = FPCODEC_UNKNOWN;}
开发者ID:Cruel,项目名称:scummvm,代码行数:47,


示例19: Engine

TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) :		Engine(syst), _gameDescription(gameDesc), _random("tinsel") {	_vm = this;	_config = new Config(this);	// Register debug flags	DebugMan.addDebugChannel(kTinselDebugAnimations, "animations", "Animations debugging");	DebugMan.addDebugChannel(kTinselDebugActions, "actions", "Actions debugging");	DebugMan.addDebugChannel(kTinselDebugSound, "sound", "Sound debugging");	DebugMan.addDebugChannel(kTinselDebugMusic, "music", "Music debugging");	// Setup mixer	syncSoundSettings();	// Add DW2 subfolder to search path in case user is running directly from the CDs	const Common::FSNode gameDataDir(ConfMan.get("path"));	SearchMan.addSubDirectoryMatching(gameDataDir, "dw2");	// Add subfolders needed for psx versions of Discworld 1	if (TinselV1PSX)		SearchMan.addDirectory(gameDataDir.getPath(), gameDataDir, 0, 3, true);	const GameSettings *g;	const char *gameid = ConfMan.get("gameid").c_str();	for (g = tinselSettings; g->gameid; ++g)		if (!scumm_stricmp(g->gameid, gameid))			_gameId = g->id;	int cd_num = ConfMan.getInt("cdrom");	if (cd_num >= 0)		_system->getAudioCDManager()->openCD(cd_num);	_midiMusic = new MidiMusicPlayer();	_pcmMusic = new PCMMusicPlayer();	_sound = new SoundManager(this);	_bmv = new BMVPlayer();	_mousePos.x = 0;	_mousePos.y = 0;	_keyHandler = NULL;	_dosPlayerDir = 0;}
开发者ID:Fyre91,项目名称:scummvm,代码行数:46,


示例20: debugC

Common::Error PinkEngine::init() {	debugC(10, kPinkDebugGeneral, "PinkEngine init");	initGraphics(640, 480);	Common::PEResources exeResources;	Common::String fileName = isPeril() ? "pptp.exe" : "hpp.exe";	if (!exeResources.loadFromEXE(fileName)) {		return Common::kNoGameDataFoundError;	}	_console = new Console(this);	_director = new Director();	initMenu(exeResources);	Common::String orbName;	Common::String broName;	if (isPeril()) {		orbName = "PPTP.ORB";		broName = "PPTP.BRO";		_bro = new BroFile;	} else {		orbName = "HPP.ORB";	}	if (!_orb.open(orbName) || (_bro && !_bro->open(broName) && _orb.getTimestamp() == _bro->getTimestamp()))		return Common::kNoGameDataFoundError;	if (!loadCursors(exeResources))		return Common::kNoGameDataFoundError;	setCursor(kLoadingCursor);	_orb.loadGame(this);	debugC(6, kPinkDebugGeneral, "Modules are loaded");	syncSoundSettings();	if (ConfMan.hasKey("save_slot"))		loadGameState(ConfMan.getInt("save_slot"));	else		initModule(_modules[0]->getName(), "", nullptr);	return Common::kNoError;}
开发者ID:Herschel,项目名称:scummvm,代码行数:45,


示例21: Engine

DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc),    _rnd("director") {    DebugMan.addDebugChannel(kDebugLingoExec, "lingoexec", "Lingo Execution");    DebugMan.addDebugChannel(kDebugLingoCompile, "lingocompile", "Lingo Compilation");    DebugMan.addDebugChannel(kDebugLoading, "loading", "Loading");    DebugMan.addDebugChannel(kDebugImages, "images", "Image drawing");    DebugMan.addDebugChannel(kDebugText, "text", "Text rendering");    if (!_mixer->isReady())        error("Sound initialization failed");    // Setup mixer    syncSoundSettings();    _sharedCasts = nullptr;    _currentScore = nullptr;    _soundManager = nullptr;    _currentPalette = nullptr;    _currentPaletteLength = 0;    _lingo = nullptr;    _sharedCasts = nullptr;    _sharedSound = nullptr;    _sharedBMP = nullptr;    _sharedSTXT = nullptr;    _sharedDIB = nullptr;    _mainArchive = nullptr;    _macBinary = nullptr;    _movies = nullptr;    _wm = nullptr;    const Common::FSNode gameDataDir(ConfMan.get("path"));    SearchMan.addSubDirectoryMatching(gameDataDir, "data");    SearchMan.addSubDirectoryMatching(gameDataDir, "install");    _colorDepth = 8;	// 256-color    _key = 0;    _keyCode = 0;    _machineType = 9; // Macintosh IIci}
开发者ID:86400,项目名称:scummvm,代码行数:44,


示例22: AgiBase

PreAgiEngine::PreAgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBase(syst, gameDesc) {	// Setup mixer	syncSoundSettings();	DebugMan.addDebugChannel(kDebugLevelMain, "Main", "Generic debug level");	DebugMan.addDebugChannel(kDebugLevelResources, "Resources", "Resources debugging");	DebugMan.addDebugChannel(kDebugLevelSprites, "Sprites", "Sprites debugging");	DebugMan.addDebugChannel(kDebugLevelInventory, "Inventory", "Inventory debugging");	DebugMan.addDebugChannel(kDebugLevelInput, "Input", "Input events debugging");	DebugMan.addDebugChannel(kDebugLevelMenu, "Menu", "Menu debugging");	DebugMan.addDebugChannel(kDebugLevelScripts, "Scripts", "Scripts debugging");	DebugMan.addDebugChannel(kDebugLevelSound, "Sound", "Sound debugging");	DebugMan.addDebugChannel(kDebugLevelText, "Text", "Text output debugging");	DebugMan.addDebugChannel(kDebugLevelSavegame, "Savegame", "Saving & restoring game debugging");	memset(&_game, 0, sizeof(struct AgiGame));	memset(&_debug, 0, sizeof(struct AgiDebug));	memset(&_mouse, 0, sizeof(struct Mouse));}
开发者ID:project-cabal,项目名称:cabal,代码行数:20,


示例23: MainMenuDialog

void Engine::openMainMenuDialog() {	if (!_mainMenuDialog)		_mainMenuDialog = new MainMenuDialog(this);	setGameToLoadSlot(-1);	runDialog(*_mainMenuDialog);	// Load savegame after main menu execution	// (not from inside the menu loop to avoid	// mouse cursor glitches and simliar bugs,	// e.g. #2822778).	// FIXME: For now we just ignore the return	// value, which is quite bad since it could	// be a fatal loading error, which renders	// the engine unusable.	if (_saveSlotToLoad >= 0)		loadGameState(_saveSlotToLoad);	syncSoundSettings();}
开发者ID:Deledrius,项目名称:residual,代码行数:21,


示例24: Engine

DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc),		_rnd("director") {	if (!_mixer->isReady())		error("Sound initialization failed");	// Setup mixer	syncSoundSettings();	_sharedCasts = new Common::HashMap<int, Cast *>;	_sharedDIB = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;	_sharedBMP = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;	_sharedSTXT = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;	_sharedSound = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;	_mainArchive = 0;	_macBinary = 0;	//FIXME	_sharedMMM = "SHARDCST.MMM";	_movies = new Common::HashMap<Common::String, Score *>;	const Common::FSNode gameDataDir(ConfMan.get("path"));	SearchMan.addSubDirectoryMatching(gameDataDir, "data");	SearchMan.addSubDirectoryMatching(gameDataDir, "install");}
开发者ID:iskrich,项目名称:director,代码行数:23,


示例25: Engine

MadsM4Engine::MadsM4Engine(OSystem *syst, const M4GameDescription *gameDesc) :	Engine(syst), _gameDescription(gameDesc) {	// Setup mixer	syncSoundSettings();	// FIXME	_vm = this;	_madsVm = NULL;	const Common::FSNode gameDataDir(ConfMan.get("path"));	SearchMan.addSubDirectoryMatching(gameDataDir, "goodstuf");	SearchMan.addSubDirectoryMatching(gameDataDir, "resource");	DebugMan.addDebugChannel(kDebugScript, "script", "Script debug level");	DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics debug level");	DebugMan.addDebugChannel(kDebugConversations, "conversations", "Conversations debugging");	DebugMan.addDebugChannel(kDebugSound, "sound", "Sounds debug level");	DebugMan.addDebugChannel(kDebugCore, "core", "Core debug level");	_resourceManager = NULL;	_globals = NULL;}
开发者ID:St0rmcrow,项目名称:scummvm,代码行数:23,


示例26: Engine

CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc)    : Engine(syst),      _gameDescription(gameDesc),      _rnd("cine") {    // Setup mixer    syncSoundSettings();    DebugMan.addDebugChannel(kCineDebugScript,    "Script",    "Script debug level");    DebugMan.addDebugChannel(kCineDebugPart,      "Part",      "Part debug level");    DebugMan.addDebugChannel(kCineDebugSound,     "Sound",     "Sound debug level");    DebugMan.addDebugChannel(kCineDebugCollision, "Collision", "Collision debug level");    _console = new CineConsole(this);    g_cine = this;    for (int i = 0; i < NUM_FONT_CHARS; i++) {        _textHandler.fontParamTable[i].characterIdx = 0;        _textHandler.fontParamTable[i].characterWidth = 0;    }    _restartRequested = false;    _preLoad = false;    _timerDelayMultiplier = 12;}
开发者ID:james-wallace-ghub,项目名称:scummvm,代码行数:23,


示例27: initGraphics

Common::Error HugoEngine::run() {	s_Engine = this;	initGraphics(320, 200, false);	_mouse = new MouseHandler(this);	_inventory = new InventoryHandler(this);	_route = new Route(this);	_sound = new SoundHandler(this);	// Setup mixer	syncSoundSettings();	_text = new TextHandler(this);	_topMenu = new TopMenu(this);	switch (_gameVariant) {	case kGameVariantH1Win: // H1 Win		_file = new FileManager_v1w(this);		_scheduler = new Scheduler_v1w(this);		_intro = new intro_v1w(this);		_screen = new Screen_v1w(this);		_parser = new Parser_v1w(this);		_object = new ObjectHandler_v1w(this);		_normalTPS = 9;		break;	case kGameVariantH2Win:		_file = new FileManager_v2w(this);		_scheduler = new Scheduler_v1w(this);		_intro = new intro_v2w(this);		_screen = new Screen_v1w(this);		_parser = new Parser_v1w(this);		_object = new ObjectHandler_v1w(this);		_normalTPS = 9;		break;	case kGameVariantH3Win:		_file = new FileManager_v2w(this);		_scheduler = new Scheduler_v1w(this);		_intro = new intro_v3w(this);		_screen = new Screen_v1w(this);		_parser = new Parser_v1w(this);		_object = new ObjectHandler_v1w(this);		_normalTPS = 9;		break;	case kGameVariantH1Dos: // H1 DOS		_file = new FileManager_v1d(this);		_scheduler = new Scheduler_v1d(this);		_intro = new intro_v1d(this);		_screen = new Screen_v1d(this);		_parser = new Parser_v1d(this);		_object = new ObjectHandler_v1d(this);		_normalTPS = 8;		break;	case kGameVariantH2Dos:		_file = new FileManager_v2d(this);		_scheduler = new Scheduler_v2d(this);		_intro = new intro_v2d(this);		_screen = new Screen_v1d(this);		_parser = new Parser_v2d(this);		_object = new ObjectHandler_v2d(this);		_normalTPS = 8;		break;	case kGameVariantH3Dos:		_file = new FileManager_v3d(this);		_scheduler = new Scheduler_v3d(this);		_intro = new intro_v3d(this);		_screen = new Screen_v1d(this);		_parser = new Parser_v3d(this);		_object = new ObjectHandler_v3d(this);		_normalTPS = 9;		break;	}	if (!loadHugoDat())		return Common::kUnknownError;	// Use Windows-looking mouse cursor	_screen->setCursorPal();	_screen->resetInventoryObjId();	_scheduler->initCypher();	initStatus();                                   // Initialize game status	initConfig();                                   // Initialize user's config	if (!_status._doQuitFl) {		initialize();		resetConfig();                              // Reset user's config		initMachine();		// Start the state machine		_status._viewState = kViewIntroInit;		int16 loadSlot = Common::ConfigManager::instance().getInt("save_slot");		if (loadSlot >= 0) {			_status._skipIntroFl = true;			_file->restoreGame(loadSlot);		} else {			_file->saveGame(0, "New Game");		}	}//.........这里部分代码省略.........
开发者ID:MaddTheSane,项目名称:scummvm,代码行数:101,


示例28: syncSoundSettings

void Sword2Engine::readSettings() {	syncSoundSettings();	_mouse->setObjectLabels(ConfMan.getBool("object_labels"));	_screen->setRenderLevel(ConfMan.getInt("gfx_details"));}
开发者ID:jweinberg,项目名称:scummvm,代码行数:5,



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


C++ sync_dirty_buffer函数代码示例
C++ symbols函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。