300 lines
11 KiB
Smali
300 lines
11 KiB
Smali
.class public Lcom/moji/weathersence/avatar/AvatarResource;
|
|
.super Lcom/moji/weathersence/avatar/BaseAvatarLoader;
|
|
.source "AvatarResource.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/badlogic/gdx/utils/Disposable;
|
|
.implements Lcom/moji/weathersence/avatar/BaseAvatarLoader$LoaderCallBack;
|
|
|
|
|
|
# static fields
|
|
.field private static a:Lcom/moji/weathersence/avatar/AvatarResource;
|
|
|
|
|
|
# instance fields
|
|
.field private b:Lcom/esotericsoftware/spine/utils/SkeletonActor;
|
|
|
|
.field private c:Lcom/esotericsoftware/spine/Skeleton;
|
|
|
|
.field private d:Lcom/esotericsoftware/spine/SkeletonData;
|
|
|
|
.field private e:Lcom/moji/weathersence/avatar/AvatarUpdate;
|
|
|
|
.field private f:Lcom/moji/weatherprovider/data/Avatar;
|
|
|
|
.field private g:Lcom/esotericsoftware/spine/SkeletonRenderer;
|
|
|
|
.field private h:Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
.field private i:Lcom/moji/tool/thread/wrapper/MJThread;
|
|
|
|
.field private j:Lcom/badlogic/gdx/utils/viewport/Viewport;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 27
|
|
new-instance v0, Lcom/moji/weathersence/avatar/AvatarResource;
|
|
|
|
invoke-direct {v0}, Lcom/moji/weathersence/avatar/AvatarResource;-><init>()V
|
|
|
|
sput-object v0, Lcom/moji/weathersence/avatar/AvatarResource;->a:Lcom/moji/weathersence/avatar/AvatarResource;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 45
|
|
invoke-direct {p0}, Lcom/moji/weathersence/avatar/BaseAvatarLoader;-><init>()V
|
|
|
|
.line 46
|
|
new-instance v0, Lcom/moji/weathersence/avatar/AvatarUpdate;
|
|
|
|
invoke-direct {v0}, Lcom/moji/weathersence/avatar/AvatarUpdate;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->e:Lcom/moji/weathersence/avatar/AvatarUpdate;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a()Lcom/moji/weathersence/avatar/AvatarResource;
|
|
.locals 1
|
|
|
|
.line 42
|
|
sget-object v0, Lcom/moji/weathersence/avatar/AvatarResource;->a:Lcom/moji/weathersence/avatar/AvatarResource;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lcom/esotericsoftware/spine/SkeletonData;)V
|
|
.locals 3
|
|
|
|
.line 102
|
|
iput-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->d:Lcom/esotericsoftware/spine/SkeletonData;
|
|
|
|
.line 104
|
|
new-instance p1, Lcom/esotericsoftware/spine/Skeleton;
|
|
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->d:Lcom/esotericsoftware/spine/SkeletonData;
|
|
|
|
invoke-direct {p1, v0}, Lcom/esotericsoftware/spine/Skeleton;-><init>(Lcom/esotericsoftware/spine/SkeletonData;)V
|
|
|
|
iput-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->c:Lcom/esotericsoftware/spine/Skeleton;
|
|
|
|
.line 106
|
|
iget-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->f:Lcom/moji/weatherprovider/data/Avatar;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->f:Lcom/moji/weatherprovider/data/Avatar;
|
|
|
|
iget-object p1, p1, Lcom/moji/weatherprovider/data/Avatar;->mSkinName:Ljava/lang/String;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 107
|
|
iget-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->d:Lcom/esotericsoftware/spine/SkeletonData;
|
|
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->f:Lcom/moji/weatherprovider/data/Avatar;
|
|
|
|
iget-object v0, v0, Lcom/moji/weatherprovider/data/Avatar;->mSkinName:Ljava/lang/String;
|
|
|
|
invoke-virtual {p1, v0}, Lcom/esotericsoftware/spine/SkeletonData;->b(Ljava/lang/String;)Lcom/esotericsoftware/spine/Skin;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
if-nez p1, :cond_1
|
|
|
|
.line 112
|
|
iget-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->d:Lcom/esotericsoftware/spine/SkeletonData;
|
|
|
|
const-string v0, "30-32"
|
|
|
|
invoke-virtual {p1, v0}, Lcom/esotericsoftware/spine/SkeletonData;->b(Ljava/lang/String;)Lcom/esotericsoftware/spine/Skin;
|
|
|
|
move-result-object p1
|
|
|
|
.line 114
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->c:Lcom/esotericsoftware/spine/Skeleton;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/esotericsoftware/spine/Skeleton;->a(Lcom/esotericsoftware/spine/Skin;)V
|
|
|
|
.line 117
|
|
new-instance p1, Lcom/esotericsoftware/spine/AnimationStateData;
|
|
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->d:Lcom/esotericsoftware/spine/SkeletonData;
|
|
|
|
invoke-direct {p1, v0}, Lcom/esotericsoftware/spine/AnimationStateData;-><init>(Lcom/esotericsoftware/spine/SkeletonData;)V
|
|
|
|
.line 120
|
|
new-instance v0, Lcom/esotericsoftware/spine/AnimationState;
|
|
|
|
invoke-direct {v0, p1}, Lcom/esotericsoftware/spine/AnimationState;-><init>(Lcom/esotericsoftware/spine/AnimationStateData;)V
|
|
|
|
.line 123
|
|
new-instance p1, Lcom/esotericsoftware/spine/utils/SkeletonActor;
|
|
|
|
iget-object v1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->g:Lcom/esotericsoftware/spine/SkeletonRenderer;
|
|
|
|
iget-object v2, p0, Lcom/moji/weathersence/avatar/AvatarResource;->c:Lcom/esotericsoftware/spine/Skeleton;
|
|
|
|
invoke-direct {p1, v1, v2, v0}, Lcom/esotericsoftware/spine/utils/SkeletonActor;-><init>(Lcom/esotericsoftware/spine/SkeletonRenderer;Lcom/esotericsoftware/spine/Skeleton;Lcom/esotericsoftware/spine/AnimationState;)V
|
|
|
|
iput-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->b:Lcom/esotericsoftware/spine/utils/SkeletonActor;
|
|
|
|
.line 125
|
|
iget-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->b:Lcom/esotericsoftware/spine/utils/SkeletonActor;
|
|
|
|
iget-object v1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->j:Lcom/badlogic/gdx/utils/viewport/Viewport;
|
|
|
|
invoke-virtual {p0, p1, v1}, Lcom/moji/weathersence/avatar/AvatarResource;->a(Lcom/esotericsoftware/spine/utils/SkeletonActor;Lcom/badlogic/gdx/utils/viewport/Viewport;)V
|
|
|
|
.line 127
|
|
iget-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->b:Lcom/esotericsoftware/spine/utils/SkeletonActor;
|
|
|
|
invoke-virtual {p1, v0}, Lcom/esotericsoftware/spine/utils/SkeletonActor;->a(Lcom/esotericsoftware/spine/AnimationState;)V
|
|
|
|
.line 129
|
|
iget-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->f:Lcom/moji/weatherprovider/data/Avatar;
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
.line 130
|
|
iget-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->b:Lcom/esotericsoftware/spine/utils/SkeletonActor;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Lcom/esotericsoftware/spine/utils/SkeletonActor;->a(Z)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Lcom/esotericsoftware/spine/SkeletonRenderer;Lcom/moji/weatherprovider/data/Avatar;Lcom/badlogic/gdx/utils/viewport/Viewport;)V
|
|
.locals 3
|
|
|
|
.line 53
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->e:Lcom/moji/weathersence/avatar/AvatarUpdate;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/weathersence/avatar/AvatarUpdate;->a()Lcom/moji/weathersence/avatar/AvatarUpdate$AvatarResource;
|
|
|
|
move-result-object v0
|
|
|
|
.line 56
|
|
new-instance v1, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
iget-object v2, v0, Lcom/moji/weathersence/avatar/AvatarUpdate$AvatarResource;->a:Lcom/badlogic/gdx/files/FileHandle;
|
|
|
|
invoke-direct {v1, v2}, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;-><init>(Lcom/badlogic/gdx/files/FileHandle;)V
|
|
|
|
iput-object v1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->h:Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
.line 59
|
|
new-instance v1, Lcom/moji/weathersence/avatar/BaseAvatarLoader$LoadSkeletonDataTask;
|
|
|
|
iget-object v0, v0, Lcom/moji/weathersence/avatar/AvatarUpdate$AvatarResource;->b:Lcom/badlogic/gdx/files/FileHandle;
|
|
|
|
iget-object v2, p0, Lcom/moji/weathersence/avatar/AvatarResource;->h:Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
invoke-direct {v1, v0, v2, p0}, Lcom/moji/weathersence/avatar/BaseAvatarLoader$LoadSkeletonDataTask;-><init>(Lcom/badlogic/gdx/files/FileHandle;Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;Lcom/moji/weathersence/avatar/BaseAvatarLoader$LoaderCallBack;)V
|
|
|
|
iput-object v1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->i:Lcom/moji/tool/thread/wrapper/MJThread;
|
|
|
|
.line 61
|
|
invoke-static {}, Lcom/moji/tool/thread/MJThreadManager;->a()Lcom/moji/tool/thread/MJThreadManager;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->i:Lcom/moji/tool/thread/wrapper/MJThread;
|
|
|
|
sget-object v2, Lcom/moji/tool/thread/ThreadType;->IO_THREAD:Lcom/moji/tool/thread/ThreadType;
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/tool/thread/MJThreadManager;->a(Lcom/moji/tool/thread/wrapper/MJThread;Lcom/moji/tool/thread/ThreadType;)V
|
|
|
|
.line 63
|
|
iput-object p1, p0, Lcom/moji/weathersence/avatar/AvatarResource;->g:Lcom/esotericsoftware/spine/SkeletonRenderer;
|
|
|
|
.line 64
|
|
iput-object p2, p0, Lcom/moji/weathersence/avatar/AvatarResource;->f:Lcom/moji/weatherprovider/data/Avatar;
|
|
|
|
.line 65
|
|
iput-object p3, p0, Lcom/moji/weathersence/avatar/AvatarResource;->j:Lcom/badlogic/gdx/utils/viewport/Viewport;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method b()Lcom/esotericsoftware/spine/SkeletonData;
|
|
.locals 1
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 72
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->d:Lcom/esotericsoftware/spine/SkeletonData;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public c()V
|
|
.locals 1
|
|
|
|
.line 87
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->h:Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;
|
|
|
|
invoke-virtual {v0}, Lcom/badlogic/gdx/graphics/g2d/TextureAtlas;->c()V
|
|
|
|
.line 88
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->i:Lcom/moji/tool/thread/wrapper/MJThread;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/tool/thread/wrapper/MJThread;->interrupt()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method d()Lcom/esotericsoftware/spine/Skeleton;
|
|
.locals 1
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 77
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->c:Lcom/esotericsoftware/spine/Skeleton;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public e()Lcom/esotericsoftware/spine/utils/SkeletonActor;
|
|
.locals 1
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 82
|
|
iget-object v0, p0, Lcom/moji/weathersence/avatar/AvatarResource;->b:Lcom/esotericsoftware/spine/utils/SkeletonActor;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public f()V
|
|
.locals 1
|
|
|
|
.line 93
|
|
new-instance v0, Lcom/moji/weathersence/avatar/AvatarResource;
|
|
|
|
invoke-direct {v0}, Lcom/moji/weathersence/avatar/AvatarResource;-><init>()V
|
|
|
|
sput-object v0, Lcom/moji/weathersence/avatar/AvatarResource;->a:Lcom/moji/weathersence/avatar/AvatarResource;
|
|
|
|
return-void
|
|
.end method
|