|
|
|
Graham has made this a lot easier with his Slot Program. Its a must download.
You have 9 slots for menu selection. 1-9
You can get them by simply turning 'on'(1) the bits you need.
Binary: 0 0 0 0 0 0 0 0 0
MenuBit: 9 8 7 6 5 4 3 2 1
If you wanted menu selection 1, 2, 4, 6, then you turn 'on' those bits.
Binary: 0 0 0 1 0 1 0 1 1
MenuBit:x x x 6 x 4 x 2 1
If you filled all of the menu choices then you would have
111111111.
But that the value would be best in hexadecimal, so you need to
convert it like this:
Basic Conversion
Binary: 0 0 0 0
Places: 8 4 2 1 --Like ones, tens, hundreds
1. Divide from right by fours.
0|0010|1011
2. Then add up all 'on' values.
0 0 0 0|0 0 1 0|1 0 1 1
0+0+0+0|0+0+2+0|8+0+2+1
0 2 11
3. Then take your 3 sums and 'stick' them together.
0(2)(11)
4. There arent numbers above 9 in hexadecimal so you use letters.
A=10 D=13
B=11 E=14
C=12 F=15
5. Your final answer would be:
0x2B for MenuBits 1,2,4,6.
-0x is the prefix for Hexadecimal, dont confuse it with the zero.
Any questions or suggestions should be sent to me: bigguy@valveworld.com