Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .class public Lid/dhianrusdhiana/SaljuUtils;
- .super Ljava/lang/Object;
- .source "SaljuUtils.java"
- # static fields
- .field private static floatSpeed:F
- .field private static intensitas:I
- .field private static speed:I
- .field private static str:Z
- # direct methods
- .method static constructor <clinit>()V
- .locals 1
- .prologue
- .line 11
- const/4 v0, 0x0
- sput v0, Lid/dhianrusdhiana/SaljuUtils;->floatSpeed:F
- return-void
- .end method
- .method public constructor <init>()V
- .locals 1
- .prologue
- .line 50
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- .line 51
- move-object v0, p0
- .line 52
- .local v0, "utils":Lid/dhianrusdhiana/SaljuUtils;
- return-void
- .end method
- .method public static getAnimatDrawable(Landroid/content/Context;)I
- .locals 1
- .param p0, "context" # Landroid/content/Context;
- .prologue
- .line 55
- invoke-static {p0}, Lid/dhianrusdhiana/SaljuUtils;->setAnimationImage(Landroid/content/Context;)I
- move-result v0
- return v0
- .end method
- .method public static salju(Landroid/app/Activity;)V
- .locals 4
- .param p0, "activity" # Landroid/app/Activity;
- .prologue
- .line 18
- move-object v0, p0
- .line 19
- .local v0, "context":Landroid/content/Context;
- invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
- move-result-object v1
- .line 20
- .local v1, "defaultSharedPreferences":Landroid/content/SharedPreferences;
- const-string v2, "salju"
- const/4 v3, 0x1
- invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
- move-result v2
- sput-boolean v2, Lid/dhianrusdhiana/SaljuUtils;->str:Z
- .line 21
- const-string v2, "intensitas"
- const/4 v3, 0x5
- invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
- move-result v2
- sput v2, Lid/dhianrusdhiana/SaljuUtils;->intensitas:I
- .line 22
- const-string v2, "speed"
- const/16 v3, 0x10
- invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
- move-result v2
- sput v2, Lid/dhianrusdhiana/SaljuUtils;->speed:I
- .line 23
- const v2, 0x358637bd
- sget v3, Lid/dhianrusdhiana/SaljuUtils;->speed:I
- int-to-float v3, v3
- mul-float/2addr v2, v3
- sput v2, Lid/dhianrusdhiana/SaljuUtils;->floatSpeed:F
- .line 24
- sget-boolean v2, Lid/dhianrusdhiana/SaljuUtils;->str:Z
- invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
- move-result-object v2
- invoke-virtual {v2}, Ljava/lang/Boolean;->booleanValue()Z
- move-result v2
- if-eqz v2, :cond_0
- .line 25
- sget v2, Lid/dhianrusdhiana/SaljuUtils;->intensitas:I
- sget v3, Lid/dhianrusdhiana/SaljuUtils;->floatSpeed:F
- invoke-static {p0, v2, v3}, Lid/dhianrusdhiana/SaljuUtils;->start(Landroid/app/Activity;IF)V
- .line 27
- :cond_0
- return-void
- .end method
- .method public static setAnimationImage(Landroid/content/Context;)I
- .locals 6
- .param p0, "context" # Landroid/content/Context;
- .prologue
- .line 59
- invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
- move-result-object v1
- .line 60
- .local v1, "preferences":Landroid/content/SharedPreferences;
- const-string v2, "animation_drawable"
- const-string v3, "0"
- invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
- move-result-object v2
- invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
- move-result v0
- .line 62
- .local v0, "n":I
- if-nez v0, :cond_1
- .line 63
- invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
- move-result-object v2
- const-string v3, "snow"
- const-string v4, "drawable"
- invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
- move-result-object v5
- invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- move-result v0
- .line 81
- .end local v0 # "n":I
- :cond_0
- :goto_0
- return v0
- .line 66
- .restart local v0 # "n":I
- :cond_1
- const/4 v2, 0x1
- if-ne v0, v2, :cond_2
- .line 67
- invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
- move-result-object v2
- const-string v3, "daun"
- const-string v4, "drawable"
- invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
- move-result-object v5
- invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- move-result v0
- goto :goto_0
- .line 70
- :cond_2
- const/4 v2, 0x2
- if-ne v0, v2, :cond_3
- .line 71
- invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
- move-result-object v2
- const-string v3, "bunga"
- const-string v4, "drawable"
- invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
- move-result-object v5
- invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- move-result v0
- goto :goto_0
- .line 74
- :cond_3
- const/4 v2, 0x3
- if-ne v0, v2, :cond_4
- .line 75
- invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
- move-result-object v2
- const-string v3, "hujan"
- const-string v4, "drawable"
- invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
- move-result-object v5
- invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- move-result v0
- goto :goto_0
- .line 78
- :cond_4
- const/4 v2, 0x4
- if-ne v0, v2, :cond_0
- .line 79
- invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
- move-result-object v2
- const-string v3, "entah"
- const-string v4, "drawable"
- invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
- move-result-object v5
- invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
- move-result v0
- goto :goto_0
- .end method
- .method public static setRotation(Landroid/content/Context;)I
- .locals 3
- .param p0, "context" # Landroid/content/Context;
- .prologue
- const/4 v1, 0x0
- .line 42
- invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
- move-result-object v0
- .line 43
- .local v0, "preferences":Landroid/content/SharedPreferences;
- const-string v2, "rotation"
- invoke-interface {v0, v2, v1}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
- move-result v2
- invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
- move-result-object v2
- invoke-virtual {v2}, Ljava/lang/Boolean;->booleanValue()Z
- move-result v2
- if-nez v2, :cond_0
- .line 46
- :goto_0
- return v1
- :cond_0
- const/16 v1, 0x90
- goto :goto_0
- .end method
- .method private static start(Landroid/app/Activity;IF)V
- .locals 13
- .param p0, "activity" # Landroid/app/Activity;
- .param p1, "i" # I
- .param p2, "f" # F
- .prologue
- const/16 v12, -0xc8
- const/high16 v11, 0x40000000
- const/high16 v10, 0x3f000000
- const v9, 0x3dcccccd
- const/4 v8, 0x0
- .line 31
- move-object v1, p0
- .line 32
- .local v1, "activity2":Landroid/app/Activity;
- move v7, p1
- .line 33
- .local v7, "i2":I
- move v6, p2
- .line 35
- .local v6, "f2":F
- new-instance v0, Lcom/plattysoft/leonids/ParticleSystem;
- const/16 v2, 0x78
- invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->getAnimatDrawable(Landroid/content/Context;)I
- move-result v3
- const-wide/16 v4, 0x2710
- invoke-direct/range {v0 .. v5}, Lcom/plattysoft/leonids/ParticleSystem;-><init>(Landroid/app/Activity;IIJ)V
- const/16 v2, 0xb4
- const/4 v3, 0x0
- invoke-virtual {v0, v8, v9, v2, v3}, Lcom/plattysoft/leonids/ParticleSystem;->setSpeedModuleAndAngleRange(FFII)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- invoke-virtual {v0, v10, v11}, Lcom/plattysoft/leonids/ParticleSystem;->setScaleRange(FF)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->setRotation(Landroid/content/Context;)I
- move-result v2
- int-to-float v2, v2
- invoke-virtual {v0, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setRotationSpeed(F)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- const/16 v2, 0x5a
- invoke-virtual {v0, v6, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setAcceleration(FI)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- const/16 v2, 0xc8
- invoke-virtual {v0, v2, v12, v7}, Lcom/plattysoft/leonids/ParticleSystem;->emit(III)V
- .line 36
- new-instance v0, Lcom/plattysoft/leonids/ParticleSystem;
- const/16 v2, 0x78
- invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->getAnimatDrawable(Landroid/content/Context;)I
- move-result v3
- const-wide/16 v4, 0x2710
- invoke-direct/range {v0 .. v5}, Lcom/plattysoft/leonids/ParticleSystem;-><init>(Landroid/app/Activity;IIJ)V
- const/16 v2, 0xb4
- const/4 v3, 0x0
- invoke-virtual {v0, v8, v9, v2, v3}, Lcom/plattysoft/leonids/ParticleSystem;->setSpeedModuleAndAngleRange(FFII)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- invoke-virtual {v0, v10, v11}, Lcom/plattysoft/leonids/ParticleSystem;->setScaleRange(FF)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->setRotation(Landroid/content/Context;)I
- move-result v2
- int-to-float v2, v2
- invoke-virtual {v0, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setRotationSpeed(F)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- const/16 v2, 0x5a
- invoke-virtual {v0, v6, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setAcceleration(FI)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- const/16 v2, 0x64
- invoke-virtual {v0, v2, v12, v7}, Lcom/plattysoft/leonids/ParticleSystem;->emit(III)V
- .line 37
- new-instance v0, Lcom/plattysoft/leonids/ParticleSystem;
- const/16 v2, 0x78
- invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->getAnimatDrawable(Landroid/content/Context;)I
- move-result v3
- const-wide/16 v4, 0x2710
- invoke-direct/range {v0 .. v5}, Lcom/plattysoft/leonids/ParticleSystem;-><init>(Landroid/app/Activity;IIJ)V
- const/16 v2, 0xb4
- const/4 v3, 0x0
- invoke-virtual {v0, v8, v9, v2, v3}, Lcom/plattysoft/leonids/ParticleSystem;->setSpeedModuleAndAngleRange(FFII)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- invoke-virtual {v0, v10, v11}, Lcom/plattysoft/leonids/ParticleSystem;->setScaleRange(FF)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->setRotation(Landroid/content/Context;)I
- move-result v2
- int-to-float v2, v2
- invoke-virtual {v0, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setRotationSpeed(F)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- const/16 v2, 0x5a
- invoke-virtual {v0, v6, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setAcceleration(FI)Lcom/plattysoft/leonids/ParticleSystem;
- move-result-object v0
- const/16 v2, 0x190
- invoke-virtual {v0, v2, v12, v7}, Lcom/plattysoft/leonids/ParticleSystem;->emit(III)V
- .line 39
- return-void
- .end method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement