TSunmix 0.2
Public Member Functions
MixFile Class Reference

mix file controller More...

#include <mix_file.h>

List of all members.

Public Member Functions

 MixFile (const MixFile &orig)
bool open (const std::string path)
 open mix archive
bool extractFile (unsigned int fileID, std::string outPath)
 extract file from mix archive
bool extractFile (std::string fileName, std::string outPath)
 extract file from mix archive
bool extractAll (std::string outPath=".", bool withFileNames=true)
 extract all files from the archive
bool checkFileName (std::string fname)
 chcecks, if file is present in the archive
std::string printFileList (int flags)
 mix archive header
unsigned int getID (t_game game, std::string name)
 count CRC ID from filename
std::vector< std::string > getFileNames ()
std::vector< t_mix_index_entrygetFileIndex ()

Detailed Description

mix file controller

Some parts of code and code are taken from XCC mix file specification.

See also:
TS mix file format specification (http://xhp.xwis.net/documents/MIX_Format.html)

Member Function Documentation

bool MixFile::checkFileName ( std::string  fname)

chcecks, if file is present in the archive

Parameters:
fnamefile name
Returns:
true if present
bool MixFile::extractAll ( std::string  outPath = ".",
bool  withFileNames = true 
)

extract all files from the archive

Parameters:
outPathoutput directory
withFileNamestry to get file names of the content
Returns:
true if extraction successful
bool MixFile::extractFile ( unsigned int  fileID,
std::string  outPath 
)

extract file from mix archive

Parameters:
fileIDCRC ID of file
outPathextracted file path
Return values:
truefile extracted
falsefile not present in the archive
bool MixFile::extractFile ( std::string  fileName,
std::string  outPath 
)

extract file from mix archive

Parameters:
fileNamename of file
outPathextracted file path
Return values:
truefile extracted
falsefile not present in the archive
unsigned int MixFile::getID ( t_game  game,
std::string  name 
)

count CRC ID from filename

Parameters:
gamet_game game selection
namefilename
Returns:
CRC ID of file
bool MixFile::open ( const std::string  path)

open mix archive

Parameters:
pathmix file path
Return values:
truefile opened
falsefile not found
string MixFile::printFileList ( int  flags = 1)

mix archive header

Prints header in following format: file CRC (hex) || file offset (dec) || file size (dec)

Parameters:
flagsprint settings
Returns:
file text list

The documentation for this class was generated from the following files:
 All Classes Functions