View Full Version : semi transparnt images in lua
Buddy4point0
April 6th, 2007, 18:26
hey i have been trying to figure out how to use semi transparent images in lua. i have my semi transparent image in png format, but when i use it in my game its opaque. if someone could tell me how, if its even posible, it would be greatly appreciated.:confused:
dangee
April 6th, 2007, 18:42
try use the alpha flag (opt. arg #8 to img:blit())
Buddy4point0
April 6th, 2007, 19:51
can u use that in an example? plz
here is what i im writing now
screen:blit(0,0,clouds)
so how would that look useing the alpha flag?
dangee
April 6th, 2007, 20:00
local U=nil ; screen:blit(0,0,clouds,U,U,U,U,true)
local im=clouds ;
screen:blit(0,0,im,0,0,im:width(),im:height(),true ) -- more reliable
Buddy4point0
April 6th, 2007, 20:58
it doesnt work. it just makes a bunch of weird likes and stuff
-Xandu-
April 6th, 2007, 21:29
It's opaque on Windows Lua Player, while it's semi-transparent on the PSP ;).
Buddy4point0
April 6th, 2007, 21:32
oh! really! thanks lemme try that now
dangee
April 7th, 2007, 20:07
It's opaque on Windows Lua Player, while it's semi-transparent on the PSP ;).
..so (alphaFlag=true) means
PSP: blit semi-trans.
PC: blit opaque
?
Gold Line
April 7th, 2007, 20:30
hi can i just ask what do i use to change .mid music to a format that lua can play
dangee
April 7th, 2007, 21:04
I played mono .wav in luaplayer PSP 2.0 but not stereo .
dont know a homebrew sound file converter..
PSPRHYTHM 7.1 have some new sound file capability..
dangee
April 13th, 2007, 13:12
local U=nil ; screen:blit(0,0,clouds,U,U,U,U,true)
local im=clouds ;
screen:blit(0,0,im,0,0,im:width(),im:height(),true ) -- more reliable
--
the im: versions ok
the U versions rong
if the 4 subimage args #4-#7 are Undefined ,
the alpha flag becomes opt. arg #4
so..
screen:blit(0,0,clouds,true)
..should work
NE1 confirm it?
BlackShark
April 23rd, 2007, 09:36
hi can i just ask what do i use to change .mid music to a format that lua can play
DL modTracker (google it) then open your midi file (mid) and just save as an it. file, load it like "NameOfSong.it", Get a soda to complement your satisfaction for coding something that works, Donate 100 $ to me, and then your done!
Powered by vBulletin® Version 4.2.3 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.