예제 #1
0
        public static void Update(GameTime gameTime)
        {
            if (lastModule != module)
            {
                GC.Collect();
                GC.WaitForPendingFinalizers();
                lastModule = module;
            }
            module = Memory.module;


//#if DEBUG
            if (Input.Button(Buttons.Back) || Input.Button(Buttons.Cancel))
            {
                Memory.module           = Memory.MODULE_MAINMENU_DEBUG;
                Input.OverrideLockMouse = false;
                Input.CurrentMode       = Input.MouseLockMode.Screen;
            }
//#endif


            switch (module)
            {
            case Memory.MODULE_BATTLE:
                module_battle.Update();
                break;

            case Memory.MODULE_BATTLE_DEBUG:
                Module_battle_debug.Update();
                break;

            case Memory.MODULE_MOVIETEST:
                Module_movie_test.Update();
                break;

            case Memory.MODULE_FIELD_DEBUG:
                Module_field_debug.Update();
                break;

            case Memory.MODULE_OVERTURE_DEBUG:
                Module_overture_debug.Update();
                break;

            case Memory.MODULE_MAINMENU_DEBUG:
                Module_main_menu_debug.Update();
                break;

            case Memory.MODULE_WORLD_DEBUG:
                Module_world_debug.Update();
                break;

            case Memory.MODULE_FACE_TEST:
                Module_face_test.Update();
                break;

            case Memory.MODULE_ICON_TEST:
                Module_icon_test.Update();
                break;
            }
        }
예제 #2
0
        public static void InitTaskMethod()
        {
            Memory.font    = new Font(); //this initializes the fonts and drawing system- holds fonts in-memory
            Memory.Strings = new Strings();

            Kernel_Bin = new Kernel_bin();
#if DEBUG
            //export the string data so you can find where the string you want is.
            // then you can Memory.Strings.Read() it :)
            try
            {
                string dumpfolder = Path.GetTempPath();
                if (Directory.Exists(dumpfolder))
                {
                    Memory.Strings.Dump(Strings.FileID.MNGRP, Path.Combine(dumpfolder, "MNGRPdump.txt"));
                    Memory.Strings.Dump(Strings.FileID.AREAMES, Path.Combine(dumpfolder, "AREAMESdump.txt"));
                    Memory.Strings.Dump(Strings.FileID.NAMEDIC, Path.Combine(dumpfolder, "NAMEDICdump.txt"));
                    Memory.Strings.Dump(Strings.FileID.KERNEL, Path.Combine(dumpfolder, "KERNELdump.txt"));
                }
            }
            catch (IOException)
            {
            }
#endif
            Memory.Cards = new Cards();
            Memory.Faces = new Faces();
            Memory.Icons = new Icons();
            Saves.Init(); //loads all savegames from steam or cd2000 directories. first come first serve.
            Module_main_menu_debug.Init();
        }
예제 #3
0
        public static void Draw(GameTime gameTime)
        {
            switch (module)
            {
            case Memory.MODULE_BATTLE:
                module_battle.Draw();
                break;

            case Memory.MODULE_BATTLE_DEBUG:
                Module_battle_debug.Draw();
                break;

            case Memory.MODULE_MOVIETEST:
                Module_movie_test.Draw();
                break;

            case Memory.MODULE_FIELD_DEBUG:
                Module_field_debug.Draw();
                break;

            case Memory.MODULE_OVERTURE_DEBUG:
                Module_overture_debug.Draw();
                break;

            case Memory.MODULE_MAINMENU_DEBUG:
                Module_main_menu_debug.Draw();
                break;

            case Memory.MODULE_WORLD_DEBUG:
                Module_world_debug.Draw();
                break;

            case Memory.MODULE_FACE_TEST:
                Module_face_test.Draw();
                break;

            case Memory.MODULE_ICON_TEST:
                Module_icon_test.Draw();
                break;
            }
        }
예제 #4
0
        public static async void Update(GameTime gameTime)
        {
            if (lastModule != module)
            {
                GC.Collect();
                GC.WaitForPendingFinalizers();
                lastModule = module;
            }
            module = Memory.module;


            //#if DEBUG
            if (Input.Button(Buttons.Back) || Input.Button(Buttons.Cancel))
            {
                Memory.module           = Memory.MODULE_MAINMENU_DEBUG;
                Input.OverrideLockMouse = false;
                Input.CurrentMode       = Input.MouseLockMode.Screen;
            }
            //#endif


            switch (module)
            {
            //doesn't need memory
            case Memory.MODULE_OVERTURE_DEBUG:
            case Memory.MODULE_MOVIETEST:
                break;

            default:
                //requires memory to be loaded.
                if ((Memory.InitTask != null) && (Memory.InitTask.IsCompleted == false ||
                                                  Memory.InitTask.Status == TaskStatus.Running ||
                                                  Memory.InitTask.Status == TaskStatus.WaitingToRun ||
                                                  Memory.InitTask.Status == TaskStatus.WaitingForActivation))
                {
                    //task is still running loading assets blank screen and wait.
                    Memory.SuppressDraw = true;
                    await Memory.InitTask;
                    //fade in doesn't happen because time was set before the await.
                    //ending here causes update to be run again with new time
                    return;
                }
                break;
            }
            switch (module)
            {
            case Memory.MODULE_BATTLE:
                module_battle.Update();
                break;

            case Memory.MODULE_BATTLE_DEBUG:
                Module_battle_debug.Update();
                break;

            case Memory.MODULE_MOVIETEST:
                Module_movie_test.Update();
                break;

            case Memory.MODULE_FIELD_DEBUG:
                Module_field_debug.Update();
                break;

            case Memory.MODULE_OVERTURE_DEBUG:
                Module_overture_debug.Update();
                break;

            case Memory.MODULE_MAINMENU_DEBUG:
                Module_main_menu_debug.Update();
                break;

            case Memory.MODULE_WORLD_DEBUG:
                Module_world_debug.Update();
                break;

            case Memory.MODULE_FACE_TEST:
                Module_face_test.Update();
                break;

            case Memory.MODULE_ICON_TEST:
                Module_icon_test.Update();
                break;

            case Memory.MODULE_CARD_TEST:
                Module_card_test.Update();
                break;
            }
        }
예제 #5
0
        public static void Draw(GameTime gameTime)
        {
            switch (module)
            {
            //doesn't need memory
            case Memory.MODULE_OVERTURE_DEBUG:
            case Memory.MODULE_MOVIETEST:
                break;

            default:
                //requires memory to be loaded.
                if ((Memory.InitTask != null) && (Memory.InitTask.IsCompleted == false ||
                                                  Memory.InitTask.Status == TaskStatus.Running ||
                                                  Memory.InitTask.Status == TaskStatus.WaitingToRun ||
                                                  Memory.InitTask.Status == TaskStatus.WaitingForActivation))
                {
                    //suppress draw in update but if draw happens before update, blank screen, and end here
                    Memory.graphics.GraphicsDevice.Clear(Color.Black);
                    return;
                }
                break;
            }
            switch (module)
            {
            case Memory.MODULE_BATTLE:
                module_battle.Draw();
                break;

            case Memory.MODULE_BATTLE_DEBUG:
                Module_battle_debug.Draw();
                break;

            case Memory.MODULE_MOVIETEST:
                Module_movie_test.Draw();
                break;

            case Memory.MODULE_FIELD_DEBUG:
                Module_field_debug.Draw();
                break;

            case Memory.MODULE_OVERTURE_DEBUG:
                Module_overture_debug.Draw();
                break;

            case Memory.MODULE_MAINMENU_DEBUG:
                Module_main_menu_debug.Draw();
                break;

            case Memory.MODULE_WORLD_DEBUG:
                Module_world_debug.Draw();
                break;

            case Memory.MODULE_FACE_TEST:
                Module_face_test.Draw();
                break;

            case Memory.MODULE_ICON_TEST:
                Module_icon_test.Draw();
                break;

            case Memory.MODULE_CARD_TEST:
                Module_card_test.Draw();
                break;
            }
        }