.class public Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;
.super Ljava/lang/Object;
.source "PolygonSpriteBatch.java"

# interfaces
.implements Lcom/badlogic/gdx/graphics/g2d/Batch;


# instance fields
.field a:F

.field public b:I

.field public c:I

.field public d:I

.field private e:Lcom/badlogic/gdx/graphics/Mesh;

.field private final f:[F

.field private final g:[S

.field private h:I

.field private i:I

.field private j:Lcom/badlogic/gdx/graphics/Texture;

.field private k:F

.field private l:F

.field private m:Z

.field private final n:Lcom/badlogic/gdx/math/Matrix4;

.field private final o:Lcom/badlogic/gdx/math/Matrix4;

.field private final p:Lcom/badlogic/gdx/math/Matrix4;

.field private q:Z

.field private r:I

.field private s:I

.field private final t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

.field private u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

.field private v:Z

.field private w:Lcom/badlogic/gdx/graphics/Color;


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

    const/16 v0, 0x7d0

    const/4 v1, 0x0

    .line 97
    invoke-direct {p0, v0, v1}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;-><init>(ILcom/badlogic/gdx/graphics/glutils/ShaderProgram;)V

    return-void
.end method

.method public constructor <init>(IILcom/badlogic/gdx/graphics/glutils/ShaderProgram;)V
    .locals 10

    .line 124
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 67
    iput v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->k:F

    iput v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->l:F

    .line 70
    new-instance v1, Lcom/badlogic/gdx/math/Matrix4;

    invoke-direct {v1}, Lcom/badlogic/gdx/math/Matrix4;-><init>()V

    iput-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->n:Lcom/badlogic/gdx/math/Matrix4;

    .line 71
    new-instance v1, Lcom/badlogic/gdx/math/Matrix4;

    invoke-direct {v1}, Lcom/badlogic/gdx/math/Matrix4;-><init>()V

    iput-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->o:Lcom/badlogic/gdx/math/Matrix4;

    .line 72
    new-instance v1, Lcom/badlogic/gdx/math/Matrix4;

    invoke-direct {v1}, Lcom/badlogic/gdx/math/Matrix4;-><init>()V

    iput-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->p:Lcom/badlogic/gdx/math/Matrix4;

    const/16 v1, 0x302

    .line 75
    iput v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->r:I

    const/16 v1, 0x303

    .line 76
    iput v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->s:I

    .line 82
    sget-object v1, Lcom/badlogic/gdx/graphics/Color;->c:Lcom/badlogic/gdx/graphics/Color;

    invoke-virtual {v1}, Lcom/badlogic/gdx/graphics/Color;->b()F

    move-result v1

    iput v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    .line 83
    new-instance v1, Lcom/badlogic/gdx/graphics/Color;

    const/high16 v2, 0x3f800000    # 1.0f

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

    iput-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->w:Lcom/badlogic/gdx/graphics/Color;

    const/4 v1, 0x0

    .line 86
    iput v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->b:I

    .line 89
    iput v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->c:I

    .line 92
    iput v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->d:I

    const/16 v2, 0x7fff

    if-gt p1, v2, :cond_2

    .line 129
    sget-object v2, Lcom/badlogic/gdx/graphics/Mesh$VertexDataType;->VertexArray:Lcom/badlogic/gdx/graphics/Mesh$VertexDataType;

    .line 130
    sget-object v3, Lcom/badlogic/gdx/Gdx;->g:Lcom/badlogic/gdx/graphics/GL30;

    if-eqz v3, :cond_0

    .line 131
    sget-object v2, Lcom/badlogic/gdx/graphics/Mesh$VertexDataType;->VertexBufferObjectWithVAO:Lcom/badlogic/gdx/graphics/Mesh$VertexDataType;

    :cond_0
    move-object v4, v2

    .line 133
    new-instance v2, Lcom/badlogic/gdx/graphics/Mesh;

    const/4 v5, 0x0

    const/4 v3, 0x3

    mul-int/lit8 p2, p2, 0x3

    new-array v8, v3, [Lcom/badlogic/gdx/graphics/VertexAttribute;

    new-instance v3, Lcom/badlogic/gdx/graphics/VertexAttribute;

    const-string v6, "a_position"

    const/4 v7, 0x2

    const/4 v9, 0x1

    invoke-direct {v3, v9, v7, v6}, Lcom/badlogic/gdx/graphics/VertexAttribute;-><init>(IILjava/lang/String;)V

    aput-object v3, v8, v1

    new-instance v1, Lcom/badlogic/gdx/graphics/VertexAttribute;

    const-string v3, "a_color"

    const/4 v6, 0x4

    invoke-direct {v1, v6, v6, v3}, Lcom/badlogic/gdx/graphics/VertexAttribute;-><init>(IILjava/lang/String;)V

    aput-object v1, v8, v9

    new-instance v1, Lcom/badlogic/gdx/graphics/VertexAttribute;

    const/16 v3, 0x10

    const-string v6, "a_texCoord0"

    invoke-direct {v1, v3, v7, v6}, Lcom/badlogic/gdx/graphics/VertexAttribute;-><init>(IILjava/lang/String;)V

    aput-object v1, v8, v7

    move-object v3, v2

    move v6, p1

    move v7, p2

    invoke-direct/range {v3 .. v8}, Lcom/badlogic/gdx/graphics/Mesh;-><init>(Lcom/badlogic/gdx/graphics/Mesh$VertexDataType;ZII[Lcom/badlogic/gdx/graphics/VertexAttribute;)V

    iput-object v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->e:Lcom/badlogic/gdx/graphics/Mesh;

    mul-int/lit8 p1, p1, 0x5

    .line 138
    new-array p1, p1, [F

    iput-object p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->f:[F

    .line 139
    new-array p1, p2, [S

    iput-object p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g:[S

    if-nez p3, :cond_1

    .line 142
    invoke-static {}, Lcom/badlogic/gdx/graphics/g2d/SpriteBatch;->g()Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    move-result-object p1

    iput-object p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    .line 143
    iput-boolean v9, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->v:Z

    goto :goto_0

    .line 145
    :cond_1
    iput-object p3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    .line 147
    :goto_0
    iget-object p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->o:Lcom/badlogic/gdx/math/Matrix4;

    sget-object p2, Lcom/badlogic/gdx/Gdx;->b:Lcom/badlogic/gdx/Graphics;

    invoke-interface {p2}, Lcom/badlogic/gdx/Graphics;->a()I

    move-result p2

    int-to-float p2, p2

    sget-object p3, Lcom/badlogic/gdx/Gdx;->b:Lcom/badlogic/gdx/Graphics;

    invoke-interface {p3}, Lcom/badlogic/gdx/Graphics;->b()I

    move-result p3

    int-to-float p3, p3

    invoke-virtual {p1, v0, v0, p2, p3}, Lcom/badlogic/gdx/math/Matrix4;->setToOrtho2D(FFFF)Lcom/badlogic/gdx/math/Matrix4;

    return-void

    .line 127
    :cond_2
    new-instance p2, Ljava/lang/IllegalArgumentException;

    new-instance p3, Ljava/lang/StringBuilder;

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

    const-string v0, "Can\'t have more than 32767 vertices per batch: "

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

    invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

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

    move-result-object p1

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

    throw p2
.end method

.method public constructor <init>(ILcom/badlogic/gdx/graphics/glutils/ShaderProgram;)V
    .locals 1

    mul-int/lit8 v0, p1, 0x2

    .line 111
    invoke-direct {p0, p1, v0, p2}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;-><init>(IILcom/badlogic/gdx/graphics/glutils/ShaderProgram;)V

    return-void
.end method

.method private a(Lcom/badlogic/gdx/graphics/Texture;)V
    .locals 2

    .line 1291
    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 1292
    iput-object p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->j:Lcom/badlogic/gdx/graphics/Texture;

    .line 1293
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/Texture;->e()I

    move-result v0

    int-to-float v0, v0

    const/high16 v1, 0x3f800000    # 1.0f

    div-float v0, v1, v0

    iput v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->k:F

    .line 1294
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/Texture;->f()I

    move-result p1

    int-to-float p1, p1

    div-float/2addr v1, p1

    iput v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->l:F

    return-void
.end method

.method private k()V
    .locals 4

    .line 1280
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->p:Lcom/badlogic/gdx/math/Matrix4;

    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->o:Lcom/badlogic/gdx/math/Matrix4;

    invoke-virtual {v0, v1}, Lcom/badlogic/gdx/math/Matrix4;->set(Lcom/badlogic/gdx/math/Matrix4;)Lcom/badlogic/gdx/math/Matrix4;

    move-result-object v0

    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->n:Lcom/badlogic/gdx/math/Matrix4;

    invoke-virtual {v0, v1}, Lcom/badlogic/gdx/math/Matrix4;->mul(Lcom/badlogic/gdx/math/Matrix4;)Lcom/badlogic/gdx/math/Matrix4;

    .line 1281
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    .line 1282
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    const-string v2, "u_projTrans"

    iget-object v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->p:Lcom/badlogic/gdx/math/Matrix4;

    invoke-virtual {v0, v2, v3}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->a(Ljava/lang/String;Lcom/badlogic/gdx/math/Matrix4;)V

    .line 1283
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    const-string v2, "u_texture"

    invoke-virtual {v0, v2, v1}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->a(Ljava/lang/String;I)V

    goto :goto_0

    .line 1285
    :cond_0
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    const-string v2, "u_projTrans"

    iget-object v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->p:Lcom/badlogic/gdx/math/Matrix4;

    invoke-virtual {v0, v2, v3}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->a(Ljava/lang/String;Lcom/badlogic/gdx/math/Matrix4;)V

    .line 1286
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    const-string v2, "u_texture"

    invoke-virtual {v0, v2, v1}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->a(Ljava/lang/String;I)V

    :goto_0
    return-void
.end method


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

    .line 152
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-nez v0, :cond_1

    const/4 v0, 0x0

    .line 153
    iput v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->b:I

    .line 155
    sget-object v1, Lcom/badlogic/gdx/Gdx;->e:Lcom/badlogic/gdx/graphics/GL20;

    invoke-interface {v1, v0}, Lcom/badlogic/gdx/graphics/GL20;->glDepthMask(Z)V

    .line 156
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    if-eqz v0, :cond_0

    .line 157
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    invoke-virtual {v0}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->e()V

    goto :goto_0

    .line 159
    :cond_0
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    invoke-virtual {v0}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->e()V

    .line 160
    :goto_0
    invoke-direct {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->k()V

    const/4 v0, 0x1

    .line 162
    iput-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    return-void

    .line 152
    :cond_1
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "PolygonSpriteBatch.end must be called before begin."

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

    throw v0
.end method

.method public a(F)V
    .locals 0

    .line 195
    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    return-void
.end method

.method public a(FFFF)V
    .locals 1

    const/high16 v0, 0x437f0000    # 255.0f

    mul-float p4, p4, v0

    float-to-int p4, p4

    shl-int/lit8 p4, p4, 0x18

    mul-float p3, p3, v0

    float-to-int p3, p3

    shl-int/lit8 p3, p3, 0x10

    or-int/2addr p3, p4

    mul-float p2, p2, v0

    float-to-int p2, p2

    shl-int/lit8 p2, p2, 0x8

    or-int/2addr p2, p3

    mul-float p1, p1, v0

    float-to-int p1, p1

    or-int/2addr p1, p2

    .line 190
    invoke-static {p1}, Lcom/badlogic/gdx/utils/NumberUtils;->a(I)F

    move-result p1

    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    return-void
.end method

.method public a(II)V
    .locals 1

    .line 1233
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->r:I

    if-ne v0, p1, :cond_0

    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->s:I

    if-ne v0, p2, :cond_0

    return-void

    .line 1234
    :cond_0
    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 1235
    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->r:I

    .line 1236
    iput p2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->s:I

    return-void
.end method

.method public a(Lcom/badlogic/gdx/graphics/Color;)V
    .locals 0

    .line 184
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/Color;->b()F

    move-result p1

    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    return-void
.end method

.method public a(Lcom/badlogic/gdx/graphics/Texture;FFFFFFFF)V
    .locals 6

    .line 643
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz v0, :cond_3

    .line 645
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g:[S

    .line 646
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->f:[F

    .line 648
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->j:Lcom/badlogic/gdx/graphics/Texture;

    if-eq p1, v2, :cond_0

    .line 649
    invoke-direct {p0, p1}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a(Lcom/badlogic/gdx/graphics/Texture;)V

    goto :goto_0

    .line 650
    :cond_0
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    add-int/lit8 p1, p1, 0x6

    array-length v2, v0

    if-gt p1, v2, :cond_1

    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/lit8 p1, p1, 0x14

    array-length v2, v1

    if-le p1, v2, :cond_2

    .line 651
    :cond_1
    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 653
    :cond_2
    :goto_0
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    .line 654
    iget v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    div-int/lit8 v2, v2, 0x5

    add-int/lit8 v3, p1, 0x1

    int-to-short v4, v2

    .line 655
    aput-short v4, v0, p1

    add-int/lit8 p1, v3, 0x1

    add-int/lit8 v5, v2, 0x1

    int-to-short v5, v5

    .line 656
    aput-short v5, v0, v3

    add-int/lit8 v3, p1, 0x1

    add-int/lit8 v5, v2, 0x2

    int-to-short v5, v5

    .line 657
    aput-short v5, v0, p1

    add-int/lit8 p1, v3, 0x1

    .line 658
    aput-short v5, v0, v3

    add-int/lit8 v3, p1, 0x1

    add-int/lit8 v2, v2, 0x3

    int-to-short v2, v2

    .line 659
    aput-short v2, v0, p1

    add-int/lit8 p1, v3, 0x1

    .line 660
    aput-short v4, v0, v3

    .line 661
    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    add-float/2addr p4, p2

    add-float/2addr p5, p3

    .line 666
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    .line 667
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/lit8 v2, v0, 0x1

    .line 668
    aput p2, v1, v0

    add-int/lit8 v0, v2, 0x1

    .line 669
    aput p3, v1, v2

    add-int/lit8 v2, v0, 0x1

    .line 670
    aput p1, v1, v0

    add-int/lit8 v0, v2, 0x1

    .line 671
    aput p6, v1, v2

    add-int/lit8 v2, v0, 0x1

    .line 672
    aput p7, v1, v0

    add-int/lit8 v0, v2, 0x1

    .line 674
    aput p2, v1, v2

    add-int/lit8 p2, v0, 0x1

    .line 675
    aput p5, v1, v0

    add-int/lit8 v0, p2, 0x1

    .line 676
    aput p1, v1, p2

    add-int/lit8 p2, v0, 0x1

    .line 677
    aput p6, v1, v0

    add-int/lit8 p6, p2, 0x1

    .line 678
    aput p9, v1, p2

    add-int/lit8 p2, p6, 0x1

    .line 680
    aput p4, v1, p6

    add-int/lit8 p6, p2, 0x1

    .line 681
    aput p5, v1, p2

    add-int/lit8 p2, p6, 0x1

    .line 682
    aput p1, v1, p6

    add-int/lit8 p5, p2, 0x1

    .line 683
    aput p8, v1, p2

    add-int/lit8 p2, p5, 0x1

    .line 684
    aput p9, v1, p5

    add-int/lit8 p5, p2, 0x1

    .line 686
    aput p4, v1, p2

    add-int/lit8 p2, p5, 0x1

    .line 687
    aput p3, v1, p5

    add-int/lit8 p3, p2, 0x1

    .line 688
    aput p1, v1, p2

    add-int/lit8 p1, p3, 0x1

    .line 689
    aput p8, v1, p3

    add-int/lit8 p2, p1, 0x1

    .line 690
    aput p7, v1, p1

    .line 691
    iput p2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    return-void

    .line 643
    :cond_3
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "PolygonSpriteBatch.begin must be called before draw."

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

    throw p1
.end method

.method public a(Lcom/badlogic/gdx/graphics/Texture;[FII)V
    .locals 7

    .line 758
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz v0, :cond_4

    .line 760
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g:[S

    .line 761
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->f:[F

    .line 763
    div-int/lit8 v2, p4, 0x14

    mul-int/lit8 v2, v2, 0x6

    .line 764
    iget-object v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->j:Lcom/badlogic/gdx/graphics/Texture;

    if-eq p1, v3, :cond_0

    .line 765
    invoke-direct {p0, p1}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a(Lcom/badlogic/gdx/graphics/Texture;)V

    goto :goto_0

    .line 766
    :cond_0
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    add-int/2addr p1, v2

    array-length v3, v0

    if-gt p1, v3, :cond_1

    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/2addr p1, p4

    array-length v3, v1

    if-le p1, v3, :cond_2

    .line 767
    :cond_1
    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 769
    :cond_2
    :goto_0
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    .line 770
    iget v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    .line 771
    div-int/lit8 v4, p1, 0x5

    int-to-short v4, v4

    add-int/2addr v2, v3

    :goto_1
    if-ge v3, v2, :cond_3

    .line 773
    aput-short v4, v0, v3

    add-int/lit8 v5, v3, 0x1

    add-int/lit8 v6, v4, 0x1

    int-to-short v6, v6

    .line 774
    aput-short v6, v0, v5

    add-int/lit8 v5, v3, 0x2

    add-int/lit8 v6, v4, 0x2

    int-to-short v6, v6

    .line 775
    aput-short v6, v0, v5

    add-int/lit8 v5, v3, 0x3

    .line 776
    aput-short v6, v0, v5

    add-int/lit8 v5, v3, 0x4

    add-int/lit8 v6, v4, 0x3

    int-to-short v6, v6

    .line 777
    aput-short v6, v0, v5

    add-int/lit8 v5, v3, 0x5

    .line 778
    aput-short v4, v0, v5

    add-int/lit8 v3, v3, 0x6

    add-int/lit8 v4, v4, 0x4

    int-to-short v4, v4

    goto :goto_1

    .line 780
    :cond_3
    iput v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    .line 782
    invoke-static {p2, p3, v1, p1, p4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 783
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/2addr p1, p4

    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    return-void

    .line 758
    :cond_4
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "PolygonSpriteBatch.begin must be called before draw."

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

    throw p1
.end method

.method public a(Lcom/badlogic/gdx/graphics/Texture;[FII[SII)V
    .locals 6

    .line 350
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz v0, :cond_4

    .line 352
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g:[S

    .line 353
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->f:[F

    .line 355
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->j:Lcom/badlogic/gdx/graphics/Texture;

    if-eq p1, v2, :cond_0

    .line 356
    invoke-direct {p0, p1}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a(Lcom/badlogic/gdx/graphics/Texture;)V

    goto :goto_0

    .line 357
    :cond_0
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    add-int/2addr p1, p7

    array-length v2, v0

    if-gt p1, v2, :cond_1

    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/2addr p1, p4

    array-length v2, v1

    if-le p1, v2, :cond_2

    .line 358
    :cond_1
    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 360
    :cond_2
    :goto_0
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    .line 361
    iget v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    .line 362
    div-int/lit8 v3, v2, 0x5

    add-int/2addr p7, p6

    :goto_1
    if-ge p6, p7, :cond_3

    add-int/lit8 v4, p1, 0x1

    .line 365
    aget-short v5, p5, p6

    add-int/2addr v5, v3

    int-to-short v5, v5

    aput-short v5, v0, p1

    add-int/lit8 p6, p6, 0x1

    move p1, v4

    goto :goto_1

    .line 366
    :cond_3
    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    .line 368
    invoke-static {p2, p3, v1, v2, p4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 369
    iget p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/2addr p1, p4

    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    return-void

    .line 350
    :cond_4
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "PolygonSpriteBatch.begin must be called before draw."

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

    throw p1
.end method

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

    .line 793
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz v0, :cond_3

    .line 795
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g:[S

    .line 796
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->f:[F

    .line 798
    iget-object v2, p1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->w:Lcom/badlogic/gdx/graphics/Texture;

    .line 799
    iget-object v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->j:Lcom/badlogic/gdx/graphics/Texture;

    if-eq v2, v3, :cond_0

    .line 800
    invoke-direct {p0, v2}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a(Lcom/badlogic/gdx/graphics/Texture;)V

    goto :goto_0

    .line 801
    :cond_0
    iget v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    add-int/lit8 v2, v2, 0x6

    array-length v3, v0

    if-gt v2, v3, :cond_1

    iget v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/lit8 v2, v2, 0x14

    array-length v3, v1

    if-le v2, v3, :cond_2

    .line 802
    :cond_1
    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 804
    :cond_2
    :goto_0
    iget v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    .line 805
    iget v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    div-int/lit8 v3, v3, 0x5

    add-int/lit8 v4, v2, 0x1

    int-to-short v5, v3

    .line 806
    aput-short v5, v0, v2

    add-int/lit8 v2, v4, 0x1

    add-int/lit8 v6, v3, 0x1

    int-to-short v6, v6

    .line 807
    aput-short v6, v0, v4

    add-int/lit8 v4, v2, 0x1

    add-int/lit8 v6, v3, 0x2

    int-to-short v6, v6

    .line 808
    aput-short v6, v0, v2

    add-int/lit8 v2, v4, 0x1

    .line 809
    aput-short v6, v0, v4

    add-int/lit8 v4, v2, 0x1

    add-int/lit8 v3, v3, 0x3

    int-to-short v3, v3

    .line 810
    aput-short v3, v0, v2

    add-int/lit8 v2, v4, 0x1

    .line 811
    aput-short v5, v0, v4

    .line 812
    iput v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    add-float/2addr p4, p2

    add-float/2addr p5, p3

    .line 816
    iget v0, p1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->x:F

    .line 817
    iget v2, p1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->A:F

    .line 818
    iget v3, p1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->z:F

    .line 819
    iget p1, p1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->y:F

    .line 821
    iget v4, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    .line 822
    iget v5, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/lit8 v6, v5, 0x1

    .line 823
    aput p2, v1, v5

    add-int/lit8 v5, v6, 0x1

    .line 824
    aput p3, v1, v6

    add-int/lit8 v6, v5, 0x1

    .line 825
    aput v4, v1, v5

    add-int/lit8 v5, v6, 0x1

    .line 826
    aput v0, v1, v6

    add-int/lit8 v6, v5, 0x1

    .line 827
    aput v2, v1, v5

    add-int/lit8 v5, v6, 0x1

    .line 829
    aput p2, v1, v6

    add-int/lit8 p2, v5, 0x1

    .line 830
    aput p5, v1, v5

    add-int/lit8 v5, p2, 0x1

    .line 831
    aput v4, v1, p2

    add-int/lit8 p2, v5, 0x1

    .line 832
    aput v0, v1, v5

    add-int/lit8 v0, p2, 0x1

    .line 833
    aput p1, v1, p2

    add-int/lit8 p2, v0, 0x1

    .line 835
    aput p4, v1, v0

    add-int/lit8 v0, p2, 0x1

    .line 836
    aput p5, v1, p2

    add-int/lit8 p2, v0, 0x1

    .line 837
    aput v4, v1, v0

    add-int/lit8 p5, p2, 0x1

    .line 838
    aput v3, v1, p2

    add-int/lit8 p2, p5, 0x1

    .line 839
    aput p1, v1, p5

    add-int/lit8 p1, p2, 0x1

    .line 841
    aput p4, v1, p2

    add-int/lit8 p2, p1, 0x1

    .line 842
    aput p3, v1, p1

    add-int/lit8 p1, p2, 0x1

    .line 843
    aput v4, v1, p2

    add-int/lit8 p2, p1, 0x1

    .line 844
    aput v3, v1, p1

    add-int/lit8 p1, p2, 0x1

    .line 845
    aput v2, v1, p2

    .line 846
    iput p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    return-void

    .line 793
    :cond_3
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "PolygonSpriteBatch.begin must be called before draw."

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

    throw p1
.end method

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

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move/from16 v2, p4

    move/from16 v3, p5

    .line 852
    iget-boolean v6, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz v6, :cond_6

    .line 854
    iget-object v6, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g:[S

    .line 855
    iget-object v7, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->f:[F

    .line 857
    iget-object v8, v1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->w:Lcom/badlogic/gdx/graphics/Texture;

    .line 858
    iget-object v9, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->j:Lcom/badlogic/gdx/graphics/Texture;

    if-eq v8, v9, :cond_0

    .line 859
    invoke-direct {v0, v8}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a(Lcom/badlogic/gdx/graphics/Texture;)V

    goto :goto_0

    .line 860
    :cond_0
    iget v8, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    add-int/lit8 v8, v8, 0x6

    array-length v9, v6

    if-gt v8, v9, :cond_1

    iget v8, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/lit8 v8, v8, 0x14

    array-length v9, v7

    if-le v8, v9, :cond_2

    .line 861
    :cond_1
    invoke-virtual/range {p0 .. p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 863
    :cond_2
    :goto_0
    iget v8, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    .line 864
    iget v9, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    div-int/lit8 v9, v9, 0x5

    add-int/lit8 v10, v8, 0x1

    int-to-short v11, v9

    .line 865
    aput-short v11, v6, v8

    add-int/lit8 v8, v10, 0x1

    add-int/lit8 v12, v9, 0x1

    int-to-short v12, v12

    .line 866
    aput-short v12, v6, v10

    add-int/lit8 v10, v8, 0x1

    add-int/lit8 v12, v9, 0x2

    int-to-short v12, v12

    .line 867
    aput-short v12, v6, v8

    add-int/lit8 v8, v10, 0x1

    .line 868
    aput-short v12, v6, v10

    add-int/lit8 v10, v8, 0x1

    add-int/lit8 v9, v9, 0x3

    int-to-short v9, v9

    .line 869
    aput-short v9, v6, v8

    add-int/lit8 v8, v10, 0x1

    .line 870
    aput-short v11, v6, v10

    .line 871
    iput v8, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    add-float v6, p2, v2

    add-float v8, p3, v3

    neg-float v9, v2

    neg-float v10, v3

    sub-float v2, p6, v2

    sub-float v3, p7, v3

    const/high16 v11, 0x3f800000    # 1.0f

    cmpl-float v12, p8, v11

    if-nez v12, :cond_3

    cmpl-float v11, p9, v11

    if-eqz v11, :cond_4

    :cond_3
    mul-float v9, v9, p8

    mul-float v10, v10, p9

    mul-float v2, v2, p8

    mul-float v3, v3, p9

    :cond_4
    const/4 v4, 0x0

    cmpl-float v4, p10, v4

    if-eqz v4, :cond_5

    .line 910
    invoke-static/range {p10 .. p10}, Lcom/badlogic/gdx/math/MathUtils;->d(F)F

    move-result v4

    .line 911
    invoke-static/range {p10 .. p10}, Lcom/badlogic/gdx/math/MathUtils;->c(F)F

    move-result v5

    mul-float v11, v4, v9

    mul-float v12, v5, v10

    sub-float v12, v11, v12

    mul-float v9, v9, v5

    mul-float v10, v10, v4

    add-float/2addr v10, v9

    mul-float v13, v5, v3

    sub-float/2addr v11, v13

    mul-float v3, v3, v4

    add-float/2addr v9, v3

    mul-float v4, v4, v2

    sub-float/2addr v4, v13

    mul-float v5, v5, v2

    add-float/2addr v3, v5

    sub-float v2, v4, v11

    add-float/2addr v2, v12

    sub-float v5, v9, v10

    sub-float v5, v3, v5

    move/from16 v17, v5

    move v5, v2

    move v2, v4

    move v4, v3

    move v3, v9

    move v9, v12

    move/from16 v12, v17

    goto :goto_1

    :cond_5
    move v5, v2

    move v4, v3

    move v11, v9

    move v12, v10

    :goto_1
    add-float/2addr v9, v6

    add-float/2addr v10, v8

    add-float/2addr v11, v6

    add-float/2addr v3, v8

    add-float/2addr v2, v6

    add-float/2addr v4, v8

    add-float/2addr v5, v6

    add-float/2addr v12, v8

    .line 947
    iget v6, v1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->x:F

    .line 948
    iget v8, v1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->A:F

    .line 949
    iget v13, v1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->z:F

    .line 950
    iget v1, v1, Lcom/badlogic/gdx/graphics/g2d/TextureRegion;->y:F

    .line 952
    iget v14, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    .line 953
    iget v15, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    add-int/lit8 v16, v15, 0x1

    .line 954
    aput v9, v7, v15

    add-int/lit8 v9, v16, 0x1

    .line 955
    aput v10, v7, v16

    add-int/lit8 v10, v9, 0x1

    .line 956
    aput v14, v7, v9

    add-int/lit8 v9, v10, 0x1

    .line 957
    aput v6, v7, v10

    add-int/lit8 v10, v9, 0x1

    .line 958
    aput v8, v7, v9

    add-int/lit8 v9, v10, 0x1

    .line 960
    aput v11, v7, v10

    add-int/lit8 v10, v9, 0x1

    .line 961
    aput v3, v7, v9

    add-int/lit8 v3, v10, 0x1

    .line 962
    aput v14, v7, v10

    add-int/lit8 v9, v3, 0x1

    .line 963
    aput v6, v7, v3

    add-int/lit8 v3, v9, 0x1

    .line 964
    aput v1, v7, v9

    add-int/lit8 v6, v3, 0x1

    .line 966
    aput v2, v7, v3

    add-int/lit8 v2, v6, 0x1

    .line 967
    aput v4, v7, v6

    add-int/lit8 v3, v2, 0x1

    .line 968
    aput v14, v7, v2

    add-int/lit8 v2, v3, 0x1

    .line 969
    aput v13, v7, v3

    add-int/lit8 v3, v2, 0x1

    .line 970
    aput v1, v7, v2

    add-int/lit8 v1, v3, 0x1

    .line 972
    aput v5, v7, v3

    add-int/lit8 v2, v1, 0x1

    .line 973
    aput v12, v7, v1

    add-int/lit8 v1, v2, 0x1

    .line 974
    aput v14, v7, v2

    add-int/lit8 v2, v1, 0x1

    .line 975
    aput v13, v7, v1

    add-int/lit8 v1, v2, 0x1

    .line 976
    aput v8, v7, v2

    .line 977
    iput v1, v0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    return-void

    .line 852
    :cond_6
    new-instance v1, Ljava/lang/IllegalStateException;

    const-string v2, "PolygonSpriteBatch.begin must be called before draw."

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

    throw v1
.end method

.method public a(Lcom/badlogic/gdx/math/Matrix4;)V
    .locals 1

    .line 1267
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 1268
    :cond_0
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->o:Lcom/badlogic/gdx/math/Matrix4;

    invoke-virtual {v0, p1}, Lcom/badlogic/gdx/math/Matrix4;->set(Lcom/badlogic/gdx/math/Matrix4;)Lcom/badlogic/gdx/math/Matrix4;

    .line 1269
    iget-boolean p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz p1, :cond_1

    invoke-direct {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->k()V

    :cond_1
    return-void
.end method

.method public b()V
    .locals 2

    .line 167
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz v0, :cond_3

    .line 168
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    if-lez v0, :cond_0

    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    :cond_0
    const/4 v0, 0x0

    .line 169
    iput-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->j:Lcom/badlogic/gdx/graphics/Texture;

    const/4 v0, 0x0

    .line 170
    iput-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    .line 172
    sget-object v0, Lcom/badlogic/gdx/Gdx;->e:Lcom/badlogic/gdx/graphics/GL20;

    const/4 v1, 0x1

    .line 173
    invoke-interface {v0, v1}, Lcom/badlogic/gdx/graphics/GL20;->glDepthMask(Z)V

    .line 174
    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i()Z

    move-result v1

    if-eqz v1, :cond_1

    const/16 v1, 0xbe2

    invoke-interface {v0, v1}, Lcom/badlogic/gdx/graphics/GL20;->glDisable(I)V

    .line 176
    :cond_1
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    if-eqz v0, :cond_2

    .line 177
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    invoke-virtual {v0}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->f()V

    goto :goto_0

    .line 179
    :cond_2
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    invoke-virtual {v0}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->f()V

    :goto_0
    return-void

    .line 167
    :cond_3
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "PolygonSpriteBatch.begin must be called before end."

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

    throw v0
.end method

.method public b(Lcom/badlogic/gdx/math/Matrix4;)V
    .locals 1

    .line 1274
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g()V

    .line 1275
    :cond_0
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->n:Lcom/badlogic/gdx/math/Matrix4;

    invoke-virtual {v0, p1}, Lcom/badlogic/gdx/math/Matrix4;->set(Lcom/badlogic/gdx/math/Matrix4;)Lcom/badlogic/gdx/math/Matrix4;

    .line 1276
    iget-boolean p1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    if-eqz p1, :cond_1

    invoke-direct {p0}, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->k()V

    :cond_1
    return-void
.end method

.method public c()V
    .locals 1

    .line 1251
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->e:Lcom/badlogic/gdx/graphics/Mesh;

    invoke-virtual {v0}, Lcom/badlogic/gdx/graphics/Mesh;->c()V

    .line 1252
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->v:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    invoke-virtual {v0}, Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;->c()V

    :cond_0
    return-void
.end method

.method public d()Lcom/badlogic/gdx/graphics/Color;
    .locals 4

    .line 200
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    invoke-static {v0}, Lcom/badlogic/gdx/utils/NumberUtils;->c(F)I

    move-result v0

    .line 201
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->w:Lcom/badlogic/gdx/graphics/Color;

    and-int/lit16 v2, v0, 0xff

    int-to-float v2, v2

    const/high16 v3, 0x437f0000    # 255.0f

    div-float/2addr v2, v3

    .line 202
    iput v2, v1, Lcom/badlogic/gdx/graphics/Color;->I:F

    ushr-int/lit8 v2, v0, 0x8

    and-int/lit16 v2, v2, 0xff

    int-to-float v2, v2

    div-float/2addr v2, v3

    .line 203
    iput v2, v1, Lcom/badlogic/gdx/graphics/Color;->J:F

    ushr-int/lit8 v2, v0, 0x10

    and-int/lit16 v2, v2, 0xff

    int-to-float v2, v2

    div-float/2addr v2, v3

    .line 204
    iput v2, v1, Lcom/badlogic/gdx/graphics/Color;->K:F

    ushr-int/lit8 v0, v0, 0x18

    and-int/lit16 v0, v0, 0xff

    int-to-float v0, v0

    div-float/2addr v0, v3

    .line 205
    iput v0, v1, Lcom/badlogic/gdx/graphics/Color;->L:F

    return-object v1
.end method

.method public e()F
    .locals 1

    .line 211
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->a:F

    return v0
.end method

.method public f()Lcom/badlogic/gdx/math/Matrix4;
    .locals 1

    .line 1262
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->n:Lcom/badlogic/gdx/math/Matrix4;

    return-object v0
.end method

.method public g()V
    .locals 6

    .line 1195
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    if-nez v0, :cond_0

    return-void

    .line 1197
    :cond_0
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->b:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->b:I

    .line 1198
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->c:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->c:I

    .line 1199
    iget v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    .line 1200
    iget v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->d:I

    if-le v0, v1, :cond_1

    iput v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->d:I

    .line 1202
    :cond_1
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->j:Lcom/badlogic/gdx/graphics/Texture;

    invoke-virtual {v1}, Lcom/badlogic/gdx/graphics/Texture;->h()V

    .line 1203
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->e:Lcom/badlogic/gdx/graphics/Mesh;

    .line 1204
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->f:[F

    iget v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    const/4 v4, 0x0

    invoke-virtual {v1, v2, v4, v3}, Lcom/badlogic/gdx/graphics/Mesh;->a([FII)Lcom/badlogic/gdx/graphics/Mesh;

    .line 1205
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->g:[S

    iget v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    invoke-virtual {v1, v2, v4, v3}, Lcom/badlogic/gdx/graphics/Mesh;->a([SII)Lcom/badlogic/gdx/graphics/Mesh;

    .line 1206
    iget-boolean v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->q:Z

    const/16 v3, 0xbe2

    if-eqz v2, :cond_2

    .line 1207
    sget-object v2, Lcom/badlogic/gdx/Gdx;->e:Lcom/badlogic/gdx/graphics/GL20;

    invoke-interface {v2, v3}, Lcom/badlogic/gdx/graphics/GL20;->glDisable(I)V

    goto :goto_0

    .line 1209
    :cond_2
    sget-object v2, Lcom/badlogic/gdx/Gdx;->e:Lcom/badlogic/gdx/graphics/GL20;

    invoke-interface {v2, v3}, Lcom/badlogic/gdx/graphics/GL20;->glEnable(I)V

    .line 1210
    iget v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->r:I

    const/4 v3, -0x1

    if-eq v2, v3, :cond_3

    sget-object v2, Lcom/badlogic/gdx/Gdx;->e:Lcom/badlogic/gdx/graphics/GL20;

    iget v3, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->r:I

    iget v5, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->s:I

    invoke-interface {v2, v3, v5}, Lcom/badlogic/gdx/graphics/GL20;->glBlendFunc(II)V

    .line 1213
    :cond_3
    :goto_0
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    if-eqz v2, :cond_4

    iget-object v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->u:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    goto :goto_1

    :cond_4
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->t:Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;

    :goto_1
    const/4 v3, 0x4

    invoke-virtual {v1, v2, v3, v4, v0}, Lcom/badlogic/gdx/graphics/Mesh;->a(Lcom/badlogic/gdx/graphics/glutils/ShaderProgram;III)V

    .line 1215
    iput v4, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->h:I

    .line 1216
    iput v4, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->i:I

    return-void
.end method

.method public h()Lcom/badlogic/gdx/math/Matrix4;
    .locals 1

    .line 1257
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->o:Lcom/badlogic/gdx/math/Matrix4;

    return-object v0
.end method

.method public i()Z
    .locals 1

    .line 1326
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->q:Z

    xor-int/lit8 v0, v0, 0x1

    return v0
.end method

.method public j()Z
    .locals 1

    .line 1331
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/g2d/PolygonSpriteBatch;->m:Z

    return v0
.end method
