.class public Lcom/esotericsoftware/spine/attachments/RegionAttachment;
.super Lcom/esotericsoftware/spine/attachments/Attachment;
.source "RegionAttachment.java"


# instance fields
.field private b:Lcom/badlogic/gdx/graphics/g2d/TextureRegion;

.field private c:Ljava/lang/String;

.field private d:F

.field private e:F

.field private f:F

.field private g:F

.field private h:F

.field private i:F

.field private j:F

.field private final k:[F

.field private final l:[F

.field private final m:Lcom/badlogic/gdx/graphics/Color;


# direct methods
.method public constructor <init>(Ljava/lang/String;)V
    .locals 2

    .line 60
    invoke-direct {p0, p1}, Lcom/esotericsoftware/spine/attachments/Attachment;-><init>(Ljava/lang/String;)V

    const/high16 p1, 0x3f800000    # 1.0f

    .line 54
    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->f:F

    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->g:F

    const/16 v0, 0x8

    .line 55
    new-array v1, v0, [F

    iput-object v1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->k:[F

    .line 56
    new-array v0, v0, [F

    iput-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->l:[F

    .line 57
    new-instance v0, Lcom/badlogic/gdx/graphics/Color;

    invoke-direct {v0, p1, p1, p1, p1}, Lcom/badlogic/gdx/graphics/Color;-><init>(FFFF)V

    iput-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->m:Lcom/badlogic/gdx/graphics/Color;

    return-void
.end method


# virtual methods
.method public a(F)V
    .locals 0

    .line 199
    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->d:F

    return-void
.end method

.method public a(Lcom/badlogic/gdx/graphics/g2d/TextureRegion;)V
    .locals 10

    if-eqz p1, :cond_1

    .line 117
    iput-object p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->b:Lcom/badlogic/gdx/graphics/g2d/TextureRegion;

    .line 118
    iget-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->k:[F

    .line 119
    instance-of v1, p1, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;

    const/4 v2, 0x1

    const/4 v3, 0x0

    const/4 v4, 0x7

    const/4 v5, 0x6

    const/4 v6, 0x5

    const/4 v7, 0x4

    const/4 v8, 0x3

    const/4 v9, 0x2

    if-eqz v1, :cond_0

    move-object v1, p1

    check-cast v1, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;

    iget-boolean v1, v1, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->i:Z

    if-eqz v1, :cond_0

    .line 120
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->l()F

    move-result v1

    aput v1, v0, v7

    .line 121
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->o()F

    move-result v1

    aput v1, v0, v6

    .line 122
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->l()F

    move-result v1

    aput v1, v0, v5

    .line 123
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->m()F

    move-result v1

    aput v1, v0, v4

    .line 124
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->n()F

    move-result v1

    aput v1, v0, v3

    .line 125
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->m()F

    move-result v1

    aput v1, v0, v2

    .line 126
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->n()F

    move-result v1

    aput v1, v0, v9

    .line 127
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->o()F

    move-result p1

    aput p1, v0, v8

    goto :goto_0

    .line 129
    :cond_0
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->l()F

    move-result v1

    aput v1, v0, v9

    .line 130
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->o()F

    move-result v1

    aput v1, v0, v8

    .line 131
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->l()F

    move-result v1

    aput v1, v0, v7

    .line 132
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->m()F

    move-result v1

    aput v1, v0, v6

    .line 133
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->n()F

    move-result v1

    aput v1, v0, v5

    .line 134
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->m()F

    move-result v1

    aput v1, v0, v4

    .line 135
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->n()F

    move-result v1

    aput v1, v0, v3

    .line 136
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->o()F

    move-result p1

    aput p1, v0, v2

    :goto_0
    return-void

    .line 116
    :cond_1
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string v0, "region cannot be null."

    invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public a(Lcom/esotericsoftware/spine/Bone;[FII)V
    .locals 11

    .line 153
    iget-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->l:[F

    .line 154
    invoke-virtual {p1}, Lcom/esotericsoftware/spine/Bone;->i()F

    move-result v1

    invoke-virtual {p1}, Lcom/esotericsoftware/spine/Bone;->j()F

    move-result v2

    .line 155
    invoke-virtual {p1}, Lcom/esotericsoftware/spine/Bone;->e()F

    move-result v3

    invoke-virtual {p1}, Lcom/esotericsoftware/spine/Bone;->f()F

    move-result v4

    invoke-virtual {p1}, Lcom/esotericsoftware/spine/Bone;->g()F

    move-result v5

    invoke-virtual {p1}, Lcom/esotericsoftware/spine/Bone;->h()F

    move-result p1

    const/4 v6, 0x6

    .line 158
    aget v6, v0, v6

    const/4 v7, 0x7

    .line 159
    aget v7, v0, v7

    mul-float v8, v6, v3

    mul-float v9, v7, v4

    add-float/2addr v8, v9

    add-float/2addr v8, v1

    .line 160
    aput v8, p2, p3

    add-int/lit8 v8, p3, 0x1

    mul-float v6, v6, v5

    mul-float v7, v7, p1

    add-float/2addr v6, v7

    add-float/2addr v6, v2

    .line 161
    aput v6, p2, v8

    add-int/2addr p3, p4

    const/4 v6, 0x0

    .line 164
    aget v6, v0, v6

    const/4 v7, 0x1

    .line 165
    aget v8, v0, v7

    mul-float v9, v6, v3

    mul-float v10, v8, v4

    add-float/2addr v9, v10

    add-float/2addr v9, v1

    .line 166
    aput v9, p2, p3

    add-int/lit8 v9, p3, 0x1

    mul-float v6, v6, v5

    mul-float v8, v8, p1

    add-float/2addr v6, v8

    add-float/2addr v6, v2

    .line 167
    aput v6, p2, v9

    add-int/2addr p3, p4

    const/4 v6, 0x2

    .line 170
    aget v6, v0, v6

    const/4 v8, 0x3

    .line 171
    aget v8, v0, v8

    mul-float v9, v6, v3

    mul-float v10, v8, v4

    add-float/2addr v9, v10

    add-float/2addr v9, v1

    .line 172
    aput v9, p2, p3

    add-int/lit8 v9, p3, 0x1

    mul-float v6, v6, v5

    mul-float v8, v8, p1

    add-float/2addr v6, v8

    add-float/2addr v6, v2

    .line 173
    aput v6, p2, v9

    add-int/2addr p3, p4

    const/4 p4, 0x4

    .line 176
    aget p4, v0, p4

    const/4 v6, 0x5

    .line 177
    aget v0, v0, v6

    mul-float v3, v3, p4

    mul-float v4, v4, v0

    add-float/2addr v3, v4

    add-float/2addr v3, v1

    .line 178
    aput v3, p2, p3

    add-int/2addr p3, v7

    mul-float p4, p4, v5

    mul-float v0, v0, p1

    add-float/2addr p4, v0

    add-float/2addr p4, v2

    .line 179
    aput p4, p2, p3

    return-void
.end method

.method public a(Ljava/lang/String;)V
    .locals 0

    .line 267
    iput-object p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->c:Ljava/lang/String;

    return-void
.end method

.method public b()V
    .locals 11

    .line 65
    invoke-virtual {p0}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->j()F

    move-result v0

    .line 66
    invoke-virtual {p0}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->k()F

    move-result v1

    const/high16 v2, 0x40000000    # 2.0f

    div-float v3, v0, v2

    div-float v2, v1, v2

    neg-float v4, v3

    neg-float v5, v2

    .line 71
    iget-object v6, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->b:Lcom/badlogic/gdx/graphics/g2d/TextureRegion;

    instance-of v6, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;

    if-eqz v6, :cond_1

    .line 72
    iget-object v6, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->b:Lcom/badlogic/gdx/graphics/g2d/TextureRegion;

    check-cast v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;

    .line 73
    iget-boolean v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->i:Z

    if-eqz v7, :cond_0

    .line 74
    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->c:F

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->g:I

    int-to-float v8, v8

    div-float/2addr v7, v8

    mul-float v7, v7, v0

    add-float/2addr v4, v7

    .line 75
    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->d:F

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->h:I

    int-to-float v8, v8

    div-float/2addr v7, v8

    mul-float v7, v7, v1

    add-float/2addr v5, v7

    .line 76
    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->g:I

    int-to-float v7, v7

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->c:F

    sub-float/2addr v7, v8

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->f:I

    int-to-float v8, v8

    sub-float/2addr v7, v8

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->g:I

    int-to-float v8, v8

    div-float/2addr v7, v8

    mul-float v7, v7, v0

    sub-float/2addr v3, v7

    .line 77
    iget v0, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->h:I

    int-to-float v0, v0

    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->d:F

    sub-float/2addr v0, v7

    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->e:I

    int-to-float v7, v7

    sub-float/2addr v0, v7

    iget v6, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->h:I

    int-to-float v6, v6

    div-float/2addr v0, v6

    mul-float v0, v0, v1

    sub-float/2addr v2, v0

    goto :goto_0

    .line 79
    :cond_0
    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->c:F

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->g:I

    int-to-float v8, v8

    div-float/2addr v7, v8

    mul-float v7, v7, v0

    add-float/2addr v4, v7

    .line 80
    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->d:F

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->h:I

    int-to-float v8, v8

    div-float/2addr v7, v8

    mul-float v7, v7, v1

    add-float/2addr v5, v7

    .line 81
    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->g:I

    int-to-float v7, v7

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->c:F

    sub-float/2addr v7, v8

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->e:I

    int-to-float v8, v8

    sub-float/2addr v7, v8

    iget v8, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->g:I

    int-to-float v8, v8

    div-float/2addr v7, v8

    mul-float v7, v7, v0

    sub-float/2addr v3, v7

    .line 82
    iget v0, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->h:I

    int-to-float v0, v0

    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->d:F

    sub-float/2addr v0, v7

    iget v7, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->f:I

    int-to-float v7, v7

    sub-float/2addr v0, v7

    iget v6, v6, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;->h:I

    int-to-float v6, v6

    div-float/2addr v0, v6

    mul-float v0, v0, v1

    sub-float/2addr v2, v0

    .line 85
    :cond_1
    :goto_0
    invoke-virtual {p0}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->g()F

    move-result v0

    .line 86
    invoke-virtual {p0}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->h()F

    move-result v1

    mul-float v4, v4, v0

    mul-float v5, v5, v1

    mul-float v3, v3, v0

    mul-float v2, v2, v1

    .line 91
    invoke-virtual {p0}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->i()F

    move-result v0

    const v1, 0x3c8efa35

    mul-float v0, v0, v1

    float-to-double v0, v0

    .line 92
    invoke-static {v0, v1}, Ljava/lang/Math;->cos(D)D

    move-result-wide v6

    double-to-float v6, v6

    .line 93
    invoke-static {v0, v1}, Ljava/lang/Math;->sin(D)D

    move-result-wide v0

    double-to-float v0, v0

    .line 94
    invoke-virtual {p0}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->e()F

    move-result v1

    .line 95
    invoke-virtual {p0}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->f()F

    move-result v7

    mul-float v8, v4, v6

    add-float/2addr v8, v1

    mul-float v4, v4, v0

    mul-float v9, v5, v6

    add-float/2addr v9, v7

    mul-float v5, v5, v0

    mul-float v10, v3, v6

    add-float/2addr v10, v1

    mul-float v3, v3, v0

    mul-float v6, v6, v2

    add-float/2addr v6, v7

    mul-float v2, v2, v0

    .line 104
    iget-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->l:[F

    const/4 v1, 0x0

    sub-float v7, v8, v5

    .line 105
    aput v7, v0, v1

    const/4 v1, 0x1

    add-float v7, v9, v4

    .line 106
    aput v7, v0, v1

    const/4 v1, 0x2

    sub-float/2addr v8, v2

    .line 107
    aput v8, v0, v1

    const/4 v1, 0x3

    add-float/2addr v4, v6

    .line 108
    aput v4, v0, v1

    const/4 v1, 0x4

    sub-float v2, v10, v2

    .line 109
    aput v2, v0, v1

    const/4 v1, 0x5

    add-float/2addr v6, v3

    .line 110
    aput v6, v0, v1

    const/4 v1, 0x6

    sub-float/2addr v10, v5

    .line 111
    aput v10, v0, v1

    const/4 v1, 0x7

    add-float/2addr v9, v3

    .line 112
    aput v9, v0, v1

    return-void
.end method

.method public b(F)V
    .locals 0

    .line 208
    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->e:F

    return-void
.end method

.method public c()Lcom/badlogic/gdx/graphics/g2d/TextureRegion;
    .locals 3

    .line 141
    iget-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->b:Lcom/badlogic/gdx/graphics/g2d/TextureRegion;

    if-eqz v0, :cond_0

    .line 142
    iget-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->b:Lcom/badlogic/gdx/graphics/g2d/TextureRegion;

    return-object v0

    .line 141
    :cond_0
    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Region has not been set: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public c(F)V
    .locals 0

    .line 217
    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->f:F

    return-void
.end method

.method public d(F)V
    .locals 0

    .line 226
    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->g:F

    return-void
.end method

.method public d()[F
    .locals 1

    .line 190
    iget-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->k:[F

    return-object v0
.end method

.method public e()F
    .locals 1

    .line 195
    iget v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->d:F

    return v0
.end method

.method public e(F)V
    .locals 0

    .line 235
    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->h:F

    return-void
.end method

.method public f()F
    .locals 1

    .line 204
    iget v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->e:F

    return v0
.end method

.method public f(F)V
    .locals 0

    .line 244
    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->i:F

    return-void
.end method

.method public g()F
    .locals 1

    .line 213
    iget v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->f:F

    return v0
.end method

.method public g(F)V
    .locals 0

    .line 253
    iput p1, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->j:F

    return-void
.end method

.method public h()F
    .locals 1

    .line 222
    iget v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->g:F

    return v0
.end method

.method public i()F
    .locals 1

    .line 231
    iget v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->h:F

    return v0
.end method

.method public j()F
    .locals 1

    .line 240
    iget v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->i:F

    return v0
.end method

.method public k()F
    .locals 1

    .line 249
    iget v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->j:F

    return v0
.end method

.method public l()Lcom/badlogic/gdx/graphics/Color;
    .locals 1

    .line 258
    iget-object v0, p0, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->m:Lcom/badlogic/gdx/graphics/Color;

    return-object v0
.end method
