Thanks to visit codestin.com
Credit goes to github.com

Skip to content

adamrt/libfft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libFFT - Final Fantasy Tactics Library

A C library for reading and extracting data from Final Fantasy Tactics PS1 binary files.

Overview

libFFT provides a comprehensive API for accessing game data from Final Fantasy Tactics (PS1), including maps, textures, events, character data, and more. The library is designed as a single-header implementation that makes it easy to integrate into C/C++ projects.

Requirements

You need to provide your own FFT binary file ripped from a PSX disc. Only the US version is supported:

  • Serial: SCUS-94221
  • SHA1: 2b5d4db3229cdc7bbd0358b95fcba33dddae8bba
  • MD5: b156ba386436d20fd5ed8d37bab6b624

Library Usage

#include <stdio.h>

#define FFT_IMPLEMENTATION
#include "fft.h"

int main() {
    // Initialize with your FFT binary file
    fft_init("fft.bin");
    
    // Read game data
    fft_map_data_t* map_data = fft_map_data_read(49);
    do_something_with_map(map_data);
    fft_map_data_destroy(map_data);
    
    // Clean up
    fft_shutdown();
    return 0;
}

Building

This library is intended to be used in your applications, but you can build the tools with:

./build.sh

This creates two executables:

  • fft_export_images - Tool for extracting game images
  • fft_debug - Debug/testing tool not for general consumption

Testing

Run the test suite

./build.sh test

Limitations

  • Not thread-safe - Use in single-threaded applications only
  • Uses assertions - Library will abort on errors rather than returning error codes
  • PS1 US version only - Other versions/platforms not supported

Acknowledgments

Special thanks to the FFHacktics community whose research and documentation made this library possible.

About

A C library for reading and extracting data from Final Fantasy Tactics PS1 binary files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published