Hallo
habe für die psp mal ein kleines program geschrieben in lua. format
Es ist ein kleines mal program.
Aber die psp zeigt mir ein lua fehler an finde ihn aber nicht
hier die lua.
weiss = Color.new(255,255,255) --definiert die farbe weiss
schwarz = Color.new(0,0,0) --definiert die farbe weiss
malflaeche = Image.createEmpty(480,272)
malflaeche:clear(weiss)
cursor = Image.load("cursor.png")
cursor_x = 100
cursor_y = 100
while true do --Mainloop
pad = Controls.read() --DPad-Code...muss man nicht verstehen. Fragen bitte ins Forum posten
dx = pad:analogX()
dy = pad:analogY()
if dx > 30 then
cursor_x = cursor_x + (math.abs(pad:analogX())/64)
end
if dx < -30 then
cursor_x = cursor_x - (math.abs(pad:analogX())/64)
end
if dy > 30 then
cursor_y = cursor_y + (math.abs(pad:analogY())/64)
end
if dy < -30 then
cursor_y = cursor_y - (math.abs(pad:analogY())/64)
end --DPad-Code ENDE
screen:blit(0,0,malflaeche) --zeigt die Malfläche an
screen:blit(cursor_x, cursor_y, cursor, true) --zeigt das cursor auf cursor_x und cursor_y an
if pad:cross() then
malflaeche:drawLine(cursor_x, cursor_y,cursor_x, cursor_y,schwarz)
end
screen.flip()
screen.waitVblankStart()
end
wenn ihr noch was braucht schreibt