LibT2FS 0.1
C API for accessing TEngine data in memory.
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1/* This file is part of LibT2FS.
2 *
3 * LibT2FS is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * LibT2FS is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <https://www.gnu.org/licenses/>.
15 */
16
17#ifndef H_T2FS_CONFIG
18#define H_T2FS_CONFIG
19
20
21#ifndef T2FS_SYSTEM_SCHEMA_DIR
22#define T2FS_SYSTEM_SCHEMA_DIR "/usr/share/libt2fs/schema/"
23#endif
24
25
31
32
48
49
58
59
60static const char *const T2FSSchemaFiles[T2FS_SCHEMA_FILE_END] = {
61 "CARTDATA.json", /* T2FS_SCHEMA_FILE_DINOSAUR_HUNTER */
62 "RageWars.json", /* T2FS_SCHEMA_FILE_RAGE_WARS */
63 "Seeds of Evil.json", /* T2FS_SCHEMA_FILE_SEEDS_OF_EVIL */
64 "win32.json", /* T2FS_SCHEMA_FILE_SOUTH_PARK */
65 "ShadowOfOblivion.json" /* T2FS_SCHEMA_FILE_SHADOW_OF_OBLIVION */
66};
67
68
75
76
77void
79
80
83int
84t2fs_config_auto_detect(T2FSFileConfig *dest, const char *const filepath);
85
86
87#endif
e_T2FSGameFileID
Different files might have a different tree hierarchy and/or data structs.
Definition config.h:35
@ T2FS_FILE_PC_SEEDS_OF_EVIL_MP
Arena Levels.lsm, CTF Levels.lsm, Rok Match Demo.lsm and Rok Match Levels.lsm.
Definition config.h:40
@ T2FS_FILE_PC_SOUTH_PARK
win32.dat
Definition config.h:37
@ T2FS_FILE_N64_SOUTH_PARK
Definition config.h:46
@ T2FS_FILE_N64_RAGE_WARS
Definition config.h:43
@ T2FS_FILE_N64_DINOSAUR_HUNTER
Definition config.h:42
@ T2FS_FILE_PC_SEEDS_OF_EVIL_SP
Seeds of Evil.lss.
Definition config.h:38
@ T2FS_FILE_N64_SEEDS_OF_EVIL
Definition config.h:44
@ T2FS_FILE_PC_SEEDS_OF_EVIL_DEMO
Turok2Demo.lss.
Definition config.h:39
@ T2FS_FILE_N64_SHADOW_OF_OBLIVION
Definition config.h:45
@ T2FS_FILE_PC_DINOSAUR_HUNTER
CARTDATA.DAT and demodata.dat.
Definition config.h:36
enum e_T2FSFileSchemaID T2FSFileSchemaID
e_T2FSFileSchemaID
Definition config.h:50
@ T2FS_SCHEMA_FILE_SEEDS_OF_EVIL
Definition config.h:53
@ T2FS_SCHEMA_FILE_RAGE_WARS
Definition config.h:52
@ T2FS_SCHEMA_FILE_SOUTH_PARK
Definition config.h:54
@ T2FS_SCHEMA_FILE_DINOSAUR_HUNTER
Definition config.h:51
@ T2FS_SCHEMA_FILE_END
Definition config.h:56
@ T2FS_SCHEMA_FILE_SHADOW_OF_OBLIVION
Definition config.h:55
enum e_T2FSGameFileID T2FSGameFileID
Different files might have a different tree hierarchy and/or data structs.
enum e_t2fsEndianness T2FSEndianness
Use to set the endianness of the input data.
struct s_T2FSFileConfig T2FSFileConfig
e_t2fsEndianness
Use to set the endianness of the input data.
Definition config.h:27
@ T2FS_ENDIAN_BIG
Definition config.h:29
@ T2FS_ENDIAN_LITTLE
Definition config.h:28
void t2fs_config_init(T2FSFileConfig *cfg)
int t2fs_config_auto_detect(T2FSFileConfig *dest, const char *const filepath)
Auto detect the needed config based on filename.
Definition config.h:69
T2FSEndianness endianData
Definition config.h:71
T2FSGameFileID gameID
Definition config.h:70
T2FSEndianness endianRNCHeader
Definition config.h:72
T2FSFileSchemaID schemaFileID
Definition config.h:73