Homebrew [Release] Lua Player Plus 3DS (lpp-3ds) - LUA interpreter for 3DS

  • Thread starter Thread starter Rinnegatamante
  • Start date Start date
  • Views Views 187,226
  • Replies Replies 1,199
  • Likes Likes 35
Can someone please help me out here? Graphics.fillRect refuses to render out what I'm passing in. I have tried to convey my situation in the screenshot below:

2016-01-21_10-59-07.png


self.x & self.y are both 0 for simplicity's sake. So the very first call to Graphics.fillRect should look like this:
Graphics.fillRect( 0, 48, 0, 48, Color.new(...) )
What is rendered, though, is a rectangle with the values 0,38,0,48 - as you can see from the raw touchscreen data at the top (yellow).

In the green annotations, you can see that the cellWidth is correct and the orange annotations show the starting points of all cells in the grid - all using correct values. What the hell is going on here?
I fear I am going to feel incredibly stupid again when I hear the solution, but this has been puzzling me to more than 2 days now.
 
Can someone please help me out here? Graphics.fillRect refuses to render out what I'm passing in. I have tried to convey my situation in the screenshot below:

2016-01-21_10-59-07.png


self.x & self.y are both 0 for simplicity's sake. So the very first call to Graphics.fillRect should look like this:
Graphics.fillRect( 0, 48, 0, 48, Color.new(...) )
What is rendered, though, is a rectangle with the values 0,38,0,48 - as you can see from the raw touchscreen data at the top (yellow).

In the green annotations, you can see that the cellWidth is correct and the orange annotations show the starting points of all cells in the grid - all using correct values. What the hell is going on here?
I fear I am going to feel incredibly stupid again when I hear the solution, but this has been puzzling me to more than 2 days now.

Me too i found some weird things with sf2dlib (library used for Graphics module) when using drawImageExtended. Can you try to use Screen module instead of Graphics just to see if it's a problem of Graphics module?
 
Can you try to use LUA_NUMBER values for fillRect? (I mean 0.0, 48.0, 0.0, 48.0 for example insdtead of 0, 48, 0, 48).

That worked! I kind of assumed you'd have to use integers here (or at least I'd never had though they'd cause problems), since you're passing the actual pixels to render the rectangle to. Well, maybe that's not what the GPU actually does under the hood, but it's the impression I got from the API.
Thank you!
 
  • Like
Reactions: Ptrk25
  • Like
Reactions: Ptrk25
I'm trying to play a beep each time I press a button. Which is the most estable sound format? wav 32000 samples/sec Mono no streaming doesn't play correctly, and streaming loops and crashes once played multiple times
 
Last edited by PabloMK7,
Is it possible to make an image change say after 10 seconds? and also How would I make a image move from one point to another?
 
Is it possible to make an image change say after 10 seconds? and also How would I make a image move from one point to another?
I believe you could set a timer for 10 seconds and once its up, stop printing the image, and print the new one in it's place. Not sure about the moving images though.
 
C:\Users\Name\Documents\GitHub\LuaApp>make
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [build] Error 2
I get this error when I try to compile
 

Site & Scene News

Popular threads in this forum