Difference between revisions of "VTable"
Prince-Link (talk | contribs) (New page: Possible Values of VTable {|{{Prettytable}} !Name !Decimal !Hex !Description |- |DrawableModel|| 6902356|| 0x54526900 || WDR Header |- |DrawableDictionary|| 6902692|| 0xA4536900 || WDD H...) |
m |
||
(19 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Stub}} | |
+ | At its simplest, a '''VTable''' is an array of pointers to functions. VTables are sometimes referred to as VFTables (or Virtual Function Tables) or VMTs (Virtual Method Tables). Any class/struct object with virtual methods contains an internal pointer to a VTable. The VTable layout is implementation dependent, and may frequently contain type metadata (to support DynamicCast) and correction factors needed to support MultipleInheritance. | ||
+ | |||
+ | GTA 4's resource data files often contain structures that are a direct memory dump of a complete class/structure in memory. These classes are sometimes virtual classes and often contain a VTable pointer in them. When the data is loaded into memory, the data is relocated and VTable pointer is corrected to the proper one by the game. It is important to note that the VTable pointer value will change depending on the exact build/version of the resource compiler used. They are a helpful indicator to identify data structures in files. However, that's all they are -- indicators. | ||
+ | |||
+ | ==Documentation== | ||
+ | |||
+ | The following VTable pointer are valid for files generated by the GTA 4 resource compilers: | ||
{|{{Prettytable}} | {|{{Prettytable}} | ||
− | !Name | + | !Class Name |
− | ! | + | !Value (Hex) |
− | |||
!Description | !Description | ||
|- | |- | ||
− | | | + | |gtaDrawable|| 0x695254 || Drawable objects (WDR file) |
+ | |- | ||
+ | |gtaFragType|| 0x695238 || Frag objects (WFT file) | ||
+ | |- | ||
+ | |rage::pgDictionary<gtaDrawable>|| 0x6953A4 || Collection of drawable objects (WDD file) | ||
+ | |- | ||
+ | |rage::pgDictionary<rage::grcTexturePC>|| 0x695384 || Collection of texture objects (WTD file) | ||
|- | |- | ||
− | | | + | |rage::pgDictionary<rage::grcTexture>|| 0x6A08A0 || Collection of texture objects (used for WDR texture references) |
|- | |- | ||
− | | | + | |rage::fragDrawable|| 0x6A32DC || Drawables in Frag objects (WFT drawable) |
|- | |- | ||
− | | | + | |rage::grmShaderGroup|| 0x6B1644 || Collection of shader definitions |
|- | |- | ||
− | | | + | |rage::grmShaderFx|| 0x6B223C|| Shader definition |
|- | |- | ||
− | | | + | |rage::grmModel|| 0x6B0234|| Drawable model |
|- | |- | ||
− | | | + | |rage::grmGeometry|| 0x6B48F4|| Drawable geometry |
+ | |- | ||
+ | |rage::grcVertexBufferD3D|| 0x6BBAD8|| Vertex buffer | ||
+ | |- | ||
+ | |rage::grcIndexBufferD3D|| 0x6BB870|| Index buffer | ||
+ | |- | ||
+ | |rage::grcTexture|| 0x6B675C|| Texture definition (for externally defined textures) | ||
+ | |- | ||
+ | |rage::grcTexturePC|| 0x6B1D94|| Texture definition | ||
+ | |- | ||
+ | |rage::phArchetypeDamp|| 0x69A5BC|| | ||
+ | |- | ||
+ | |rage::phBoundComposite|| 0x69BBEC|| Collection of bounding definitions | ||
+ | |- | ||
+ | |rage::phBoundBox|| 0x69D56C|| Bounding box definition | ||
+ | |- | ||
+ | |rage::phBoundGeometry|| 0x69AAF4|| Bounding geometry definition | ||
+ | |- | ||
+ | |rage::phBoundCurvedGeometry|| 0x69B41C|| Bounding curved geometry definition | ||
+ | |- | ||
+ | |rage::evtSet|| 0x6A4678|| | ||
|- | |- | ||
|} | |} | ||
+ | {{Incomplete}} | ||
+ | |||
+ | == External links == | ||
− | + | * [[wikipedia:Virtual_table|Virtual table description at wikipedia]] | |
{{GTA4-navi}} | {{GTA4-navi}} | ||
+ | [[Category:Documentation|Documentation]] |
Latest revision as of 08:11, 24 September 2010
At its simplest, a VTable is an array of pointers to functions. VTables are sometimes referred to as VFTables (or Virtual Function Tables) or VMTs (Virtual Method Tables). Any class/struct object with virtual methods contains an internal pointer to a VTable. The VTable layout is implementation dependent, and may frequently contain type metadata (to support DynamicCast) and correction factors needed to support MultipleInheritance.
GTA 4's resource data files often contain structures that are a direct memory dump of a complete class/structure in memory. These classes are sometimes virtual classes and often contain a VTable pointer in them. When the data is loaded into memory, the data is relocated and VTable pointer is corrected to the proper one by the game. It is important to note that the VTable pointer value will change depending on the exact build/version of the resource compiler used. They are a helpful indicator to identify data structures in files. However, that's all they are -- indicators.
Documentation
The following VTable pointer are valid for files generated by the GTA 4 resource compilers:
Class Name | Value (Hex) | Description |
---|---|---|
gtaDrawable | 0x695254 | Drawable objects (WDR file) |
gtaFragType | 0x695238 | Frag objects (WFT file) |
rage::pgDictionary<gtaDrawable> | 0x6953A4 | Collection of drawable objects (WDD file) |
rage::pgDictionary<rage::grcTexturePC> | 0x695384 | Collection of texture objects (WTD file) |
rage::pgDictionary<rage::grcTexture> | 0x6A08A0 | Collection of texture objects (used for WDR texture references) |
rage::fragDrawable | 0x6A32DC | Drawables in Frag objects (WFT drawable) |
rage::grmShaderGroup | 0x6B1644 | Collection of shader definitions |
rage::grmShaderFx | 0x6B223C | Shader definition |
rage::grmModel | 0x6B0234 | Drawable model |
rage::grmGeometry | 0x6B48F4 | Drawable geometry |
rage::grcVertexBufferD3D | 0x6BBAD8 | Vertex buffer |
rage::grcIndexBufferD3D | 0x6BB870 | Index buffer |
rage::grcTexture | 0x6B675C | Texture definition (for externally defined textures) |
rage::grcTexturePC | 0x6B1D94 | Texture definition |
rage::phArchetypeDamp | 0x69A5BC | |
rage::phBoundComposite | 0x69BBEC | Collection of bounding definitions |
rage::phBoundBox | 0x69D56C | Bounding box definition |
rage::phBoundGeometry | 0x69AAF4 | Bounding geometry definition |
rage::phBoundCurvedGeometry | 0x69B41C | Bounding curved geometry definition |
rage::evtSet | 0x6A4678 |
This section is incomplete. You can help by fixing and expanding it.
External links
Grand Theft Auto IV | |
---|---|
File Formats | .dat • .gxt • .ide • .img • .ipl • .nod • .sco • .rpf • .rrr • .wad • .wbd/.wbn • .wdd • .wdr • .wft • .whm • .wpl • .wtd |
Documentation | Audio • Bink Video • Cryptography • Cutscenes • GXT Text • Image listing • Keycodes • Map Listing • Native functions • Paths • Radar Blips • Radio Stations • Saves • Scenarios • VTable • Weapons |
Tools | ASI Loader • ENBSeries • G-Texture • GIMS IV • Ingame WPL Editor • IV Needle • OpenIV • SparkIV • XLiveLess • WPL Manager • X Mod Installer Alice • C++ Script Hook • .NET Script Hook • Scocl |
Tutorials | Importing Textures with OpenIV • Importing Textures with SparkIV |
Modifications | GTA Connected • Gostown IV • Four Multiplayer • IV Multiplayer • CitizenMP:IV Reloaded |
Useful links | Community portal • Discussion forums • Modding forums • Mods on GTAGarage.com |