The meaning of substracting 0x100000 of integers

Embrace_It

New Member
Reaction score
9
Hi all,

In many systems that I have been trying to understand, I have seen something like this:

JASS:

    GetHandleId(...) -0x100000 // Keeping with the new native...


I am guessing that the 0x100000 is a number in binary code.

My question: What is the purpose of this?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
GetHandleId will return handles's id.
0x100000 is the starting of handle id.

This formula helps to store in globals with array, since array only has 8191 slots.
 

Akolyt0r

New Member
Reaction score
33
any numbers prefixed with "0x" are Hexadecimal numbers ... not binary numbers.

With the new natives this shouldnt be needed anymore anyway, since hashtables arent limited as arrays...
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
Probably. But they are still much faster than Gamecache.
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
I'm going to take Karune's word for true on this matter.

However unlike the GameCache which uses strings for keys, the hashtable uses integers. Additionally, storing and retrieving data in hashtables are much faster and safer than storing data in the GameCache.

Linky if you wish.
 

Embrace_It

New Member
Reaction score
9
Ok, I think I understand. It is for starting at the beginning of an array.

any numbers prefixed with "0x" are Hexadecimal numbers ... not binary numbers.

Thanks for pointing that out :)
 

Akolyt0r

New Member
Reaction score
33
benchmark are coming soon, as Mindworks finishes the new StopWatch Natives (i am hoping he will ..some day)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top