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,858
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,618
Trophies
2
Age
24
Location
Yoshi's Island
XP
5,199
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,858
Country
Italy

GalladeGuy

Cool and Epic
Member
Joined
Oct 28, 2015
Messages
2,686
Trophies
1
XP
3,126
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
  • BigOnYa @ BigOnYa:
    eez nuts
  • K3Nv2 @ K3Nv2:
    I tried that new prime X flavor and almost gagged in my mouth lol
  • BigOnYa @ BigOnYa:
    I'm surprised, with your awesome gag reflexs you have B-)
  • K3Nv2 @ K3Nv2:
    Well for being with your wife for so long I have self control
    +1
  • K3Nv2 @ K3Nv2:
    If you wanna commit suicide just drink prime
    +1
  • Sicklyboy @ Sicklyboy:
    obamna
  • The Catboy @ The Catboy:
    SODA
  • Sonic Angel Knight @ Sonic Angel Knight:
    Catboy back in chat. :ninja:
  • Sonic Angel Knight @ Sonic Angel Knight:
    Don't forget to pet it for good luck
  • K3Nv2 @ K3Nv2:
    That cat bites
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Hmmm yes she does
  • Psionic Roshambo @ Psionic Roshambo:
    Float like a butterfly burns when I pee lol
    +1
  • BigOnYa @ BigOnYa:
    So does that mean your date was not good? It burns now?
    +1
  • K3Nv2 @ K3Nv2:
    Got two new stds in one night
    +1
  • BigOnYa @ BigOnYa:
    Giggity
    +1
  • The Catboy @ The Catboy:
    I don't bite! Minus the times when I did bite
  • The Catboy @ The Catboy:
    Like 5 minutes ago
  • K3Nv2 @ K3Nv2:
    Billie needs her lunch
  • K3Nv2 @ K3Nv2:
    Ffs papa brought back the cheeseburger pizza it's like the only decent pie they had since the 80s
  • BigOnYa @ BigOnYa:
    I'm not a fan of papa johns, but that does sound good. We hardly order out pizza, I like making my own, but when we do its donatoes
  • K3Nv2 @ K3Nv2:
    I get them like once every two months anymore
  • K3Nv2 @ K3Nv2:
    Just because it's half a mile from where I live
  • BigOnYa @ BigOnYa:
    Request next time you order, that Shaq deliver it to you
  • K3Nv2 @ K3Nv2:
    I want him to buy me a chain also
  • K3Nv2 @ K3Nv2:
    Open it right next to the one we have
    +1
    K3Nv2 @ K3Nv2: Open it right next to the one we have +1