Difference between revisions of "Talk:List of RW section IDs"
ModelingMan (talk | contribs) (New page: ==How Chunk IDs work== Chunk/Section IDs contain both the vendor ID and object ID. RenderWare contains a macro in it's C headers to generate a Chunk ID which is used for internal use and b...) |
m |
||
Line 1: | Line 1: | ||
==How Chunk IDs work== | ==How Chunk IDs work== | ||
Chunk/Section IDs contain both the vendor ID and object ID. RenderWare contains a macro in it's C headers to generate a Chunk ID which is used for internal use and by identifying the chunk in a binary file. There are another 2 macros for getting the vendor and object IDs from a chunk ID. The macros are something similar to the following: | Chunk/Section IDs contain both the vendor ID and object ID. RenderWare contains a macro in it's C headers to generate a Chunk ID which is used for internal use and by identifying the chunk in a binary file. There are another 2 macros for getting the vendor and object IDs from a chunk ID. The macros are something similar to the following: | ||
− | + | <source lang="cpp"> | |
#define MAKECHUNKID(_vendorID, _objectID) ((_vendorID & 0xFFFFFF) << 8) | (_objectID & 0xFF) | #define MAKECHUNKID(_vendorID, _objectID) ((_vendorID & 0xFFFFFF) << 8) | (_objectID & 0xFF) | ||
#define GETVENDORID(_chunkID) ((_chunkID >> 8) & 0xFFFFFF) | #define GETVENDORID(_chunkID) ((_chunkID >> 8) & 0xFFFFFF) | ||
#define GETOBJECTID(_chunkID) (_chunkID & 0xFF) | #define GETOBJECTID(_chunkID) (_chunkID & 0xFF) | ||
− | + | </source> | |
So for example; Rockstar's Frame Node Name plugin has the chunk ID 0x0253F2FE. Putting this chunk ID through the above "GET" macros results in Rockstar's vendor ID being 0x253F2 (which is used in all their "custom" sections) and the object ID being 0xFE. | So for example; Rockstar's Frame Node Name plugin has the chunk ID 0x0253F2FE. Putting this chunk ID through the above "GET" macros results in Rockstar's vendor ID being 0x253F2 (which is used in all their "custom" sections) and the object ID being 0xFE. | ||
Latest revision as of 10:53, 30 October 2010
How Chunk IDs work
Chunk/Section IDs contain both the vendor ID and object ID. RenderWare contains a macro in it's C headers to generate a Chunk ID which is used for internal use and by identifying the chunk in a binary file. There are another 2 macros for getting the vendor and object IDs from a chunk ID. The macros are something similar to the following:
#define MAKECHUNKID(_vendorID, _objectID) ((_vendorID & 0xFFFFFF) << 8) | (_objectID & 0xFF)
#define GETVENDORID(_chunkID) ((_chunkID >> 8) & 0xFFFFFF)
#define GETOBJECTID(_chunkID) (_chunkID & 0xFF)
So for example; Rockstar's Frame Node Name plugin has the chunk ID 0x0253F2FE. Putting this chunk ID through the above "GET" macros results in Rockstar's vendor ID being 0x253F2 (which is used in all their "custom" sections) and the object ID being 0xFE.
Criterion have 8 vendor IDs (0x000000-0x000008) declared in their RenderWare headers. With regards to GTA, only 3 of them matter; Core is 0x000000, Toolkits are 0x000001 and the World plugin is 0x000005 (this is evident from the chunk IDs listed on the page).
--ModelingMan 21:43, 13 March 2009 (UTC)