590 lines
12 KiB
Smali
590 lines
12 KiB
Smali
.class public Lcom/badlogic/gdx/utils/ShortArray;
|
|
.super Ljava/lang/Object;
|
|
.source "ShortArray.java"
|
|
|
|
|
|
# instance fields
|
|
.field public a:[S
|
|
|
|
.field public b:I
|
|
|
|
.field public c:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/16 v1, 0x10
|
|
|
|
.line 33
|
|
invoke-direct {p0, v0, v1}, Lcom/badlogic/gdx/utils/ShortArray;-><init>(ZI)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(I)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 38
|
|
invoke-direct {p0, v0, p1}, Lcom/badlogic/gdx/utils/ShortArray;-><init>(ZI)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(ZI)V
|
|
.locals 0
|
|
|
|
.line 44
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 45
|
|
iput-boolean p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->c:Z
|
|
|
|
.line 46
|
|
new-array p1, p2, [S
|
|
|
|
iput-object p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 249
|
|
iput v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(I)V
|
|
.locals 3
|
|
|
|
.line 77
|
|
iget-object v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
.line 78
|
|
iget v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
array-length v2, v0
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
const/16 v0, 0x8
|
|
|
|
iget v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
const/high16 v2, 0x3fe00000 # 1.75f
|
|
|
|
mul-float v1, v1, v2
|
|
|
|
float-to-int v1, v1
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p0, v0}, Lcom/badlogic/gdx/utils/ShortArray;->f(I)[S
|
|
|
|
move-result-object v0
|
|
|
|
.line 79
|
|
:cond_0
|
|
iget v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
iput v2, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
int-to-short p1, p1
|
|
|
|
aput-short p1, v0, v1
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(S)V
|
|
.locals 3
|
|
|
|
.line 83
|
|
iget-object v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
.line 84
|
|
iget v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
array-length v2, v0
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
const/16 v0, 0x8
|
|
|
|
iget v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
const/high16 v2, 0x3fe00000 # 1.75f
|
|
|
|
mul-float v1, v1, v2
|
|
|
|
float-to-int v1, v1
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p0, v0}, Lcom/badlogic/gdx/utils/ShortArray;->f(I)[S
|
|
|
|
move-result-object v0
|
|
|
|
.line 85
|
|
:cond_0
|
|
iget v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
iput v2, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
aput-short p1, v0, v1
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b(I)S
|
|
.locals 3
|
|
|
|
.line 111
|
|
iget v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
if-ge p1, v0, :cond_0
|
|
|
|
.line 112
|
|
iget-object v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
aget-short p1, v0, p1
|
|
|
|
return p1
|
|
|
|
.line 111
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IndexOutOfBoundsException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "index can\'t be >= size: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " >= "
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public b()[S
|
|
.locals 4
|
|
|
|
.line 322
|
|
iget v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
new-array v0, v0, [S
|
|
|
|
.line 323
|
|
iget-object v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
iget v2, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v1, v3, v0, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public c(I)S
|
|
.locals 4
|
|
|
|
.line 186
|
|
iget v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
if-ge p1, v0, :cond_1
|
|
|
|
.line 187
|
|
iget-object v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
.line 188
|
|
aget-short v1, v0, p1
|
|
|
|
.line 189
|
|
iget v2, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
iput v2, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
.line 190
|
|
iget-boolean v2, p0, Lcom/badlogic/gdx/utils/ShortArray;->c:Z
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
add-int/lit8 v2, p1, 0x1
|
|
|
|
.line 191
|
|
iget v3, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
sub-int/2addr v3, p1
|
|
|
|
invoke-static {v0, v2, v0, p1, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 193
|
|
:cond_0
|
|
iget v2, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
aget-short v2, v0, v2
|
|
|
|
aput-short v2, v0, p1
|
|
|
|
:goto_0
|
|
return v1
|
|
|
|
.line 186
|
|
:cond_1
|
|
new-instance v0, Ljava/lang/IndexOutOfBoundsException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "index can\'t be >= size: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " >= "
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public d(I)[S
|
|
.locals 1
|
|
|
|
.line 264
|
|
iget v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
add-int/2addr v0, p1
|
|
|
|
.line 265
|
|
iget-object p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
array-length p1, p1
|
|
|
|
if-le v0, p1, :cond_0
|
|
|
|
const/16 p1, 0x8
|
|
|
|
invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/badlogic/gdx/utils/ShortArray;->f(I)[S
|
|
|
|
.line 266
|
|
:cond_0
|
|
iget-object p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public e(I)[S
|
|
.locals 1
|
|
|
|
.line 272
|
|
iget-object v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
array-length v0, v0
|
|
|
|
if-le p1, v0, :cond_0
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-static {v0, p1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p0, v0}, Lcom/badlogic/gdx/utils/ShortArray;->f(I)[S
|
|
|
|
.line 273
|
|
:cond_0
|
|
iput p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
.line 274
|
|
iget-object p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 6
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p1, p0, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 338
|
|
:cond_0
|
|
iget-boolean v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->c:Z
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 339
|
|
:cond_1
|
|
instance-of v1, p1, Lcom/badlogic/gdx/utils/ShortArray;
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
return v2
|
|
|
|
.line 340
|
|
:cond_2
|
|
check-cast p1, Lcom/badlogic/gdx/utils/ShortArray;
|
|
|
|
.line 341
|
|
iget-boolean v1, p1, Lcom/badlogic/gdx/utils/ShortArray;->c:Z
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
return v2
|
|
|
|
.line 342
|
|
:cond_3
|
|
iget v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
.line 343
|
|
iget v3, p1, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
if-eq v1, v3, :cond_4
|
|
|
|
return v2
|
|
|
|
.line 344
|
|
:cond_4
|
|
iget-object v3, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
.line 345
|
|
iget-object v3, p1, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v3, v1, :cond_6
|
|
|
|
.line 347
|
|
iget-object v4, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
aget-short v4, v4, v3
|
|
|
|
iget-object v5, p1, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
aget-short v5, v5, v3
|
|
|
|
if-eq v4, v5, :cond_5
|
|
|
|
return v2
|
|
|
|
:cond_5
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
return v0
|
|
.end method
|
|
|
|
.method protected f(I)[S
|
|
.locals 3
|
|
|
|
.line 278
|
|
new-array p1, p1, [S
|
|
|
|
.line 279
|
|
iget-object v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
.line 280
|
|
iget v1, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
array-length v2, p1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {v0, v2, p1, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
.line 281
|
|
iput-object p1, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 5
|
|
|
|
.line 328
|
|
iget-boolean v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->c:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-super {p0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
|
|
.line 329
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 331
|
|
iget v2, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
const/4 v3, 0x1
|
|
|
|
:goto_0
|
|
if-ge v1, v2, :cond_1
|
|
|
|
mul-int/lit8 v3, v3, 0x1f
|
|
|
|
.line 332
|
|
aget-short v4, v0, v1
|
|
|
|
add-int/2addr v3, v4
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v3
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 4
|
|
|
|
.line 352
|
|
iget v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, "[]"
|
|
|
|
return-object v0
|
|
|
|
.line 353
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/badlogic/gdx/utils/ShortArray;->a:[S
|
|
|
|
.line 354
|
|
new-instance v1, Lcom/badlogic/gdx/utils/StringBuilder;
|
|
|
|
const/16 v2, 0x20
|
|
|
|
invoke-direct {v1, v2}, Lcom/badlogic/gdx/utils/StringBuilder;-><init>(I)V
|
|
|
|
const/16 v2, 0x5b
|
|
|
|
.line 355
|
|
invoke-virtual {v1, v2}, Lcom/badlogic/gdx/utils/StringBuilder;->b(C)Lcom/badlogic/gdx/utils/StringBuilder;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 356
|
|
aget-short v2, v0, v2
|
|
|
|
invoke-virtual {v1, v2}, Lcom/badlogic/gdx/utils/StringBuilder;->b(I)Lcom/badlogic/gdx/utils/StringBuilder;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 357
|
|
:goto_0
|
|
iget v3, p0, Lcom/badlogic/gdx/utils/ShortArray;->b:I
|
|
|
|
if-ge v2, v3, :cond_1
|
|
|
|
const-string v3, ", "
|
|
|
|
.line 358
|
|
invoke-virtual {v1, v3}, Lcom/badlogic/gdx/utils/StringBuilder;->b(Ljava/lang/String;)Lcom/badlogic/gdx/utils/StringBuilder;
|
|
|
|
.line 359
|
|
aget-short v3, v0, v2
|
|
|
|
invoke-virtual {v1, v3}, Lcom/badlogic/gdx/utils/StringBuilder;->b(I)Lcom/badlogic/gdx/utils/StringBuilder;
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/16 v0, 0x5d
|
|
|
|
.line 361
|
|
invoke-virtual {v1, v0}, Lcom/badlogic/gdx/utils/StringBuilder;->b(C)Lcom/badlogic/gdx/utils/StringBuilder;
|
|
|
|
.line 362
|
|
invoke-virtual {v1}, Lcom/badlogic/gdx/utils/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|