Skip to content

Commit 1990660

Browse files
mlauss2icculus
authored andcommitted
Add LucasArts 3d shooter archives
Read-Only support for the GOB, LAB and LFD archives found in 1990's LucasArts titles like "Dark Forces", "Outlaws" and "Jedi Knight" / "Mysteries of the Sith". Signed-off-by: Manuel Lauss <[email protected]>
1 parent 31209b7 commit 1990660

File tree

5 files changed

+416
-1
lines changed

5 files changed

+416
-1
lines changed

CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ set(PHYSFS_SRCS
9898
src/physfs_archiver_slb.c
9999
src/physfs_archiver_iso9660.c
100100
src/physfs_archiver_vdf.c
101+
src/physfs_archiver_lec3d.c
101102
${PHYSFS_CPP_SRCS}
102103
${PHYSFS_M_SRCS}
103104
)
@@ -162,6 +163,11 @@ if(NOT PHYSFS_ARCHIVE_VDF)
162163
add_definitions(-DPHYSFS_SUPPORTS_VDF=0)
163164
endif()
164165

166+
option(PHYSFS_ARCHIVE_LECARCHIVES "Enable LucasArts GOB/LAB/LFD Archive support" TRUE)
167+
if(NOT PHYSFS_ARCHIVE_LECARCHIVES)
168+
add_definitions(-DPHYSFS_SUPPORTS_LECARCHIVES=0)
169+
endif()
170+
165171

166172
option(PHYSFS_BUILD_STATIC "Build static library" TRUE)
167173
if(PHYSFS_BUILD_STATIC)
@@ -333,6 +339,7 @@ message_bool_option("QPAK support" PHYSFS_ARCHIVE_QPAK)
333339
message_bool_option("SLB support" PHYSFS_ARCHIVE_SLB)
334340
message_bool_option("VDF support" PHYSFS_ARCHIVE_VDF)
335341
message_bool_option("ISO9660 support" PHYSFS_ARCHIVE_ISO9660)
342+
message_bool_option("GOB/LAB/LFD support" PHYSFS_ARCHIVE_LECARCHIVES)
336343
message_bool_option("Build static library" PHYSFS_BUILD_STATIC)
337344
message_bool_option("Build shared library" PHYSFS_BUILD_SHARED)
338345
message_bool_option("Build stdio test program" PHYSFS_BUILD_TEST)

src/Makefile.os2

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ SRCS = physfs.c &
2626
physfs_archiver_slb.c &
2727
physfs_archiver_iso9660.c &
2828
physfs_archiver_csm.c &
29-
physfs_archiver_vdf.c
29+
physfs_archiver_vdf.c &
30+
physfs_archiver_lec3d.c
3031

3132

3233
OBJS = $(SRCS:.c=.obj)

src/physfs.c

+5
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,11 @@ static int initStaticArchivers(void)
12001200
#if PHYSFS_SUPPORTS_VDF
12011201
REGISTER_STATIC_ARCHIVER(VDF)
12021202
#endif
1203+
#if PHYSFS_SUPPORTS_LECARCHIVES
1204+
REGISTER_STATIC_ARCHIVER(GOB)
1205+
REGISTER_STATIC_ARCHIVER(LFD)
1206+
REGISTER_STATIC_ARCHIVER(LAB)
1207+
#endif
12031208

12041209
#undef REGISTER_STATIC_ARCHIVER
12051210

0 commit comments

Comments
 (0)