mirror of
https://github.com/simtactics/niotso.git
synced 2025-07-04 21:50:37 -04:00
Made the iffexport utility (design based on libfar), added in an HTML5 z-buffer renderer, and made tags for libfar 1.0.0 and libvitaboy 1.0.0.
This commit is contained in:
parent
f23bcd7b4d
commit
432d12397c
15 changed files with 671 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
project(FileHandler)
|
||||
|
||||
add_subdirectory(iff)
|
||||
add_subdirectory(libexpat)
|
||||
add_subdirectory(libfar)
|
||||
add_subdirectory(libjpeg-turbo)
|
||||
|
|
10
Libraries/FileHandler/iff/CMakeLists.txt
Normal file
10
Libraries/FileHandler/iff/CMakeLists.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
project(iff)
|
||||
|
||||
set(IFF_SOURCES
|
||||
chunks.c
|
||||
iff.c
|
||||
iffexport.c
|
||||
)
|
||||
|
||||
add_executable(iffexport ${IFF_SOURCES})
|
24
Libraries/FileHandler/iff/chunks.c
Normal file
24
Libraries/FileHandler/iff/chunks.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
chunks.c - Copyright (c) 2012 Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "iff.h"
|
||||
|
||||
int iff_read_rsmp(IFFChunk * ChunkInfo, const uint8_t * Buffer, unsigned MaxChunkSize, unsigned IFFSize){
|
||||
return 1;
|
||||
}
|
150
Libraries/FileHandler/iff/iff.c
Normal file
150
Libraries/FileHandler/iff/iff.c
Normal file
|
@ -0,0 +1,150 @@
|
|||
/*
|
||||
iff.c - Copyright (c) 2012 Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "iff.h"
|
||||
|
||||
#ifndef __inline
|
||||
#define __inline
|
||||
#endif
|
||||
#ifndef __restrict
|
||||
#define __restrict
|
||||
#endif
|
||||
|
||||
IFFFile * iff_create()
|
||||
{
|
||||
IFFFile *ptr = malloc(sizeof(IFFFile));
|
||||
if(ptr == NULL) return NULL;
|
||||
|
||||
memset(ptr, 0, sizeof(IFFFile));
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
int iff_read_header(IFFFile * IFFFileInfo, const uint8_t * Buffer, unsigned FileSize)
|
||||
{
|
||||
unsigned offset;
|
||||
|
||||
if(!FileSize) FileSize = ~0;
|
||||
else if(FileSize < 64)
|
||||
return 0;
|
||||
|
||||
if(memcmp(Buffer, Header_IFF, 60))
|
||||
return 0;
|
||||
memcpy(IFFFileInfo->Header, Buffer, 60);
|
||||
|
||||
offset = read_uint32be(Buffer+60);
|
||||
if(offset > FileSize - 28)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
IFFChunkNode * iff_add_chunk(IFFFile * IFFFileInfo, int Position)
|
||||
{
|
||||
IFFChunkNode *ptr = malloc(sizeof(IFFChunkNode)), *node;
|
||||
if(ptr == NULL) return NULL;
|
||||
memset(ptr, 0, sizeof(IFFChunkNode));
|
||||
if(IFFFileInfo == NULL) return ptr;
|
||||
|
||||
if(Position >= 0){
|
||||
node = IFFFileInfo->FirstChunk;
|
||||
|
||||
if(node == NULL){
|
||||
IFFFileInfo->FirstChunk = ptr;
|
||||
IFFFileInfo->LastChunk = ptr;
|
||||
}else{
|
||||
/* Find the node we will take the place of */
|
||||
while(Position-- && node->NextChunk != NULL)
|
||||
node = node->NextChunk;
|
||||
|
||||
if(node->PrevChunk == NULL)
|
||||
IFFFileInfo->FirstChunk = ptr;
|
||||
|
||||
/* Shift this node and all nodes after it above us */
|
||||
ptr->PrevChunk = node->PrevChunk;
|
||||
ptr->NextChunk = node;
|
||||
node->PrevChunk = ptr;
|
||||
}
|
||||
}else{
|
||||
node = IFFFileInfo->LastChunk;
|
||||
|
||||
if(node == NULL){
|
||||
IFFFileInfo->FirstChunk = ptr;
|
||||
IFFFileInfo->LastChunk = ptr;
|
||||
}else{
|
||||
/* Find the node we will take the place of */
|
||||
while(++Position && node->PrevChunk != NULL)
|
||||
node = node->PrevChunk;
|
||||
|
||||
if(node->NextChunk == NULL)
|
||||
IFFFileInfo->LastChunk = ptr;
|
||||
|
||||
/* Shift this node and all nodes before it below us */
|
||||
ptr->PrevChunk = node;
|
||||
ptr->NextChunk = node->NextChunk;
|
||||
node->NextChunk = ptr;
|
||||
}
|
||||
}
|
||||
|
||||
IFFFileInfo->ChunkCount++;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
int iff_read_chunk(IFFChunk * ChunkInfo, const uint8_t * Buffer, unsigned MaxChunkSize)
|
||||
{
|
||||
if(MaxChunkSize == 0) MaxChunkSize = ~0;
|
||||
|
||||
if(MaxChunkSize < 76)
|
||||
return 0;
|
||||
|
||||
memcpy(ChunkInfo->Type, Buffer+0, 4);
|
||||
ChunkInfo->Size = read_uint32be(Buffer+4);
|
||||
ChunkInfo->ChunkID = read_uint16be(Buffer+8);
|
||||
ChunkInfo->Flags = read_uint16be(Buffer+10);
|
||||
memcpy(ChunkInfo->Label, Buffer+12, 64);
|
||||
|
||||
if(ChunkInfo->Size < 76 || ChunkInfo->Size > MaxChunkSize)
|
||||
return 0;
|
||||
|
||||
if(ChunkInfo->Size > 76){
|
||||
ChunkInfo->Data = malloc(ChunkInfo->Size - 76);
|
||||
if(ChunkInfo->Data == NULL)
|
||||
return 0;
|
||||
memcpy(ChunkInfo->Data, Buffer+76, ChunkInfo->Size - 76);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int iff_enumerate_chunks(IFFFile * IFFFileInfo, const uint8_t * Buffer, unsigned BufferSize)
|
||||
{
|
||||
while(BufferSize){
|
||||
IFFChunkNode * chunk = iff_add_chunk(IFFFileInfo, -1);
|
||||
if(chunk == NULL)
|
||||
return 0;
|
||||
if(!iff_read_chunk(&chunk->Chunk, Buffer, BufferSize)){
|
||||
free(chunk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Buffer += chunk->Chunk.Size;
|
||||
BufferSize -= chunk->Chunk.Size;
|
||||
}
|
||||
return 1;
|
||||
}
|
85
Libraries/FileHandler/iff/iff.h
Normal file
85
Libraries/FileHandler/iff/iff.h
Normal file
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
iff.h - Copyright (c) 2012 Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef read_uint32be
|
||||
#define read_uint32be(x) (unsigned)(((x)[0]<<(8*3)) | ((x)[1]<<(8*2)) | ((x)[2]<<(8*1)) | ((x)[3]<<(8*0)))
|
||||
#define read_uint24be(x) (unsigned)(((x)[0]<<(8*2)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*0)))
|
||||
#define read_uint16be(x) (unsigned)(((x)[0]<<(8*1)) | ((x)[1]<<(8*0)))
|
||||
#define read_uint8be(x) (unsigned)(((x)[0]<<(8*0)))
|
||||
#define read_uint32le(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2)) | ((x)[3]<<(8*3)))
|
||||
#define read_uint24le(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2)))
|
||||
#define read_uint16le(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
|
||||
#define read_uint8le(x) (unsigned)(((x)[0]<<(8*0)))
|
||||
#endif
|
||||
|
||||
typedef struct IFFChunk_struct
|
||||
{
|
||||
char Type[5];
|
||||
uint32_t Size;
|
||||
uint16_t ChunkID;
|
||||
uint16_t Flags;
|
||||
char Label[65];
|
||||
uint8_t * Data;
|
||||
void * FormattedData;
|
||||
} IFFChunk;
|
||||
|
||||
typedef struct IFFChunkNode_struct
|
||||
{
|
||||
IFFChunk Chunk;
|
||||
struct IFFChunkNode_struct * PrevChunk;
|
||||
struct IFFChunkNode_struct * NextChunk;
|
||||
} IFFChunkNode;
|
||||
|
||||
typedef struct IFFFile_struct
|
||||
{
|
||||
uint8_t Header[64];
|
||||
|
||||
uint32_t ChunkCount;
|
||||
IFFChunkNode * FirstChunk;
|
||||
IFFChunkNode * LastChunk;
|
||||
IFFChunkNode * ResourceMap;
|
||||
} IFFFile;
|
||||
|
||||
static const uint8_t Header_IFF[] = "IFF FILE 2.5:TYPE FOLLOWED BY SIZE\0 JAMIE DOORNBOS & MAXIS 1";
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** IFF file functions
|
||||
*/
|
||||
|
||||
IFFFile * iff_create();
|
||||
int iff_read_header(IFFFile * IFFFileInfo, const uint8_t * Buffer, unsigned FileSize);
|
||||
|
||||
IFFChunkNode * iff_add_chunk(IFFFile * IFFFileInfo, int Position);
|
||||
int iff_read_chunk(IFFChunk * ChunkInfo, const uint8_t * Buffer, unsigned MaxChunkSize);
|
||||
int iff_enumerate_chunks(IFFFile * IFFFileInfo, const uint8_t * Buffer, unsigned BufferSize);
|
||||
|
||||
void iff_delete_chunk(IFFFile * IFFFileInfo, int Position);
|
||||
void iff_delete(IFFFile * IFFFileInfo);
|
||||
|
||||
|
||||
/*
|
||||
** IFF chunk functions
|
||||
*/
|
||||
|
||||
int iff_read_rsmp(IFFChunk * ChunkInfo, const uint8_t * Buffer, unsigned MaxChunkSize, unsigned IFFSize);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
142
Libraries/FileHandler/iff/iffexport.c
Normal file
142
Libraries/FileHandler/iff/iffexport.c
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
iffexport.c - Copyright (c) 2012 Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <windows.h>
|
||||
#include "iff.h"
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
HANDLE hFile;
|
||||
int overwrite = 0;
|
||||
char *InFile, *OutDirectory;
|
||||
HANDLE ProcessHeap = GetProcessHeap();
|
||||
DWORD FileSize;
|
||||
DWORD bytestransferred = 0;
|
||||
uint8_t * IFFData;
|
||||
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"
|
||||
"Use -f to force overwriting without confirmation.\n"
|
||||
"\n"
|
||||
"Report bugs to <X-Fi6@phppoll.org>.\n"
|
||||
"iffexport is maintained by the Niotso project.\n"
|
||||
"Home page: <http://www.niotso.org/>\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(argc >= 4 && !strcmp(argv[1], "-f")){
|
||||
overwrite++;
|
||||
InFile = argv[2];
|
||||
OutDirectory = argv[3];
|
||||
}else{
|
||||
InFile = argv[1];
|
||||
OutDirectory = argv[2];
|
||||
}
|
||||
|
||||
/****
|
||||
** Open the file and read in entire contents to memory
|
||||
*/
|
||||
|
||||
hFile = CreateFile(InFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
|
||||
if(hFile == INVALID_HANDLE_VALUE){
|
||||
if(GetLastError() == ERROR_FILE_NOT_FOUND){
|
||||
printf("%sThe specified input file does not exist.", "iffexport: error: ");
|
||||
return -1;
|
||||
}
|
||||
printf("%sThe input file could not be opened for reading.", "iffexport: error: ");
|
||||
return -1;
|
||||
}
|
||||
FileSize = GetFileSize(hFile, NULL);
|
||||
if(FileSize < 64){
|
||||
printf("%sNot a valid IFF file.", "iffexport: error: ");
|
||||
return -1;
|
||||
}
|
||||
IFFData = HeapAlloc(ProcessHeap, HEAP_NO_SERIALIZE, FileSize);
|
||||
if(IFFData == NULL){
|
||||
printf("%sMemory for this file could not be allocated.", "iffexport: error: ");
|
||||
return -1;
|
||||
}
|
||||
if(!ReadFile(hFile, IFFData, FileSize, &bytestransferred, NULL) || bytestransferred != FileSize){
|
||||
printf("%sThe input file could not be read.", "iffexport: error: ");
|
||||
return -1;
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
|
||||
/****
|
||||
** Load header information
|
||||
*/
|
||||
|
||||
IFFFileInfo = iff_create();
|
||||
if(IFFFileInfo == NULL){
|
||||
printf("%sMemory for this file could not be allocated.", "iffexport: error: ");
|
||||
return -1;
|
||||
}
|
||||
if(!iff_read_header(IFFFileInfo, IFFData, FileSize)){
|
||||
printf("%sNot a valid IFF file.", "iffexport: error: ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/****
|
||||
** Load entry information
|
||||
*/
|
||||
|
||||
if(!iff_enumerate_chunks(IFFFileInfo, IFFData+64, FileSize-64)){
|
||||
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
|
||||
*/
|
||||
for(ChunkNode = IFFFileInfo->FirstChunk; ChunkNode; ChunkNode = ChunkNode->NextChunk){
|
||||
char name[256], destination[256];
|
||||
char filter[] = "\\/:*?\"<>|";
|
||||
int i;
|
||||
|
||||
chunk++;
|
||||
sprintf(name, "%03u-%s-%04X-%s", chunk, ChunkNode->Chunk.Type, ChunkNode->Chunk.ChunkID, ChunkNode->Chunk.Label);
|
||||
for(i=0; i<9; i++){
|
||||
char * c = name;
|
||||
while((c = strchr(c, filter[i])) != NULL)
|
||||
*c = '.';
|
||||
}
|
||||
sprintf(destination, "%s/%s.%s", OutDirectory, name, (!memcmp(ChunkNode->Chunk.Type, "BMP_", 4)) ? "bmp" : "dat");
|
||||
|
||||
hFile = CreateFile(destination, GENERIC_WRITE, 0, NULL, CREATE_NEW+overwrite,
|
||||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
|
||||
if(hFile == INVALID_HANDLE_VALUE){
|
||||
printf(" (%u/%u) Skipped (%s): %s\n", chunk, chunkcount,
|
||||
(!overwrite && GetLastError() == ERROR_FILE_EXISTS) ? "file exists" : "could not open",
|
||||
name);
|
||||
continue;
|
||||
}
|
||||
|
||||
printf(" (%u/%u) %s (%u bytes)\n", chunk, chunkcount, name, ChunkNode->Chunk.Size-76);
|
||||
|
||||
WriteFile(hFile, ChunkNode->Chunk.Data, ChunkNode->Chunk.Size-76, &bytestransferred, NULL);
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
1
Libraries/libvitaboy/AUTHORS
Normal file
1
Libraries/libvitaboy/AUTHORS
Normal file
|
@ -0,0 +1 @@
|
|||
Fatbag <X-Fi6@phppoll.org>
|
8
Libraries/libvitaboy/CHANGES
Normal file
8
Libraries/libvitaboy/CHANGES
Normal file
|
@ -0,0 +1,8 @@
|
|||
libvitaboy 1.0.0 (2012-03-04) Fatbag
|
||||
|
||||
* first stable release
|
||||
* read support for ANIM, APR, BND, COL, HAG, MESH, OFT, PO, SKEL
|
||||
* working rendering and animation of characters in OpenGL
|
||||
* basic keyboard controls
|
||||
* support for environments: MinGW
|
||||
* support for platforms: i686, x86-64
|
13
Libraries/libvitaboy/COPYING
Normal file
13
Libraries/libvitaboy/COPYING
Normal file
|
@ -0,0 +1,13 @@
|
|||
libfar - Copyright (c) 2011-2012 Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
67
Libraries/libvitaboy/README
Normal file
67
Libraries/libvitaboy/README
Normal file
|
@ -0,0 +1,67 @@
|
|||
***************************************************************************
|
||||
* ** libvitaboy - Open source OpenGL TSO character animation library ** *
|
||||
* ** Copyright (c) 2012 Drew D'Addesio ("Fatbag", <X-Fi6@phppoll.org>) ** *
|
||||
* *
|
||||
* Use and distribution of all files in the "include" and "lib" folders *
|
||||
* are governed under the ISC License, included with this source code in *
|
||||
* "COPYING". *
|
||||
* *
|
||||
* All other files included but not aforementioned are not copyrighted, *
|
||||
* and are distributed into the public domain. *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
libvitaboy is a cross-platform C++ library for parsing the various character rendering formats used in The Sims Online and using
|
||||
that information to render and animate the 3D characters of the game using OpenGL.
|
||||
|
||||
Formats include:
|
||||
(*) ANIM (Animation)
|
||||
(*) APR (Appearance)
|
||||
(*) BND (Binding)
|
||||
(*) COL (Collection)
|
||||
(*) HAG (Hand Group)
|
||||
(*) MESH (Mesh)
|
||||
(*) OFT (Outfit)
|
||||
(*) PO (Purchasable Outfit)
|
||||
(*) SKEL (Skeleton)
|
||||
|
||||
|
||||
1. What this library will do for you
|
||||
|
||||
You can use this library to render a character in a fixed location.
|
||||
|
||||
|
||||
2. Compiling
|
||||
|
||||
Compiling is straightforward. The Makefiles and project files should already be set up for you, and are easy to tweak.
|
||||
Before compiling the library, make your changes to config.h to specify what's compiled in.
|
||||
|
||||
a. Compiling from a Makefile
|
||||
|
||||
Makefiles are listed in the top directory in the format Makefile.$(PLATFORM). Just copy the one applicable to your platform
|
||||
to the destination file "Makefile" and run GNU make.
|
||||
|
||||
b. Compiling from a project file
|
||||
|
||||
Project files are held within their own directories. They can be opened up with the target IDE and be compiled by
|
||||
invoking the compile action of that IDE.
|
||||
|
||||
c. Compiling using your own Makefile or project file
|
||||
|
||||
It's possible no such file exists for your platform. In this case, look at whichever Makefile is most relevant to your
|
||||
platform, copy all source files down (.cpp, .hpp, ...), and add it your own Makefile or project. In theory,
|
||||
it should work. :)
|
||||
|
||||
libvitaboy is intended to work with any C++ compiler. If not, and the compiler is not only modern and popular but also free
|
||||
software (gratis, libre, open source software), please report it as a bug.
|
||||
|
||||
|
||||
3. Useful links
|
||||
|
||||
libvitaboy is hosted by and maintained by the Niotso project.
|
||||
Home page: <http://www.niotso.org/>
|
||||
Don Hopkins documentation:
|
||||
(*) http://www.donhopkins.com/drupal/node/20 [Sims Character Animation File Format]
|
||||
(*) http://www.donhopkins.com/drupal/node/21 [Details on The Sims Character Animation File Format and Rendering]
|
||||
(*) http://www.donhopkins.com/drupal/node/19 [Sims VitaBoy Character Animation Library Documentation]
|
||||
(*) http://www.donhopkins.com/home/movies/ [Index of Archived Streaming QuickTime Movies]
|
10
Libraries/libvitaboy/THANKS
Normal file
10
Libraries/libvitaboy/THANKS
Normal file
|
@ -0,0 +1,10 @@
|
|||
--------------------------------|----------------------------------------------------------------
|
||||
| Thanks to | for |
|
||||
|--------------------------------|----------------------------------------------------------------|
|
||||
| Don Hopkins | Kickstarting The Sims 1 customization, encouraging fine |
|
||||
| | individuals to document the game, and most importantly, |
|
||||
| | sharing with us his documentation of his VitaBoy skeletal |
|
||||
| | character animation library used in The Sims 1, in the form |
|
||||
| | of articles and videos. Dozens of thanks from each one of us. |
|
||||
| (*) <http://www.donhopkins.com/> |
|
||||
-------------------------------------------------------------------------------------------------
|
Loading…
Add table
Add a link
Reference in a new issue