Skip to content

Commit

Permalink
Add LucasArts 3d shooter archives
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
mlauss2 committed Aug 29, 2024
1 parent 31209b7 commit 79e0eee
Show file tree
Hide file tree
Showing 5 changed files with 416 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ set(PHYSFS_SRCS
src/physfs_archiver_slb.c
src/physfs_archiver_iso9660.c
src/physfs_archiver_vdf.c
src/physfs_archiver_lec3d.c
${PHYSFS_CPP_SRCS}
${PHYSFS_M_SRCS}
)
Expand Down Expand Up @@ -162,6 +163,11 @@ if(NOT PHYSFS_ARCHIVE_VDF)
add_definitions(-DPHYSFS_SUPPORTS_VDF=0)
endif()

option(PHYSFS_ARCHIVE_LECARCHIVES "Enable LucasArts GOB/LAB/LFD Archive support" TRUE)
if(NOT PHYSFS_ARCHIVE_LECARCHIVES)
add_definitions(-DPHYSFS_SUPPORTS_LECARCHIVES=0)
endif()


option(PHYSFS_BUILD_STATIC "Build static library" TRUE)
if(PHYSFS_BUILD_STATIC)
Expand Down Expand Up @@ -333,6 +339,7 @@ message_bool_option("QPAK support" PHYSFS_ARCHIVE_QPAK)
message_bool_option("SLB support" PHYSFS_ARCHIVE_SLB)
message_bool_option("VDF support" PHYSFS_ARCHIVE_VDF)
message_bool_option("ISO9660 support" PHYSFS_ARCHIVE_ISO9660)
message_bool_option("GOB/LAB/LFD support" PHYSFS_ARCHIVE_LECARCHIVES)
message_bool_option("Build static library" PHYSFS_BUILD_STATIC)
message_bool_option("Build shared library" PHYSFS_BUILD_SHARED)
message_bool_option("Build stdio test program" PHYSFS_BUILD_TEST)
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile.os2
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ SRCS = physfs.c &
physfs_archiver_slb.c &
physfs_archiver_iso9660.c &
physfs_archiver_csm.c &
physfs_archiver_vdf.c
physfs_archiver_vdf.c &
physfs_archiver_lec3d.c


OBJS = $(SRCS:.c=.obj)
Expand Down
5 changes: 5 additions & 0 deletions src/physfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,11 @@ static int initStaticArchivers(void)
#if PHYSFS_SUPPORTS_VDF
REGISTER_STATIC_ARCHIVER(VDF)
#endif
#if PHYSFS_SUPPORTS_LECARCHIVES
REGISTER_STATIC_ARCHIVER(GOB)
REGISTER_STATIC_ARCHIVER(LFD)
REGISTER_STATIC_ARCHIVER(LAB)
#endif

#undef REGISTER_STATIC_ARCHIVER

Expand Down
Loading

0 comments on commit 79e0eee

Please sign in to comment.