semi-transparent images?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
2Xtremes2004
Posts: 53
Joined: Wed Aug 31, 2005 1:43 am

semi-transparent images?

Post by 2Xtremes2004 »

Is there curently anyway to make semi-transparent images work in lua?
For example, I would like to make a menu that I can still see the background image through. Also, can anyone tell me how to make a button not work, maybe like pad:left(nil) or something.

Thx for all the help, and great work on Lua!
I want my money back!?
chaos
Posts: 135
Joined: Sun Apr 10, 2005 5:05 pm

Post by chaos »

there's no way to do real transparency yet, unless you write your own blending routine, which would be very slow...
Chaosmachine Studios: High Quality Homebrew.
2Xtremes2004
Posts: 53
Joined: Wed Aug 31, 2005 1:43 am

Post by 2Xtremes2004 »

ok, thx for the quick reply. I hope, and look forward to see this feature included in Lua. :P
I want my money back!?
2Xtremes2004
Posts: 53
Joined: Wed Aug 31, 2005 1:43 am

Post by 2Xtremes2004 »

Anyone got any suggestions for the button problem? Im trying to make it so that when my task menu is opened by pressing cross that no other buttons work untill the menu is closed with the cross button. I have tried different things, such as:

Code: Select all

pad:left(nil)

Code: Select all

nil pad:left()

Code: Select all

if pad:left() then
pad:left() = nil
... but these all give me errors. I am getting all bent out of shape cause i cant figure out this little problem. :(
I want my money back!?
chaos
Posts: 135
Joined: Sun Apr 10, 2005 5:05 pm

Post by chaos »

sounds like you're going about things in the wrong way..

just make a loop that only checks for the buttons you want.
Chaosmachine Studios: High Quality Homebrew.
holger
Posts: 204
Joined: Thu Aug 18, 2005 10:57 am

Post by holger »

there's no way to do real transparency yet, unless you write your own blending routine, which would be very slow...
Shine posted a demo how to access pspGL from Lua some time ago, maybe you want to take a look...
chaos
Posts: 135
Joined: Sun Apr 10, 2005 5:05 pm

Post by chaos »

holger wrote:
there's no way to do real transparency yet, unless you write your own blending routine, which would be very slow...
Shine posted a demo how to access pspGL from Lua some time ago, maybe you want to take a look...
that demo was for an experimental build of luaplayer. you can't do that with regular luaplayer, afaik.
Chaosmachine Studios: High Quality Homebrew.
2Xtremes2004
Posts: 53
Joined: Wed Aug 31, 2005 1:43 am

Post by 2Xtremes2004 »

chaos wrote:sounds like you're going about things in the wrong way..

just make a loop that only checks for the buttons you want.
That worked, thanks... Don't know why I got stuck on something so simple.
I want my money back!?
alinear
Posts: 5
Joined: Tue Sep 06, 2005 2:27 pm
Location: Brooklyn, NY, USA
Contact:

Post by alinear »

You could try refresh interlacing the images to get a psuedo 50% alpha look... try blinking the image onto the screen every other frame. Not sure how this will look but its an old trick.

Another option would be to blit every other line of the image intended to be mixed onto the screen buffer. This, if done with horizontal lines, would probably not be terribly intense to do... a basic interlace blend.

Been meaning to try both of these. They are far from ideal but could get you psuedo blending/transparency until a real GL hook is implemented.
Post Reply