WTD
Материал из GTAModding.ru
Версия от 14:55, 2 августа 2010; Chipsman (обсуждение | вклад)
Версия объекта: |
| ||
---|---|---|---|
Расширение файла: |
| ||
Содержащийся объект: |
|
WTD - Windows Texture Dictionary
Формат ПК-текстур GTA 4. Работа с ними поддерживается в OpenIV, SparkIV и G-Texture.
На Xbox360 текстуры имели формат XTD - XENON Texture Dictionary. Просмотр был реализован в ранних версиях OpenIV и SparkIV, но не поддерживается публичными вариантами.
Вывод структуры в 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: wtd.bt // Version: 0.1 // Author: Dageron // Site: www.GTAModding.ru //-------------------------------------- // Based on: //http://public.sannybuilder.com/GTA4/rsc_en.txt //http://gtaivtools.googlecode.com/ //-------------------------------------- //Simple function to get offset typedef int GetOffset <read=GetOffsetRead>; string GetOffsetRead(GetOffset f) { string s; if (f == 0) s="0"; else if (f >> 28 != 5) s="0"; //wrong offset else SPrintf( s, "%i", f & 0x0fffffff); return s; } //-------------------------------------- struct GTA_Windows_Texture { LittleEndian(); struct pgDictionary { SetBackColor( cLtGreen ); int VTable; GetOffset BlockMapOffset; int ParentDictionary; // always 0 in file int UsageCount; // always 1 in file GetOffset HashTableOffset; short TextureCount; short TextureCount2; GetOffset TextureListOffset; short TextureCount3; short TextureCount4; FSeek(BlockMapOffset & 0x0fffffff); SetBackColor( cLtGray ); struct { int zero; ` byte padding[524]; } BlockMap; }Header; struct { FSeek(Header.HashTableOffset & 0x0fffffff); SetBackColor( cLtGreen ); local int i; local int total = 16-(Header.TextureCount*4%16); for(i = 0; i < Header.TextureCount; i++ ) { uint Hash; } SetBackColor( cLtGray ); byte padding1[total]; SetBackColor( cLtGreen ); }HashTable; struct { FSeek(Header.TextureListOffset & 0x0fffffff); SetBackColor( cLtGreen ); local int i; local int total = 16-(Header.TextureCount*4%16); for(i = 0; i < Header.TextureCount; i++ ) { GetOffset InfoOffsets; } SetBackColor( cLtGray ); byte padding1[total]; SetBackColor( cLtGreen ); }TextureListTable; struct { local int i; for(i = 0; i < Header.TextureCount; i++ ) { FSeek(TextureListTable.InfoOffsets[i]& 0x0fffffff); SetBackColor(cLtYellow); struct { uint VTable; GetOffset BlockMapOffset; uint Unknown1; uint Unknown2; uint Unknown3; GetOffset m_pszTextureName; //pointer to texture filename uint Unknown4; ushort m_wWidth; //texture width (edge length for cube texture) ushort m_wHeight; SetBackColor(cLtGreen); //texture height byte m_pixelFormat[4]; SetBackColor(cLtYellow); //texture pixel format short m_BytesPerLine; //number of bytes per pixel line byte m_TextureType; //texture type: 1 - cube texture, 2 - volume texture, other - regular texture byte m_nbLevels; //number of levels in the texture float UnknownFloat1; float UnknownFloat2; float UnknownFloat3; float UnknownFloat4; float UnknownFloat5; float UnknownFloat6; GetOffset m_pPrev; //PrevTextureInfoOffset GetOffset m_pNext; //NextTextureInfoOffset int RawDataOffset; uint Unknown6; }TextureInfo; } for(i = 0; i < Header.TextureCount; i++ ) { FSeek(TextureInfo[i].m_pszTextureName& 0x0fffffff); SetBackColor( cLtGreen ); struct { string Name; SetBackColor(cLtYellow); }TextureName; } }grcTexturePC; }dictionary;