515 lines
13 KiB
Smali
515 lines
13 KiB
Smali
.class public Lcom/moji/weathersence/adbg/AdAnimationActor;
|
|
.super Lcom/badlogic/gdx/scenes/scene2d/Actor;
|
|
.source "AdAnimationActor.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/badlogic/gdx/utils/Disposable;
|
|
|
|
|
|
# instance fields
|
|
.field private l:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/badlogic/gdx/graphics/g2d/Animation<",
|
|
"Lcom/badlogic/gdx/scenes/scene2d/ui/Image;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private m:F
|
|
|
|
.field private n:Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;
|
|
|
|
.field private o:Z
|
|
|
|
.field private p:Landroid/os/Handler;
|
|
|
|
.field private q:Z
|
|
|
|
.field private r:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 37
|
|
invoke-direct {p0}, Lcom/badlogic/gdx/scenes/scene2d/Actor;-><init>()V
|
|
|
|
.line 27
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->l:Ljava/util/List;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 29
|
|
iput v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->m:F
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 31
|
|
iput-boolean v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->o:Z
|
|
|
|
.line 38
|
|
new-instance v0, Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;
|
|
|
|
invoke-direct {v0}, Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->n:Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;
|
|
|
|
.line 39
|
|
new-instance v0, Landroid/os/Handler;
|
|
|
|
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->p:Landroid/os/Handler;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(ZZ)V
|
|
.locals 2
|
|
|
|
.line 67
|
|
iget-boolean v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->q:Z
|
|
|
|
if-ne v0, p2, :cond_0
|
|
|
|
iget-boolean v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->r:Z
|
|
|
|
if-eq p1, v0, :cond_1
|
|
|
|
.line 68
|
|
:cond_0
|
|
iput-boolean p2, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->q:Z
|
|
|
|
.line 69
|
|
iput-boolean p1, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->r:Z
|
|
|
|
.line 70
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->p:Landroid/os/Handler;
|
|
|
|
new-instance v1, Lcom/moji/weathersence/adbg/AdAnimationActor$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/moji/weathersence/adbg/AdAnimationActor$1;-><init>(Lcom/moji/weathersence/adbg/AdAnimationActor;ZZ)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lcom/badlogic/gdx/graphics/g2d/Batch;F)V
|
|
.locals 7
|
|
|
|
.line 44
|
|
invoke-super {p0, p1, p2}, Lcom/badlogic/gdx/scenes/scene2d/Actor;->a(Lcom/badlogic/gdx/graphics/g2d/Batch;F)V
|
|
|
|
.line 45
|
|
iget-boolean v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->o:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 46
|
|
invoke-direct {p0, v1, v1}, Lcom/moji/weathersence/adbg/AdAnimationActor;->a(ZZ)V
|
|
|
|
return-void
|
|
|
|
.line 49
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->l:Ljava/util/List;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_3
|
|
|
|
.line 50
|
|
iget v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->m:F
|
|
|
|
sget-object v2, Lcom/badlogic/gdx/Gdx;->b:Lcom/badlogic/gdx/Graphics;
|
|
|
|
invoke-interface {v2}, Lcom/badlogic/gdx/Graphics;->e()F
|
|
|
|
move-result v2
|
|
|
|
add-float/2addr v0, v2
|
|
|
|
iput v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->m:F
|
|
|
|
.line 51
|
|
invoke-interface {p1}, Lcom/badlogic/gdx/graphics/g2d/Batch;->a()V
|
|
|
|
.line 53
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/badlogic/gdx/graphics/g2d/Animation;
|
|
|
|
.line 54
|
|
iget v4, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->m:F
|
|
|
|
invoke-virtual {v2, v4}, Lcom/badlogic/gdx/graphics/g2d/Animation;->a(F)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/badlogic/gdx/scenes/scene2d/ui/Image;
|
|
|
|
.line 55
|
|
sget-object v5, Lcom/badlogic/gdx/graphics/g2d/Animation$PlayMode;->NORMAL:Lcom/badlogic/gdx/graphics/g2d/Animation$PlayMode;
|
|
|
|
invoke-virtual {v2}, Lcom/badlogic/gdx/graphics/g2d/Animation;->b()Lcom/badlogic/gdx/graphics/g2d/Animation$PlayMode;
|
|
|
|
move-result-object v6
|
|
|
|
if-ne v5, v6, :cond_1
|
|
|
|
.line 56
|
|
invoke-virtual {v2}, Lcom/badlogic/gdx/graphics/g2d/Animation;->a()[Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
.line 57
|
|
array-length v2, v1
|
|
|
|
sub-int/2addr v2, v3
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-virtual {v4, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
.line 59
|
|
:cond_1
|
|
invoke-virtual {v4, p1, p2}, Lcom/badlogic/gdx/scenes/scene2d/ui/Image;->a(Lcom/badlogic/gdx/graphics/g2d/Batch;F)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 61
|
|
:cond_2
|
|
invoke-direct {p0, v3, v1}, Lcom/moji/weathersence/adbg/AdAnimationActor;->a(ZZ)V
|
|
|
|
.line 62
|
|
invoke-interface {p1}, Lcom/badlogic/gdx/graphics/g2d/Batch;->b()V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Ljava/util/List;)Z
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/weathersence/adbg/AdAnimationLayer;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 82
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->clear()V
|
|
|
|
.line 83
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/moji/weathersence/adbg/AdAnimationLayer;
|
|
|
|
.line 84
|
|
iget-object v1, v1, Lcom/moji/weathersence/adbg/AdAnimationLayer;->a:Ljava/util/List;
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
.line 85
|
|
iget-object v3, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->n:Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;
|
|
|
|
const-class v4, Lcom/badlogic/gdx/graphics/Texture;
|
|
|
|
invoke-virtual {v3, v2, v4}, Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;->b(Ljava/lang/String;Ljava/lang/Class;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 89
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->n:Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;->b()V
|
|
|
|
.line 92
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_1
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/weathersence/adbg/AdAnimationLayer;
|
|
|
|
.line 93
|
|
iget-object v1, v0, Lcom/moji/weathersence/adbg/AdAnimationLayer;->b:Landroid/graphics/RectF;
|
|
|
|
const/high16 v2, 0x44340000 # 720.0f
|
|
|
|
.line 94
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
|
|
|
|
move-result v3
|
|
|
|
int-to-float v3, v3
|
|
|
|
div-float/2addr v2, v3
|
|
|
|
.line 95
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->c()I
|
|
|
|
move-result v3
|
|
|
|
int-to-float v3, v3
|
|
|
|
const/high16 v4, 0x44a00000 # 1280.0f
|
|
|
|
div-float v3, v4, v3
|
|
|
|
.line 97
|
|
invoke-virtual {v1}, Landroid/graphics/RectF;->width()F
|
|
|
|
move-result v5
|
|
|
|
mul-float v5, v5, v2
|
|
|
|
.line 98
|
|
invoke-virtual {v1}, Landroid/graphics/RectF;->height()F
|
|
|
|
move-result v6
|
|
|
|
mul-float v6, v6, v3
|
|
|
|
.line 100
|
|
iget v7, v1, Landroid/graphics/RectF;->left:F
|
|
|
|
mul-float v7, v7, v2
|
|
|
|
.line 101
|
|
iget v1, v1, Landroid/graphics/RectF;->bottom:F
|
|
|
|
mul-float v1, v1, v3
|
|
|
|
sub-float/2addr v4, v1
|
|
|
|
.line 103
|
|
new-instance v1, Lcom/badlogic/gdx/utils/Array;
|
|
|
|
invoke-direct {v1}, Lcom/badlogic/gdx/utils/Array;-><init>()V
|
|
|
|
.line 104
|
|
iget-object v2, v0, Lcom/moji/weathersence/adbg/AdAnimationLayer;->a:Ljava/util/List;
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_2
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
.line 105
|
|
iget-object v8, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->n:Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;
|
|
|
|
invoke-virtual {v8, v3}, Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;->a(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/badlogic/gdx/graphics/Texture;
|
|
|
|
.line 106
|
|
new-instance v8, Lcom/badlogic/gdx/scenes/scene2d/ui/Image;
|
|
|
|
invoke-direct {v8, v3}, Lcom/badlogic/gdx/scenes/scene2d/ui/Image;-><init>(Lcom/badlogic/gdx/graphics/Texture;)V
|
|
|
|
.line 107
|
|
invoke-virtual {v8, v5}, Lcom/badlogic/gdx/scenes/scene2d/ui/Image;->b(F)V
|
|
|
|
.line 108
|
|
invoke-virtual {v8, v6}, Lcom/badlogic/gdx/scenes/scene2d/ui/Image;->c(F)V
|
|
|
|
.line 110
|
|
invoke-virtual {v8, v7, v4}, Lcom/badlogic/gdx/scenes/scene2d/ui/Image;->a(FF)V
|
|
|
|
.line 111
|
|
invoke-virtual {v1, v8}, Lcom/badlogic/gdx/utils/Array;->a(Ljava/lang/Object;)V
|
|
|
|
goto :goto_2
|
|
|
|
.line 114
|
|
:cond_2
|
|
new-instance v2, Lcom/badlogic/gdx/graphics/g2d/Animation;
|
|
|
|
const v3, 0x3d75c28f # 0.06f
|
|
|
|
invoke-direct {v2, v3, v1}, Lcom/badlogic/gdx/graphics/g2d/Animation;-><init>(FLcom/badlogic/gdx/utils/Array;)V
|
|
|
|
.line 115
|
|
iget-boolean v0, v0, Lcom/moji/weathersence/adbg/AdAnimationLayer;->c:Z
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
sget-object v0, Lcom/badlogic/gdx/graphics/g2d/Animation$PlayMode;->LOOP:Lcom/badlogic/gdx/graphics/g2d/Animation$PlayMode;
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
sget-object v0, Lcom/badlogic/gdx/graphics/g2d/Animation$PlayMode;->NORMAL:Lcom/badlogic/gdx/graphics/g2d/Animation$PlayMode;
|
|
|
|
:goto_3
|
|
invoke-virtual {v2, v0}, Lcom/badlogic/gdx/graphics/g2d/Animation;->a(Lcom/badlogic/gdx/graphics/g2d/Animation$PlayMode;)V
|
|
|
|
.line 116
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 119
|
|
invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public b(Z)V
|
|
.locals 0
|
|
|
|
.line 132
|
|
iput-boolean p1, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->o:Z
|
|
|
|
.line 133
|
|
iget-boolean p1, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->o:Z
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 134
|
|
iput p1, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->m:F
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public c()V
|
|
.locals 1
|
|
|
|
.line 128
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->n:Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/weathersence/adbg/BackgroundAdAssertManager;->c()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public v()V
|
|
.locals 1
|
|
|
|
.line 139
|
|
iget-object v0, p0, Lcom/moji/weathersence/adbg/AdAnimationActor;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->clear()V
|
|
|
|
return-void
|
|
.end method
|