private IO.TextFile LoadIniFile() { #if FRANTZX var dir = System.IO.Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]); var inipath = System.IO.Path.Combine(dir, @"xnaMugen.ini"); return(SubSystems.GetSubSystem <IO.FileSystem>().OpenTextFile(inipath)); #else return(GetSubSystem <IO.FileSystem>().OpenTextFile(@"xnaMugen.ini")); #endif }
IO.TextFile LoadIniFile() { #if FRANTZX String exepath = Environment.CommandLine.Substring(1, Environment.CommandLine.IndexOf("\"", 1) - 1); String dir = System.IO.Path.GetDirectoryName(exepath); String inipath = System.IO.Path.Combine(dir, @"xnaMugen.ini"); return(SubSystems.GetSubSystem <IO.FileSystem>().OpenTextFile(inipath)); #else return(GetSubSystem <IO.FileSystem>().OpenTextFile(@"xnaMugen.ini")); #endif }
/// <summary> /// Initializes engine subsystems, including drawing, sound and input. /// </summary> protected override void Initialize() { m_subsystems = new SubSystems(this); m_subsystems.LoadAllSubSystems(); m_subsystems.GetSubSystem <IO.FileSystem>().Initialize(); m_subsystems.GetSubSystem <InitializationSettings>().Initialize(); m_subsystems.GetSubSystem <ProfileLoader>().Initialize(); m_subsystems.GetSubSystem <Input.InputSystem>().Initialize(); m_subsystems.GetSubSystem <Video.VideoSystem>().Initialize(); m_subsystems.GetSubSystem <Audio.SoundSystem>().Initialize(); m_subsystems.GetSubSystem <Diagnostics.DiagnosticSystem>().Initialize(); m_subsystems.LoadAllMainSystems(); m_subsystems.GetSubSystem <Input.InputSystem>().CurrentInput[0].Add(SystemButton.DebugDraw, ToggleDebugDraw); m_subsystems.GetSubSystem <Input.InputSystem>().CurrentInput[0].Add(SystemButton.TakeScreenshot, TakeScreenshot); base.Initialize(); }
protected override void Initialize() { m_subsystems = new SubSystems(this); m_subsystems.GetSubSystem <IO.FileSystem>().Initialize(); m_subsystems.GetSubSystem <InitializationSettings>().Initialize(); m_subsystems.GetSubSystem <Input.InputSystem>().Initialize(); m_subsystems.GetSubSystem <Video.VideoSystem>().Initialize(); //m_font = m_subsystems.GetSubSystem<Drawing.SpriteSystem>().LoadFont(@"font/num1.fnt"); //m_sprites = m_subsystems.GetSubSystem<Drawing.SpriteSystem>().CreateManager(@"chars/BuraiYamamoto/Burai.sff"); //m_animations = m_subsystems.GetSubSystem<Animations.AnimationSystem>().CreateManager(@"chars/BuraiYamamoto/Burai.air"); m_sprites = m_subsystems.GetSubSystem <Drawing.SpriteSystem>().CreateManager(@"chars/kfm/kfm.sff"); m_animations = m_subsystems.GetSubSystem <Animations.AnimationSystem>().CreateManager(@"chars/kfm/kfm.air"); m_animations.SetLocalAnimation(0, 0); m_sprites.LoadSprites(m_animations.CurrentAnimation); m_subsystems.GetSubSystem <Input.InputSystem>().CurrentInput[0].Add(SystemButton.DebugDraw, this.Click); base.Initialize(); }