I had a look through and I remembered doing something pretty interesting that helped me with a problem that I don't think is mentioned much: Switching what is rendered and what inputs are taken in a game. For example: your main game menu looks entirely different to the 'main' part of your game and it takes different inputs. How do you manage these different situations?
What I had done is implement a RenderMode table which linked a number of callbacks to the bits in an __int64. This allowed me to toggle drawing things to the screen by simply bitwise XOR-ing the relevant bit in the current RenderMode. I could then bitwise AND each RenderMode in the lookup table with the current RenderMode and if it came out true I would call the relevant callback which would draw something to the screen.
This then extended to my input functions where I would associate each key (mouse or keyboard) with a callback and a RenderMode- ensuring that some keys could be painlessly reused for a menu or in the game proper.
I'm currently porting this code over to C# (using ulong so I get the possibility of 128 unique RenderModes) hopefully it will be as much of a success as it was in C.
I'll post the C code if anyone wants, I can't be bothered to upload it if it ain't gonna be used [grin]
I'm sure I was looking at something on MSDN that's 128 bit in C#.
Anyway, I only used 8 bit places before and that's because I was using a rendermode for everything I was drawing, to test it out. In reality, I think 64 might be enough for most games.
---
It was the decimal value type. That's 128 bit. Knew I'd seen it somewhere.