Sub Process_Globals
Dim BMCplay31 As Map
End Sub
Sub Globals
'parameters declation:
Dim ImageView1 As ImageView
Dim x,y,a,ho As Float
Dim a1,a2,a3,a4,a5 As Animation
Dim num As Int
Dim lifes(3) As BitmapData
'******************************
Dim gv As GameView
Dim AcSf As AcceleratedSurface
Dim IU As AS_ImageUtils
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Activity.LoadLayout("Layout1")
x=Activity.Width/100.0
y=Activity.Height/100.0
gv.Initialize("gv")
Activity.AddView(gv, 0, 0, 100%x, 100%y)
AcSf.Initialize("AcSf", True)
Activity.AddView(AcSf, 0, 0, 100%x, 100%y)
' defining the gv and its layouts
gv.BitmapsData.Add(fondo)
'******************************
If gv.IsHardwareAccelerated = False Then
Msgbox("Hardware acceleration is not supported!!!", "")
End If
'
Activity.LoadLayout("game31")
' Load the files only the first time:
If FirstTime=True Then
BMCplay31.Initialize
bb=0.3
a=0.18
BMCplay31.Put("panelpuntuacion",IU.LoadScaledBitmap(File.DirAssets,"puntuacion_330x110.png",330*a*x,110*a*x,True))
BMCplay31.Put("empezar",LoadBitmapSample(File.DirAssets,"empezar_410x150.png",Activity.Width*bb,Activity.Height*bb))
' Load all the list of maps (60 but only between 5 and 30kb each one)
End If
'using the bitmpas:
fondo.Bitmap=BMCplay31.Get("blackfondo")
fondo.DestRect.Initialize(0, 0, 100*x, 100*y)
' home button
a=0.18
ImageView1.SetBackgroundImage(BMCplay31.Get("menubutton"))
ImageView1.Width=110*x*a
ImageView1.Height=130*x*a
ImageView1.Top=ho
ImageView1.Left=61*x
' more elements
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub