Beispiel #1
0
        private void Main4()
        {
            // *.INIT
            {
                // アプリ固有 >

                //RippleEffect.INIT();
                //画面分割.INIT();
                //画面分割_Effect.INIT();

                // < アプリ固有
            }

            //DDTouch.Touch(); // moved -> Logo

            if (DDConfig.LOG_ENABLED)
            {
                DDEngine.DispDebug = () =>
                {
                    DDPrint.SetPrint();
                    DDPrint.SetBorder(new I3Color(0, 0, 0));

                    DDPrint.Print(string.Join(
                                      " ",
                                      DDMouse.X,
                                      DDMouse.Y,
                                      Game.I == null ? "-" : "" + Game.I.Status.CurrPageIndex,

                                      // デバッグ表示する情報をここへ追加..

                                      DDEngine.FrameProcessingMillis,
                                      DDEngine.FrameProcessingMillis_Worst
                                      ));

                    DDPrint.Reset();
                };
            }

            if (ProcMain.DEBUG)
            {
                Main4_Debug();
            }
            else if (ProcMain.ArgsReader.HasArgs())             // シナリオファイルを指定して実行
            {
                string name            = ProcMain.ArgsReader.NextArg();
                string scenarioRootDir = Path.Combine(ProcMain.SelfDir, DDConsts.ResourceDir_InternalRelease, Scenario.SCENARIO_FILE_PREFIX);

                scenarioRootDir = SCommon.MakeFullPath(scenarioRootDir);

                name = SCommon.MakeFullPath(name);
                name = SCommon.ChangeRoot(name, scenarioRootDir);
                name = Path.Combine(Path.GetDirectoryName(name), Path.GetFileNameWithoutExtension(name));                 // remove extention

                using (new Game())
                {
                    Game.I.Status.Scenario = new Scenario(name);
                    Game.I.Perform();
                }
            }
            else
            {
                Main4_Release();
            }
        }
Beispiel #2
0
        private void Main4()
        {
            // *.INIT
            {
                // アプリ固有 >

                //RippleEffect.INIT();
                //画面分割.INIT();
                //画面分割_Effect.INIT();

                // < アプリ固有
            }

            #region Charge To DDTouch

            // DDCCResource 等のための Touch
            //DDTouch.Add(TitleMenu.TouchWallDrawerResources);

            // 個別に設定
            //DDTouch.Add(Ground.I.Picture.XXX);
            //DDTouch.Add(Ground.I.Music.XXX);
            //DDTouch.Add(Ground.I.SE.XXX);

            // 全部設定
            //DDTouch.AddAllPicture();
            //DDTouch.AddAllMusic();
            //DDTouch.AddAllSE();

            #endregion

            //DDTouch.Touch(); // moved -> Logo

            if (DDConfig.LOG_ENABLED)
            {
                DDEngine.DispDebug = () =>
                {
                    DDPrint.SetPrint();
                    DDPrint.SetBorder(new I3Color(0, 0, 0));

                    DDPrint.Print(string.Join(" ",
                                              DDEngine.FrameProcessingMillis,
                                              DDEngine.FrameProcessingMillis_Worst,
                                              DDMouse.X,
                                              DDMouse.Y

                                              // デバッグ表示する情報をここへ追加..
                                              ));

                    DDPrint.Reset();
                };
            }

            if (ProcMain.DEBUG)
            {
                Main4_Debug();
            }
            else if (ProcMain.ArgsReader.HasArgs())             // シナリオファイルを指定して実行
            {
                string name            = ProcMain.ArgsReader.NextArg();
                string scenarioRootDir = Path.Combine(ProcMain.SelfDir, DDConsts.ResourceDir_InternalRelease, Scenario.SCENARIO_FILE_PREFIX);

                scenarioRootDir = SCommon.MakeFullPath(scenarioRootDir);

                name = SCommon.MakeFullPath(name);
                name = SCommon.ChangeRoot(name, scenarioRootDir);
                name = Path.Combine(Path.GetDirectoryName(name), Path.GetFileNameWithoutExtension(name));                 // remove extention

                using (new Game())
                {
                    Game.I.Status.Scenario = new Scenario(name);
                    Game.I.Perform();
                }
            }
            else
            {
                Main4_Release();
            }
        }
Beispiel #3
0
        /// <summary>
        /// <para>ファイルリストを取得する。</para>
        /// <para>ソート済み</para>
        /// <para>'_' で始まるファイルの除去済み</para>
        /// </summary>
        /// <returns>ファイルリスト</returns>
        public static IEnumerable <string> GetFiles()
        {
            IEnumerable <string> files;

            if (ReleaseMode)
            {
                files = File2ResInfo.Keys;
            }
            else
            {
                files = Directory.GetFiles(ResourceDir, "*", SearchOption.AllDirectories).Select(file => SCommon.ChangeRoot(file, ResourceDir));

                // '_' で始まるファイルの除去
                // makeDDResourceFile は '_' で始まるファイルを含めない。
                files = files.Where(file => Path.GetFileName(file)[0] != '_');
            }

            // ソート
            // makeDDResourceFile はファイルリストを sortJLinesICase している。
            // ここでソートする必要は無いが、戻り値に統一性を持たせるため(毎回ファイルの並びが違うということのないように)ソートしておく。
            files = SCommon.Sort(files, SCommon.CompIgnoreCase);

            return(files);
        }