white = Color.new(255, 255, 255)
 backgroundH = Image.load("backroundH.png")

cImages = {}
cImages[1] = Image.load("hippie/hippiemain.png")
cImages[2] = Image.load("hippie/hippiemainCIRCLE.png")
cImages[3] = Image.load("hippie/hippiemainCROSS.png")
cImages[4] = Image.load("hippie/hippiemainSQUARE.png")
cImages[5] = Image.load("hippie/hippiemainTRIANGLE.png")
cImages[6] = Image.load("hippie/hippiemainUP.png")
cImages[7] = Image.load("hippie/hippiemainDOWN.png")
cImages[8] = Image.load("hippie/hippiemainLEFT.png")
cImages[9] = Image.load("hippie/hippiemainRIGHT.png")
currentcImage = 1

while true do
screen:clear() 
screen:blit(0, 0, backgroundH, false)
screen:blit(198, 40,cImages[currentcImage]) 

pad = Controls.read()
 
screen:print(135, 251, "Press 'Start' to restart",white)
screen:print(110, 261, "Press 'Select' for a screenshot", white)

if pad:l() then
dofile("tinky.lua")
end

if pad:r() then
end
 
if pad:cross() then
currentcImage = 3
hippieCROSS:play()
end
 
if pad:circle() then
currentcImage = 2
hippieCIRCLE:play()
end

if pad:triangle() then
currentcImage = 5
hippieTRIANGLE:play()
end
 
if pad:square() then
currentcImage = 4
hippieSQUARE:play()
end
 
if pad:up() then
currentcImage = 6
hippieUP:play()
end
 
if pad:down() then
currentcImage = 7
hippieDOWN:play()
end
 
if pad:left() then
currentcImage = 8
hippieCROSS:play()
end
 
if pad:right() then
currentcImage = 9
hippieSQUARE:play()
end
 
 
if pad:select() then screen:save("screenshot.tga") end
 
if pad:start() then		
break
end 
 screen.flip()
end
 

