physis/lib.rs
1// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4//! Crate for reading and writing the file formats used by FFXIV.
5
6extern crate core;
7
8/// Represents a continuous block of memory which is not owned, and comes either from an in-memory location or from a file.
9pub type ByteSpan<'a> = &'a [u8];
10
11/// Represents a continuous block of memory which is owned.
12pub type ByteBuffer = Vec<u8>;
13
14/// Reading and writing game data repositories, such as "ffxiv" and "ex1", and so on.
15pub mod gamedata;
16
17/// Parsing game repositories, such as "ffxiv", "ex1" and their version information.
18pub mod repository;
19
20/// Handling and updating data in the "boot" directory, which contains the launcher files.
21pub mod bootdata;
22
23/// SqPack file formats - including Db, Data and Index/Index2 files.
24pub mod sqpack;
25
26mod compression;
27
28/// Reading model (MDL) files.
29pub mod model;
30
31/// Playable race and genders.
32pub mod race;
33
34/// Reading Excel lists (EXL).
35pub mod exl;
36
37/// Reading equipment and equipment-related data.
38pub mod equipment;
39
40/// Common structures, enumerations and functions used by many modules.
41pub mod common;
42
43/// Methods for installing game and boot patches.
44pub mod patch;
45
46/// Implementation of the Blowfish ECB block cipher used by the retail client. It's used to encrypt arguments in the launcher, to prevent login token snooping.
47pub mod blowfish;
48
49/// Reading Excel header files (EXH).
50pub mod exh;
51
52/// Reading Excel data files (EXD).
53pub mod exd;
54
55/// Reading Havok XML sidecar files.
56pub mod skeleton;
57
58/// Reading file info files (FIIN).
59pub mod fiin;
60
61/// Reading and writing chat logs (LOG).
62pub mod log;
63
64/// Reading textures (TEX).
65pub mod tex;
66
67/// Reading material files (MTRL)
68pub mod mtrl;
69
70/// Reading shader packages (SHPK)
71pub mod shpk;
72
73/// Reading character parameter files (CMP)
74pub mod cmp;
75
76/// Reading and writing character data files (DAT) which are used in the character creator to save presets.
77pub mod chardat;
78
79/// Reading and writing the content of gear sets (GEARSET.DAT) which are used to store a character's gear sets.
80pub mod gearsets;
81
82/// Reading and writing the plaintext config files (CFG) used by the game to store most of it's configuration.
83pub mod cfg;
84
85mod havok;
86
87/// Reading bone deform matrices.
88pub mod pbd;
89
90mod crc;
91mod sha1;
92
93mod model_file_operations;
94
95pub mod model_vertex_declarations;
96
97/// Reading layer information for a map (LGB)
98pub mod layer;
99
100pub mod tera;
101
102/// Reading data from executables
103pub mod execlookup;
104
105mod common_file_operations;
106
107/// Reading word dictionaries, such as the vulgar word list.
108pub mod dic;
109
110#[doc(hidden)]
111pub const PHYSIS_VERSION: &str = env!("CARGO_PKG_VERSION");
112
113/// Reading ULD files
114pub mod uld;
115
116/// Reading SGB files
117pub mod sgb;
118
119/// Reading SCD files
120pub mod scd;
121
122/// Reading HWC files
123pub mod hwc;
124
125/// Reading IWC files
126pub mod iwc;
127
128/// Reading TMB files
129pub mod tmb;
130
131/// Reading SKP files
132pub mod skp;
133
134/// Reading SCHD files
135pub mod schd;
136
137/// Reading PHYB files
138pub mod phyb;
139
140/// Reading PAP files
141pub mod pap;
142
143/// Reading AVFX files
144pub mod avfx;
145
146/// Reading STM files
147pub mod stm;
148
149/// Find existing installation directories
150pub mod existing_dirs;
151
152/// Reading patch lists
153pub mod patchlist;
154
155mod bcn;
156
157/// Reading the binary .dat files in the user folder (e.g. GEARSET.dat)
158pub mod dat;
159
160mod error;
161pub use error::Error;