public Converter(MainForm f, int wid, int hei, byte mi, string inp, string outp, string binp, byte tsk_mapstatics, byte tsk_season, bool tsk_uop, bool tsk_dds) { form = f; width = wid; height = hei; mapIndex = mi; inPath = inp; outPath = outp; binPath = binp; tileMatrix = new TileMatrix(inPath, mapIndex, mapIndex, width, height); task_mapstatics = tsk_mapstatics; task_season = tsk_season; task_uop = tsk_uop; task_dds = tsk_dds; CDAppendToLog = new DelegateString(form.AppendToLog); CDItemsState = new DelegateBool(form.SetItemsState); CDProgressBarSetMarquee = new DelegateBool(form.ProgressbarSetMarquee); CDProgressBarIncrease = new DelegateVoid(form.ProgressbarIncrease); CDProgressBarSetMax = new DelegateInt(form.ProgressbarSetMax); CDProgressBarSetVal = new DelegateInt(form.ProgressbarSetVal); CDSuccess = new DelegateVoid(form.Success); Log("Loading hues.mul into memory... ", true); Hues.Init(); Log("Done!\n", true); if (task_season != 0) { LoadLTDictionary(); } if (tsk_dds) { loadRadarcol(); bmp = new Bitmap(width, height, PixelFormat.Format16bppRgb555); Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height); bmpData = bmp.LockBits(rect, ImageLockMode.WriteOnly, bmp.PixelFormat); unsafe { bmpPtr = (byte *)bmpData.Scan0.ToPointer(); } } }