- Joined
- Jul 10, 2007
- Messages
- 6,306
... hmm, so basicly this only makes sense when used in combination with hostbots or website-hosted games?You want to use BigInt when you are dealing with standard save/load codes and BitInt when you are doing save/load with networking.
* //dangerous, read note
* method pushFront takes BitInt bits returns nothing
* - Pushes bits on to front of this
* - Can push on to partials, but can't push parials
* - A BitInt is partial if bitCount%bitGroup != 0
*
* //dangerous, read note
* method pushBack takes BitInt bits returns nothing
* - Pushes bits on to back of this
* - Can push partials, but can't push on to partials
* - A BitInt is partial if bitCount%bitGroup != 0
*
* method popFront takes integer nodeCount returns BitInt
* - Pops off front nodes and returns BitInt containing them
*
* method popBack takes integer nodeCount returns BitInt
* - Pops off back nodes and returns BitInt containing them
// cJass
#define IntGetByte1(src) = (src / (256*256))
#define IntGetByte2(src) = (ModuloInteger(src, (256*256)) / 256)
#define IntGetByte3(src) = (ModuloInteger(src,256))
#define IntSetByte1(src,val) = { src = (ModuloInteger(src,(256*256)) + val*256*256 ) }
#define IntSetByte2(src,val) = { src = (ModuloInteger(src,256) + (src / (256*256))*256*256 + val*256) }
#define IntSetByte3(src,val) = { src = ((src / 256)*256 +val)}
math? no, never heard...
Code:// cJass #define IntGetByte1(src) = (src / (256*256)) #define IntGetByte2(src) = (ModuloInteger(src, (256*256)) / 256) #define IntGetByte3(src) = (ModuloInteger(src,256)) #define IntSetByte1(src,val) = { src = (ModuloInteger(src,(256*256)) + val*256*256 ) } #define IntSetByte2(src,val) = { src = (ModuloInteger(src,256) + (src / (256*256))*256*256 + val*256) } #define IntSetByte3(src,val) = { src = ((src / 256)*256 +val)}
Hello from Russia
That's not relevant to this resource and the use of ModuloInteger would get us closer to the operation-limit. (Meaning MD5 and AES wouldn't work well :v)
Also, that code has the wrong behavior for negative numbers.