Exemplo n.º 1
1
 public static extern bool GetConsoleMode(SafeConsoleHandle hConsoleHandle, out ConsoleMode lpMode);
Exemplo n.º 2
1
 public static extern bool SetConsoleMode(SafeConsoleHandle hConsoleHandle, ConsoleMode dwMode);
            public TtyContext(ITrace trace, SafeFileHandle stream, bool echo)
            {
                EnsureArgument.NotNull(stream, nameof(stream));

                _trace  = trace;
                _stream = stream;

                // Capture current console mode so we can restore it later
                ConsoleMode consoleMode;

                if (!Kernel32.GetConsoleMode(consoleMode: out consoleMode, consoleHandle: stream))
                {
                    Win32Error.ThrowIfError(Marshal.GetLastWin32Error(), "Failed to get initial console mode");
                }

                _originalMode = consoleMode;

                // Set desired echo state
                _trace.WriteLine($"Setting console echo state to '{echo}'");
                if (!echo)
                {
                    ConsoleMode newConsoleMode = consoleMode ^ ConsoleMode.EchoInput;
                    if (!Kernel32.SetConsoleMode(consoleMode: newConsoleMode, consoleHandle: _stream))
                    {
                        Win32Error.ThrowIfError(Marshal.GetLastWin32Error(), "Failed to set console mode");
                    }
                }
            }
Exemplo n.º 4
0
 public ConsoleWindow(object game)
     : base(game)
 {
     _font         = EquestriEngine.AssetManager.CreateFontFromFile("{console}", @"fonts\celestia_redux");
     _consoleColor = Color.Multiply(Color.White, 0.5f);
     _currentMode  = ConsoleMode.Console;
     _consoleInput = new Variable("");
     _entries      = "";
     process       = System.Diagnostics.Process.GetCurrentProcess();
 }
 public static void ChangeMode()
 {
     if (_currentMode == ConsoleMode.Stats)
     {
         _currentMode = ConsoleMode.Console;
     }
     else
     {
         _currentMode++;
     }
     RefreshEntries();
 }
Exemplo n.º 6
0
 /// <summary>
 /// Update <see cref="INSERT_SYMBOL"/> after ConsoleMode change.
 /// </summary>
 /// <param name="mode">Current console mode.</param>
 public void UpdateLineStates(ConsoleMode mode)
 {
     if (mode == ConsoleMode.COMMAND_MODE)
     {
         INSERT_SYMBOL = (int)LineState.COMMAND_STATE;
     }
     else
     {
         INSERT_SYMBOL = (int)LineState.EDIT_STATE;
     }
     while (TextView.Document.LineCount < LeftMarginStatesList.Count)
     {
         LeftMarginStatesList.RemoveAt(LeftMarginStatesList.Count - 1);
     }
 }
Exemplo n.º 7
0
        public bool Allowed(ConsoleMode Console, RegionType Region)
        {
            if (Hidden)
            {
                return(false);
            }
            if (AllowedRegions != null && AllowedRegions.Count > 0 && !AllowedRegions.Contains(Region))
            {
                return(false);
            }
            if (AllowedConsoles != null && AllowedConsoles.Count > 0 && !AllowedConsoles.Contains(Console))
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 8
0
 public ConsoleStartConfiguration(
     bool runFullScreen         = false,
     ConsoleMode mode           = ConsoleMode.Buffered,
     bool tryVirtualConsole     = true,
     Screen startScreen         = null,
     uint desiredRowWidth       = 0,
     uint desiredRowCount       = 0,
     uint desiredBufferWidth    = 0,
     uint desiredBufferRowCount = 0)
 {
     this.RunFullScreen         = runFullScreen;
     this.Mode                  = mode;
     this.TryVirtualConsole     = tryVirtualConsole;
     this.DesiredRowWidth       = desiredRowWidth;
     this.DesiredRowCount       = desiredRowCount;
     this.DesiredBufferRowWidth = desiredBufferWidth;
     this.DesiredBufferRowCount = desiredBufferRowCount;
     this.StartScreen           = startScreen ?? Screen.PrimaryScreen;
 }
Exemplo n.º 9
0
 public static extern bool SetConsoleMode(void *hWnd, ConsoleMode dwMode);
Exemplo n.º 10
0
 public static extern bool SetConsoleMode(SafeFileHandle consoleHandle, ConsoleMode consoleMode);
Exemplo n.º 11
0
 private static extern bool GetConsoleMode(int hConsoleHandle, out ConsoleMode lpMode);
Exemplo n.º 12
0
 internal static extern bool SetConsoleMode(IntPtr handle, ConsoleMode mode);
Exemplo n.º 13
0
 public static extern bool SetConsoleMode(
     [In] SafeFileHandle consoleHandle,
     [In, MarshalAs(UnmanagedType.U4)] ConsoleMode consoleMode);
Exemplo n.º 14
0
        public static void PatchEXE(ConsoleMode console, RegionType region, string basePath, string execName, string StartChunk = @"Levels\Earth\Hub\Beach")
        {
            string filePath = Path.Combine(basePath, execName);

            ExecutablePatchInfo executable;

            if (console == ConsoleMode.XBOX)
            {
                if (region == RegionType.PAL)
                {
                    executable = executables[ExecutableIndex.XBOX_PAL];
                }
                else if (region == RegionType.NTSC_U)
                {
                    executable = executables[ExecutableIndex.XBOX_NTSC];
                }
                else
                {
                    return;
                }
            }
            else
            {
                if (region == RegionType.NTSC_U)
                {
                    using (BinaryReader reader = new BinaryReader(new FileStream(filePath, FileMode.Open, FileAccess.Read)))
                    {
                        reader.BaseStream.Position = executables[ExecutableIndex.NTSCU].ArchiveOff;
                        char ch = reader.ReadChar();

                        if (ch == 'C')
                        {
                            executable = executables[ExecutableIndex.NTSCU];
                        }
                        else
                        {
                            executable = executables[ExecutableIndex.NTSCU2];
                        }
                    }
                }
                else if (region == RegionType.PAL)
                {
                    executable = executables[ExecutableIndex.PAL];
                }
                else if (region == RegionType.NTSC_J)
                {
                    executable = executables[ExecutableIndex.NTSCJ];
                }
                else
                {
                    return;
                }
            }

            uint StartChunkPointer   = 0;
            uint CreditsChunkPointer = 0;

            using (BinaryReader reader = new BinaryReader(new FileStream(filePath, FileMode.Open, FileAccess.Read)))
            {
                reader.BaseStream.Position = executable.StartLevelPathPatchOff;
                StartChunkPointer          = reader.ReadUInt32();

                reader.BaseStream.Position = executable.StartLevelPathPatchOff2;
                CreditsChunkPointer        = reader.ReadUInt32();
            }

            BinaryWriter writer = new BinaryWriter(new FileStream(filePath, FileMode.Open, FileAccess.Write));

            /*
             * if (ModCrates.HasSetting("ArchiveName") && ModLoaderGlobals.Console != ConsoleMode.XBOX)
             * {
             *  string archiveName = ModCrates.GetSetting("ArchiveName");
             *  writer.BaseStream.Position = executable.ArchiveOff;
             *  while (writer.BaseStream.Position < executable.ArchiveOff + executable.ArchiveSize)
             *      writer.Write((byte)0);
             *  writer.BaseStream.Position = executable.ArchiveOff;
             *  for (int i = 0; i < executable.ArchiveSize && writer.BaseStream.Position < executable.ArchiveOff + executable.ArchiveSize && i < archiveName.Length; ++i)
             *  {
             *      writer.Write(archiveName[i]);
             *  }
             * }
             */
            string levelName = StartChunk;

            int LevelSize = executable.LevelSize;

            if (StartingChunk.HasChanged)
            {
                levelName = StartingChunk.Value;

                writer.BaseStream.Position = executable.LevelOff;
                while (writer.BaseStream.Position < executable.LevelOff + LevelSize)
                {
                    writer.Write((byte)0);
                }
                writer.BaseStream.Position = executable.LevelOff;
                for (int i = 0; i < LevelSize && writer.BaseStream.Position < executable.LevelOff + LevelSize && i < levelName.Length; ++i)
                {
                    writer.Write(levelName[i]);
                }
            }

            if (CreditsChunk.HasChanged)
            {
                LevelSize = executable.CreditsLevelSize;
                levelName = CreditsChunk.Value;

                writer.BaseStream.Position = executable.CreditsLevelOff;
                while (writer.BaseStream.Position < executable.CreditsLevelOff + LevelSize)
                {
                    writer.Write((byte)0);
                }
                writer.BaseStream.Position = executable.CreditsLevelOff;
                for (int i = 0; i < LevelSize && writer.BaseStream.Position < executable.CreditsLevelOff + LevelSize && i < levelName.Length; ++i)
                {
                    writer.Write(levelName[i]);
                }
            }

            if (Option_SwapStartAndCreditsChunk.Enabled)
            {
                writer.BaseStream.Position = executable.StartLevelPathPatchOff;
                writer.Write(CreditsChunkPointer);
                writer.BaseStream.Position = executable.StartLevelPathPatchOff2;
                writer.Write(StartChunkPointer);
            }
            if (Option_StartAndCreditsSpawn.Enabled)
            {
                writer.BaseStream.Position = executable.StartLevelPathPatchOff;
                writer.Write(CreditsChunkPointer);
            }


            writer.Close();
        }
Exemplo n.º 15
0
        void GenerateUI()
        {
            PropGUIs    = new List <ModPropertyGUI_Base>();
            label1.Text = "";

            int initOffset  = 0;
            int offset      = 0;
            int initRowSize = 25;

            int itemsPerPage = 45; // to reduce lag

            SortedDictionary <int, string> Pages = new SortedDictionary <int, string>();

            foreach (ModPropertyBase prop in mod.Props)
            {
                if (!Pages.ContainsKey((int)prop.Category))
                {
                    if (Game.PropertyCategories != null && Game.PropertyCategories.ContainsKey((int)prop.Category))
                    {
                        Pages.Add((int)prop.Category, Game.PropertyCategories[(int)prop.Category]);
                    }
                    else
                    {
                        Pages.Add((int)prop.Category, string.Format("{0} {1}", ModLoaderText.ModMenuPage, prop.Category + 1));
                    }
                }
            }

            tabControl1.TabPages.Clear();

            int curItem = 0;
            int curPage = 1;
            TableLayoutPanel tableLayout = null;
            ConsoleMode      Console     = mod.ConsolePipeline.Metadata.Console;
            RegionType       Region      = mod.GameRegion.Region;

            foreach (KeyValuePair <int, string> pair in Pages)
            {
                tabControl1.TabPages.Add(pair.Value);
                tabControl1.TabPages[tabControl1.TabPages.Count - 1].AutoScroll = true; //auto scroll causes massive cpu usage and choppy visuals with lots of elements

                curItem     = 0;
                curPage     = 1;
                tableLayout = null;

                foreach (ModPropertyBase propbase in mod.Props)
                {
                    if (!propbase.Allowed(Console, Region))
                    {
                        continue;
                    }
                    if (curItem == itemsPerPage)
                    {
                        if (curPage == 1)
                        {
                            tabControl1.TabPages[tabControl1.TabPages.Count - 1].Text = string.Format("{0} {1} {2}", tabControl1.TabPages[tabControl1.TabPages.Count - 1].Text, ModLoaderText.ModMenuPage, curPage);
                        }
                        curPage++;
                        tabControl1.TabPages.Add(string.Format("{0} {1} {2}", pair.Value, ModLoaderText.ModMenuPage, curPage));
                        tabControl1.TabPages[tabControl1.TabPages.Count - 1].AutoScroll = true;

                        curItem = 0;
                        offset  = initOffset;
                    }
                    if (propbase.Category == pair.Key)
                    {
                        if (curItem == 0)
                        {
                            if (tableLayout != null)
                            {
                                int newSize = -initRowSize;
                                foreach (RowStyle row in tableLayout.RowStyles)
                                {
                                    newSize += (int)row.Height;
                                }
                                tableLayout.Size = new Size(tabControl1.TabPages[tabControl1.TabPages.Count - 1].Width, newSize);
                            }

                            tableLayout        = new TableLayoutPanel();
                            tableLayout.Parent = tabControl1.TabPages[tabControl1.TabPages.Count - 1];
                            //tableLayout.Dock = DockStyle.Fill;

                            tableLayout.Location = new Point(0, 0);
                            tableLayout.Anchor   = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
                            tableLayout.AutoSize = false;
                            tableLayout.Size     = new Size(tabControl1.TabPages[tabControl1.TabPages.Count - 1].Width, 300);

                            tableLayout.RowCount    = 1;
                            tableLayout.ColumnCount = 1;
                            tableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f));
                            tableLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, initRowSize));
                        }

                        //ModPropertyGUI_Base prop = new ModPropertyGUI<ModPropertyBase>(propbase);
                        ModPropertyGUI_Base prop = GetExtension(propbase);
                        prop.GenerateUI(tableLayout, ref offset);
                        tableLayout.RowCount++;
                        tableLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, initRowSize));
                        offset += 1;
                        curItem++;
                        PropGUIs.Add(prop);
                    }
                }

                if (tableLayout != null)
                {
                    int newSize = -initRowSize;
                    foreach (RowStyle row in tableLayout.RowStyles)
                    {
                        newSize += (int)row.Height;
                    }
                    tableLayout.Size = new Size(tabControl1.TabPages[tabControl1.TabPages.Count - 1].Width, newSize);
                }

                offset = initOffset;
            }
        }
Exemplo n.º 16
0
 public ConsoleUpdatedPacket(ConsoleMode _consoleMode) : this()
 {
     consoleMode = _consoleMode;
 }
Exemplo n.º 17
0
        public static Credential CredentialPrompt(Program program, TargetUri targetUri, string titleMessage)
        {
            // ReadConsole 32768 fail, 32767 OK @linquize [https://github.com/Microsoft/Git-Credential-Manager-for-Windows/commit/a62b9a19f430d038dcd85a610d97e5f763980f85]
            const int BufferReadSize = 16 * 1024;

            if (program is null)
            {
                throw new ArgumentNullException(nameof(program));
            }
            if (targetUri is null)
            {
                throw new ArgumentNullException(nameof(targetUri));
            }

            titleMessage = titleMessage ?? "Please enter your credentials for ";

            var  buffer  = new StringBuilder(BufferReadSize);
            uint read    = 0;
            uint written = 0;

            ConsoleMode consoleMode     = 0;
            var         fileAccessFlags = NativeMethods.FileAccess.GenericRead
                                          | NativeMethods.FileAccess.GenericWrite;
            var fileAttributes          = NativeMethods.FileAttributes.Normal;
            var fileCreationDisposition = FileCreationDisposition.OpenExisting;
            var fileShareFlags          = NativeMethods.FileShare.Read
                                          | NativeMethods.FileShare.Write;

            using (SafeFileHandle stdout = CreateFile(fileName: ConsoleOutName,
                                                      desiredAccess: fileAccessFlags,
                                                      shareMode: fileShareFlags,
                                                      securityAttributes: IntPtr.Zero,
                                                      creationDisposition: fileCreationDisposition,
                                                      flagsAndAttributes: fileAttributes,
                                                      templateFile: IntPtr.Zero))
                using (SafeFileHandle stdin = CreateFile(fileName: ConsoleInName,
                                                         desiredAccess: fileAccessFlags,
                                                         shareMode: fileShareFlags,
                                                         securityAttributes: IntPtr.Zero,
                                                         creationDisposition: fileCreationDisposition,
                                                         flagsAndAttributes: fileAttributes,
                                                         templateFile: IntPtr.Zero))
                {
                    // Read the current console mode.
                    if (stdin.IsInvalid || stdout.IsInvalid)
                    {
                        program.Trace.WriteLine("not a tty detected, abandoning prompt.");
                        return(null);
                    }
                    else if (!GetConsoleMode(consoleMode: out consoleMode,
                                             consoleHandle: stdin))
                    {
                        int error = Marshal.GetLastWin32Error();
                        throw new Win32Exception(error, "Unable to determine console mode (" + Win32Error.GetText(error) + ").");
                    }

                    program.Trace.WriteLine($"console mode = '{consoleMode}'.");

                    string username = null;
                    string password = null;

                    // Instruct the user as to what they are expected to do.
                    buffer.Append(titleMessage)
                    .Append(targetUri)
                    .AppendLine();

                    if (!WriteConsole(buffer: buffer,
                                      consoleOutputHandle: stdout,
                                      numberOfCharsToWrite: (uint)buffer.Length,
                                      numberOfCharsWritten: out written,
                                      reserved: IntPtr.Zero))
                    {
                        int error = Marshal.GetLastWin32Error();
                        throw new Win32Exception(error, "Unable to write to standard output (" + Win32Error.GetText(error) + ").");
                    }

                    // Clear the buffer for the next operation.
                    buffer.Clear();

                    // Prompt the user for the username wanted.
                    buffer.Append("username: "******"Unable to write to standard output (" + Win32Error.GetText(error) + ").");
                    }

                    // Clear the buffer for the next operation.
                    buffer.Clear();

                    // Read input from the user.
                    if (!ReadConsole(buffer: buffer,
                                     consoleInputHandle: stdin,
                                     numberOfCharsToRead: BufferReadSize,
                                     numberOfCharsRead: out read,
                                     reserved: IntPtr.Zero))
                    {
                        int error = Marshal.GetLastWin32Error();
                        throw new Win32Exception(error, "Unable to read from standard input (" + Win32Error.GetText(error) + ").");
                    }

                    // Record input from the user into local storage, stripping any EOL chars.
                    username = buffer.ToString(0, (int)read);
                    username = username.Trim(program.Settings.NewLine.ToCharArray());

                    // Clear the buffer for the next operation.
                    buffer.Clear();

                    // Set the console mode to current without echo input.
                    ConsoleMode consoleMode2 = consoleMode ^ ConsoleMode.EchoInput;

                    try
                    {
                        if (!SetConsoleMode(consoleMode: consoleMode2,
                                            consoleHandle: stdin))
                        {
                            int error = Marshal.GetLastWin32Error();
                            throw new Win32Exception(error, "Unable to set console mode (" + Win32Error.GetText(error) + ").");
                        }

                        program.Trace.WriteLine($"console mode = '{(consoleMode2 & ConsoleMode.AllFlags)}'.");

                        // Prompt the user for password.
                        buffer.Append("password: "******"Unable to write to standard output (" + Win32Error.GetText(error) + ").");
                        }

                        // Clear the buffer for the next operation.
                        buffer.Clear();

                        // Read input from the user.
                        if (!ReadConsole(buffer: buffer,
                                         consoleInputHandle: stdin,
                                         numberOfCharsToRead: BufferReadSize,
                                         numberOfCharsRead: out read,
                                         reserved: IntPtr.Zero))
                        {
                            int error = Marshal.GetLastWin32Error();
                            throw new Win32Exception(error, "Unable to read from standard input (" + Win32Error.GetText(error) + ").");
                        }

                        // Record input from the user into local storage, stripping any EOL chars.
                        password = buffer.ToString(0, (int)read);
                        password = password.Trim(program.Settings.NewLine.ToCharArray());
                    }
                    finally
                    {
                        // Restore the console mode to its original value.
                        SetConsoleMode(consoleMode: consoleMode,
                                       consoleHandle: stdin);

                        program.Trace.WriteLine($"console mode = '{consoleMode}'.");
                    }

                    if (username != null && password != null)
                    {
                        return(new Credential(username, password));
                    }
                }

            return(null);
        }
Exemplo n.º 18
0
 public static void SetConsoleMode(ConsoleHandle bufferHandle, ConsoleMode mode)
 {
     if(bufferHandle == ConsoleHandle.OUTPUT)
         Extern.SetConsoleMode(consoleOutput, (byte)mode);
     if (bufferHandle == ConsoleHandle.INPUT)
         Extern.SetConsoleMode(consoleInput, (byte)mode);
 }
 public static extern bool SetConsoleMode(SafeFileHandle consoleHandle, ConsoleMode consoleMode);
Exemplo n.º 20
0
 private static extern bool SetConsoleMode(int hConsoleHandle, ConsoleMode dwMode);
 public static void OpenConsole()
 {
     Console_Open = true;
     _currentMode = ConsoleMode.Console;
     RefreshEntries();
 }
Exemplo n.º 22
0
        void SetGameType(string serial, ConsoleMode console, uint RegionID)
        {
            bool       RegionNotSupported = true;
            RegionCode TargetRegion       = new RegionCode();

            Modder = null;

            SupportedMods = new List <ModCrate>();

            if (SupportedGames.Count <= 0)
            {
                Console.WriteLine("ERROR: No games supported!");
                return;
            }

            foreach (KeyValuePair <Game, Assembly> pair in SupportedGames)
            {
                Game game = pair.Key;

                if (!game.Consoles.Contains(console))
                {
                    continue;
                }

                RegionCode[] codelist;

                if (game.RegionID.ContainsKey(console))
                {
                    codelist = game.RegionID[console];
                }
                else
                {
                    codelist = null;
                    Console.WriteLine("ERROR: Missing RegionID for game " + game.Name);
                }

                foreach (var r in codelist)
                {
                    if (serial.Contains(r.Name))
                    {
                        if (console == ConsoleMode.XBOX && RegionID != r.RegionNumber)
                        {
                            RegionNotSupported = true;
                        }
                        else
                        {
                            RegionNotSupported = false;
                            Modder             = (Modder)Activator.CreateInstance(game.ModderClass);
                            Game         = game;
                            TargetRegion = r;
                            break;
                        }
                    }
                }

                if (RegionNotSupported)
                {
                    foreach (var r in codelist)
                    {
                        if (serial.Contains(r.Name))
                        {
                            Modder       = (Modder)Activator.CreateInstance(game.ModderClass);
                            Game         = game;
                            TargetRegion = r;
                            break;
                        }
                    }
                }

                if (Modder != null)
                {
                    Modder.assembly        = pair.Value;
                    Modder.ConsolePipeline = Pipeline;
                    Modder.GameRegion      = TargetRegion;
                    break;
                }
            }

            string cons_mod = "";

            switch (console)
            {
            default: cons_mod = console.ToString(); break;

            case ConsoleMode.Undefined: cons_mod = "(" + ModLoaderText.UnknownConsole + ")"; break;
            }

            string region_mod = "(" + ModLoaderText.UnknownRegion + ")";

            if (!RegionNotSupported)
            {
                switch (TargetRegion.Region)
                {
                case RegionType.NTSC_J: region_mod = "NTSC-J"; break;

                case RegionType.NTSC_U: region_mod = "NTSC-U"; break;

                case RegionType.PAL: region_mod = "PAL"; break;

                case RegionType.Global: region_mod = ""; break;

                default: region_mod = "(" + ModLoaderText.UnknownRegion + ")"; break;
                }
            }

            // UI stuff
            if (Modder == null)
            {
                LayoutChangeUnsupported.Invoke(this, new EventValueArgs <string>(cons_mod));
            }
            else
            {
                Modder.PopulateProperties();
                LayoutChangeSupported.Invoke(this, new EventGameDetails(Game, cons_mod, region_mod));
            }
        }
Exemplo n.º 23
0
 public static extern bool GetConsoleMode(IntPtr hConsoleHandle, out ConsoleMode lpMode);
Exemplo n.º 24
0
 public DummySwitchInfo(CryptoMode cryptoMode, string targetFile, ConsoleMode consoleMode)
 {
     Mode        = cryptoMode;
     TargetFile  = targetFile;
     ConsoleMode = consoleMode;
 }
Exemplo n.º 25
0
 public ConsoleUpdatePacket(ConsoleMode _consoleMode, ulong _TargetBot) : this()
 {
     consoleMode = _consoleMode;
     TargetBot   = _TargetBot;
 }
Exemplo n.º 26
0
 public static extern bool GetConsoleMode(SafeHandle h, out ConsoleMode mode);
Exemplo n.º 27
0
        public void SetPaths(ConsoleMode console, string exec_name = "")
        {
            path_RCF_default  = "";
            path_RCF_common   = "";
            path_RCF_frontend = "";
            //path_executable = "";
            path_RCF_onfoot0 = "";
            path_RCF_onfoot1 = "";
            path_RCF_onfoot2 = "";
            path_RCF_onfoot3 = "";
            path_RCF_onfoot4 = "";
            path_RCF_onfoot5 = "";
            path_RCF_onfoot6 = "";
            path_RCF_onfoot7 = "";
            path_RCF_advent1 = "";
            path_RCF_advent2 = "";
            path_RCF_advent3 = "";
            path_RCF_adventa = "";
            path_RCF_dino1   = "";
            path_RCF_dino2   = "";
            path_RCF_dino3   = "";
            path_RCF_dinoa   = "";
            path_RCF_egypt1  = "";
            path_RCF_egypt2  = "";
            path_RCF_egypt3  = "";
            path_RCF_egypta  = "";
            path_RCF_fairy1  = "";
            path_RCF_fairy2  = "";
            path_RCF_fairy3  = "";
            path_RCF_fairys  = "";
            path_RCF_solar1  = "";
            path_RCF_solar2  = "";
            path_RCF_solar3  = "";
            path_RCF_solars  = "";
            path_RCF_0       = "";
            path_RCF_1       = "";
            path_RCF_2       = "";
            path_RCF_3       = "";
            path_RCF_4       = "";
            path_RCF_5       = "";
            path_RCF_6       = "";
            path_RCF_sound   = "";
            path_RCF_english = "";
            path_RCF_movies  = "";

            if (console == ConsoleMode.PS2)
            {
                //path_executable = exec_name;
                path_RCF_default  = @"ADEFAULT\DEFAULT.RCF";
                path_RCF_advent1  = @"ADVENT\ADVENT1.RCF";
                path_RCF_advent2  = @"ADVENT\ADVENT2.RCF";
                path_RCF_advent3  = @"ADVENT\ADVENT3.RCF";
                path_RCF_adventa  = @"ADVENT\ADVENTA.RCF";
                path_RCF_common   = @"COMMON\COMMON.RCF";
                path_RCF_dino1    = @"DINO\DINO1.RCF";
                path_RCF_dino2    = @"DINO\DINO2.RCF";
                path_RCF_dino3    = @"DINO\DINO3.RCF";
                path_RCF_dinoa    = @"DINO\DINOA.RCF";
                path_RCF_egypt1   = @"EGYPT\EGYPT1.RCF";
                path_RCF_egypt2   = @"EGYPT\EGYPT2.RCF";
                path_RCF_egypt3   = @"EGYPT\EGYPT3.RCF";
                path_RCF_egypta   = @"EGYPT\EGYPTA.RCF";
                path_RCF_english  = @"ENGLISH.RCF";
                path_RCF_fairy1   = @"FAIRY\FAIRY1.RCF";
                path_RCF_fairy2   = @"FAIRY\FAIRY2.RCF";
                path_RCF_fairy3   = @"FAIRY\FAIRY3.RCF";
                path_RCF_fairys   = @"FAIRY\FAIRYS.RCF";
                path_RCF_frontend = @"COMMON\FRONTEND.RCF";
                path_RCF_solar1   = @"SOLAR\SOLAR1.RCF";
                path_RCF_solar2   = @"SOLAR\SOLAR2.RCF";
                path_RCF_solar3   = @"SOLAR\SOLAR3.RCF";
                path_RCF_solars   = @"SOLAR\SOLARS.RCF";
                path_RCF_onfoot0  = @"ONFOOT\ONFOOT.RCF";
                path_RCF_onfoot1  = @"ONFOOT\ONFOOT1.RCF";
                path_RCF_onfoot2  = @"ONFOOT\ONFOOT2.RCF";
                path_RCF_onfoot3  = @"ONFOOT\ONFOOT3.RCF";
                path_RCF_onfoot5  = @"ONFOOT\ONFOOT5.RCF";
                path_RCF_onfoot6  = @"ONFOOT\ONFOOT6.RCF";
                path_RCF_movies   = @"MOVIES.RCF";
            }
            else if (console == ConsoleMode.PSP)
            {
                //path_executable = @"PSP_GAME\SYSDIR\BOOT.BIN";
                path_RCF_default  = @"adefault\default.rcf";
                path_RCF_advent1  = @"advent\advent1.rcf";
                path_RCF_advent2  = @"advent\advent2.rcf";
                path_RCF_advent3  = @"advent\advent3.rcf";
                path_RCF_adventa  = @"advent\adventa.rcf";
                path_RCF_common   = @"common\common.rcf";
                path_RCF_dino1    = @"dino\dino1.rcf";
                path_RCF_dino2    = @"dino\dino2.rcf";
                path_RCF_dino3    = @"dino\dino3.rcf";
                path_RCF_dinoa    = @"dino\dinoa.rcf";
                path_RCF_egypt1   = @"egypt\egypt1.rcf";
                path_RCF_egypt2   = @"egypt\egypt2.rcf";
                path_RCF_egypt3   = @"egypt\egypt3.rcf";
                path_RCF_egypta   = @"egypt\egypta.rcf";
                path_RCF_english  = @"english.rcf";
                path_RCF_fairy1   = @"fairy\fairy1.rcf";
                path_RCF_fairy2   = @"fairy\fairy2.rcf";
                path_RCF_fairy3   = @"fairy\fairy3.rcf";
                path_RCF_fairys   = @"fairy\fairys.rcf";
                path_RCF_frontend = @"common\frontend.rcf";
                path_RCF_solar1   = @"solar\solar1.rcf";
                path_RCF_solar2   = @"solar\solar2.rcf";
                path_RCF_solar3   = @"solar\solar3.rcf";
                path_RCF_solars   = @"solar\solars.rcf";
                path_RCF_onfoot0  = @"onfoot\onfoot.rcf";
                path_RCF_onfoot1  = @"onfoot\onfoot1.rcf";
                path_RCF_onfoot2  = @"onfoot\onfoot2.rcf";
                path_RCF_onfoot3  = @"onfoot\onfoot3.rcf";
                path_RCF_onfoot4  = @"onfoot\onfoot4.rcf";
                path_RCF_onfoot5  = @"onfoot\onfoot5.rcf";
                path_RCF_onfoot6  = @"onfoot\onfoot6.rcf";
                path_RCF_movies   = @"movies.rcf";
            }
            else if (console == ConsoleMode.GCN)
            {
                // path_executable = @"sys\main.dol";
                path_RCF_default  = @"adefault\default.rcf";
                path_RCF_advent1  = @"advent\advent1.rcf";
                path_RCF_advent2  = @"advent\advent2.rcf";
                path_RCF_advent3  = @"advent\advent3.rcf";
                path_RCF_adventa  = @"advent\adventa.rcf";
                path_RCF_common   = @"common\common.rcf";
                path_RCF_dino1    = @"dino\dino1.rcf";
                path_RCF_dino2    = @"dino\dino2.rcf";
                path_RCF_dino3    = @"dino\dino3.rcf";
                path_RCF_dinoa    = @"dino\dinoa.rcf";
                path_RCF_egypt1   = @"egypt\egypt1.rcf";
                path_RCF_egypt2   = @"egypt\egypt2.rcf";
                path_RCF_egypt3   = @"egypt\egypt3.rcf";
                path_RCF_english  = @"english.rcf";
                path_RCF_fairy1   = @"fairy\fairy1.rcf";
                path_RCF_fairy2   = @"fairy\fairy2.rcf";
                path_RCF_fairy3   = @"fairy\fairy3.rcf";
                path_RCF_fairys   = @"fairy\fairys.rcf";
                path_RCF_frontend = @"common\frontend.rcf";
                path_RCF_solar1   = @"solar\solar1.rcf";
                path_RCF_solar2   = @"solar\solar2.rcf";
                path_RCF_solar3   = @"solar\solar3.rcf";
                path_RCF_solars   = @"solar\solars.rcf";
                path_RCF_onfoot0  = @"onfoot\onfoot.rcf";
                path_RCF_onfoot1  = @"onfoot\onfoot1.rcf";
                path_RCF_onfoot2  = @"onfoot\onfoot2.rcf";
                path_RCF_onfoot3  = @"onfoot\onfoot3.rcf";
                path_RCF_onfoot5  = @"onfoot\onfoot5.rcf";
                path_RCF_onfoot6  = @"onfoot\onfoot6.rcf";
                path_RCF_onfoot7  = @"onfoot\onfoot7.rcf";
                path_RCF_movies   = @"movies.rcf";
            }
            else
            {
                //path_executable = @"default.xbe";
                path_RCF_advent1  = @"advent\advent1.rcf";
                path_RCF_advent2  = @"advent\advent2.rcf";
                path_RCF_advent3  = @"advent\advent3.rcf";
                path_RCF_adventa  = @"advent\adventa.rcf";
                path_RCF_common   = @"common\common.rcf";
                path_RCF_dino1    = @"dino\dino1.rcf";
                path_RCF_dino2    = @"dino\dino2.rcf";
                path_RCF_dino3    = @"dino\dino3.rcf";
                path_RCF_dinoa    = @"dino\dinoa.rcf";
                path_RCF_egypt1   = @"egypt\egypt1.rcf";
                path_RCF_egypt2   = @"egypt\egypt2.rcf";
                path_RCF_egypt3   = @"egypt\egypt3.rcf";
                path_RCF_fairy1   = @"fairy\fairy1.rcf";
                path_RCF_fairy2   = @"fairy\fairy2.rcf";
                path_RCF_fairy3   = @"fairy\fairy3.rcf";
                path_RCF_fairys   = @"fairy\fairys.rcf";
                path_RCF_frontend = @"common\frontend.rcf";
                path_RCF_solar1   = @"solar\solar1.rcf";
                path_RCF_solar2   = @"solar\solar2.rcf";
                path_RCF_solar3   = @"solar\solar3.rcf";
                path_RCF_solars   = @"solar\solars.rcf";
                path_RCF_onfoot0  = @"onfoot\onfoot.rcf";
                path_RCF_onfoot1  = @"onfoot\onfoot1.rcf";
                path_RCF_onfoot2  = @"onfoot\onfoot2.rcf";
                path_RCF_onfoot3  = @"onfoot\onfoot3.rcf";
                path_RCF_onfoot5  = @"onfoot\onfoot5.rcf";
                path_RCF_onfoot6  = @"onfoot\onfoot6.rcf";
                path_RCF_0        = @"0\0.rcf";
                path_RCF_1        = @"1\1.rcf";
                path_RCF_2        = @"2\2.rcf";
                path_RCF_3        = @"3\3.rcf";
                path_RCF_4        = @"4\4.rcf";
                path_RCF_5        = @"5\5.rcf";
                path_RCF_6        = @"6\6.rcf";
                path_RCF_sound    = @"sound\sound.rcf";
            }
        }
Exemplo n.º 28
0
 public static extern bool GetConsoleMode(SafeHandle h, out ConsoleMode mode);
Exemplo n.º 29
0
 public static extern bool GetConsoleMode(IntPtr handle, out ConsoleMode mode);
 public static void OpenConsole()
 {
     Console_Open = true;
     _currentMode = ConsoleMode.Console;
     RefreshEntries();
 }
Exemplo n.º 31
0
 public static extern bool SetConsoleMode(IntPtr hConsoleHandle, ConsoleMode mode);
Exemplo n.º 32
-1
 public static void ChangeMode()
 {
     if (_currentMode == ConsoleMode.Stats)
     {
         _currentMode = ConsoleMode.Console;
     }
     else
         _currentMode++;
     RefreshEntries();
 }
Exemplo n.º 33
-1
 public ConsoleWindow(object game)
     : base(game)
 {
     _font = EquestriEngine.AssetManager.CreateFontFromFile("{console}", @"fonts\celestia_redux");
     _consoleColor = Color.Multiply(Color.White, 0.5f);
     _currentMode = ConsoleMode.Console;
     _consoleInput = new Variable("");
     _entries = "";
     process = System.Diagnostics.Process.GetCurrentProcess();
 }