He intentado realizar un pequeño homebrew en LuaDEV, un menu, pero cuando pulso cualquier flecha de dirección, este no responde, y al rato, el menu dice "not enough memory", aquí dejo el codigo por si he hecho algo mal.
currentselection = 1 while true do screen.clear() pinselector = image.load("resources/pin.png") mainmenu = image.load("resources/mainmenu.png") image.blit(mainmenu,0,0) if currentselection == 1 then image.blit(pinselector,189,116) end if currentselection == 2 then image.blit(pinselector,189,155) end if currentselection == 3 then image.blit(pinselector,189,195) end if controls.press("up") then if currentselection == 2 then currentselection = 1 end if currentselection == 3 then currentselection = 2 end end if controls.press("down") then if currentselection == 1 then currentselection = 2 end if currentselection == 2 then currentselection = 3 end end screen.flip() screen.waitvblankstart() end
currentselection =
Claro que no se te mueve, te
Click en la imagen si kieres un avatar o una firma tan espectacular como los mios =P.
Psp 2001 Gen d3 + Memory stick 4 gb
Ps3 Fat 60GB + CFW Rebug 3.55 + Disco duro externo 250 GB+ Multiman
Vaya
Es que hoy justamente me he puesto con LuaDEV, y al principio incluso creia que era "pad = Controls.read()" y todo... y ahora ya me he aclarado bastante, gracias :D
Cualquier cosa mandame un mp
Cualquier cosa mandame un mp y encantado te ayudo =D.
Normal
si te cargas la ram, nos ves que en el while tienes puesto que a cada pasada cargue una imagen?
Por eso te quedas sin memoria en tan poco tiempo, debes poner la carga de imagenes fuera del bucle.
Vale
Voy a "optimizar" el código y a ver si no me da problemas.
EDITO: ¿Sabes que a veces se me va la cabeza?, pensaba que con la carga te referías a blit..., estoy fatal, cuando he visto los dos loads metidos en el bucle..... jajja que fallo.
Gracias :D
ademas de que tienes otro fallo en el blit
los argumentos no son: imagen,x,y es al reves x,y,imagen.
Es decir que te dara error en el image.blit
Saludos.
No
Pues no me da fallos, es que en LuaDEV es "image.blit
(imagen img, number x, number y)"
Pero aún sigue sin moverse el menu, no se porque.
EDITO:
Toma el código corregido, a ver si hay algun fallo...
Mira te lo voy a dar automatizado
Wtf, se le seguira sin
Wtf, se le seguira sin mover...
Por que no lo hacen con un
Por que no lo hacen con un bucle for y se dejan de romPerse la cabeza xD