;************************************
;Author: Chris Turek 
; 10/15/2004
;
;Functions to setup the initial environment of mappoint
;
;
;
;
;*************************************

Global g_model, sky, g_light1, sp
Global collideNoise, channel, hud, hudf1, hudf2, hudf3, hudf4
Global trafficsound, gameover
Global puzzlemode = False
Global road, sidewalk, sidewalk2, grass
Global building1,building2_1,building2_2,building3_1,building3_2,building4_1
Global building4_2,building5_1,building5_2,building6_1,building6_2,building6_3, record_store
Global hydrant, hydrant2, hydrant3, hydrant4, hydrant5, hydrant6
Global streetlamp, streetlamp2, streetlamp3, streetlamp4, streetlamp5
Global streetlamp6, streetlamp7, streetlamp8, streetlamp9, streetlamp10
;entity radius for a building
Global erb = .4



Include "hanoi.bb"
Include "carsAI.bb"
Include "pellets.bb"





Function SetUpWorld ()





; Load a demo model and animate it
g_model = LoadAnimMesh("H-Beach Bug 2-Move.3ds")		; the car
RotateEntity g_model, 0, 180, 0
ScaleEntity g_model, .3, .3, .3
;ScaleEntity g_model, 1, 1, 1
PositionEntity g_model,0, -3, 0
Animate g_model
EntityType g_model, PLAYER
EntityRadius g_model,.65
EntityOrder g_model, -1



;MOON LIT SKY
sky = LoadAnimMesh("sky/sky08.3DS")
EntityType sky, SCENERY
EntityRadius sky, .2
ScaleEntity sky,100,100,100
PositionEntity sky,0,0,100
EntityOrder sky, 1




gameover = LoadSprite("lose_game.jpg",8)
SpriteViewMode gameover, 1
HideEntity gameover

hud = LoadSprite("hud.bmp", 8, SL_GetLeftCamera())
SpriteViewMode hud, 3
EntityOrder hud, -11
ShowEntity hud

hudf1 = LoadSprite("piece1_color.bmp", 8, SL_GetLeftCamera())
SpriteViewMode hudf1, 3
EntityOrder hudf1, -11
HideEntity hudf1

hudf2 = LoadSprite("piece2_color.bmp", 8, SL_GetLeftCamera())
SpriteViewMode hudf2, 3
EntityOrder hudf2, -11
HideEntity hudf2

hudf3 = LoadSprite("piece3_color.bmp", 8, SL_GetLeftCamera())
SpriteViewMode hudf3, 3
EntityOrder hudf3, -11
HideEntity hudf3

hudf4 = LoadSprite("piece4_color.bmp", 8, SL_GetLeftCamera())
SpriteViewMode hudf4, 3
EntityOrder hudf4, -11
HideEntity hudf4


If g_screenXSize=2048 Then

	PositionEntity hud, -13.7, -10.5, 16
	
	PositionEntity hudf1, 11.7, -8.501, 16
	PositionEntity hudf2, 13.7, -8.501, 16
	PositionEntity hudf3, 11.7, -10.5, 16
	PositionEntity hudf4, 13.7, -10.5, 16	
		
	
ElseIf g_screenXSize=1280 Then

	PositionEntity hud, -12.3, -23.1, 16	
	
	PositionEntity hudf1, 11.7, -18.501, 16
	PositionEntity hudf2, 13.7, -18.501, 16
	PositionEntity hudf3, 11.7, -20.5, 16
	PositionEntity hudf4, 13.7, -20.5, 16	
		
	

Else

	PositionEntity hud, -7.1, -13, 10	
	
	PositionEntity hudf1, 8.7, -18.501, 16
	PositionEntity hudf2, 10.7, -18.501, 16
	PositionEntity hudf3, 8.7, -20.5, 16
	PositionEntity hudf4, 10.7, -20.5, 16
		

EndIf



;grass
grass = LoadMesh("grass.x")
grassTex = LoadTexture("grass.jpg")
EntityTexture grass, grassTex
ScaleEntity grass,.5,.5,.5
RotateEntity grass, 0, 90, 0
PositionEntity grass,-140,-3.4,-15
EntityOrder grass, 0

;sidewalk
sidewalk = LoadMesh("sidewalk.x")
sidewalkTex = LoadTexture("concrete.jpg")
EntityTexture sidewalk, sidewalkTex
EntityType sidewalk, SCENERY
EntityRadius sidewalk, erb
ScaleEntity sidewalk,.5,.5,.5
RotateEntity sidewalk, 0, 90, 0
PositionEntity sidewalk,-135,-3.5,-15
EntityOrder sidewalk, 0

;sidewalk2
sidewalk2 = LoadMesh("sidewalk2.x")
sidewalk2Tex = LoadTexture("concrete.jpg")
EntityTexture sidewalk2, sidewalk2Tex
EntityType sidewalk2, SCENERY
EntityRadius sidewalk2, erb
ScaleEntity sidewalk2,.5,.5,.5
RotateEntity sidewalk2, 0, 90, 0
PositionEntity sidewalk2,-135,-3.5,-15
EntityOrder sidewalk2, 0


;road
road = LoadMesh("road.x")
roadTex = LoadTexture("road.jpg")
EntityTexture road, roadTex
ScaleEntity road,.5,.5,.5
RotateEntity road, 0, 90, 0
PositionEntity road,-140,-4,-15
EntityOrder road, 0



;record store
record_store = LoadMesh("record_store.x")
record_storeTex = LoadTexture("record_store.jpg")
EntityTexture record_store, record_storeTex
EntityType record_store, PUZZLE1
EntityRadius record_store, erb
ScaleEntity record_store,.5,.5,2
PositionEntity record_store, -39, 5, 67
EntityOrder record_store, 0





;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;buildings

building1 = LoadMesh("building1.x")
building1Tex = LoadTexture("building1.jpg")
EntityTexture building1, building1Tex
EntityType building1, SCENERY
EntityRadius building1, erb
ScaleEntity building1,.5,.5,.5
RotateEntity building1, 0, 90, 0
PositionEntity building1,-60,9,-143
EntityOrder building1, 0

;garage
building2_1 = LoadMesh("building2_1.x")
building2_1Tex = LoadTexture("building2_1.jpg")
EntityTexture building2_1, building2_1Tex
EntityType building2_1, SCENERY
EntityRadius building2_1, erb
ScaleEntity building2_1,.5,.5,.5
RotateEntity building2_1, 0, 90, 0
PositionEntity building2_1,-101,4,-10
EntityOrder building2_1, 0

building2_2 = LoadMesh("building2_2.x")
building2_2Tex = LoadTexture("building2_2.jpg")
EntityTexture building2_2, building2_2Tex
EntityType building2_2, SCENERY
EntityRadius building2_2, erb
ScaleEntity building2_2,.5,.5,.5
RotateEntity building2_2, 0, 90, 0
PositionEntity building2_2,-42,13,-12
EntityOrder building2_2, 0

building3_1 = LoadMesh("building3_1.x")
building3_1Tex = LoadTexture("building3_1.jpg")
EntityTexture building3_1, building3_1Tex
EntityType building3_1, SCENERY
EntityRadius building3_1, erb
ScaleEntity building3_1,.5,.5,.5
RotateEntity building3_1, 0, 90, 0
PositionEntity building3_1,-45,26,125
EntityOrder building3_1, 0

building3_2 = LoadMesh("building3_2.x")
building3_2Tex = LoadTexture("building3_2.jpg")
EntityTexture building3_2, building3_2Tex
EntityType building3_2, SCENERY
EntityRadius building3_2, erb
ScaleEntity building3_2,.5,.5,.5
RotateEntity building3_2, 0, 90, 0
PositionEntity building3_2,-100,20,125
EntityOrder building3_2, 0

building4_1 = LoadMesh("building4_1.x")
building4_1Tex = LoadTexture("building4_1.jpg")
EntityTexture building4_1, building4_1Tex
EntityType building4_1, SCENERY
EntityRadius building4_1, erb
ScaleEntity building4_1,.5,.5,.5
PositionEntity building4_1,-202,48,-166
EntityOrder building4_1, 0

building4_2 = LoadMesh("building4_2.x")
building4_2Tex = LoadTexture("building4_2.jpg")
EntityTexture building4_2, building4_2Tex
EntityType building4_2, SCENERY
EntityRadius building4_2, erb
ScaleEntity building4_2,.5,.5,.5
RotateEntity building4_2, 0, 90, 0
PositionEntity building4_2,-175,22,-120
EntityOrder building4_2, 0

building5_1 = LoadMesh("building5_1.x")
building5_1Tex = LoadTexture("building5_1.jpg")
EntityTexture building5_1, building5_1Tex
EntityType building5_1, SCENERY
EntityRadius building5_1, erb
ScaleEntity building5_1,.5,.5,.5
RotateEntity building5_1, 0, 90, 0
PositionEntity building5_1,-195,30,-32
EntityOrder building5_1, 0

building5_2 = LoadMesh("building5_2.x")
building5_2Tex = LoadTexture("building5_2.jpg")
EntityTexture building5_2, building5_2Tex
EntityType building5_2, SCENERY
EntityRadius building5_2, erb
ScaleEntity building5_2,.5,.5,.5
RotateEntity building5_2, 0, 90, 0
PositionEntity building5_2,-195,50,25
EntityOrder building5_2, 0

building6_1 = LoadMesh("building6_1.x")
building6_1Tex = LoadTexture("building6_1.jpg")
EntityTexture building6_1, building6_1Tex
EntityType building6_1, SCENERY
EntityRadius building6_1, erb
ScaleEntity building6_1,.5,.5,.5
RotateEntity building6_1, 0, 90, 0
PositionEntity building6_1,-195,33,87
EntityOrder building6_1, 0

building6_2 = LoadMesh("building6_2.x")
building6_2Tex = LoadTexture("building6_2.jpg")
EntityTexture building6_2, building6_2Tex
EntityType building6_2, SCENERY
EntityRadius building6_2, erb
ScaleEntity building6_2,.5,.5,.5
RotateEntity building6_2, 0, 90, 0
PositionEntity building6_2,-195,58,122
EntityOrder building6_2, 0

building6_3 = LoadMesh("building6_3.x")
building6_3Tex = LoadTexture("building6_3.jpg")
EntityTexture building6_3, building6_3Tex
EntityType building6_3, SCENERY
EntityRadius building6_3, erb
ScaleEntity building6_3,.5,.5,.5
RotateEntity building6_3, 0, 90, 0
PositionEntity building6_3,-200,70,160
EntityOrder building6_3, 0


;;;;end of buildings...............

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;environment objects

;the hydrant
hydrant = LoadMesh("hydrant.x")
hydrantTex = LoadTexture("hydred.tga")
EntityTexture hydrant, hydrantTex
EntityType hydrant, SCENERY
EntityRadius hydrant, erb
ScaleEntity hydrant, .003, .003, .003
RotateEntity hydrant, -90, -90, 0
PositionEntity hydrant, -12, -2.5, -92
EntityOrder hydrant, 0

hydrant2 = LoadMesh("hydrant.x")
hydrantTex2 = LoadTexture("hydred.tga")
EntityTexture hydrant2, hydrantTex2
EntityType hydrant2, SCENERY
EntityRadius hydrant2, erb
ScaleEntity hydrant2, .003, .003, .003
RotateEntity hydrant2, -90, -90, 0
PositionEntity hydrant2, -82, -2.5, 68
EntityOrder hydrant2, 0

hydrant3 = LoadMesh("hydrant.x")
hydrantTex3 = LoadTexture("hydred.tga")
EntityTexture hydrant3, hydrantTex3
EntityType hydrant3, SCENERY
EntityRadius hydrant3, erb
ScaleEntity hydrant3, .003, .003, .003
RotateEntity hydrant3, -90, -90, 0
PositionEntity hydrant3, -121, -2.5, 50
EntityOrder hydrant3, 0

hydrant4 = LoadMesh("hydrant.x")
hydrantTex4 = LoadTexture("hydred.tga")
EntityTexture hydrant4, hydrantTex4
EntityType hydrant4, SCENERY
EntityRadius hydrant4, erb
ScaleEntity hydrant4, .003, .003, .003
RotateEntity hydrant4, -90, -90, 0
PositionEntity hydrant4, -123, -2.5, -73
EntityOrder hydrant4, 0

hydrant5 = LoadMesh("hydrant.x")
hydrantTex5 = LoadTexture("hydred.tga")
EntityTexture hydrant5, hydrantTex5
EntityType hydrant5, SCENERY
EntityRadius hydrant5, erb
ScaleEntity hydrant5, .003, .003, .003
RotateEntity hydrant5, -90, -90, 0
PositionEntity hydrant5, -254, -2.5, -92
EntityOrder hydrant5, 0

hydrant6 = LoadMesh("hydrant.x")
hydrantTex6 = LoadTexture("hydred.tga")
EntityTexture hydrant6, hydrantTex6
EntityType hydrant6, SCENERY
EntityRadius hydrant6, erb
ScaleEntity hydrant6, .003, .003, .003
RotateEntity hydrant6, -90, -90, 0
PositionEntity hydrant6, -123, -2.5, 185
EntityOrder hydrant6, 0

streetlamp = LoadMesh("streetlamp.x")
streetlampTex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp, streetlampTex
EntityType streetlamp, SCENERY
EntityRadius streetlamp, erb
ScaleEntity streetlamp, .003, .003, .003
RotateEntity streetlamp, -90, -90, 0
PositionEntity streetlamp, -13, -2.5, 49
EntityOrder streetlamp, 0

streetlamp2 = LoadMesh("streetlamp.x")
streetlamp2Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp2, streetlamp2Tex
EntityType streetlamp2, SCENERY
EntityRadius streetlamp2, erb
ScaleEntity streetlamp2, .003, .003, .003
RotateEntity streetlamp2, -90, -90, 0
PositionEntity streetlamp2, -124, -2.5, 68
EntityOrder streetlamp2, 0

streetlamp3 = LoadMesh("streetlamp.x")
streetlamp3Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp3, streetlamp3Tex
EntityType streetlamp3, SCENERY
EntityRadius streetlamp3, erb
ScaleEntity streetlamp3, .003, .003, .003
RotateEntity streetlamp3, -90, -90, 0
PositionEntity streetlamp3, -80, -2.5, 49
EntityOrder streetlamp3, 0

streetlamp4 = LoadMesh("streetlamp.x")
streetlamp4Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp4, streetlamp4Tex
EntityType streetlamp4, SCENERY
EntityRadius streetlamp4, erb
ScaleEntity streetlamp4, .003, .003, .003
RotateEntity streetlamp4, -90, -90, 0
PositionEntity streetlamp4, -144, -2.5, -73
EntityOrder streetlamp4, 0

streetlamp5 = LoadMesh("streetlamp.x")
streetlamp5Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp5, streetlamp5Tex
EntityType streetlamp5, SCENERY
EntityRadius streetlamp5, erb
ScaleEntity streetlamp5, .003, .003, .003
RotateEntity streetlamp5, -90, -90, 0
PositionEntity streetlamp5, -80, -2.5, -73
EntityOrder streetlamp5, 0

streetlamp6 = LoadMesh("streetlamp.x")
streetlamp6Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp6, streetlamp6Tex
EntityType streetlamp6, SCENERY
EntityRadius streetlamp6, erb
ScaleEntity streetlamp6, .003, .003, .003
RotateEntity streetlamp6, -90, -90, 0
PositionEntity streetlamp6, -124, -2.5, -210
EntityOrder streetlamp6, 0

streetlamp7 = LoadMesh("streetlamp.x")
streetlamp7Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp7, streetlamp7Tex
EntityType streetlamp7, SCENERY
EntityRadius streetlamp7, erb
ScaleEntity streetlamp7, .003, .003, .003
RotateEntity streetlamp7, -90, -90, 0
PositionEntity streetlamp7, -144, -2.5, 49
EntityOrder streetlamp7, 0

streetlamp8 = LoadMesh("streetlamp.x")
streetlamp8Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp8, streetlamp8Tex
EntityType streetlamp8, SCENERY
EntityRadius streetlamp8, erb
ScaleEntity streetlamp8, .003, .003, .003
RotateEntity streetlamp8, -90, -90, 0
PositionEntity streetlamp8, -124, -2.5, -94
EntityOrder streetlamp8, 0

streetlamp9 = LoadMesh("streetlamp.x")
streetlamp9Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp9, streetlamp9Tex
EntityType streetlamp9, SCENERY
EntityRadius streetlamp9, erb
ScaleEntity streetlamp9, .003, .003, .003
RotateEntity streetlamp9, -90, -90, 0
PositionEntity streetlamp9, -13, -2.5, -75
EntityOrder streetlamp9, 0

streetlamp10 = LoadMesh("streetlamp.x")
streetlamp10Tex = LoadTexture("streetlamp.jpg")
EntityTexture streetlamp10, streetlamp10Tex
EntityType streetlamp10, SCENERY
EntityRadius streetlamp10, erb
ScaleEntity streetlamp10, .003, .003, .003
RotateEntity streetlamp10, -90, -90, 0
PositionEntity streetlamp10, -144, -2.5, 185
EntityOrder streetlamp10, 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;end environment objects

;setup the AI cars
setUpCars()

;setup the pellets
setUpPellets()


;enable a collision
Collisions PLAYER, SCENERY,  2, 1
Collisions PLAYER, PUZZLE1, 2, 1 
Collisions player, POLICE, 2, 1
Collisions player, HEARSE, 2, 1
Collisions player, USCAR, 2, 1
Collisions player, WHITECAR, 2, 1
Collisions player, TAXI, 2, 1
Collisions player, RED, 2, 1
Collisions PLAYER, HAPPY_1, 2, 1
Collisions PLAYER, HAPPY_2, 2, 1
Collisions PLAYER, HAPPY_3, 2, 1
Collisions PLAYER, HAPPY_4, 2, 1
Collisions PLAYER, HAPPY_5, 2, 1
Collisions PLAYER, SAD_1, 2, 1
Collisions PLAYER, SAD_2, 2, 1
Collisions PLAYER, SAD_3, 2, 1
Collisions PLAYER, SAD_4, 2, 1
Collisions PLAYER, SAD_5, 2, 1
Collisions PLAYER, FLYER_1, 2, 1
Collisions PLAYER, FLYER_2, 2, 1
Collisions PLAYER, FLYER_3, 2, 1
Collisions PLAYER, FLYER_4, 2, 1

;Sound
;sound=LoadSound("daftpunk.mp3") ; Load sound 
;PlaySound sound 
;LoopSound sound

collideNoise = LoadSound("fs_fr_stone03.wav")

;background traffic sound
trafficsound=LoadSound("traffic.wav") ; Load sound
LoopSound trafficsound 
PlaySound trafficsound



;light
g_light1 = CreateLight()
RotateEntity g_light1, 90,0,0



;set up the towers of hanoi puzzle
; note: will not be visible
setupTowers()




End Function




;hide the all of the entities in the world
Function hideWorld()

HideEntity g_model
HideEntity grass
HideEntity sky
HideEntity hud
HideEntity road
HideEntity sidewalk
HideEntity sidewalk2
HideEntity building1
HideEntity building2_1
HideEntity building2_2
HideEntity building3_1
HideEntity building3_2
HideEntity building4_1
HideEntity building4_2
HideEntity building5_1
HideEntity building5_2
HideEntity building6_1
HideEntity building6_2
HideEntity building6_3
HideEntity record_store

HideEntity hydrant
HideEntity hydrant2
HideEntity hydrant3
HideEntity hydrant4
HideEntity hydrant5
HideEntity hydrant6

HideEntity streetlamp
HideEntity streetlamp2
HideEntity streetlamp3
HideEntity streetlamp4
HideEntity streetlamp5
HideEntity streetlamp6
HideEntity streetlamp7
HideEntity streetlamp8
HideEntity streetlamp9
HideEntity streetlamp10

HideEntity happy1
HideEntity happy2
HideEntity happy3
HideEntity happy4
HideEntity happy5
HideEntity sad1
HideEntity sad2
HideEntity sad3
HideEntity sad4
HideEntity sad5


HideEntity policeC
HideEntity hearseC
HideEntity uscarC
HideEntity whitecarC
HideEntity taxiC
HideEntity redC


HideEntity hydrant
HideEntity hydrant2
HideEntity hydrant3
HideEntity hydrant4
HideEntity hydrant5
HideEntity hydrant6
HideEntity streetlamp
HideEntity streetlamp2
HideEntity streetlamp3
HideEntity streetlamp4
HideEntity streetlamp5
HideEntity streetlamp6
HideEntity streetlamp7
HideEntity streetlamp8
HideEntity streetlamp9
HideEntity streetlamp10


End Function



;show all the entities in the world
Function showWorld()


ShowEntity g_model
ShowEntity grass
ShowEntity sky
ShowEntity hud
ShowEntity road
ShowEntity sidewalk
ShowEntity sidewalk2
ShowEntity building1
ShowEntity building2_1
ShowEntity building2_2
ShowEntity building3_1
ShowEntity building3_2
ShowEntity building4_1
ShowEntity building4_2
ShowEntity building5_1
ShowEntity building5_2
ShowEntity building6_1
ShowEntity building6_2
ShowEntity building6_3
ShowEntity record_store

ShowEntity hydrant
ShowEntity hydrant2
ShowEntity hydrant3
ShowEntity hydrant4
ShowEntity hydrant5
ShowEntity hydrant6

ShowEntity streetlamp
ShowEntity streetlamp2
ShowEntity streetlamp3
ShowEntity streetlamp4
ShowEntity streetlamp5
ShowEntity streetlamp6
ShowEntity streetlamp7
ShowEntity streetlamp8
ShowEntity streetlamp9
ShowEntity streetlamp10

ShowEntity happy1
ShowEntity happy2
ShowEntity happy3
ShowEntity happy4
ShowEntity happy5
ShowEntity sad1
ShowEntity sad2
ShowEntity sad3
ShowEntity sad4
ShowEntity sad5


ShowEntity policeC
ShowEntity hearseC
ShowEntity uscarC
ShowEntity whitecarC
ShowEntity taxiC
ShowEntity redC

ShowEntity hydrant
ShowEntity hydrant2
ShowEntity hydrant3
ShowEntity hydrant4
ShowEntity hydrant5
ShowEntity hydrant6
ShowEntity streetlamp
ShowEntity streetlamp2
ShowEntity streetlamp3
ShowEntity streetlamp4
ShowEntity streetlamp5
ShowEntity streetlamp6
ShowEntity streetlamp7
ShowEntity streetlamp8
ShowEntity streetlamp9
ShowEntity streetlamp10


HideEntity sprite



End Function

;adjust the hud when you shift to stereo
Function hudStereo()

If g_screenXSize=2048 Then

	PositionEntity hud, -13.7, -10.5, 16	
		
	PositionEntity hudf1, 11.7, -8.501, 16
	PositionEntity hudf2, 13.7, -8.501, 16
	PositionEntity hudf3, 11.7, -10.5, 16
	PositionEntity hudf4, 13.7, -10.5, 16	
			
		
	
ElseIf g_screenXSize=1280 Then

	PositionEntity hud, -12.3, -23.1, 16	
	
	PositionEntity hudf1, 11.7, -18.501, 16
	PositionEntity hudf2, 13.7, -18.501, 16
	PositionEntity hudf3, 11.7, -20.5, 16
	PositionEntity hudf4, 13.7, -20.5, 16
	

Else

	PositionEntity hud, -7.1, -13, 10	
		
	PositionEntity hudf1, 8.7, -18.501, 16
	PositionEntity hudf2, 10.7, -18.501, 16
	PositionEntity hudf3, 8.7, -20.5, 16
	PositionEntity hudf4, 10.7, -20.5, 16


EndIf


End Function




;adjust the hud when you shift to mono
Function hudMono()


If g_screenXSize=2048 Then

	PositionEntity hud, -13.7, -10.5, 16	
	
	PositionEntity hudf1, 11.7, -8.501, 16
	PositionEntity hudf2, 13.7, -8.501, 16
	PositionEntity hudf3, 11.7, -10.5, 16
	PositionEntity hudf4, 13.7, -10.5, 16
		
	
ElseIf g_screenXSize=1280 Then

	PositionEntity hud, -22.2, -18, 25	
	
	PositionEntity hudf1, 18.7, -13.501, 25
	PositionEntity hudf2, 20.7, -13.501, 25
	PositionEntity hudf3, 18.7, -15.5, 25
	PositionEntity hudf4, 20.7, -15.5, 25
	

Else

	PositionEntity hud, -13.6, -10.5, 16	
		
	PositionEntity hudf1, 20.7, -9.501, 25
	PositionEntity hudf2, 22.7, -9.501, 25
	PositionEntity hudf3, 20.7, -11.5, 25
	PositionEntity hudf4, 22.7, -11.5, 25

EndIf




End Function