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

Biont

Member
Newcomer
Joined
Jan 18, 2016
Messages
7
Trophies
0
Age
124
XP
64
Country
Barbados
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.
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
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?
 

Biont

Member
Newcomer
Joined
Jan 18, 2016
Messages
7
Trophies
0
Age
124
XP
64
Country
Barbados
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!
 

PabloMK7

Red Yoshi! ^ω^
Developer
Joined
Feb 21, 2014
Messages
2,616
Trophies
2
Age
24
Location
Yoshi's Island
XP
5,173
Country
Spain
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,

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy

GalladeGuy

Cool and Epic
Member
Joined
Oct 28, 2015
Messages
2,686
Trophies
1
XP
3,115
Country
United States
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.
 

ElyosOfTheAbyss

Well-Known Member
Member
Joined
Aug 20, 2015
Messages
2,225
Trophies
1
XP
1,911
Country
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

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @K3Nv2, https://www.youtube.com/watch?v=U8uydsntOyc