Skip to content

A C++ library for serialising (reading) and deserialising (writing) CyberConnect2 NUCC data, useful for projects that interact with XFBIN files.

License

Notifications You must be signed in to change notification settings

KojoBailey/nucc-cpp-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DISCLAIMER: This documentation is a work in progress. Information may be inaccurate!


Welcome to the NUCC C++ Library for modern C++, C++20 and onwards.

Its purpose is to allow easy interaction with the XFBIN container format (file sig: NUCC / 4E 55 43 43), originating from CyberConnect2's in-house NUCC engine.

Design Goals

While there are XFBIN libraries out there for Rust, Python, and C#, this is the first for C++.

This library aims for:

  • Ease of integration → Everything is intended to be as abstracted as is useful, and although there are multiple headers you may need to include, they are also intentionally structured to be easy to organise. Most projects focusing on one game shouldn't need to include more than 2.
  • A myriad of features → Across the CC2 NUCC games, there's a lot that happens with XFBINs behind the scenes, such as en/decryption, hashing, and more - all actions which this library will support.
  • Efficiency → For a library intended to be used in bigger projects, the faster it can do its part, the better. As such, it should be as optimal as possible.
  • Flexibility → This library should be able to achieve any (reasonable) task without driving users insane.

Usage

Everything in this library is under the nucc namespace.

Loading from path

#include <nucc/xfbin.hpp>

int main(int argc, char* argv[])
{
        nucc::xfbin xfbin{argv[1]};
}

Loading from binary data

#include <nucc/xfbin.cpp>

int main(int argc, char* argv[])
{
        kojo::binary data{argv[1]};
        nucc::xfbin xfbin{data, data.size()};
}

Getting chunk data

#include <nucc/xfbin.hpp>
#include <nucc/chunk_texture.hpp>

int main(int argc, char* argv[])
{
        nucc::xfbin xfbin{argv[1]};
        nucc::chunk chunk{xfbin.get_chunk(nucc::chunk_type::texture)};
        nucc::chunk_texture texture{chunk.data()};

        std::uint16_t width = texture.width();
        std::uint16_t height = texture.height();
}

About

A C++ library for serialising (reading) and deserialising (writing) CyberConnect2 NUCC data, useful for projects that interact with XFBIN files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •