WDR — различия между версиями
Материал из GTAModding.ru
Chipsman (обсуждение | вклад) (Новая: '''WDR''' - '''W'''indows '''Dr'''awable Формат ПК-моделей GTA 4. На Xbox360 модели имеют формат '''XDR''' - '''X'''ENON '''Dr'''awable. Прос...) |
Dageron (обсуждение | вклад) |
||
Строка 5: | Строка 5: | ||
На Xbox360 модели имеют формат '''XDR''' - '''X'''ENON '''Dr'''awable. Просмотр и редактирование консольных форматов невозможен. | На Xbox360 модели имеют формат '''XDR''' - '''X'''ENON '''Dr'''awable. Просмотр и редактирование консольных форматов невозможен. | ||
+ | <div class="NavFrame collapsed"><div class="NavHead">'''Вывод структуры в 010 Editor'''</div> | ||
+ | <div class="NavContent"> | ||
+ | <source lang="template010"> | ||
+ | //-------------------------------------- | ||
+ | //--- 010 Editor v3.0.5 Binary Template | ||
+ | // File: wdr.bt | ||
+ | // Version: 0.1 | ||
+ | // Author: Dageron | ||
+ | // Site: www.GTAModding.ru | ||
+ | //-------------------------------------- | ||
+ | struct pgPtr { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | byte DataStart; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct pgPtr_OffsetMap { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | DWORD OffsetMap[132]; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct PointerCollection { | ||
+ | pgPtr OffsetToThePointers; | ||
+ | short NumberOfPointers; | ||
+ | short unknown; | ||
+ | }; | ||
+ | |||
+ | |||
+ | struct VertexBuffer { // BlockSize 0x40 | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | LONG VTable;// 0xD8BA6B00 | ||
+ | short VertexCount; | ||
+ | short Unknown1;// Usually 0 | ||
+ | pgPtr DataOffsetToVertexData; | ||
+ | LONG VertexStride;// 36 without normal map, 52 with normal map | ||
+ | pgPtr VertexDeclarationOffset; | ||
+ | LONG Unknown2;// Usually 0 | ||
+ | pgPtr DataOffsetToVertexData1;// Again | ||
+ | LONG Unknown3;// Usually 0 | ||
+ | byte Padding[32]; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct IndexBuffer{ // BlockSize 0x40 | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | LONG VTable;// 0x70B86B00 | ||
+ | LONG IndexCount; | ||
+ | pgPtr DataOffsetToIndexData; | ||
+ | LONG Unknown1;// Usually 0 | ||
+ | byte Padding[32]; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct Geometry { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | LONG VTable;// 0xF4486B00 | ||
+ | LONG Unknown1;// Usually 0 | ||
+ | LONG Unknown2;// Usually 0 | ||
+ | VertexBuffer m_VertexBuffer; | ||
+ | LONG Unknown3;// Usually 0 | ||
+ | LONG Unknown4;// Usually 0 | ||
+ | LONG Unknown5;// Usually 0 | ||
+ | IndexBuffer m_IndexBuffer; | ||
+ | LONG Unknown6;// Usually 0 | ||
+ | LONG Unknown7;// Usually 0 | ||
+ | LONG Unknown8;// Usually 0 | ||
+ | LONG IndexCount; | ||
+ | LONG FaceCount; | ||
+ | short VertexCount; | ||
+ | short PrimitiveType; | ||
+ | LONG Unknown9;// Usually 0 | ||
+ | short VertexStride;// 36 without normal map, 52 with normal map | ||
+ | short Unknown10;// Usually 0 | ||
+ | LONG Unknown11;// Usually 0 | ||
+ | LONG Unknown12;// Usually 0 | ||
+ | LONG Unknown13;// Usually 0 | ||
+ | byte Padding[4]; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct PtrCollectionGeometrys { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | short NumberOfPointers; | ||
+ | short unknown; | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | Geometry m_Geometry[NumberOfPointers] <optimize=true>; | ||
+ | FSeek(doffset); | ||
+ | }; | ||
+ | |||
+ | |||
+ | struct pgPtr_Model { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | LONG VTable;// 0x34026B00 | ||
+ | PtrCollectionGeometrys m_PtrCollectionGeometrys; | ||
+ | pgPtr SimpleArrayVector4;// Unknown Vectors | ||
+ | pgPtr SimpleArrayInteger;// Material Mappings | ||
+ | short Unknown1;// Usually 0 | ||
+ | short Unknown2; | ||
+ | short Unknown3; | ||
+ | short GeometryCount; | ||
+ | byte Padding[8]; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct pgPtr_ModelCollection { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | int offset1:28; | ||
+ | int type1:4; | ||
+ | short NumberOfPointers; | ||
+ | short Unknown; | ||
+ | byte Padding[8]; | ||
+ | { | ||
+ | if (type1 == 5) { // RAM location | ||
+ | local uint doffset1 = FTell(); | ||
+ | FSeek(offset1); | ||
+ | pgPtr_Model m_pgPtr_Model[NumberOfPointers]<optimize=true>; | ||
+ | FSeek(doffset1); | ||
+ | } | ||
+ | } | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct SimpleCollection { | ||
+ | pgPtr OffsetToTheData; | ||
+ | short DataCount; | ||
+ | short DataSize; | ||
+ | }; | ||
+ | |||
+ | struct pgPtr_String{ | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | string data; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct ShaderFX { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | LONG VTable;// 0x3C226B00 | ||
+ | LONG BlockMapAdress; | ||
+ | short Unknown1; | ||
+ | byte Unknown2; | ||
+ | byte Unknown3; | ||
+ | LONG Unknown4; | ||
+ | LONG Unknown5; | ||
+ | pgPtr ShaderParamsOffsetsOffset; | ||
+ | LONG Unknown6; | ||
+ | LONG ShaderParamCount; | ||
+ | LONG Unknown8; | ||
+ | pgPtr ShaderParamTypesOffset; | ||
+ | LONG UnknownHash; | ||
+ | LONG Unknown9; | ||
+ | LONG Unknown10; | ||
+ | pgPtr ShaderParamNameOffset; | ||
+ | LONG Unknown11; | ||
+ | LONG Unknown12; | ||
+ | LONG Unknown13; | ||
+ | pgPtr_String ShaderNamePointer; // Pointer to null terminated String | ||
+ | pgPtr_String ShaderSPSPointer; // Pointer to null terminated String | ||
+ | LONG Unknown14; | ||
+ | LONG Unknown15; | ||
+ | LONG Unknown16; | ||
+ | LONG Unknown17; | ||
+ | } | ||
+ | FSeek(doffset); | ||
+ | }; | ||
+ | |||
+ | struct PtrPointerCollectionShaderFXObjects { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | short NumberOfPointers; | ||
+ | short unknown; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | ShaderFX m_ShaderFX[NumberOfPointers]<optimize=true>; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | struct ShaderGroupData { | ||
+ | int offset:28; | ||
+ | int type:4; | ||
+ | if (type == 5) { // RAM location | ||
+ | local uint doffset = FTell(); | ||
+ | FSeek(offset); | ||
+ | LONG VTable;// 0x44166B00 | ||
+ | pgPtr TextureDictionairy;// 0 = no Embedded textures | ||
+ | PtrPointerCollectionShaderFXObjects m_PointerCollectionToShaderFXobjects; | ||
+ | int zeros[12]; | ||
+ | SimpleCollection VertexDeclarationUsageFlags; | ||
+ | SimpleCollection UnknownInts; | ||
+ | FSeek(doffset); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | |||
+ | struct gtaDrawable { | ||
+ | int VTable; | ||
+ | pgPtr_OffsetMap m_pgPtr_OffsetMap; | ||
+ | ShaderGroupData m_ShaderGroupData; | ||
+ | pgPtr SkeletonData; | ||
+ | float CenterX; | ||
+ | float CenterY; | ||
+ | float CenterZ; | ||
+ | float CenterW; | ||
+ | float BoundsMinX; | ||
+ | float BoundsMinY; | ||
+ | float BoundsMinZ; | ||
+ | float BoundsMinW; | ||
+ | float BoundsMaxX; | ||
+ | float BoundsMaxY; | ||
+ | float BoundsMaxZ; | ||
+ | float BoundsMaxW; | ||
+ | pgPtr_ModelCollection m_pgPtr_ModelCollection;//0=Non existing | ||
+ | pgPtr PointerLODmodels1;//0=Non existing | ||
+ | pgPtr PointerLODmodels2;//0=Non existing | ||
+ | pgPtr PointerLODmodels3;//0=Non existing | ||
+ | float MaxVectorX;//Usually 9999.0) | ||
+ | float MaxVectorY;//Usually 9999.0) | ||
+ | float MaxVectorZ;//Usually 9999.0) | ||
+ | float MaxVectorW;//Usually 9999.0) | ||
+ | int ObjectCount; | ||
+ | int Unknown1;//Usually 0xFFFFFFFF | ||
+ | int Unknown2;//Usually 0xFFFFFFFF | ||
+ | int Unknown3;//Usually 0xFFFFFFFF | ||
+ | int Unknown4; | ||
+ | byte Unknown[20];//Usually all zeros | ||
+ | byte UnassignedData[8];//0xCDCDCDCDCDCDCDCD | ||
+ | byte EndOfHeader[4];//Usually 0x00000000 | ||
+ | }; | ||
+ | |||
+ | |||
+ | |||
+ | LittleEndian(); | ||
+ | |||
+ | |||
+ | struct | ||
+ | { | ||
+ | gtaDrawable m_gtaDrawable; | ||
+ | } wdr; | ||
+ | |||
+ | </source> | ||
+ | </div></div> | ||
{{stub}} | {{stub}} | ||
[[Категория:GTA 4]] [[Категория: Форматы файлов]] | [[Категория:GTA 4]] [[Категория: Форматы файлов]] |
Версия 13:49, 13 августа 2009
WDR - Windows Drawable
Формат ПК-моделей GTA 4.
На Xbox360 модели имеют формат XDR - XENON Drawable. Просмотр и редактирование консольных форматов невозможен.
Вывод структуры в 010 Editor
Указан неподдерживаемый язык.
Вы должны указать язык следующим образом: <source lang="html4strict">...</source>
Поддерживаемые языки:
4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, scm, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic
//-------------------------------------- //--- 010 Editor v3.0.5 Binary Template // File: wdr.bt // Version: 0.1 // Author: Dageron // Site: www.GTAModding.ru //-------------------------------------- struct pgPtr { int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); byte DataStart; FSeek(doffset); } }; struct pgPtr_OffsetMap { int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); DWORD OffsetMap[132]; FSeek(doffset); } }; struct PointerCollection { pgPtr OffsetToThePointers; short NumberOfPointers; short unknown; }; struct VertexBuffer { // BlockSize 0x40 int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); LONG VTable;// 0xD8BA6B00 short VertexCount; short Unknown1;// Usually 0 pgPtr DataOffsetToVertexData; LONG VertexStride;// 36 without normal map, 52 with normal map pgPtr VertexDeclarationOffset; LONG Unknown2;// Usually 0 pgPtr DataOffsetToVertexData1;// Again LONG Unknown3;// Usually 0 byte Padding[32]; FSeek(doffset); } }; struct IndexBuffer{ // BlockSize 0x40 int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); LONG VTable;// 0x70B86B00 LONG IndexCount; pgPtr DataOffsetToIndexData; LONG Unknown1;// Usually 0 byte Padding[32]; FSeek(doffset); } }; struct Geometry { int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); LONG VTable;// 0xF4486B00 LONG Unknown1;// Usually 0 LONG Unknown2;// Usually 0 VertexBuffer m_VertexBuffer; LONG Unknown3;// Usually 0 LONG Unknown4;// Usually 0 LONG Unknown5;// Usually 0 IndexBuffer m_IndexBuffer; LONG Unknown6;// Usually 0 LONG Unknown7;// Usually 0 LONG Unknown8;// Usually 0 LONG IndexCount; LONG FaceCount; short VertexCount; short PrimitiveType; LONG Unknown9;// Usually 0 short VertexStride;// 36 without normal map, 52 with normal map short Unknown10;// Usually 0 LONG Unknown11;// Usually 0 LONG Unknown12;// Usually 0 LONG Unknown13;// Usually 0 byte Padding[4]; FSeek(doffset); } }; struct PtrCollectionGeometrys { int offset:28; int type:4; short NumberOfPointers; short unknown; local uint doffset = FTell(); FSeek(offset); Geometry m_Geometry[NumberOfPointers] <optimize=true>; FSeek(doffset); }; struct pgPtr_Model { int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); LONG VTable;// 0x34026B00 PtrCollectionGeometrys m_PtrCollectionGeometrys; pgPtr SimpleArrayVector4;// Unknown Vectors pgPtr SimpleArrayInteger;// Material Mappings short Unknown1;// Usually 0 short Unknown2; short Unknown3; short GeometryCount; byte Padding[8]; FSeek(doffset); } }; struct pgPtr_ModelCollection { int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); int offset1:28; int type1:4; short NumberOfPointers; short Unknown; byte Padding[8]; { if (type1 == 5) { // RAM location local uint doffset1 = FTell(); FSeek(offset1); pgPtr_Model m_pgPtr_Model[NumberOfPointers]<optimize=true>; FSeek(doffset1); } } FSeek(doffset); } }; struct SimpleCollection { pgPtr OffsetToTheData; short DataCount; short DataSize; }; struct pgPtr_String{ int offset:28; int type:4; if (type == 5) { local uint doffset = FTell(); FSeek(offset); string data; FSeek(doffset); } }; struct ShaderFX { int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); LONG VTable;// 0x3C226B00 LONG BlockMapAdress; short Unknown1; byte Unknown2; byte Unknown3; LONG Unknown4; LONG Unknown5; pgPtr ShaderParamsOffsetsOffset; LONG Unknown6; LONG ShaderParamCount; LONG Unknown8; pgPtr ShaderParamTypesOffset; LONG UnknownHash; LONG Unknown9; LONG Unknown10; pgPtr ShaderParamNameOffset; LONG Unknown11; LONG Unknown12; LONG Unknown13; pgPtr_String ShaderNamePointer; // Pointer to null terminated String pgPtr_String ShaderSPSPointer; // Pointer to null terminated String LONG Unknown14; LONG Unknown15; LONG Unknown16; LONG Unknown17; } FSeek(doffset); }; struct PtrPointerCollectionShaderFXObjects { int offset:28; int type:4; short NumberOfPointers; short unknown; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); ShaderFX m_ShaderFX[NumberOfPointers]<optimize=true>; FSeek(doffset); } }; struct ShaderGroupData { int offset:28; int type:4; if (type == 5) { // RAM location local uint doffset = FTell(); FSeek(offset); LONG VTable;// 0x44166B00 pgPtr TextureDictionairy;// 0 = no Embedded textures PtrPointerCollectionShaderFXObjects m_PointerCollectionToShaderFXobjects; int zeros[12]; SimpleCollection VertexDeclarationUsageFlags; SimpleCollection UnknownInts; FSeek(doffset); } }; struct gtaDrawable { int VTable; pgPtr_OffsetMap m_pgPtr_OffsetMap; ShaderGroupData m_ShaderGroupData; pgPtr SkeletonData; float CenterX; float CenterY; float CenterZ; float CenterW; float BoundsMinX; float BoundsMinY; float BoundsMinZ; float BoundsMinW; float BoundsMaxX; float BoundsMaxY; float BoundsMaxZ; float BoundsMaxW; pgPtr_ModelCollection m_pgPtr_ModelCollection;//0=Non existing pgPtr PointerLODmodels1;//0=Non existing pgPtr PointerLODmodels2;//0=Non existing pgPtr PointerLODmodels3;//0=Non existing float MaxVectorX;//Usually 9999.0) float MaxVectorY;//Usually 9999.0) float MaxVectorZ;//Usually 9999.0) float MaxVectorW;//Usually 9999.0) int ObjectCount; int Unknown1;//Usually 0xFFFFFFFF int Unknown2;//Usually 0xFFFFFFFF int Unknown3;//Usually 0xFFFFFFFF int Unknown4; byte Unknown[20];//Usually all zeros byte UnassignedData[8];//0xCDCDCDCDCDCDCDCD byte EndOfHeader[4];//Usually 0x00000000 }; LittleEndian(); struct { gtaDrawable m_gtaDrawable; } wdr;