193 lines
6.3 KiB
Smali
193 lines
6.3 KiB
Smali
.class public Lcom/esotericsoftware/spine/attachments/AtlasAttachmentLoader;
|
|
.super Ljava/lang/Object;
|
|
.source "AtlasAttachmentLoader.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/esotericsoftware/spine/attachments/AttachmentLoader;
|
|
|
|
|
|
# instance fields
|
|
.field private a:Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;)V
|
|
.locals 1
|
|
|
|
.line 46
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 48
|
|
iput-object p1, p0, Lcom/esotericsoftware/spine/attachments/AtlasAttachmentLoader;->a:Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
return-void
|
|
|
|
.line 47
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v0, "atlas cannot be null."
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lcom/esotericsoftware/spine/Skin;Ljava/lang/String;)Lcom/esotericsoftware/spine/attachments/BoundingBoxAttachment;
|
|
.locals 0
|
|
|
|
.line 68
|
|
new-instance p1, Lcom/esotericsoftware/spine/attachments/BoundingBoxAttachment;
|
|
|
|
invoke-direct {p1, p2}, Lcom/esotericsoftware/spine/attachments/BoundingBoxAttachment;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public a(Lcom/esotericsoftware/spine/Skin;Ljava/lang/String;Ljava/lang/String;)Lcom/esotericsoftware/spine/attachments/RegionAttachment;
|
|
.locals 2
|
|
|
|
.line 52
|
|
iget-object p1, p0, Lcom/esotericsoftware/spine/attachments/AtlasAttachmentLoader;->a:Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
invoke-virtual {p1, p3}, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;->a(Ljava/lang/String;)Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 54
|
|
new-instance p3, Lcom/esotericsoftware/spine/attachments/RegionAttachment;
|
|
|
|
invoke-direct {p3, p2}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 55
|
|
invoke-virtual {p3, p1}, Lcom/esotericsoftware/spine/attachments/RegionAttachment;->a(Lcom/badlogic/gdx/graphics/g2d/TextureRegion;)V
|
|
|
|
return-object p3
|
|
|
|
.line 53
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Region not found in atlas: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p3, " (region attachment: "
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, ")"
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public b(Lcom/esotericsoftware/spine/Skin;Ljava/lang/String;)Lcom/esotericsoftware/spine/attachments/ClippingAttachment;
|
|
.locals 0
|
|
|
|
.line 72
|
|
new-instance p1, Lcom/esotericsoftware/spine/attachments/ClippingAttachment;
|
|
|
|
invoke-direct {p1, p2}, Lcom/esotericsoftware/spine/attachments/ClippingAttachment;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public b(Lcom/esotericsoftware/spine/Skin;Ljava/lang/String;Ljava/lang/String;)Lcom/esotericsoftware/spine/attachments/MeshAttachment;
|
|
.locals 2
|
|
|
|
.line 60
|
|
iget-object p1, p0, Lcom/esotericsoftware/spine/attachments/AtlasAttachmentLoader;->a:Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
invoke-virtual {p1, p3}, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;->a(Ljava/lang/String;)Lcom/badlogic/gdx/graphics/g2d/TextureAtlas$AtlasRegion;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 62
|
|
new-instance p3, Lcom/esotericsoftware/spine/attachments/MeshAttachment;
|
|
|
|
invoke-direct {p3, p2}, Lcom/esotericsoftware/spine/attachments/MeshAttachment;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 63
|
|
invoke-virtual {p3, p1}, Lcom/esotericsoftware/spine/attachments/MeshAttachment;->a(Lcom/badlogic/gdx/graphics/g2d/TextureRegion;)V
|
|
|
|
return-object p3
|
|
|
|
.line 61
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Region not found in atlas: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p3, " (mesh attachment: "
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, ")"
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public c(Lcom/esotericsoftware/spine/Skin;Ljava/lang/String;)Lcom/esotericsoftware/spine/attachments/PathAttachment;
|
|
.locals 0
|
|
|
|
.line 76
|
|
new-instance p1, Lcom/esotericsoftware/spine/attachments/PathAttachment;
|
|
|
|
invoke-direct {p1, p2}, Lcom/esotericsoftware/spine/attachments/PathAttachment;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public d(Lcom/esotericsoftware/spine/Skin;Ljava/lang/String;)Lcom/esotericsoftware/spine/attachments/PointAttachment;
|
|
.locals 0
|
|
|
|
.line 80
|
|
new-instance p1, Lcom/esotericsoftware/spine/attachments/PointAttachment;
|
|
|
|
invoke-direct {p1, p2}, Lcom/esotericsoftware/spine/attachments/PointAttachment;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|