private void putChips() { changedAfterSave = true; if (selecting_type == SelectingType.Mapchip) { Tuple <int, int> t = cursor.OriginalIndex(); Tuple <int, int> t_ter = cursor.TerminalIndex(); Point refp = MainForm.mainform.CurrentMapchip(); if (refp.X != -1) { for (int y = t.Item2; y <= t_ter.Item2; y++) { for (int x = t.Item1; x <= t_ter.Item1; x++) { Mapchip c = new Mapchip(); c.width = c.height = 64; c.p = new Point(x * 64, y * 64); c.refx = refp.X; c.refy = refp.Y; data[c.p] = c; } } } } else if (selecting_type == SelectingType.Object) { Tuple <int, int> t = cursor.OriginalIndex(); Tuple <int, int> t_ter = cursor.TerminalIndex(); Point refp = MainForm.mainform.CurrentObjchip(); if (refp.X != -1) { for (int y = t.Item2; y <= t_ter.Item2; y++) { for (int x = t.Item1; x <= t_ter.Item1; x++) { Mapchip c = new Mapchip(); c.width = c.height = 32; c.p = new Point(x * 32, y * 32); c.refx = refp.X; c.refy = refp.Y; data.setObject(c.p, c); } } } } else if (selecting_type == SelectingType.Billboard) { Billboard b = MainForm.mainform.bbs.getBillboard(); Point p = cursor.getOrigin(); b.x = p.X; b.y = p.Y; b.translate_rate_y = 1; b.translate_rate_x = 0.6; billboards.Add(b); } }
public Tuple <int, int> getCurrentIndex() { return(cursor.OriginalIndex()); }
public void Clip(MapData data, RectCursor cursor) { clipboard.setChips(data, cursor.OriginalIndex().Item1, cursor.OriginalIndex().Item2 , cursor.TerminalIndex().Item1 - cursor.OriginalIndex().Item1 + 1 , cursor.TerminalIndex().Item2 - cursor.OriginalIndex().Item2 + 1); }