Added prerelease version of libvitaboy 1.0.1

This commit is contained in:
Fatbag 2012-03-10 14:56:32 -06:00
parent 432d12397c
commit a4a7b82bb7
10 changed files with 281 additions and 96 deletions

View file

@ -30,7 +30,7 @@ int main(int argc, char *argv[]){
unsigned chunkcount, chunk = 0;
IFFFile * IFFFileInfo;
IFFChunkNode * ChunkNode;
if(argc == 1 || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){
printf("Usage: iffexport [-f] infile OutDirectory\n"
"Export the resources of an EA IFF file.\n"
@ -41,7 +41,7 @@ int main(int argc, char *argv[]){
"Home page: <http://www.niotso.org/>\n");
return 0;
}
if(argc >= 4 && !strcmp(argv[1], "-f")){
overwrite++;
InFile = argv[2];
@ -79,7 +79,7 @@ int main(int argc, char *argv[]){
return -1;
}
CloseHandle(hFile);
/****
** Load header information
*/
@ -102,10 +102,10 @@ int main(int argc, char *argv[]){
printf("%sChunk data is corrupt.", "iffexport: error: ");
return -1;
}
chunkcount = IFFFileInfo->ChunkCount;
printf("This IFF file contains %u chunks.\n\nExporting\n", chunkcount);
/****
** Extract each entry
*/
@ -137,6 +137,6 @@ int main(int argc, char *argv[]){
WriteFile(hFile, ChunkNode->Chunk.Data, ChunkNode->Chunk.Size-76, &bytestransferred, NULL);
CloseHandle(hFile);
}
return 0;
}