I got all of ammaross' code I'll have to dig it up and post it again somewhere.
----- Original Message ----- From: "Richard Lindsey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[email protected]> Sent: Thursday, April 01, 2004 1:54 PM Subject: RE: more bits Actually, that is in essence what the unlimited bits snippet does, but the problem with your version is that you're using 1 int variable to hold each flag value, and I'm assuming you'd just set it to 1 or 0 for toggling it on or off... but, 1 int variable is actually 2 bytes long, or 16 bits, so you're using 16x the amount of memory for your flags by doing it that way... the unlimited bits snippet accesses the integer variables it uses as a bit array instead of as 1 variable to turn on or off, and you define a value like AFF_FLAGS 2, which would allow you 32 bits (2 * the 16 bits in 1 int variable), and whenever you run past the 32 bits you have access to, you simply up AFF_FLAGS by 1, and you get 16 more available bit slots... it's pretty nice... I had a hard time locating this snippet myself, and I've deleted it since then, but I've got about 40 backups dating back to the stock codebase I started with, and I'm sure it's in some of them, so I can dig it out and email it to you... Richard Lindsey -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 2:50 PM To: [email protected] Subject: more bits I've read through several rounds of bit discussions in the archives, and I've heard of the unlimited bit snippit that I can't seem to find. But what I'm curious about is would I be able to use an int array and use this to store things like act[100] and have 100 act spots I could define? Are there any reasons why this would be a bad idea? ________________________________________________________________ The best thing to hit the Internet in years - NetZero HiSpeed! Surf the Web up to FIVE TIMES FASTER! Only $14.95/ month -visit www.netzero.com to sign up today! -- ROM mailing list [email protected] http://www.rom.org/cgi-bin/mailman/listinfo/rom -- ROM mailing list [email protected] http://www.rom.org/cgi-bin/mailman/listinfo/rom

