예제 #1
0
 public StringFormatter(SubSystems systems)
     : base(systems)
 {
     m_lock    = new Object();
     m_builder = new StringBuilder(100);
     m_args    = new List <Object>();
 }
예제 #2
0
 public StringConverter(SubSystems subsystems)
     : base(subsystems)
 {
     m_blendingregex    = new Regex(@"^AS(\d+)d(\d+)$", RegexOptions.IgnoreCase);
     m_printdataregex   = new Regex(@"^(\d+)\s*,\s*(\d+)\s*,?\s*?(-?\d+)?$", RegexOptions.IgnoreCase);
     m_hitpriorityregex = new Regex(@"^(\d+),\s*(\w+)$", RegexOptions.IgnoreCase);
     m_failure          = new object();
     m_conversionmap    = BuildConversionMap();
 }
예제 #3
0
        protected MainSystem(SubSystems subsystems)
        {
            if (subsystems == null)
            {
                throw new ArgumentNullException(nameof(subsystems));
            }

            m_subsystems = subsystems;
        }
예제 #4
0
        protected SubSystem(SubSystems subsystems)
        {
            if (subsystems == null)
            {
                throw new ArgumentNullException("subsystems");
            }

            m_subsystems = subsystems;
        }
예제 #5
0
        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
        }
예제 #7
0
 public InitializationSettings(SubSystems subsystems)
     : base(subsystems)
 {
     m_screensize       = Mugen.ScreenSize;
     m_useoldshader     = false;
     m_vsync            = true;
     m_diagonsticwindow = false;
     m_keeplog          = false;
     m_preloadsprites   = true;
     m_screenshotformat = ScreenShotFormat.Png;
     m_systemkeys       = new Dictionary <SystemButton, Keys>();
     m_p1keys           = new Dictionary <PlayerButton, Keys>();
     m_p2keys           = new Dictionary <PlayerButton, Keys>();
     m_roundlength      = 99;
     m_soundchannels    = 10;
     m_recordreplay     = false;
     m_quitafterreplay  = true;
 }
예제 #8
0
        /// <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();
        }
예제 #9
0
        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();
        }
예제 #10
0
 public ProfileLoader(SubSystems subsystems)
     : base(subsystems)
 {
     m_stages  = new List <StageProfile>();
     m_players = new List <PlayerSelect>();
 }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of this class with a time dependant seed.
 /// </summary>
 public Random(SubSystems subsystems)
     : base(subsystems)
 {
     Seed(Environment.TickCount);
 }