I resolved my problem. The error was in fillRect: I was assigning wrong values as parameters and the code was not running properly. Now it does. Thank you for your support.
You're putting index.lua with the .3dsx, right?I am new to both Lua and the whole 3DS homebrewing scene.
Trying to get various samples to run, to no avail. I've tried both renaming the samples to index.lua, or putting dofile(samplefilename.lua) into the index.lua.
All I get when it launches is a blank, greylined screen.
Yep, and the 3dsx file is named after the folder it's in.You're putting index.lua with the .3dsx, right?
I've used lpp with browserhax and it works fine.I can't seem to get any lua based homebrew programs (or even the LPP samples) to work at all on my N3DS. I'm using Themehax 1.3 (but I also tried browserhax/stagefright, with no luck), and I put lpp-3ds.3dsx in /3ds/lpp-3ds on my sd card, along with the helloworld.lua sample (renamed to index.lua), but all I get is a black screen, and I have to hard reboot the 3DS. Other non-lua homebrew applications work fine. No emuNANDs are being used here. Is LPP not compatible with themehax (homemenuhax) or browserhax?
I thunk the index.lua should be placed in the scripts folder. Not sure though, i might be dreamingI'm not sure what the issue is, then. I have nothing wrongly named, or in the wrong place, as far as I can tell. The instructions say to put the index.lua file with the 3dsx file, which it is.
Nah, next to the 3dsx.I thunk the index.lua should be placed in the scripts folder. Not sure though, i might be dreaming
I'm not sure what the issue is, then. I have nothing wrongly named, or in the wrong place, as far as I can tell. The instructions say to put the index.lua file with the 3dsx file, which it is.
dofile("graphics_and_controls.lua")
function gpu()
Graphics.initBlend(TOP_SCREEN)
Graphics.drawLine(0, 100, 0, 100, Color.new(255,255,255))
Graphics.fillRect(20,50,30,40, Color.new(255,0,0))
Graphics.termBlend()
Screen.flip()
Screen.waitVblankStart()
end
Graphics.init() -- Init GPU
red = Color.new(255,0,0)
blue = Color.new(0,0,255)
green = Color.new(0,255,0)
while true do
Screen.waitVblankStart()
pad = Controls.read()
Screen.refresh()
Screen.clear(TOP_SCREEN)
Screen.fillRect(5,150,5,20,green,TOP_SCREEN)
if (Controls.check(pad,KEY_A)) then
Screen.debugPrint(6,6,"Button A pressed",blue,TOP_SCREEN)
else
Screen.debugPrint(6,6,"Button A not pressed",blue,TOP_SCREEN)
end
if (Controls.check(pad,KEY_B)) then
gpu()
end
if (Controls.check(pad,KEY_Y)) then
Graphics.term() -- Term GPU before exiting
System.exit()
end
Screen.debugPrint(0,0,"LPP 3DS Test Script",red,BOTTOM_SCREEN)
Screen.debugPrint(0,15,"Screen & Color Modules - OK",red,BOTTOM_SCREEN)
Screen.debugPrint(0,30,"Controls Module - OK",red,BOTTOM_SCREEN)
Screen.flip()
end
I know you've already removed the code, but you could try 'dofile(System.currentDirectory().."/graphics_and_controls.lua")'.Yet if I just putin index.lua, it doesn't work, resulting in the same black screen. I'm getting really confused.Code:dofile("graphics_and_controls.lua")
I know you've already removed the code, but you could try 'dofile(System.currentDirectory().."/graphics_and_controls.lua")'.
I noticed that sometimes just giving a file name didn't work with file-based operations. So that might be why.This could explain why I couldn't get the image code to work, because I wasn't using the absolute path to the image file. Thanks, I'll give it a shot.
Screen.saveBitmap(bitmap2,"/bitmap",false)
That... worked? The graphic being displayed on the screen is a squashed mess of monochromatic pixels, when the original bitmap was pale green, (the only way it resembles the original bitmap is in its width) but it's doing something that isn't crashing, so that's good. (To be honest though, I did just use the default values and sub in a large image, so that's probably why it's being squashed. Let me just review the parameters)
Also, the image sample has a piece of code in itCode:Screen.saveBitmap(bitmap2,"/bitmap",false)
Which isn't even documented.
What's the deal?
Is it possible to loop a sound to a certain sample? I mean, if the file has 1000 samples and I want to loop to sample 100 when it reaches sample 1000, is it possible?