forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do you write the color in drawLineScreen()?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Acegikmo



Joined: 19 Jul 2008
Posts: 15

PostPosted: Thu Jul 24, 2008 4:36 pm    Post subject: How do you write the color in drawLineScreen()? Reply with quote

Yeah, I don't know what way to write the color.

drawLineScreen(ax, ay, bx, by, ??? );

So, for example, how do I draw a white line that's not transparent with this?
Back to top
View user's profile Send private message MSN Messenger
Smong



Joined: 04 Sep 2007
Posts: 82

PostPosted: Fri Jul 25, 2008 1:25 am    Post subject: Reply with quote

I looked at graphics.h from luaplayer source and color is just an int like this: 0xAABBGGRR. There seem to be some macros available too, they work like this:
Code:
Color color;
color = A(0x00) | B(0xFF) | G(0xFF) | R(0xFF);
drawLineScreen(x1, y1, x2, y2, color);

// or just
drawLineScreen(x1, y1, x2, y2, 0x00FFFFFF);

That will get you white, but I don't know if the alpha is meant to be 0x00 or 0xFF for opaque.
_________________
(+[__]%)
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Fri Jul 25, 2008 1:52 am    Post subject: Reply with quote

apha should be FF for opaque.
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
Acegikmo



Joined: 19 Jul 2008
Posts: 15

PostPosted: Fri Jul 25, 2008 5:07 am    Post subject: Reply with quote

Thanks, I'll try that
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group