View Single Post
Old 27-08-10, 13:47   #1
Tonttu
Student
 
Tonttu's Avatar
 
Join Date: May 2006
Posts: 130
Default TPFcreate

TPFcreate 1.1

Quote:
TPFcreate 1.1 written by Tonttu
based on MiniZip 1.01, demo of zLib + Zip package written by Gilles Vollant
more info at http://www.winimage.com/zLibDll/unzip.html

Usage : TPFcreate [-o] [-c "name"] [-i "info"] [-0 to -9] file.tpf [files_to_add]

-o Overwrite existing file.tpf
-c Creator name ["TPFcreate"]
-i Info text [""] (| = new line)
-0 Store only
-1 Compress faster
-9 Compress better
Use TexMod to log the textures as you normally would.
Now instead of using TexMod's package build mode rename the *.log created by texmod to "texmod.def"
Open the texmod.def in your favorite text editor and remove the full path to textures
Example:
change this
Code:
0x10F14463|D:\TexMod\Textures\MASSEFFECT2.EXE_0x10F14463.dds
to this
Code:
0x10F14463|MASSEFFECT2.EXE_0x10F14463.dds
Afterwards use this tool to create a *.tpf

Example:
you logged the textures as *.dds and want to use the best/slowest compression method
you want the creator to be "Someone" and info text to read "Something"
Code:
TPFcreate -9 -c "Someone" -i "Something" tpf_name.tpf *.dds texmod.def
Multiline info text
Code:
TPFcreate -9 -c "Someone" -i "This is|a multiline|info text" filename.tpf *.dds texmod.def
Compression ratio is slightly better than what TexMod uses.
You won't see much difference when using *.png textures as PNG already uses deflate for compression.
However if you use *.bmp textures then you should see a bigger difference between a *.tpf made with TexMod and one made with TPFcreate

Source code is included in the archive

Changelog
1.1
  • Add support for multiline info text (use pipe as line break)
  • New unified Makefile instead of one for Windows and another for Linux

Last edited by Tonttu; 06-11-11 at 10:27. Reason: updated link
Tonttu is offline   Reply With Quote