weiss = Color.new(255,255,255)
schwarz = Color.new(0,0,0)
hinterg = Image.load("zone1.png")
ash = Image.load("ash.png")
cursor_x = 200
cursor_y = 150
pic=0
timerup=0
timerdown=0
timerright=0
timerleft=0
animation=1
--Mp3.load("a.mp3")
--Mp3.play()
while true do
--screen:clear()
--Zone1
--Wand rechts
if cursor_x >443 then
cursor_x=443
end
--Wand oben
if cursor_y <-10 then
cursor_y=-10
end
--Wand unten
if cursor_y >225 then
cursor_y=225
end
--Wand links
if cursor_x <8 then
cursor_x=8
end
--Haus unten rechts
--horizontale ebene
if cursor_x <444 and cursor_x >362 and cursor_y >150 and cursor_y <152 then
cursor_y=150
end
if cursor_x <444 and cursor_x >362 and cursor_y >208 and cursor_y <210 then
cursor_y=210
end
--vertikale ebene
if cursor_x >360 and cursor_y <210 and cursor_y >155 then
cursor_x=360
end
--Haus oben
--horizontale ebene
if cursor_x <170 and cursor_x >80 and cursor_y <28 then
cursor_y=28
end
--vertikale ebene
if cursor_x <173 and cursor_x >170 and cursor_y <30 and cursor_y >-15 then
cursor_x=173
end
if cursor_x >77 and cursor_x <80 and cursor_y <30 and cursor_y >-15 then
cursor_x=77
end
-- Bus
--horizontale ebene
if cursor_x >0 and cursor_x <48 and cursor_y <132 and cursor_y>130 then
cursor_y=132
end
if cursor_x >0 and cursor_x <48 and cursor_y >85 and cursor_y<87 then
cursor_y=85
end
--vertikale ebene
if cursor_x <50 and cursor_y <132 and cursor_y >85 then
cursor_x=50
end
--Baeme links
--vertikale ebene
if cursor_x <30 and cursor_y <130 and cursor_y >-15 then
cursor_x=30
end
--Baeme unten
--horizontale ebene
if cursor_x >0 and cursor_x <270 and cursor_y >200 then
cursor_y=200
end
--vertikale ebene
if cursor_x <272 and cursor_y <250 and cursor_y >200 then
cursor_x=272
end
pad = Controls.read()
function Ashbew ()
if pad:right() then
cursor_x = cursor_x + 1.5
end
if pad:left() then
cursor_x = cursor_x - 1.5
end
if pad:down() then
cursor_y = cursor_y + 1.5
end
if pad:up() then
cursor_y = cursor_y - 1.5
end
end
-------------------------------------
if pad:down() then
timerdown = timerdown + 0.125
end
if timerdown == 0.125 then
animation = 1
elseif timerdown == 1 then
animation = 2
elseif timerdown == 2 then
animation = 3
end
if timerdown > 3 then
timerdown = 0
end
---------------------------------------
-------------------------------------
if pad:down() and pad:left() then
timerdown = timerdown + 0.125
end
if timerdown == 0.125 then
animation = 1
elseif timerdown == 1 then
animation = 2
elseif timerdown == 2 then
animation = 3
end
if timerdown > 3 then
timerdown = 0
end
---------------------------------------
-------------------------------------
if pad:down() and pad:right() then
timerdown = timerdown + 0.125
end
if timerdown == 0.125 then
animation = 1
elseif timerdown == 1 then
animation = 2
elseif timerdown == 2 then
animation = 3
end
if timerdown > 3 then
timerdown = 0
end
---------------------------------------
if pad:up() then
timerup = timerup + 0.125
end
if timerup == 0.125 then
animation = 7
elseif timerup == 1 then
animation = 8
elseif timerup == 2 then
animation = 9
end
if timerup > 3 then
timerup = 0
end
------------------------------------
---------------------------------------
if pad:up() and pad:left()then
timerup = timerup + 0.125
end
if timerup == 0.125 then
animation = 7
elseif timerup == 1 then
animation = 8
elseif timerup == 2 then
animation = 9
end
if timerup > 3 then
timerup = 0
end
------------------------------------
---------------------------------------
if pad:up() and pad:right() then
timerup = timerup + 0.125
end
if timerup == 0.125 then
animation = 7
elseif timerup == 1 then
animation = 8
elseif timerup == 2 then
animation = 9
end
if timerup > 3 then
timerup = 0
end
------------------------------------
------------------------------------
if pad:right() then
timerright = timerright + 0.125
end
if timerright == 0.125 then
animation = 4
elseif timerright == 1 then
animation = 5
elseif timerright == 2 then
animation = 6
end
if timerright > 3 then
timerright = 0
end
------------------------------------
------------------------------------
if pad:left() then
timerleft = timerleft + 0.125
end
if timerleft == 0.125 then
animation = 10
elseif timerleft == 1 then
animation = 11
elseif timerleft == 2 then
animation = 12
end
if timerleft > 3 then
timerleft = 0
end
------------------------------------
if animation == 0 then
pic = 0
elseif animation == 1 then
pic = 32
elseif animation == 2 then
pic = 64
elseif animation == 3 then
pic = 96
elseif animation == 4 then
pic = 128
elseif animation == 5 then
pic = 160
elseif animation == 6 then
pic = 192
elseif animation == 7 then
pic = 224
elseif animation == 8 then
pic = 256
elseif animation == 9 then
pic = 288
elseif animation == 10 then
pic = 320
elseif animation == 11 then
pic = 352
elseif animation == 12 then
pic = 384
end
Ashbew()
screen:blit(0,0,hinterg,true)
screen:blit(cursor_x, cursor_y, ash, pic, 0, 32, 32)
screen:print(350,20,"Hodges Pokemap",weiss)
screen.flip()
screen.waitVblankStart()
end