Beispiel #1
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     if (Pattern != null)
     {
         BGI.SetFillPattern(Pattern, (byte)Color);
     }
 }
Beispiel #2
0
        public void Redraw()
        {
            var updates = new List <Rectangle>();

            RemoveDrawing(updates);
            ApplyDrawing(updates);
            BGI.UpdateRegion(updates);
        }
Beispiel #3
0
 public override void PostLoad()
 {
     base.PostLoad();
     if (this.Document.EditMode)
     {
         BGI.DelayDraw    = false;
         this.LinePattern = BGI.GetLinePattern(BGICanvas.LineStyle.User);
         this.FillPattern = BGI.GetFillPattern(BGICanvas.FillStyle.User);
         SelectTool <Rip.Tools.Line>();
     }
 }
Beispiel #4
0
		public override void Receive(ReceiveCommandArgs args)
		{
			base.Receive(args);
			SetBGI(null);
			var updates = new List<Rectangle>();
			BGI.GraphDefaults(updates);
			commands.Clear();
			args.Message.ReadCommands(this, commands);
			foreach (var command in commands)
			{
				updates.Clear();
				command.Apply(updates);
			}
		}
Beispiel #5
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     if (Points != null && Points.Length > 1)
     {
         var drawUpdates = updates ?? new List <Rectangle> ();
         BGI.MoveTo(Points [0]);
         for (int i = 1; i < Points.Length; i++)
         {
             BGI.LineTo(Points [i], drawUpdates);
         }
         if (updates == null)
         {
             BGI.UpdateRegion(drawUpdates);
         }
     }
 }
Beispiel #6
0
    public static DMSMapLight?ff9fieldMCFGetLightByCharFloor(DMSMapConf ObjPtr, Int32 uid, ref Int16 FloorNoPtr)
    {
        Int16 num = 0;

        BGI.BGI_charGetInfo(uid, ref num, ref FloorNoPtr);
        if (ObjPtr.lightUse == 0)
        {
            return(null);
        }
        if ((FloorNoPtr & 255) == 255)
        {
            return(null);
        }
        DMSMapLight[] dmsmapLight = ObjPtr.DMSMapLight;
        Int32         num2        = (Int32)(ObjPtr.lightUse - 1);
        DMSMapLight   value;

        for (;;)
        {
            value = dmsmapLight[num2];
            if ((Int32)value.type == 0)
            {
                for (Int32 i = 3; i >= 0; i--)
                {
                    SByte b    = value.floor[i];
                    Int32 num3 = (Int32)b & 255;
                    if (num3 == (Int32)FloorNoPtr)
                    {
                        goto Block_4;
                    }
                }
            }
            num2--;
            if (num2 < 0)
            {
                goto Block_5;
            }
        }
Block_4:
        return(new DMSMapLight?(value));

Block_5:
        return(null);
    }
Beispiel #7
0
        public override void GenerateRegion(Graphics graphics, Rectangle rectSource, Rectangle rectDest)
        {
            if (this.ZoomRatio.Width == 1 && this.ZoomRatio.Height == 1)
            {
                graphics.ImageInterpolation = ImageInterpolation.None;
            }
            else
            {
                graphics.ImageInterpolation = ImageInterpolation.Default;
            }

            if (BGI != null)
            {
                BGI.DrawRegion(graphics, rectSource, rectDest);
            }
            else if (RipDocument.Image != null)
            {
                graphics.DrawImage(RipDocument.Image, rectSource, rectDest);
            }
        }
Beispiel #8
0
        public void Redraw(IList <Rectangle> updates = null)
        {
            var tempUpdates = new List <Rectangle>();

            SelectedTool?.RemoveDrawing(tempUpdates);
            BGI.GraphDefaults(tempUpdates);
            foreach (var command in RipDocument.Commands)
            {
                tempUpdates.Clear();
                command.Apply(tempUpdates);
            }
            SelectedTool?.ApplyDrawing(tempUpdates);

            var rect = new Rectangle(BGI.WindowSize);

            if (updates != null)
            {
                updates.Add(rect);
            }
            else
            {
                BGI.UpdateRegion(rect);
            }
        }
Beispiel #9
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.OutTextXY(Point.X, Point.Y, Text, updates);
 }
Beispiel #10
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     Document.RipImage = BGI.GetImage(Rectangle.Left, Rectangle.Top, Rectangle.InnerRight, Rectangle.InnerBottom);
 }
Beispiel #11
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.SetTextStyle(Font, Direction, CharacterSize);
 }
Beispiel #12
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.FillPoly(Points, updates);
 }
Beispiel #13
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.SetPalette(Color, Palette, updates);
 }
Beispiel #14
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.Circle(Point.X, Point.Y, Radius, updates);
 }
Beispiel #15
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.DrawBezier(Points.Length, Points, Segments, updates);
 }
Beispiel #16
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.Ellipse(Point.X, Point.Y, StartAngle, EndAngle, Radius.Width, Radius.Height, updates);
 }
Beispiel #17
0
    public int DoCalcOperationExt(int code)
    {
        int   frameNdx  = 0;
        short triNdx1   = 0;
        short floorNdx1 = 0;

        EBin.op_binary opBinary = (EBin.op_binary)code;
        switch (opBinary)
        {
        case EBin.op_binary.B_HAVE_ITEM:
            int id = this.eBin.getv();
            frameNdx = id >= EventEngine.kSItemOfs ? (id >= EventEngine.kCItemOfs ? QuadMistDatabase.MiniGame_GetCardCount(id - EventEngine.kCItemOfs) : (!ff9item.FF9Item_IsExistImportant(id - EventEngine.kSItemOfs) ? 0 : 1)) : ff9item.FF9Item_GetCount(id);
            break;

        case EBin.op_binary.B_BAFRAME:
            this.fieldmap.walkMesh.BGI_animGetFrame((uint)this.eBin.getv(), ref frameNdx);
            break;

        case EBin.op_binary.B_FRAME:
            frameNdx = EventEngineUtils.GetCharAnimFrame(this.gCur.go, this.eBin.getv());
            break;

        case EBin.op_binary.B_SPS:
            this.eBin.getv();
            this.eBin.getv();
            break;

        case EBin.op_binary.B_CURMP:
            frameNdx = (int)this._ff9.player[this.chr2slot(this.eBin.getv())].cur.mp;
            break;

        case EBin.op_binary.B_MAXMP:
            frameNdx = (int)this._ff9.player[this.chr2slot(this.eBin.getv())].max.mp;
            break;

        case EBin.op_binary.B_BGIID:
            short triNdx2 = -1;
            BGI.BGI_charGetInfo(this.eBin.getv(), ref triNdx2, ref floorNdx1);
            frameNdx = (int)triNdx2;
            break;

        case EBin.op_binary.B_BGIFLOOR:
            short floorNdx2 = -1;
            BGI.BGI_charGetInfo(this.eBin.getv(), ref triNdx1, ref floorNdx2);
            frameNdx = (int)floorNdx2;
            break;

        default:
            switch (opBinary - 67)
            {
            case EBin.op_binary.B_PAD0:
            case EBin.op_binary.B_PAD1:
            case EBin.op_binary.B_PAD2:
label_9:
                frameNdx = this.OperatorExtractLet(code);
                break;

            case EBin.op_binary.B_POST_PLUS_A:
            case EBin.op_binary.B_POST_MINUS_A:
label_8:
                frameNdx = this.OperatorExtract1(code);
                break;

            default:
                switch (opBinary - 8)
                {
                case EBin.op_binary.B_PAD0:
                case EBin.op_binary.B_PAD1:
                case EBin.op_binary.B_PAD2:
                case EBin.op_binary.B_PAD3:
                    frameNdx = this.OperatorAll1(code);
                    break;

                case EBin.op_binary.B_PRE_MINUS:
                    goto label_8;

                default:
                    switch (opBinary - 90)
                    {
                    case EBin.op_binary.B_PAD0:
                    case EBin.op_binary.B_PAD1:
                    case EBin.op_binary.B_PAD2:
                        this.eBin.getv();
                        break;

                    default:
                        if (opBinary != EBin.op_binary.B_CURHP)
                        {
                            if (opBinary != EBin.op_binary.B_MAXHP)
                            {
                                if (opBinary == EBin.op_binary.B_LET_E)
                                {
                                    goto label_9;
                                }
                                else
                                {
                                    break;
                                }
                            }
                            else
                            {
                                frameNdx = (int)this._ff9.player[this.chr2slot(this.eBin.getv())].max.hp;
                                break;
                            }
                        }
                        else
                        {
                            frameNdx = (int)this._ff9.player[this.chr2slot(this.eBin.getv())].cur.hp;
                            break;
                        }
                    }
                    break;
                }
                break;
            }
            break;
        }
        return(frameNdx);
    }
Beispiel #18
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.PieSlice(Point.X, Point.Y, StartAngle, EndAngle, Radius, updates);
 }
Beispiel #19
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.SetWriteMode(Mode);
 }
Beispiel #20
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.Rectangle(Rectangle.Left, Rectangle.Top, Rectangle.InnerRight, Rectangle.InnerBottom, updates);
 }
Beispiel #21
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.SetFillStyle(Style, (byte)Color);
 }
Beispiel #22
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.PutPixel(Point.X, Point.Y, BGI.GetColor(), updates);
 }
Beispiel #23
0
 public override void Loaded()
 {
     base.Loaded();
     BGI.ResetGraphics();
 }
Beispiel #24
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.Line(Start.X, Start.Y, End.X, End.Y, updates);
 }
Beispiel #25
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.SetColor((byte)Value);
 }
Beispiel #26
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.OutText(Text, updates);
 }
Beispiel #27
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.MoveTo(Point.X, Point.Y);
 }
Beispiel #28
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.FloodFill(Point.X, Point.Y, Border, updates);
 }
Beispiel #29
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.GraphDefaults(updates);
 }
Beispiel #30
0
 public override void Apply(IList <Rectangle> updates = null)
 {
     BGI.SetLineStyle(Style, Pattern, Thickness);
 }