Import brl.FreeTypeFont


Global msxs
Global msys

Global PlayerLink:Player 


Global SEntities:TList = New TList
Global SWeapons:TList = New TList
Global SEnemys:TList = New TList
Global SPlayer:TList = New TList


Global BulletImg:TImage


Global StarsImg1:TImage
Global StarsImg2:TImage

Global width:Float
Global height:Float
Global wp
Global hp

Global ButtonImg:TImage = LoadImage("Data\Images\Panel\ButtonOverride.png")
MidHandleImage ButtonImg

Global Player1_img:TImage
Global Player2_img:TImage

Global PlayerName:String
Global PlayerNameLocal:String

Global ScrollSpeed

Global init

Global GameLevel = -1 ' -1 = Menu;  0 - single ; 1-10 = missions

Global NameBackspace

Global MenuLevel = 10 ' 10 - MainMenu; 0 - company, 1 - single; 2 - top ; 3 - options; 4 - about ; 6 - SelectMission ; 7 - Garaj; 8 - shop
Global SelectedButton
Global SelectedComButton
Global ButtonText:String[] = New String[10]



 'Garaj

	 		
' KEY CODES FOR GAME
Global KeyUp1, KeyUp2, KeyLeft1, KeyLeft2, KeyRight1, KeyRight2, KeyDown1, KeyDown2, KeyEnter1, KeyEnter2, KeySecAttack1, KeySecAttack2


Include "Resources.bmx"
Include "WeaponTypes.bmx"
Include "Functions.bmx"
Include "Variables.bmx"

Include "EnemyTypes.bmx"
Include "AmmoTypes.bmx"
Include "Player_gameplay.bmx"

Global fps:FPSCounter = New FPSCounter
Graphics width, height
width = GraphicsWidth()
height = GraphicsHeight()
   File:TImage = LoadImage("Data\Images\Ammo\13.png")
   Cls
   DrawImage File, 500, 600
   Flip
   Delay(2000)
   

Global StandartFont:TImageFont = LoadImageFont("Data\arial.ttf", 14)
Global BoxFont:TImageFont = LoadImageFont("Data\Blox2.ttf", 25)
Global ArtFont:TImageFont = LoadImageFont("Data\Art-Nouveau 1895-Contour.ttf", 36)
SetImageFont(StandartFont)


  Global b:String = "lol"

While Not (MenuLevel = 5)
hohoh = 0
fps.Start()
'Score
If (ShowScore < LocScore) Then
	  ShowScore = ShowScore + 1
EndIf


msxs = MouseX() - width / 2
msys = MouseY() - height / 2
Cls
	If (MenuLevel > - 1 And GameLevel < 0) Then
		SetScale(width / MenuBackImg.width, height / MenuBackImg.height)
		DrawImage MenuBackImg, 0, 0
		DrawImage File, 200, 100
		SetScale(1, 1)
	EndIf
  MenuSelect()
  If GameLevel > - 1 Then
 	 PlayerGUI()
  End If
DrawText "FPS: " + fps.fps, 30, 20
MoveMouse(width / 2, height / 2)
Flip
fps.Finish()
Wend
End


Function MenuSelect()
	Select MenuLevel
		Case (10)
			Include "Menu_main.bmx"
		Case 0
			Include "Menu_company.bmx"
		Case 1
			Include "Menu_deathmatch.bmx"
		Case 2
			Include "Menu_records.bmx"
		Case 3
			Include "Menu_options.bmx"
		Case 4
			Include "Menu_titles.bmx"
		Case 20
			
		Case 21
			Include "Menu_garaj.bmx"
		Case 22
			Include "Menu_shop.bmx"
	End Select

End Function




















	   


















