public override void Initialize() { InitializationSettings settings = GetSubSystem <InitializationSettings>(); m_keymap.Clear(); foreach (var kvp in settings.SystemKeys) { m_keymap.Add(kvp.Value, new ButtonWrapper(0, kvp.Key)); } foreach (var kvp in settings.Player1Keys) { m_keymap.Add(kvp.Value, new ButtonWrapper(1, kvp.Key)); } foreach (var kvp in settings.Player2Keys) { m_keymap.Add(kvp.Value, new ButtonWrapper(2, kvp.Key)); } #if FRANTZX m_keymap.Add(Keys.P, new ButtonWrapper(2, PlayerButton.Y)); m_keymap.Add(Keys.OemOpenBrackets, new ButtonWrapper(0, SystemButton.Pause)); #endif }
public override void Initialize() { m_sounddevice.SetCooperativeLevel(SubSystems.Game.Window.Handle, CooperativeLevel.Priority); InitializationSettings settings = GetSubSystem <InitializationSettings>(); CreateSoundChannels(settings.SoundChannels); }
public static bool Initialize(InitializationSettings settings) { if (_Handle == IntPtr.Zero) { throw new InvalidOperationException(); } return(_EngineInitialize(ref settings)); }
public override void Initialize() { InitializationSettings settings = GetSubSystem <InitializationSettings>(); if (settings.ShowDiagnosticWindow == true || Debugger.IsAttached == true) { Start(); } }
public static void Init(InitializationSettings settings) { IsLoggingEnabled = settings.IsLoggingEnabled; #if UNITY_EDITOR AkCallbackSerializer.SetLocalOutput((uint)AkMonitorErrorLevel.ErrorLevel_All); #endif AkCallbackSerializer.Init(); }
public static AKRESULT Init(InitializationSettings settings) { IsLoggingEnabled = settings.IsLoggingEnabled; m_pNotifMem = settings.BufferSize > 0 ? System.Runtime.InteropServices.Marshal.AllocHGlobal(settings.BufferSize) : System.IntPtr.Zero; #if UNITY_EDITOR AkCallbackSerializer.SetLocalOutput((uint)AkMonitorErrorLevel.ErrorLevel_All); #endif return(AkCallbackSerializer.Init(m_pNotifMem, (uint)settings.BufferSize)); }
public override void Initialize() { InitializationSettings settings = GetSubSystem <InitializationSettings>(); #if FRANTZX ScreenSize = Mugen.ScreenSize * 2; #else ScreenSize = settings.ScreenSize; #endif m_renderer.UseOldShader = settings.UseOldShader; m_devicemanager.SynchronizeWithVerticalRetrace = settings.VSync; m_devicemanager.MinimumPixelShaderProfile = m_renderer.UseOldShader ? ShaderProfile.PS_2_0 : ShaderProfile.PS_3_0; m_devicemanager.ApplyChanges(); }
public void TakeScreenshot() { if (m_screenshot == null) { return; } Device.ResolveBackBuffer(m_screenshot); InitializationSettings settings = GetSubSystem <InitializationSettings>(); String extension = null; ImageFileFormat format = ImageFileFormat.Bmp; switch (settings.ScreenShotFormat) { case ScreenShotFormat.Bmp: extension = "bmp"; format = ImageFileFormat.Bmp; break; case ScreenShotFormat.Jpg: extension = "jpg"; format = ImageFileFormat.Jpg; break; case ScreenShotFormat.Png: extension = "png"; format = ImageFileFormat.Png; break; default: return; } m_stringbuilder.Length = 0; m_stringbuilder.AppendFormat(@"Screenshot {0:u}.{1}", DateTime.Now, extension).Replace(':', '-'); m_screenshot.Save(m_stringbuilder.ToString(), format); }
/// <summary> /// Initializes a new instance of the <see cref="GATDataAllocator"/> class. /// In most cases, only the default allocator initialized by GATManager is /// required. /// </summary> public GATDataAllocator( InitializationSettings initSettings ) { int i; _totalSize = ( int )( initSettings.preAllocatedAudioDuration * GATInfo.OutputSampleRate ); _mainBuffer = new float[ _totalSize ]; _pool = new Stack< GATManagedData >( initSettings.maxConcurrentSamples ); _binWidth = initSettings.binWidth; _nbOfBins = initSettings.nbOfBins; for( i = 0; i < initSettings.maxConcurrentSamples; i++ ) { GATManagedData data = new GATManagedData( this ); _pool.Push( data ); } _freeChunksBins = new Stack< GATManagedData >[ _nbOfBins ]; for( i = 0; i < _nbOfBins; i++ ) { _freeChunksBins[i] = new Stack< GATManagedData >(20); } InitCursors(); _maxBinSize = _nbOfBins * _binWidth; #if !UNITY_WEBPLAYER _mainBufferHandle = GCHandle.Alloc( _mainBuffer, GCHandleType.Pinned ); _mainBufferPointer = _mainBufferHandle.AddrOfPinnedObject(); #endif #if GAT_DEBUG Debug.Log( "GATDataAllocator initialized, total size: " + _totalSize + " largest allocatable chunk: " + _maxBinSize ); #endif }
/// <summary> /// Initializes a new instance of the <see cref="GATDataAllocator"/> class. /// In most cases, only the default allocator initialized by GATManager is /// required. /// </summary> public GATDataAllocator(InitializationSettings initSettings) { int i; _totalSize = ( int )(initSettings.preAllocatedAudioDuration * GATInfo.OutputSampleRate); _mainBuffer = new float[_totalSize]; _pool = new Stack <GATManagedData>(initSettings.maxConcurrentSamples); _binWidth = initSettings.binWidth; _nbOfBins = initSettings.nbOfBins; for (i = 0; i < initSettings.maxConcurrentSamples; i++) { GATManagedData data = new GATManagedData(this); _pool.Push(data); } _freeChunksBins = new Stack <GATManagedData> [_nbOfBins]; for (i = 0; i < _nbOfBins; i++) { _freeChunksBins[i] = new Stack <GATManagedData>(20); } InitCursors(); _maxBinSize = _nbOfBins * _binWidth; #if !UNITY_WEBPLAYER _mainBufferHandle = GCHandle.Alloc(_mainBuffer, GCHandleType.Pinned); _mainBufferPointer = _mainBufferHandle.AddrOfPinnedObject(); #endif #if GAT_DEBUG Debug.Log("GATDataAllocator initialized, total size: " + _totalSize + " largest allocatable chunk: " + _maxBinSize); #endif }
public override void Initialize() { InitializationSettings settings = GetSubSystem <InitializationSettings>(); CreateSoundChannels(settings.SoundChannels); }