コード例 #1
0
        public SaveDialogSettingsState ShowSetupDialogBox(SaveDialogSettingsState cache, Bitmap preview)
        {
            SaveDialogSettings setupDlg = new SaveDialogSettings(cache);

            setupDlg._img = preview;
            setupDlg.ShowDialog();
            setupDlg.Dispose();

            SaveDialogSettingsState info = setupDlg._state;

            return(info);
        }
コード例 #2
0
        public SaveDialogSettingsState ShowSetupDialogBox(PVRT shendkPvr, Bitmap preview)
        {
            SaveDialogSettings setupDlg;

            uint?gbixCase = null;

            try
            {
                // Who was so smart to report a empty gbix over HasGlobalIndex in ShenmueDK as true
                // when there is none in file...  oh right that was me
                // TODO: fix it in ShenmueDKSharp...
                if (shendkPvr.GlobalIndex[0] != 0x00 || shendkPvr.GlobalIndex[1] != 0x00 ||
                    shendkPvr.GlobalIndex[2] != 0x00 || shendkPvr.GlobalIndex[3] != 0x00)
                {
                    gbixCase = BitConverter.ToUInt32(new byte[] {
                        shendkPvr.GlobalIndex[0], shendkPvr.GlobalIndex[1], shendkPvr.GlobalIndex[2], shendkPvr.GlobalIndex[3],
                    }, 0);
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("ShenmueDK could not parse the GBIX ID. Please enter your own or use PuyoTools Load engine."
                                + Environment.NewLine + e);
            }

            if (shendkPvr != null)
            {
                setupDlg = new SaveDialogSettings(shendkPvr.DataFormat, shendkPvr.PixelFormat, true, gbixCase);
            }
            else
            {
                setupDlg = new SaveDialogSettings(
                    ShenmueDKSharp.Files.Images._PVRT.PvrDataFormat.VECTOR_QUANTIZATION,
                    ShenmueDKSharp.Files.Images._PVRT.PvrPixelFormat.ARGB1555, false, null); //default when no file
            }
            setupDlg._img = preview;
            setupDlg.ShowDialog();
            setupDlg.Dispose();

            SaveDialogSettingsState info = setupDlg._state;

            return(info);
        }
コード例 #3
0
        public SaveDialogSettingsState ShowSetupDialogBox(PvrTextureDecoder puyoPvr, Bitmap preview)
        {
            SaveDialogSettings setupDlg;

            if (puyoPvr != null)
            {
                setupDlg = new SaveDialogSettings((PvrDataFormatEncodeOnly)puyoPvr.DataFormat, puyoPvr.PixelFormat, true, puyoPvr.GlobalIndex);
            }
            else
            {
                setupDlg = new SaveDialogSettings(PvrDataFormatEncodeOnly.Vq, PvrPixelFormat.Argb1555, false, null); //default when no file
            }
            setupDlg._img = preview;
            setupDlg.ShowDialog();
            setupDlg.Dispose();

            SaveDialogSettingsState info = setupDlg._state;

            return(info);
        }