bitflags.c

tmi2_fluffos_v2/lib/std/user/bitflags.c · 457 B

From the archive tmi2_fluffos_v2.zip

Download the archive   « Back to the archive contents

// bitflags.c
// Code received from DreamShadow, written by Anne
// Transported to TMI by Sulam (april 12, 1992)
// rewritten because it wasn't working by sulam (april 12, 1992)
//   reimplemented all the bit stuff using bit notation
// 94-11-09 Leto changed status to int

private int bitflags;	// Bitfield of flags

void set_flag(int n)
{   bitflags |= n;
}

int test_flag(int n)
{   return bitflags & n;
}

void clear_flag(int n)
{   bitflags &= ~(n);
}

Site Stats

Snippets: 1791
Codebases: 571