Archived
1
Fork 0
This repository has been archived on 2025-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
libxiv/include/sqpack.h
Joshua Goins b11767dc02 Big refactoring commit pt. 1
This is the first of many commits to improve code quality, and try to
tame my bad looking code.

Types such as Slot and Race are now living under types/ and have
dedicated functions to go between ids and enumerations without a heavy
std::map.

A new repository API lives in a new SqPack header, which replaces the
old crusty way of fetching repository information in GameData.

Building equipment paths now live in libxiv (moved from novus) provided
you have a model id. Standard methods to build index and dat filenames
are provided in their functions now too.
2022-04-17 16:55:41 -04:00

29 lines
No EOL
750 B
C++

#pragma once
#include <cstdint>
#include <string>
#include <vector>
// The type of file inside of a SqPack dat file.
// Standard is everything that isn't covered by Model or Texture, such as exd files.
enum class FileType : int32_t {
Empty = 1,
Standard = 2,
Model = 3,
Texture = 4
};
// This is a folder containing game data, usually seperated by ffxiv (which is always present), and then exX
// where X is the expansion number.
struct Repository {
enum class Type {
Base,
Expansion
} type = Type::Base;
std::string name;
int expansion_number = 0;
std::pair<std::string, std::string> get_index_filenames(int category);
std::string get_dat_filename(int category, uint32_t data_file_id);
};