new A_RailAttack
Moderator: GZDoom Developers
- Cutmanmike
- Posts: 11335
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
@Graf: what about this:
Code: Select all
case 'C':
case 'c': // Color
SC_MustGetString ();
if (!stricmp (sc_String, "none"))
{
v = -1;
}
else
{
char num[16];
sprintf (num, "0x%s", sc_String);
int color = strtol (num, NULL, 0);
v = ColorMatcher.Pick (RPART (color), GPART (color), BPART (color));
}
break;
Code: Select all
FUNC (A_RailAttack, "Ii!ccii")
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
That's ok but to I suggest:
Use V_GetColor to retrieve the color value instead. That function allows a nicer way to specify colors than just a cheap hex string.
and then use APART(v) where the color is being used. Then Timmie can use the full colors in case he wants to do that for ZDoomGL. That's what I had in mind anyway. But you can improve it even more:v |= ColorMatcher.Pick (RPART (color), GPART (color), BPART (color)) << 24;
Use V_GetColor to retrieve the color value instead. That function allows a nicer way to specify colors than just a cheap hex string.
I guess not yet
EDIT: whoops, read below.
EDIT: whoops, read below.
Last edited by Grubber on Mon May 30, 2005 12:16 pm, edited 1 time in total.
- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
- Cutmanmike
- Posts: 11335
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact: