Sub App_Start
GameFormLib.New1("GameForm", B4PObject(1))
GameGameWindow.New1("GameForm", 0, 0, WIDTH, HEIGHT)
GameGameWindow.DrawBackgroundImage(AppPath & "\images\backdrop.png")
ObjectDoor.New1(False)
ObjectDoor.FromControl("GameForm")
ObjectDoor.SetProperty("KeyPreview", True)
TmpBackdropBitmap.New1(AppPath & "\images\backdrop.png")
GameForm.Image = TmpBackdropBitmap.Value
GameForm.Show
GameForm.ForeLayer = True
CreateCloseButton
CreateNewCell
UpdateForm1
MoveCellTimer.Enabled = True
End Sub
Sub UpdateForm1
CellBitmap.New1(AppPath & "\images\cell.png")
CellRectangle.New1(0, 0, CellBitmap.Width, CellBitmap.Height)
BackdropRectangle.New1(0, 0, CellBitmap.Width, CellBitmap.Height)
GameFormDrawer.New1("GameForm", True)
End Sub
Sub UpdateForm(x, y)
BackdropRectangle.X = x
BackdropRectangle.Y = y
GameFormDrawer.DrawImage1(CellBitmap.Value, CellRectangle.Value, BackdropRectangle.Value, False)
GameFormDrawer.Refresh2(BackdropRectangle.Value)
GameGameWindow.DrawBackgroundImage2(GameForm.Image)
End Sub