- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
824 lines
17 KiB
Smali
824 lines
17 KiB
Smali
.class Lcom/firemint/realracing/Font;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field public static final OUTLINE_INSIDE:I = 0x2
|
|
|
|
.field public static final OUTLINE_NONE:I = 0x0
|
|
|
|
.field public static final OUTLINE_OUTSIDE:I = 0x3
|
|
|
|
.field public static final OUTLINE_STROKE:I = 0x1
|
|
|
|
|
|
# instance fields
|
|
.field public ascent:F
|
|
|
|
.field bmpData:[B
|
|
|
|
.field public bmpHeight:I
|
|
|
|
.field public bmpLeft:I
|
|
|
|
.field public bmpPitch:I
|
|
|
|
.field public bmpTop:I
|
|
|
|
.field public bmpWidth:I
|
|
|
|
.field public bottom:F
|
|
|
|
.field public defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.field public descent:F
|
|
|
|
.field public glyphAdvance:F
|
|
|
|
.field public glyphHeight:F
|
|
|
|
.field public glyphOffX:F
|
|
|
|
.field public glyphOffY:F
|
|
|
|
.field public glyphWidth:F
|
|
|
|
.field public height:F
|
|
|
|
.field public leading:F
|
|
|
|
.field private m_size:F
|
|
|
|
.field private m_typeface:Landroid/graphics/Typeface;
|
|
|
|
.field private m_widthScale:F
|
|
|
|
.field public top:F
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 26
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->m_size:F
|
|
|
|
const/high16 v1, 0x3f800000 # 1.0f
|
|
|
|
iput v1, p0, Lcom/firemint/realracing/Font;->m_widthScale:F
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iput-object v1, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->ascent:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->descent:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->height:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->top:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->bottom:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->leading:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->glyphOffX:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->glyphOffY:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->glyphWidth:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->glyphHeight:F
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->glyphAdvance:F
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->bmpLeft:I
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->bmpTop:I
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->bmpWidth:I
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->bmpHeight:I
|
|
|
|
iput v0, p0, Lcom/firemint/realracing/Font;->bmpPitch:I
|
|
|
|
iput-object v1, p0, Lcom/firemint/realracing/Font;->bmpData:[B
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getSize()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/firemint/realracing/Font;->m_size:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getTypeface()Landroid/graphics/Typeface;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/firemint/realracing/Font;->m_typeface:Landroid/graphics/Typeface;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getWidthScale()F
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/firemint/realracing/Font;->m_widthScale:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public init(Ljava/lang/String;ZZFF)Z
|
|
.locals 2
|
|
|
|
.line 63
|
|
invoke-static {p1}, Landroid/graphics/Typeface;->createFromFile(Ljava/lang/String;)Landroid/graphics/Typeface;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
const/4 p2, 0x3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
if-eqz p2, :cond_2
|
|
|
|
move p2, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-eqz p3, :cond_3
|
|
|
|
const/4 p2, 0x2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
move p2, v0
|
|
|
|
.line 87
|
|
:goto_0
|
|
invoke-static {p1, p2}, Landroid/graphics/Typeface;->create(Landroid/graphics/Typeface;I)Landroid/graphics/Typeface;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/firemint/realracing/Font;->m_typeface:Landroid/graphics/Typeface;
|
|
|
|
if-nez p1, :cond_4
|
|
|
|
return v0
|
|
|
|
:cond_4
|
|
iput p4, p0, Lcom/firemint/realracing/Font;->m_size:F
|
|
|
|
const/4 p1, 0x0
|
|
|
|
cmpl-float p1, p5, p1
|
|
|
|
if-lez p1, :cond_5
|
|
|
|
iput p5, p0, Lcom/firemint/realracing/Font;->m_widthScale:F
|
|
|
|
.line 99
|
|
:cond_5
|
|
new-instance p1, Landroid/graphics/Paint;
|
|
|
|
invoke-direct {p1}, Landroid/graphics/Paint;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
const/4 p2, -0x1
|
|
|
|
.line 100
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
iget-object p1, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
iget-object p2, p0, Lcom/firemint/realracing/Font;->m_typeface:Landroid/graphics/Typeface;
|
|
|
|
.line 101
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;
|
|
|
|
iget-object p1, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
iget p2, p0, Lcom/firemint/realracing/Font;->m_size:F
|
|
|
|
.line 102
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Paint;->setTextSize(F)V
|
|
|
|
iget-object p1, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
iget p2, p0, Lcom/firemint/realracing/Font;->m_widthScale:F
|
|
|
|
.line 103
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Paint;->setTextScaleX(F)V
|
|
|
|
iget-object p1, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 104
|
|
invoke-virtual {p1, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
|
|
|
|
iget-object p1, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 105
|
|
sget-object p2, Landroid/graphics/Paint$Align;->LEFT:Landroid/graphics/Paint$Align;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V
|
|
|
|
iget-object p1, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 107
|
|
invoke-virtual {p1}, Landroid/graphics/Paint;->getFontMetrics()Landroid/graphics/Paint$FontMetrics;
|
|
|
|
move-result-object p1
|
|
|
|
.line 108
|
|
iget p2, p1, Landroid/graphics/Paint$FontMetrics;->ascent:F
|
|
|
|
neg-float p2, p2
|
|
|
|
iput p2, p0, Lcom/firemint/realracing/Font;->ascent:F
|
|
|
|
.line 109
|
|
iget p3, p1, Landroid/graphics/Paint$FontMetrics;->descent:F
|
|
|
|
iput p3, p0, Lcom/firemint/realracing/Font;->descent:F
|
|
|
|
add-float/2addr p2, p3
|
|
|
|
iput p2, p0, Lcom/firemint/realracing/Font;->height:F
|
|
|
|
.line 111
|
|
iget p2, p1, Landroid/graphics/Paint$FontMetrics;->top:F
|
|
|
|
neg-float p2, p2
|
|
|
|
iput p2, p0, Lcom/firemint/realracing/Font;->top:F
|
|
|
|
.line 112
|
|
iget p2, p1, Landroid/graphics/Paint$FontMetrics;->bottom:F
|
|
|
|
iput p2, p0, Lcom/firemint/realracing/Font;->bottom:F
|
|
|
|
.line 113
|
|
iget p1, p1, Landroid/graphics/Paint$FontMetrics;->leading:F
|
|
|
|
iput p1, p0, Lcom/firemint/realracing/Font;->leading:F
|
|
|
|
return v1
|
|
.end method
|
|
|
|
.method public loadBitmap(IFFFI)Z
|
|
.locals 6
|
|
|
|
iget-object p3, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
filled-new-array {p1}, [I
|
|
|
|
move-result-object p1
|
|
|
|
.line 185
|
|
:try_start_0
|
|
new-instance p3, Ljava/lang/String;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p3, p1, v0, v1}, Ljava/lang/String;-><init>([III)V
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 193
|
|
new-instance p1, Landroid/graphics/Rect;
|
|
|
|
invoke-direct {p1}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
iget-object v2, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 194
|
|
invoke-virtual {p3}, Ljava/lang/String;->length()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v2, p3, v0, v3, p1}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
|
|
|
|
const/high16 v2, 0x3f800000 # 1.0f
|
|
|
|
if-eq p5, v1, :cond_1
|
|
|
|
const/4 v3, 0x3
|
|
|
|
if-ne p5, v3, :cond_2
|
|
|
|
:cond_1
|
|
add-float/2addr v2, p4
|
|
|
|
:cond_2
|
|
iget p4, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float p4, p4
|
|
|
|
add-float/2addr p4, p2
|
|
|
|
sub-float/2addr p4, v2
|
|
|
|
float-to-double p4, p4
|
|
|
|
.line 202
|
|
invoke-static {p4, p5}, Ljava/lang/Math;->floor(D)D
|
|
|
|
move-result-wide p4
|
|
|
|
double-to-float p4, p4
|
|
|
|
iget p5, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float p5, p5
|
|
|
|
add-float/2addr p5, p2
|
|
|
|
add-float/2addr p5, v2
|
|
|
|
float-to-double v3, p5
|
|
|
|
.line 203
|
|
invoke-static {v3, v4}, Ljava/lang/Math;->ceil(D)D
|
|
|
|
move-result-wide v3
|
|
|
|
double-to-float p5, v3
|
|
|
|
float-to-double v3, v2
|
|
|
|
.line 204
|
|
invoke-static {v3, v4}, Ljava/lang/Math;->floor(D)D
|
|
|
|
move-result-wide v3
|
|
|
|
double-to-float v3, v3
|
|
|
|
iget v4, p1, Landroid/graphics/Rect;->bottom:I
|
|
|
|
iget p1, p1, Landroid/graphics/Rect;->top:I
|
|
|
|
sub-int/2addr v4, p1
|
|
|
|
int-to-float p1, v4
|
|
|
|
add-float/2addr p1, v2
|
|
|
|
float-to-double v4, p1
|
|
|
|
.line 205
|
|
invoke-static {v4, v5}, Ljava/lang/Math;->ceil(D)D
|
|
|
|
move-result-wide v4
|
|
|
|
double-to-float p1, v4
|
|
|
|
float-to-int v2, p4
|
|
|
|
iput v2, p0, Lcom/firemint/realracing/Font;->bmpLeft:I
|
|
|
|
float-to-int v2, v3
|
|
|
|
neg-int v2, v2
|
|
|
|
iput v2, p0, Lcom/firemint/realracing/Font;->bmpTop:I
|
|
|
|
sub-float/2addr p5, p4
|
|
|
|
float-to-int p5, p5
|
|
|
|
iput p5, p0, Lcom/firemint/realracing/Font;->bmpWidth:I
|
|
|
|
sub-float/2addr p1, v3
|
|
|
|
float-to-int p1, p1
|
|
|
|
iput p1, p0, Lcom/firemint/realracing/Font;->bmpHeight:I
|
|
|
|
if-lez p5, :cond_4
|
|
|
|
if-gtz p1, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
.line 218
|
|
:cond_3
|
|
sget-object v2, Landroid/graphics/Bitmap$Config;->ALPHA_8:Landroid/graphics/Bitmap$Config;
|
|
|
|
invoke-static {p5, p1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p1
|
|
|
|
.line 219
|
|
new-instance p5, Landroid/graphics/Canvas;
|
|
|
|
invoke-direct {p5, p1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
|
|
|
|
.line 220
|
|
invoke-static {v0, v0, v0, v0}, Landroid/graphics/Color;->argb(IIII)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/Bitmap;->eraseColor(I)V
|
|
|
|
sub-float/2addr p2, p4
|
|
|
|
const/4 p4, 0x0
|
|
|
|
iget-object v0, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 223
|
|
invoke-virtual {p5, p3, p2, p4, v0}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 226
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result p3
|
|
|
|
mul-int/2addr p2, p3
|
|
|
|
new-array p2, p2, [B
|
|
|
|
iput-object p2, p0, Lcom/firemint/realracing/Font;->bmpData:[B
|
|
|
|
.line 227
|
|
invoke-static {p2}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;
|
|
|
|
move-result-object p2
|
|
|
|
.line 228
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Bitmap;->copyPixelsToBuffer(Ljava/nio/Buffer;)V
|
|
|
|
.line 231
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->getRowBytes()I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/firemint/realracing/Font;->bmpPitch:I
|
|
|
|
.line 233
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->recycle()V
|
|
|
|
return v1
|
|
|
|
:catch_0
|
|
:cond_4
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public loadBitmapDynamic(IFFFI)Z
|
|
.locals 7
|
|
|
|
iget-object v0, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
filled-new-array {p1}, [I
|
|
|
|
move-result-object p1
|
|
|
|
.line 248
|
|
:try_start_0
|
|
new-instance v0, Ljava/lang/String;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v0, p1, v1, v2}, Ljava/lang/String;-><init>([III)V
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 256
|
|
new-instance p1, Landroid/graphics/Rect;
|
|
|
|
invoke-direct {p1}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
iget-object v3, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 257
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v3, v0, v1, v4, p1}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
|
|
|
|
const/high16 v3, 0x3f800000 # 1.0f
|
|
|
|
if-eq p5, v2, :cond_1
|
|
|
|
const/4 v4, 0x3
|
|
|
|
if-ne p5, v4, :cond_2
|
|
|
|
:cond_1
|
|
add-float/2addr v3, p4
|
|
|
|
:cond_2
|
|
neg-float p3, p3
|
|
|
|
iget p4, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float p4, p4
|
|
|
|
add-float/2addr p4, p2
|
|
|
|
sub-float/2addr p4, v3
|
|
|
|
float-to-double p4, p4
|
|
|
|
.line 268
|
|
invoke-static {p4, p5}, Ljava/lang/Math;->floor(D)D
|
|
|
|
move-result-wide p4
|
|
|
|
double-to-float p4, p4
|
|
|
|
iget p5, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
int-to-float p5, p5
|
|
|
|
add-float/2addr p5, p2
|
|
|
|
add-float/2addr p5, v3
|
|
|
|
float-to-double v4, p5
|
|
|
|
.line 269
|
|
invoke-static {v4, v5}, Ljava/lang/Math;->ceil(D)D
|
|
|
|
move-result-wide v4
|
|
|
|
double-to-float p5, v4
|
|
|
|
iget v4, p1, Landroid/graphics/Rect;->top:I
|
|
|
|
int-to-float v4, v4
|
|
|
|
add-float/2addr v4, p3
|
|
|
|
sub-float/2addr v4, v3
|
|
|
|
float-to-double v4, v4
|
|
|
|
.line 270
|
|
invoke-static {v4, v5}, Ljava/lang/Math;->floor(D)D
|
|
|
|
move-result-wide v4
|
|
|
|
double-to-float v4, v4
|
|
|
|
iget p1, p1, Landroid/graphics/Rect;->bottom:I
|
|
|
|
int-to-float p1, p1
|
|
|
|
add-float/2addr p1, p3
|
|
|
|
add-float/2addr p1, v3
|
|
|
|
float-to-double v5, p1
|
|
|
|
.line 271
|
|
invoke-static {v5, v6}, Ljava/lang/Math;->ceil(D)D
|
|
|
|
move-result-wide v5
|
|
|
|
double-to-float p1, v5
|
|
|
|
float-to-int v3, p4
|
|
|
|
iput v3, p0, Lcom/firemint/realracing/Font;->bmpLeft:I
|
|
|
|
float-to-int v3, v4
|
|
|
|
neg-int v3, v3
|
|
|
|
iput v3, p0, Lcom/firemint/realracing/Font;->bmpTop:I
|
|
|
|
sub-float/2addr p5, p4
|
|
|
|
float-to-int p5, p5
|
|
|
|
iput p5, p0, Lcom/firemint/realracing/Font;->bmpWidth:I
|
|
|
|
sub-float/2addr p1, v4
|
|
|
|
float-to-int p1, p1
|
|
|
|
iput p1, p0, Lcom/firemint/realracing/Font;->bmpHeight:I
|
|
|
|
if-lez p5, :cond_4
|
|
|
|
if-gtz p1, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
.line 284
|
|
:cond_3
|
|
sget-object v3, Landroid/graphics/Bitmap$Config;->ALPHA_8:Landroid/graphics/Bitmap$Config;
|
|
|
|
invoke-static {p5, p1, v3}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p1
|
|
|
|
.line 285
|
|
new-instance p5, Landroid/graphics/Canvas;
|
|
|
|
invoke-direct {p5, p1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
|
|
|
|
.line 286
|
|
invoke-static {v1, v1, v1, v1}, Landroid/graphics/Color;->argb(IIII)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1, v1}, Landroid/graphics/Bitmap;->eraseColor(I)V
|
|
|
|
sub-float/2addr p2, p4
|
|
|
|
sub-float/2addr p3, v4
|
|
|
|
iget-object p4, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 289
|
|
invoke-virtual {p5, v0, p2, p3, p4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 292
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result p3
|
|
|
|
mul-int/2addr p2, p3
|
|
|
|
new-array p2, p2, [B
|
|
|
|
iput-object p2, p0, Lcom/firemint/realracing/Font;->bmpData:[B
|
|
|
|
.line 293
|
|
invoke-static {p2}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;
|
|
|
|
move-result-object p2
|
|
|
|
.line 294
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Bitmap;->copyPixelsToBuffer(Ljava/nio/Buffer;)V
|
|
|
|
.line 297
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->getRowBytes()I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/firemint/realracing/Font;->bmpPitch:I
|
|
|
|
.line 299
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->recycle()V
|
|
|
|
return v2
|
|
|
|
:catch_0
|
|
:cond_4
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
.method public loadGlyph(I)Z
|
|
.locals 5
|
|
|
|
iget-object v0, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
filled-new-array {p1}, [I
|
|
|
|
move-result-object p1
|
|
|
|
.line 144
|
|
:try_start_0
|
|
new-instance v0, Ljava/lang/String;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v0, p1, v1, v2}, Ljava/lang/String;-><init>([III)V
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 152
|
|
new-instance p1, Landroid/graphics/Rect;
|
|
|
|
invoke-direct {p1}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
iget-object v3, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 153
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v3, v0, v1, v4, p1}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
|
|
|
|
iget v3, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v3, v3
|
|
|
|
iput v3, p0, Lcom/firemint/realracing/Font;->glyphOffX:F
|
|
|
|
iget v3, p1, Landroid/graphics/Rect;->top:I
|
|
|
|
neg-int v3, v3
|
|
|
|
int-to-float v3, v3
|
|
|
|
iput v3, p0, Lcom/firemint/realracing/Font;->glyphOffY:F
|
|
|
|
.line 157
|
|
invoke-virtual {p1}, Landroid/graphics/Rect;->width()I
|
|
|
|
move-result v3
|
|
|
|
int-to-float v3, v3
|
|
|
|
iput v3, p0, Lcom/firemint/realracing/Font;->glyphWidth:F
|
|
|
|
.line 158
|
|
invoke-virtual {p1}, Landroid/graphics/Rect;->height()I
|
|
|
|
move-result p1
|
|
|
|
int-to-float p1, p1
|
|
|
|
iput p1, p0, Lcom/firemint/realracing/Font;->glyphHeight:F
|
|
|
|
.line 161
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result p1
|
|
|
|
new-array p1, p1, [F
|
|
|
|
iget-object v3, p0, Lcom/firemint/realracing/Font;->defaultPaint:Landroid/graphics/Paint;
|
|
|
|
.line 162
|
|
invoke-virtual {v3, v0, p1}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I
|
|
|
|
.line 163
|
|
aget p1, p1, v1
|
|
|
|
iput p1, p0, Lcom/firemint/realracing/Font;->glyphAdvance:F
|
|
|
|
return v2
|
|
|
|
:catch_0
|
|
return v1
|
|
.end method
|