| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -17,13 +17,15 @@ using CTFAK.MMFParser.EXE.Loaders.Banks;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					using CTFAK.MMFParser.EXE.Loaders.Objects;
 | 
					 | 
					 | 
					 | 
					using CTFAK.MMFParser.EXE.Loaders.Objects;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					using CTFAK.MMFParser.Translation;
 | 
					 | 
					 | 
					 | 
					using CTFAK.MMFParser.Translation;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					using CTFAK.Utils;
 | 
					 | 
					 | 
					 | 
					using CTFAK.Utils;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					using Animation = CTFAK.MMFParser.EXE.Loaders.Objects.Animation;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					using AnimationDirection = CTFAK.MMFParser.EXE.Loaders.Objects.AnimationDirection;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					namespace CTFAK.GUI
 | 
					 | 
					 | 
					 | 
					namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					{
 | 
					 | 
					 | 
					 | 
					{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public partial class MainForm : Form
 | 
					 | 
					 | 
					 | 
					    public partial class MainForm : Form
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    {
 | 
					 | 
					 | 
					 | 
					    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        public delegate void IncrementSortedProgressBar(int all);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        public delegate void SaveHandler(int index, int all);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public static bool IsDumpingImages;
 | 
					 | 
					 | 
					 | 
					        public static bool IsDumpingImages;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public static bool IsDumpingSounds;
 | 
					 | 
					 | 
					 | 
					        public static bool IsDumpingSounds;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public static bool IsDumpingMusics;
 | 
					 | 
					 | 
					 | 
					        public static bool IsDumpingMusics;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -33,10 +35,12 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public static bool Loaded;
 | 
					 | 
					 | 
					 | 
					        public static bool Loaded;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public static Color ColorTheme = Color.FromArgb(223, 114, 38);
 | 
					 | 
					 | 
					 | 
					        public static Color ColorTheme = Color.FromArgb(223, 114, 38);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public delegate void SaveHandler(int index, int all);
 | 
					 | 
					 | 
					 | 
					        private bool _breakAnim;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        private bool _isAnimRunning;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public delegate void IncrementSortedProgressBar(int all);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        private bool _isAudioPlaying;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        private SoundPlayer _soundPlayer;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public MainForm(Color color)
 | 
					 | 
					 | 
					 | 
					        public MainForm(Color color)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -52,29 +56,22 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (item is Button) item.BackColor = Color.FromArgb(30, 30, 30);
 | 
					 | 
					 | 
					 | 
					                if (item is Button) item.BackColor = Color.FromArgb(30, 30, 30);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (item is Label)
 | 
					 | 
					 | 
					 | 
					                if (item is Label)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    //item.BackColor = Color.Transparent;
 | 
					 | 
					 | 
					 | 
					                    //item.BackColor = Color.Transparent;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    item.Refresh();
 | 
					 | 
					 | 
					 | 
					                    item.Refresh();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (TabPage tabPage in tabControl1.TabPages)
 | 
					 | 
					 | 
					 | 
					            foreach (TabPage tabPage in tabControl1.TabPages)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (Control item in tabPage.Controls)
 | 
					 | 
					 | 
					 | 
					            foreach (Control item in tabPage.Controls)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                item.ForeColor = ColorTheme;
 | 
					 | 
					 | 
					 | 
					                item.ForeColor = ColorTheme;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (!(item is PictureBox) && !(item is TabPage)&&!(item is Label)) item.BackColor = Color.Black;
 | 
					 | 
					 | 
					 | 
					                if (!(item is PictureBox) && !(item is TabPage) && !(item is Label)) item.BackColor = Color.Black;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (item is Button) item.BackColor = Color.FromArgb(30, 30, 30);
 | 
					 | 
					 | 
					 | 
					                if (item is Button) item.BackColor = Color.FromArgb(30, 30, 30);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (item is Label)
 | 
					 | 
					 | 
					 | 
					                if (item is Label)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    //item.BackColor = Color.Transparent;
 | 
					 | 
					 | 
					 | 
					                    //item.BackColor = Color.Transparent;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    item.Refresh();
 | 
					 | 
					 | 
					 | 
					                    item.Refresh();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (var item in ChunkCombo.Items)
 | 
					 | 
					 | 
					 | 
					            foreach (var item in ChunkCombo.Items)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                ((ToolStripItem) item).ForeColor = ColorTheme;
 | 
					 | 
					 | 
					 | 
					                ((ToolStripItem) item).ForeColor = ColorTheme;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -87,16 +84,17 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            hexBox1.SelectionBackColor = Color.FromArgb(ColorTheme.R / 4, ColorTheme.G / 4, ColorTheme.B / 4);
 | 
					 | 
					 | 
					 | 
					            hexBox1.SelectionBackColor = Color.FromArgb(ColorTheme.R / 4, ColorTheme.G / 4, ColorTheme.B / 4);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            hexBox1.ShadowSelectionColor = Color.FromArgb(150, ColorTheme.R / 4, ColorTheme.G / 4, ColorTheme.B / 4);
 | 
					 | 
					 | 
					 | 
					            hexBox1.ShadowSelectionColor = Color.FromArgb(150, ColorTheme.R / 4, ColorTheme.G / 4, ColorTheme.B / 4);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            label1.Text = Settings.DumperVersion;
 | 
					 | 
					 | 
					 | 
					            label1.Text = Settings.DumperVersion;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            Text = Settings.DumperVersion;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            Pame2Mfa.OnMessage += (obj) =>
 | 
					 | 
					 | 
					 | 
					            Pame2Mfa.OnMessage += obj =>
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var date = DateTime.Now;
 | 
					 | 
					 | 
					 | 
					                var date = DateTime.Now;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                string msg = (string) obj;
 | 
					 | 
					 | 
					 | 
					                var msg = (string) obj;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                mfaLogBox.AppendText(msg.Length > 0
 | 
					 | 
					 | 
					 | 
					                mfaLogBox.AppendText(msg.Length > 0
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    ? $"[{date.Hour,2}:{date.Minute,2}:{date.Second,2}:{date.Millisecond,3}] {msg}\r\n"
 | 
					 | 
					 | 
					 | 
					                    ? $"[{date.Hour,2}:{date.Minute,2}:{date.Second,2}:{date.Millisecond,3}] {msg}\r\n"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    : "\r\n");
 | 
					 | 
					 | 
					 | 
					                    : "\r\n");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            };
 | 
					 | 
					 | 
					 | 
					            };
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.Closing += (a, e) =>
 | 
					 | 
					 | 
					 | 
					            Closing += (a, e) =>
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var dlg = MessageBox.Show("Are you sure you want to exit?", "Exiting", MessageBoxButtons.YesNo);
 | 
					 | 
					 | 
					 | 
					                var dlg = MessageBox.Show("Are you sure you want to exit?", "Exiting", MessageBoxButtons.YesNo);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (dlg == DialogResult.Yes) Environment.Exit(0);
 | 
					 | 
					 | 
					 | 
					                if (dlg == DialogResult.Yes) Environment.Exit(0);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -104,39 +102,26 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            };
 | 
					 | 
					 | 
					 | 
					            };
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            KeyPreview = true;
 | 
					 | 
					 | 
					 | 
					            KeyPreview = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            tabControl1.Selecting += tabControl1_Selecting;
 | 
					 | 
					 | 
					 | 
					            tabControl1.Selecting += tabControl1_Selecting;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //tabControl1.TabPages.Remove(mfaTab);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (!Loaded)
 | 
					 | 
					 | 
					 | 
					            if (!Loaded)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (e.TabPage != mainTab)
 | 
					 | 
					 | 
					 | 
					                if (e.TabPage != mainTab)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    e.Cancel = true;
 | 
					 | 
					 | 
					 | 
					                    e.Cancel = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //_soundPlayer.Stop();
 | 
					 | 
					 | 
					 | 
					            //_soundPlayer.Stop();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var worker = new BackgroundWorker();
 | 
					 | 
					 | 
					 | 
					            var worker = new BackgroundWorker();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            worker.DoWork += (workSender, workE) =>
 | 
					 | 
					 | 
					 | 
					            worker.DoWork += (workSender, workE) =>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if(File.Exists(openFileDialog1.FileName)) StartReading();
 | 
					 | 
					 | 
					 | 
					                if (File.Exists(openFileDialog1.FileName)) StartReading();
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                else throw new NotImplementedException("File not found");
 | 
					 | 
					 | 
					 | 
					                else throw new NotImplementedException("File not found");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            };
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            worker.RunWorkerCompleted += (workSender, workE) =>
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                AfterLoad();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            };
 | 
					 | 
					 | 
					 | 
					            };
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            worker.RunWorkerCompleted += (workSender, workE) => { AfterLoad(); };
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            worker.RunWorkerAsync();
 | 
					 | 
					 | 
					 | 
					            worker.RunWorkerAsync();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -151,12 +136,11 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            loadingLabel.Visible = false;
 | 
					 | 
					 | 
					 | 
					            loadingLabel.Visible = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            listBox1.Items.Clear();
 | 
					 | 
					 | 
					 | 
					            listBox1.Items.Clear();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var console = new MainConsole();
 | 
					 | 
					 | 
					 | 
					            var console = new MainConsole();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.Location= new Point(0,0);
 | 
					 | 
					 | 
					 | 
					            Location = new Point(0, 0);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.Size= new Size(this.Size.Width-100,Screen.PrimaryScreen.Bounds.Height-120);
 | 
					 | 
					 | 
					 | 
					            Size = new Size(Size.Width - 100, Screen.PrimaryScreen.Bounds.Height - 120);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            console.Show();
 | 
					 | 
					 | 
					 | 
					            console.Show();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            console.Location = new Point(this.Location.X+this.Size.Width-15,0);
 | 
					 | 
					 | 
					 | 
					            console.Location = new Point(Location.X + Size.Width - 15, 0);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            console.Size=new Size(console.Size.Width,this.Size.Height);
 | 
					 | 
					 | 
					 | 
					            console.Size = new Size(console.Size.Width, Size.Height);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -178,24 +162,16 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            musicsButton.Visible = false;
 | 
					 | 
					 | 
					 | 
					            musicsButton.Visible = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            dumpSortedBtn.Visible = false;
 | 
					 | 
					 | 
					 | 
					            dumpSortedBtn.Visible = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            Loaded = false;
 | 
					 | 
					 | 
					 | 
					            Loaded = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void treeView1_AfterDblClick(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void treeView1_AfterDblClick(object sender, EventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            ChunkCombo.Show(Cursor.Position);
 | 
					 | 
					 | 
					 | 
					            ChunkCombo.Show(Cursor.Position);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void treeView1_RightClick(object sender, MouseEventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void treeView1_RightClick(object sender, MouseEventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if ((e.Button & MouseButtons.Right) != 0)
 | 
					 | 
					 | 
					 | 
					            if ((e.Button & MouseButtons.Right) != 0) ChunkCombo.Show(Cursor.Position);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                ChunkCombo.Show(Cursor.Position);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void ChunkCombo_ItemSelected(object sender, ToolStripItemClickedEventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void ChunkCombo_ItemSelected(object sender, ToolStripItemClickedEventArgs e)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -204,11 +180,7 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case "saveChunkBtn":
 | 
					 | 
					 | 
					 | 
					                case "saveChunkBtn":
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    var chunk = ((ChunkNode) treeView1.SelectedNode).chunk;
 | 
					 | 
					 | 
					 | 
					                    var chunk = ((ChunkNode) treeView1.SelectedNode).chunk;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (chunk != null)
 | 
					 | 
					 | 
					 | 
					                    chunk?.Save();
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        chunk.Save();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    break;
 | 
					 | 
					 | 
					 | 
					                    break;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case "viewHexBtn":
 | 
					 | 
					 | 
					 | 
					                case "viewHexBtn":
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    ShowHex();
 | 
					 | 
					 | 
					 | 
					                    ShowHex();
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -233,7 +205,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            listBox1.Items.Clear();
 | 
					 | 
					 | 
					 | 
					            listBox1.Items.Clear();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (nodeChunk != null)
 | 
					 | 
					 | 
					 | 
					            if (nodeChunk != null)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                listBox1.Items.Add($"Name: {nodeChunk.Name}");
 | 
					 | 
					 | 
					 | 
					                listBox1.Items.Add($"Name: {nodeChunk.Name}");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                listBox1.Items.Add($"Id: {nodeChunk.Id} - 0x{nodeChunk.Id:X4}");
 | 
					 | 
					 | 
					 | 
					                listBox1.Items.Add($"Id: {nodeChunk.Id} - 0x{nodeChunk.Id:X4}");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                listBox1.Items.Add($"Flag: {nodeChunk.Flag}");
 | 
					 | 
					 | 
					 | 
					                listBox1.Items.Add($"Flag: {nodeChunk.Flag}");
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -265,7 +236,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public void AfterLoad()
 | 
					 | 
					 | 
					 | 
					        public void AfterLoad()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            Logger.Log("Loading GUI");
 | 
					 | 
					 | 
					 | 
					            Logger.Log("Loading GUI");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //GameData gameData = null;
 | 
					 | 
					 | 
					 | 
					            //GameData gameData = null;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var exe = Exe.Instance;
 | 
					 | 
					 | 
					 | 
					            var exe = Exe.Instance;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -275,13 +245,11 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            treeView1.Nodes.Clear();
 | 
					 | 
					 | 
					 | 
					            treeView1.Nodes.Clear();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (var item in gameData.GameChunks.Chunks)
 | 
					 | 
					 | 
					 | 
					            foreach (var item in gameData.GameChunks.Chunks)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					                var ActualName = item.Name;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                string ActualName = item.Name;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (item.Loader is Frame frm) ActualName = ActualName + " " + frm.Name;
 | 
					 | 
					 | 
					 | 
					                if (item.Loader is Frame frm) ActualName = ActualName + " " + frm.Name;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                ChunkNode newNode = Helper.GetChunkNode(item, ActualName);
 | 
					 | 
					 | 
					 | 
					                var newNode = Helper.GetChunkNode(item, ActualName);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                treeView1.Nodes.Add(newNode);
 | 
					 | 
					 | 
					 | 
					                treeView1.Nodes.Add(newNode);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (item.Loader is Frame frame)
 | 
					 | 
					 | 
					 | 
					                if (item.Loader is Frame frame)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    foreach (var frmChunk in frame.Chunks.Chunks)
 | 
					 | 
					 | 
					 | 
					                    foreach (var frmChunk in frame.Chunks.Chunks)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					                    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        var frameNode = Helper.GetChunkNode(frmChunk);
 | 
					 | 
					 | 
					 | 
					                        var frameNode = Helper.GetChunkNode(frmChunk);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -290,7 +258,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        {
 | 
					 | 
					 | 
					 | 
					                        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            var objs = frame.Chunks.GetChunk<ObjectInstances>();
 | 
					 | 
					 | 
					 | 
					                            var objs = frame.Chunks.GetChunk<ObjectInstances>();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            if (objs != null)
 | 
					 | 
					 | 
					 | 
					                            if (objs != null)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                foreach (var frmitem in objs.Items)
 | 
					 | 
					 | 
					 | 
					                                foreach (var frmitem in objs.Items)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                {
 | 
					 | 
					 | 
					 | 
					                                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    var objNode = new ChunkNode(frmitem.Name, frmitem);
 | 
					 | 
					 | 
					 | 
					                                    var objNode = new ChunkNode(frmitem.Name, frmitem);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -298,18 +265,13 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                }
 | 
					 | 
					 | 
					 | 
					                                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        }
 | 
					 | 
					 | 
					 | 
					                        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                else if (item.Loader is FrameItems items)
 | 
					 | 
					 | 
					 | 
					                else if (item.Loader is FrameItems items)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    foreach (var key in items.ItemDict.Keys)
 | 
					 | 
					 | 
					 | 
					                    foreach (var key in items.ItemDict.Keys)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					                    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        var frameItem = items.ItemDict[key];
 | 
					 | 
					 | 
					 | 
					                        var frameItem = items.ItemDict[key];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        var objNode = new ChunkNode($"{(Constants.ObjectType) frameItem.ObjectType} - {frameItem.Name}",
 | 
					 | 
					 | 
					 | 
					                        var objNode = new ChunkNode($"{(Constants.ObjectType) frameItem.ObjectType} - {frameItem.Name}",
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            frameItem);
 | 
					 | 
					 | 
					 | 
					                            frameItem);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        newNode.Nodes.Add(objNode);
 | 
					 | 
					 | 
					 | 
					                        newNode.Nodes.Add(objNode);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -378,10 +340,7 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            SortedProgressBar.Visible = true;
 | 
					 | 
					 | 
					 | 
					            SortedProgressBar.Visible = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            SortedProgressBar.Maximum = all;
 | 
					 | 
					 | 
					 | 
					            SortedProgressBar.Maximum = all;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            SortedProgressBar.Value += 1;
 | 
					 | 
					 | 
					 | 
					            SortedProgressBar.Value += 1;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (SortedProgressBar.Value >= SortedProgressBar.Maximum)
 | 
					 | 
					 | 
					 | 
					            if (SortedProgressBar.Value >= SortedProgressBar.Maximum) SortedProgressBar.Visible = false;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                SortedProgressBar.Visible = false;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -391,7 +350,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void soundsButton_Click(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void soundsButton_Click(object sender, EventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>() == null) return;
 | 
					 | 
					 | 
					 | 
					            if (Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>() == null) return;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -400,7 +358,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                SetSoundElements(true);
 | 
					 | 
					 | 
					 | 
					                SetSoundElements(true);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                IsDumpingSounds = true;
 | 
					 | 
					 | 
					 | 
					                IsDumpingSounds = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                Backend.DumpSounds(this, true, true);
 | 
					 | 
					 | 
					 | 
					                Backend.DumpSounds(this, true, true);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else
 | 
					 | 
					 | 
					 | 
					            else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -418,8 +375,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                SetImageElements(true);
 | 
					 | 
					 | 
					 | 
					                SetImageElements(true);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                IsDumpingImages = true;
 | 
					 | 
					 | 
					 | 
					                IsDumpingImages = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                Backend.DumpImages(this, true, true);
 | 
					 | 
					 | 
					 | 
					                Backend.DumpImages(this, true, true);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else
 | 
					 | 
					 | 
					 | 
					            else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -444,7 +399,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                IsDumpingMusics = false;
 | 
					 | 
					 | 
					 | 
					                IsDumpingMusics = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                SetMusicElements(false);
 | 
					 | 
					 | 
					 | 
					                SetMusicElements(false);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -476,7 +430,7 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if ((ChunkNode) treeView1.SelectedNode != null)
 | 
					 | 
					 | 
					 | 
					            if ((ChunkNode) treeView1.SelectedNode != null)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var node = ((ChunkNode) treeView1.SelectedNode);
 | 
					 | 
					 | 
					 | 
					                var node = (ChunkNode) treeView1.SelectedNode;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                HexViewForm hexform = null;
 | 
					 | 
					 | 
					 | 
					                HexViewForm hexform = null;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                hexform = new HexViewForm(node.chunk.ChunkData, node.chunk.RawData, ColorTheme,
 | 
					 | 
					 | 
					 | 
					                hexform = new HexViewForm(node.chunk.ChunkData, node.chunk.RawData, ColorTheme,
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -484,11 +438,9 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                hexform.Show();
 | 
					 | 
					 | 
					 | 
					                hexform.Show();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void dumpSortedBtn_Click(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void dumpSortedBtn_Click(object sender, EventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            imageBar.Visible = true;
 | 
					 | 
					 | 
					 | 
					            imageBar.Visible = true;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -500,7 +452,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var bank = Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>();
 | 
					 | 
					 | 
					 | 
					                var bank = Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                bank.SaveImages = false;
 | 
					 | 
					 | 
					 | 
					                bank.SaveImages = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                bank.Read();
 | 
					 | 
					 | 
					 | 
					                bank.Read();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            };
 | 
					 | 
					 | 
					 | 
					            };
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            worker.RunWorkerCompleted += (senderA, eA) =>
 | 
					 | 
					 | 
					 | 
					            worker.RunWorkerCompleted += (senderA, eA) =>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -512,11 +463,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void dumpMFAButton_Click(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void dumpMFAButton_Click(object sender, EventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var worker = new BackgroundWorker();
 | 
					 | 
					 | 
					 | 
					            var worker = new BackgroundWorker();
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -526,17 +472,13 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                Logger.Log("MFA Done", true, ConsoleColor.Yellow);
 | 
					 | 
					 | 
					 | 
					                Logger.Log("MFA Done", true, ConsoleColor.Yellow);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var res = MessageBox.Show("Dump Extensions?", "Finished", MessageBoxButtons.YesNo);
 | 
					 | 
					 | 
					 | 
					                var res = MessageBox.Show("Dump Extensions?", "Finished", MessageBoxButtons.YesNo);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (res == DialogResult.Yes)
 | 
					 | 
					 | 
					 | 
					                if (res == DialogResult.Yes)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    foreach (var item in Exe.Instance.PackData.Items)
 | 
					 | 
					 | 
					 | 
					                    foreach (var item in Exe.Instance.PackData.Items)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					                    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        item.Dump();
 | 
					 | 
					 | 
					 | 
					                        item.Dump();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        Pame2Mfa.Message("Dumping " + item.PackFilename);
 | 
					 | 
					 | 
					 | 
					                        Pame2Mfa.Message("Dumping " + item.PackFilename);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                Process.Start($"{Settings.DumpPath}");
 | 
					 | 
					 | 
					 | 
					                Process.Start($"{Settings.DumpPath}");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            };
 | 
					 | 
					 | 
					 | 
					            };
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            worker.RunWorkerAsync();
 | 
					 | 
					 | 
					 | 
					            worker.RunWorkerAsync();
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -561,9 +503,8 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            try
 | 
					 | 
					 | 
					 | 
					            try
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var previewKey = Decryption.MakeKeyFromComb(rawData, (byte) int.Parse((charBox.Text)));
 | 
					 | 
					 | 
					 | 
					                var previewKey = Decryption.MakeKeyFromComb(rawData, (byte) int.Parse(charBox.Text));
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                hexBox1.ByteProvider = new DynamicByteProvider(previewKey);
 | 
					 | 
					 | 
					 | 
					                hexBox1.ByteProvider = new DynamicByteProvider(previewKey);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            catch
 | 
					 | 
					 | 
					 | 
					            catch
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -574,10 +515,7 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public void InitPackDataTab()
 | 
					 | 
					 | 
					 | 
					        public void InitPackDataTab()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            packDataListBox.Items.Clear();
 | 
					 | 
					 | 
					 | 
					            packDataListBox.Items.Clear();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (var item in Exe.Instance.PackData.Items)
 | 
					 | 
					 | 
					 | 
					            foreach (var item in Exe.Instance.PackData.Items) packDataListBox.Items.Add(item.PackFilename);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                packDataListBox.Items.Add(item.PackFilename);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            UpdatePackInfo(0);
 | 
					 | 
					 | 
					 | 
					            UpdatePackInfo(0);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -603,10 +541,7 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void dumpAllPackButton_Click(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void dumpAllPackButton_Click(object sender, EventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (var item in Exe.Instance.PackData.Items)
 | 
					 | 
					 | 
					 | 
					            foreach (var item in Exe.Instance.PackData.Items) item.Dump();
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                item.Dump();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void packDataDialog_FileOk(object sender, CancelEventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void packDataDialog_FileOk(object sender, CancelEventArgs e)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -615,8 +550,10 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            item.Dump(packDataDialog.FileName);
 | 
					 | 
					 | 
					 | 
					            item.Dump(packDataDialog.FileName);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void packDataListBox_SelectedIndexChanged(object sender, EventArgs e) =>
 | 
					 | 
					 | 
					 | 
					        private void packDataListBox_SelectedIndexChanged(object sender, EventArgs e)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            UpdatePackInfo(packDataListBox.SelectedIndex);
 | 
					 | 
					 | 
					 | 
					            UpdatePackInfo(packDataListBox.SelectedIndex);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void plusCharBtn_Click(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void plusCharBtn_Click(object sender, EventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -631,9 +568,10 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            InitKeyTab();
 | 
					 | 
					 | 
					 | 
					            InitKeyTab();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void charBox_TextChanged(object sender, EventArgs e) => InitKeyTab();
 | 
					 | 
					 | 
					 | 
					        private void charBox_TextChanged(object sender, EventArgs e)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					            InitKeyTab();
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public void InitImages()
 | 
					 | 
					 | 
					 | 
					        public void InitImages()
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -642,13 +580,12 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var bank = Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>();
 | 
					 | 
					 | 
					 | 
					            var bank = Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var items = bank.Images.ToList();
 | 
					 | 
					 | 
					 | 
					            var items = bank.Images.ToList();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var filtered = items.OrderBy(x => x.Value.Handle);
 | 
					 | 
					 | 
					 | 
					            var filtered = items.OrderBy(x => x.Value.Handle);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (Frame frame in Exe.Instance.GameData.Frames)
 | 
					 | 
					 | 
					 | 
					            foreach (var frame in Exe.Instance.GameData.Frames)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var frameNode = new ChunkNode(frame.Name, frame);
 | 
					 | 
					 | 
					 | 
					                var frameNode = new ChunkNode(frame.Name, frame);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                imagesTreeView.Nodes.Add(frameNode);
 | 
					 | 
					 | 
					 | 
					                imagesTreeView.Nodes.Add(frameNode);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (frame.Objects != null)
 | 
					 | 
					 | 
					 | 
					                if (frame.Objects != null)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                    foreach (var objInst in frame.Objects.Items)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    foreach (ObjectInstance objInst in frame.Objects.Items)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					                    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        var objInstNode = new ChunkNode(objInst.FrameItem.Name, objInst);
 | 
					 | 
					 | 
					 | 
					                        var objInstNode = new ChunkNode(objInst.FrameItem.Name, objInst);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        frameNode.Nodes.Add(objInstNode);
 | 
					 | 
					 | 
					 | 
					                        frameNode.Nodes.Add(objInstNode);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -656,20 +593,19 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        if (loader is ObjectCommon common)
 | 
					 | 
					 | 
					 | 
					                        if (loader is ObjectCommon common)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        {
 | 
					 | 
					 | 
					 | 
					                        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            if (common.Animations != null)
 | 
					 | 
					 | 
					 | 
					                            if (common.Animations != null)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                foreach (var pair in common.Animations.AnimationDict)
 | 
					 | 
					 | 
					 | 
					                                foreach (var pair in common.Animations.AnimationDict)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                {
 | 
					 | 
					 | 
					 | 
					                                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    var animNode = new ChunkNode($"Animation {pair.Key}", pair.Value);
 | 
					 | 
					 | 
					 | 
					                                    var animNode = new ChunkNode($"Animation {pair.Key}", pair.Value);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    objInstNode.Nodes.Add(animNode);
 | 
					 | 
					 | 
					 | 
					                                    objInstNode.Nodes.Add(animNode);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    foreach (var dir in pair.Value.DirectionDict)
 | 
					 | 
					 | 
					 | 
					                                    foreach (var dir in pair.Value.DirectionDict)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        if (pair.Value.DirectionDict.Count > 1)
 | 
					 | 
					 | 
					 | 
					                                        if (pair.Value.DirectionDict.Count > 1)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        {
 | 
					 | 
					 | 
					 | 
					                                        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            var dirNode = new ChunkNode($"Direction {pair.Value.DirectionDict.ToList().IndexOf(dir)}",dir.Value);
 | 
					 | 
					 | 
					 | 
					                                            var dirNode = new ChunkNode(
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                                $"Direction {pair.Value.DirectionDict.ToList().IndexOf(dir)}",
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                                dir.Value);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            animNode.Nodes.Add(dirNode);
 | 
					 | 
					 | 
					 | 
					                                            animNode.Nodes.Add(dirNode);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            for (int a = 0; a < dir.Value.Frames.Count; a++)
 | 
					 | 
					 | 
					 | 
					                                            for (var a = 0; a < dir.Value.Frames.Count; a++)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            {
 | 
					 | 
					 | 
					 | 
					                                            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                var animFrame = dir.Value.Frames[a];
 | 
					 | 
					 | 
					 | 
					                                                var animFrame = dir.Value.Frames[a];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                bank.Images.TryGetValue(animFrame, out var img);
 | 
					 | 
					 | 
					 | 
					                                                bank.Images.TryGetValue(animFrame, out var img);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                if (img != null)
 | 
					 | 
					 | 
					 | 
					                                                if (img != null)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -677,14 +613,12 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                    var animFrameNode = new ChunkNode(a.ToString(), img);
 | 
					 | 
					 | 
					 | 
					                                                    var animFrameNode = new ChunkNode(a.ToString(), img);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                    dirNode.Nodes.Add(animFrameNode);
 | 
					 | 
					 | 
					 | 
					                                                    dirNode.Nodes.Add(animFrameNode);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                }
 | 
					 | 
					 | 
					 | 
					                                                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            }
 | 
					 | 
					 | 
					 | 
					                                            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        }
 | 
					 | 
					 | 
					 | 
					                                        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        else
 | 
					 | 
					 | 
					 | 
					                                        else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        {
 | 
					 | 
					 | 
					 | 
					                                        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            for (int a = 0; a < dir.Value.Frames.Count; a++)
 | 
					 | 
					 | 
					 | 
					                                            for (var a = 0; a < dir.Value.Frames.Count; a++)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            {
 | 
					 | 
					 | 
					 | 
					                                            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                var animFrame = dir.Value.Frames[a];
 | 
					 | 
					 | 
					 | 
					                                                var animFrame = dir.Value.Frames[a];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                bank.Images.TryGetValue(animFrame, out var img);
 | 
					 | 
					 | 
					 | 
					                                                bank.Images.TryGetValue(animFrame, out var img);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                if (img != null)
 | 
					 | 
					 | 
					 | 
					                                                if (img != null)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -692,17 +626,13 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                    var animFrameNode = new ChunkNode(a.ToString(), img);
 | 
					 | 
					 | 
					 | 
					                                                    var animFrameNode = new ChunkNode(a.ToString(), img);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                    animNode.Nodes.Add(animFrameNode);
 | 
					 | 
					 | 
					 | 
					                                                    animNode.Nodes.Add(animFrameNode);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                }
 | 
					 | 
					 | 
					 | 
					                                                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            }
 | 
					 | 
					 | 
					 | 
					                                            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        }
 | 
					 | 
					 | 
					 | 
					                                        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                }
 | 
					 | 
					 | 
					 | 
					                                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        }
 | 
					 | 
					 | 
					 | 
					                        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        else if (loader is Backdrop backdrop)
 | 
					 | 
					 | 
					 | 
					                        else if (loader is Backdrop backdrop)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        {
 | 
					 | 
					 | 
					 | 
					                        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            bank.Images.TryGetValue(backdrop.Image,out var img);
 | 
					 | 
					 | 
					 | 
					                            bank.Images.TryGetValue(backdrop.Image, out var img);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            if (img != null)
 | 
					 | 
					 | 
					 | 
					                            if (img != null)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            {
 | 
					 | 
					 | 
					 | 
					                            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                var backdropNode = new ChunkNode("Image", img);
 | 
					 | 
					 | 
					 | 
					                                var backdropNode = new ChunkNode("Image", img);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -712,11 +642,6 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private bool _breakAnim;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private bool _isAnimRunning;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private SoundPlayer _soundPlayer;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void advancedPlayAnimation_Click(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void advancedPlayAnimation_Click(object sender, EventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -730,14 +655,12 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _isAnimRunning = true;
 | 
					 | 
					 | 
					 | 
					                    _isAnimRunning = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    var animThread = new Thread(PlayAnimation);
 | 
					 | 
					 | 
					 | 
					                    var animThread = new Thread(PlayAnimation);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    List<Bitmap> frames = new List<Bitmap>();
 | 
					 | 
					 | 
					 | 
					                    var frames = new List<Bitmap>();
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    foreach (var dir in anim.DirectionDict)
 | 
					 | 
					 | 
					 | 
					                    foreach (var dir in anim.DirectionDict)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					                    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        foreach (var frame in dir.Value.Frames)
 | 
					 | 
					 | 
					 | 
					                        foreach (var frame in dir.Value.Frames)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            frames.Add(Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>().Images[frame].Bitmap);
 | 
					 | 
					 | 
					 | 
					                            frames.Add(Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>().Images[frame].Bitmap);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        }
 | 
					 | 
					 | 
					 | 
					                        animThread.Start(new Tuple<List<Bitmap>, AnimationDirection>(frames, dir.Value));
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        animThread.Start(new Tuple<List<Bitmap>,AnimationDirection>(frames,dir.Value));
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        break;
 | 
					 | 
					 | 
					 | 
					                        break;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -752,41 +675,41 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _isAnimRunning = true;
 | 
					 | 
					 | 
					 | 
					                    _isAnimRunning = true;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    var animThread = new Thread(PlayAnimation);
 | 
					 | 
					 | 
					 | 
					                    var animThread = new Thread(PlayAnimation);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    List<Bitmap> frames = new List<Bitmap>();
 | 
					 | 
					 | 
					 | 
					                    var frames = new List<Bitmap>();
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    foreach (var frame in dir.Frames)
 | 
					 | 
					 | 
					 | 
					                    foreach (var frame in dir.Frames)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					                    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        frames.Add(Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>().Images[frame].Bitmap);
 | 
					 | 
					 | 
					 | 
					                        frames.Add(Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>().Images[frame].Bitmap);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        animThread.Start(new Tuple<List<Bitmap>,AnimationDirection>(frames,dir));
 | 
					 | 
					 | 
					 | 
					                        animThread.Start(new Tuple<List<Bitmap>, AnimationDirection>(frames, dir));
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        break;
 | 
					 | 
					 | 
					 | 
					                        break;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public void PlayAnimation(object o)
 | 
					 | 
					 | 
					 | 
					        public void PlayAnimation(object o)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var (frames,anim) = (Tuple<List<Bitmap>,AnimationDirection>) o;
 | 
					 | 
					 | 
					 | 
					            var (frames, anim) = (Tuple<List<Bitmap>, AnimationDirection>) o;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var fps = (float)anim.MaxSpeed;
 | 
					 | 
					 | 
					 | 
					            var fps = (float) anim.MaxSpeed;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            float delay = 1f/fps;
 | 
					 | 
					 | 
					 | 
					            var delay = 1f / fps;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            int i = 0;
 | 
					 | 
					 | 
					 | 
					            var i = 0;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (anim.Repeat > 0&& anim.Frames.Count>1)
 | 
					 | 
					 | 
					 | 
					            if (anim.Repeat > 0 && anim.Frames.Count > 1)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                foreach (Bitmap frame in frames)
 | 
					 | 
					 | 
					 | 
					                foreach (var frame in frames)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    imageViewPictureBox.Image = frame;
 | 
					 | 
					 | 
					 | 
					                    imageViewPictureBox.Image = frame;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    imageViewerInfo.Text = $"Current frame: {frames.IndexOf(frame)}\nAnimation Speed: {fps}";
 | 
					 | 
					 | 
					 | 
					                    imageViewerInfo.Text = $"Current frame: {frames.IndexOf(frame)}\nAnimation Speed: {fps}";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    Thread.Sleep((int) (delay*1500));
 | 
					 | 
					 | 
					 | 
					                    Thread.Sleep((int) (delay * 1500));
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _isAnimRunning = false;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                try {Thread.CurrentThread.Abort();}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                catch {}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                _isAnimRunning = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                try
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    Thread.CurrentThread.Abort();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                catch
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else
 | 
					 | 
					 | 
					 | 
					            else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -795,25 +718,18 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    var frame = frames[i];
 | 
					 | 
					 | 
					 | 
					                    var frame = frames[i];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    imageViewPictureBox.Image = frame;
 | 
					 | 
					 | 
					 | 
					                    imageViewPictureBox.Image = frame;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    imageViewerInfo.Text = $"Current frame: {i.ToString()}\nAnimation Speed: {fps}";
 | 
					 | 
					 | 
					 | 
					                    imageViewerInfo.Text = $"Current frame: {i.ToString()}\nAnimation Speed: {fps}";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    Thread.Sleep((int) (delay*1500));
 | 
					 | 
					 | 
					 | 
					                    Thread.Sleep((int) (delay * 1500));
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    i++;
 | 
					 | 
					 | 
					 | 
					                    i++;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (i == frames.Count) i = 0;
 | 
					 | 
					 | 
					 | 
					                    if (i == frames.Count) i = 0;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (_breakAnim)
 | 
					 | 
					 | 
					 | 
					                    if (_breakAnim)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    {
 | 
					 | 
					 | 
					 | 
					                    {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        _isAnimRunning = false;
 | 
					 | 
					 | 
					 | 
					                        _isAnimRunning = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        _breakAnim = false;
 | 
					 | 
					 | 
					 | 
					                        _breakAnim = false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        if(Thread.CurrentThread.IsAlive) Thread.CurrentThread.Abort();
 | 
					 | 
					 | 
					 | 
					                        if (Thread.CurrentThread.IsAlive) Thread.CurrentThread.Abort();
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        break;
 | 
					 | 
					 | 
					 | 
					                        break;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    }
 | 
					 | 
					 | 
					 | 
					                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void advancedTreeView_AfterSelect(object sender, TreeViewEventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void advancedTreeView_AfterSelect(object sender, TreeViewEventArgs e)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -821,23 +737,16 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var node = e.Node;
 | 
					 | 
					 | 
					 | 
					            var node = e.Node;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (((ChunkNode) node).loader is ImageItem)
 | 
					 | 
					 | 
					 | 
					            if (((ChunkNode) node).loader is ImageItem)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                var img = ((ImageItem) ((ChunkNode) node).loader);
 | 
					 | 
					 | 
					 | 
					                var img = (ImageItem) ((ChunkNode) node).loader;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                imageViewPictureBox.Image = img.Bitmap;
 | 
					 | 
					 | 
					 | 
					                imageViewPictureBox.Image = img.Bitmap;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public void InitPlugins()
 | 
					 | 
					 | 
					 | 
					        public void InitPlugins()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            PluginAPI.PluginAPI.InitializePlugins();
 | 
					 | 
					 | 
					 | 
					            PluginAPI.PluginAPI.InitializePlugins();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (var plugin in PluginAPI.PluginAPI.Plugins)
 | 
					 | 
					 | 
					 | 
					            foreach (var plugin in PluginAPI.PluginAPI.Plugins) pluginsList.Items.Add(plugin.Name);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                pluginsList.Items.Add(plugin.Name);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void activatePluginBtn_Click(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void activatePluginBtn_Click(object sender, EventArgs e)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -846,45 +755,37 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public void InitSounds()
 | 
					 | 
					 | 
					 | 
					        public void InitSounds()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            var bank = Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>();
 | 
					 | 
					 | 
					 | 
					            var bank = Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (bank == null) return;
 | 
					 | 
					 | 
					 | 
					            if (bank == null) return;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach (SoundItem soundItem in bank.Items)
 | 
					 | 
					 | 
					 | 
					            foreach (var soundItem in bank.Items) soundList.Nodes.Add(new ChunkNode(soundItem.Name, soundItem));
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					            _soundPlayer =
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                soundList.Nodes.Add(new ChunkNode(soundItem.Name,soundItem));
 | 
					 | 
					 | 
					 | 
					                new SoundPlayer(new MemoryStream(Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>().Items[0].Data));
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _soundPlayer = new SoundPlayer(new MemoryStream(Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>().Items[0].Data));
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private bool _isAudioPlaying;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void playSoundBtn_Click(object sender, EventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void playSoundBtn_Click(object sender, EventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _soundPlayer.Stream = new MemoryStream(Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>().Items[soundList.SelectedNode.Index].Data);
 | 
					 | 
					 | 
					 | 
					            _soundPlayer.Stream = new MemoryStream(Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>()
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                .Items[soundList.SelectedNode.Index].Data);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _soundPlayer.Play();
 | 
					 | 
					 | 
					 | 
					            _soundPlayer.Play();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        private void soundList_AfterSelect(object sender, TreeViewEventArgs e)
 | 
					 | 
					 | 
					 | 
					        private void soundList_AfterSelect(object sender, TreeViewEventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        protected override void OnKeyDown(KeyEventArgs e)
 | 
					 | 
					 | 
					 | 
					        protected override void OnKeyDown(KeyEventArgs e)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        {
 | 
					 | 
					 | 
					 | 
					        {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (tabControl1.SelectedTab == imgViewerTab)
 | 
					 | 
					 | 
					 | 
					            if (tabControl1.SelectedTab == imgViewerTab)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (e.Control)
 | 
					 | 
					 | 
					 | 
					                if (e.Control)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                {
 | 
					 | 
					 | 
					 | 
					                {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    var node = (ChunkNode)imagesTreeView.SelectedNode;
 | 
					 | 
					 | 
					 | 
					                    var node = (ChunkNode) imagesTreeView.SelectedNode;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    var path = $"{Settings.ImagePath}\\{Helper.GetTreePath(imagesTreeView,(ChunkNode) imagesTreeView.SelectedNode)}";
 | 
					 | 
					 | 
					 | 
					                    var path =
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                        $"{Settings.ImagePath}\\{Helper.GetTreePath(imagesTreeView, (ChunkNode) imagesTreeView.SelectedNode)}";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (node == null) return;
 | 
					 | 
					 | 
					 | 
					                    if (node == null) return;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    ImageDumper.SaveFromNode(node);
 | 
					 | 
					 | 
					 | 
					                    ImageDumper.SaveFromNode(node);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -894,8 +795,3 @@ namespace CTFAK.GUI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |