.class public Lcom/esotericsoftware/spine/Animation$PathConstraintSpacingTimeline;
.super Lcom/esotericsoftware/spine/Animation$PathConstraintPositionTimeline;
.source "Animation.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/esotericsoftware/spine/Animation;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "PathConstraintSpacingTimeline"
.end annotation


# direct methods
.method public constructor <init>(I)V
    .locals 0

    .line 1432
    invoke-direct {p0, p1}, Lcom/esotericsoftware/spine/Animation$PathConstraintPositionTimeline;-><init>(I)V

    return-void
.end method


# virtual methods
.method public a()I
    .locals 2

    .line 1436
    sget-object v0, Lcom/esotericsoftware/spine/Animation$TimelineType;->pathConstraintSpacing:Lcom/esotericsoftware/spine/Animation$TimelineType;

    invoke-virtual {v0}, Lcom/esotericsoftware/spine/Animation$TimelineType;->ordinal()I

    move-result v0

    shl-int/lit8 v0, v0, 0x18

    iget v1, p0, Lcom/esotericsoftware/spine/Animation$PathConstraintSpacingTimeline;->a:I

    add-int/2addr v0, v1

    return v0
.end method

.method public a(Lcom/esotericsoftware/spine/Skeleton;FFLcom/badlogic/gdx/utils/Array;FLcom/esotericsoftware/spine/Animation$MixPose;Lcom/esotericsoftware/spine/Animation$MixDirection;)V
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/esotericsoftware/spine/Skeleton;",
            "FF",
            "Lcom/badlogic/gdx/utils/Array<",
            "Lcom/esotericsoftware/spine/Event;",
            ">;F",
            "Lcom/esotericsoftware/spine/Animation$MixPose;",
            "Lcom/esotericsoftware/spine/Animation$MixDirection;",
            ")V"
        }
    .end annotation

    .line 1442
    iget-object p1, p1, Lcom/esotericsoftware/spine/Skeleton;->g:Lcom/badlogic/gdx/utils/Array;

    iget p2, p0, Lcom/esotericsoftware/spine/Animation$PathConstraintSpacingTimeline;->a:I

    invoke-virtual {p1, p2}, Lcom/badlogic/gdx/utils/Array;->a(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/esotericsoftware/spine/PathConstraint;

    .line 1443
    iget-object p2, p0, Lcom/esotericsoftware/spine/Animation$PathConstraintSpacingTimeline;->b:[F

    const/4 p4, 0x0

    .line 1444
    aget p4, p2, p4

    cmpg-float p4, p3, p4

    if-gez p4, :cond_0

    .line 1445
    sget-object p2, Lcom/esotericsoftware/spine/Animation$1;->a:[I

    invoke-virtual {p6}, Lcom/esotericsoftware/spine/Animation$MixPose;->ordinal()I

    move-result p3

    aget p2, p2, p3

    packed-switch p2, :pswitch_data_0

    goto :goto_0

    .line 1450
    :pswitch_0
    iget p2, p1, Lcom/esotericsoftware/spine/PathConstraint;->e:F

    iget-object p3, p1, Lcom/esotericsoftware/spine/PathConstraint;->a:Lcom/esotericsoftware/spine/PathConstraintData;

    iget p3, p3, Lcom/esotericsoftware/spine/PathConstraintData;->j:F

    iget p4, p1, Lcom/esotericsoftware/spine/PathConstraint;->e:F

    sub-float/2addr p3, p4

    mul-float p3, p3, p5

    add-float/2addr p2, p3

    iput p2, p1, Lcom/esotericsoftware/spine/PathConstraint;->e:F

    goto :goto_0

    .line 1447
    :pswitch_1
    iget-object p2, p1, Lcom/esotericsoftware/spine/PathConstraint;->a:Lcom/esotericsoftware/spine/PathConstraintData;

    iget p2, p2, Lcom/esotericsoftware/spine/PathConstraintData;->j:F

    iput p2, p1, Lcom/esotericsoftware/spine/PathConstraint;->e:F

    return-void

    :goto_0
    return-void

    .line 1456
    :cond_0
    array-length p4, p2

    const/4 p7, 0x2

    sub-int/2addr p4, p7

    aget p4, p2, p4

    cmpl-float p4, p3, p4

    if-ltz p4, :cond_1

    .line 1457
    array-length p3, p2

    add-int/lit8 p3, p3, -0x1

    aget p2, p2, p3

    goto :goto_1

    .line 1460
    :cond_1
    invoke-static {p2, p3, p7}, Lcom/esotericsoftware/spine/Animation;->a([FFI)I

    move-result p4

    add-int/lit8 p7, p4, -0x1

    .line 1461
    aget p7, p2, p7

    .line 1462
    aget v0, p2, p4

    .line 1463
    div-int/lit8 v1, p4, 0x2

    add-int/lit8 v1, v1, -0x1

    const/high16 v2, 0x3f800000    # 1.0f

    sub-float/2addr p3, v0

    add-int/lit8 v3, p4, -0x2

    aget v3, p2, v3

    sub-float/2addr v3, v0

    div-float/2addr p3, v3

    sub-float/2addr v2, p3

    invoke-virtual {p0, v1, v2}, Lcom/esotericsoftware/spine/Animation$PathConstraintSpacingTimeline;->a(IF)F

    move-result p3

    add-int/lit8 p4, p4, 0x1

    .line 1466
    aget p2, p2, p4

    sub-float/2addr p2, p7

    mul-float p2, p2, p3

    add-float/2addr p2, p7

    .line 1469
    :goto_1
    sget-object p3, Lcom/esotericsoftware/spine/Animation$MixPose;->setup:Lcom/esotericsoftware/spine/Animation$MixPose;

    if-ne p6, p3, :cond_2

    .line 1470
    iget-object p3, p1, Lcom/esotericsoftware/spine/PathConstraint;->a:Lcom/esotericsoftware/spine/PathConstraintData;

    iget p3, p3, Lcom/esotericsoftware/spine/PathConstraintData;->j:F

    iget-object p4, p1, Lcom/esotericsoftware/spine/PathConstraint;->a:Lcom/esotericsoftware/spine/PathConstraintData;

    iget p4, p4, Lcom/esotericsoftware/spine/PathConstraintData;->j:F

    sub-float/2addr p2, p4

    mul-float p2, p2, p5

    add-float/2addr p3, p2

    iput p3, p1, Lcom/esotericsoftware/spine/PathConstraint;->e:F

    goto :goto_2

    .line 1472
    :cond_2
    iget p3, p1, Lcom/esotericsoftware/spine/PathConstraint;->e:F

    iget p4, p1, Lcom/esotericsoftware/spine/PathConstraint;->e:F

    sub-float/2addr p2, p4

    mul-float p2, p2, p5

    add-float/2addr p3, p2

    iput p3, p1, Lcom/esotericsoftware/spine/PathConstraint;->e:F

    :goto_2
    return-void

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
