Skip to main content
GameDev.net gamedev.net
🔒 Locked

Writing a function that uses Flags

Started by Drastick Jan 2, 2003 at 9:09 PM 2 replies 200+ views
Original Post
Drastick
Drastick
I understand how you use flags with functions that already exist (that I have not writen) but I have never figured out how to write my own funtion that takes flags and an input. Anyone have a good example of how they should be used... or a good link I have been searching with no luck thanks ^_^
Dustino
Dustino
  
#define BLUE 1x01
#define RED 1x02


void SomeFunc(int Flags)
{
if (Flags & BLUE) { ..code.. }
}


[edited by - Dustino on January 2, 2003 10:28:53 PM]
Drastick
Drastick
thanks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.