Skip to content

Commit

Permalink
Add lost debian/patches
Browse files Browse the repository at this point in the history
  • Loading branch information
tx00100xt committed Mar 7, 2024
1 parent e096983 commit 095531a
Show file tree
Hide file tree
Showing 8 changed files with 920 additions and 0 deletions.
13 changes: 13 additions & 0 deletions debian/patches/0004-Engine.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Description: Global variable to support the content of the demo version of the game
Forwarded: not-needed
--- a/SamTFE/Sources/Engine/Engine.h 2024-03-04 19:25:48.961212942 +0300
+++ b/SamTFE/Sources/Engine/Engine.h 2024-03-04 19:51:24.933150308 +0300
@@ -207,6 +207,8 @@
extern ENGINE_API CTString _strLogFile;
extern ENGINE_API CTFileName _fnmModLibPath;
extern ENGINE_API INDEX sys_iSysPath;
+extern ENGINE_API INDEX sys_iGameDemoMode;
+
#ifdef PLATFORM_WIN32
//
extern ENGINE_API FLOAT _fPlayerFOVAdjuster;
107 changes: 107 additions & 0 deletions debian/patches/0005-Stream.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
Description: Add additional data path /usr/share/games/<internal game name>-vk
Forwarded: not-needed
--- a/SamTFE/Sources/Engine/Base/Stream.h 2024-02-15 12:44:53.057345383 +0300
+++ b/SamTFE/Sources/Engine/Base/Stream.h 2024-02-15 13:17:01.634702073 +0300
@@ -391,6 +391,10 @@

// global string with application path
ENGINE_API extern CTFileName _fnmApplicationPath;
+#ifdef PLATFORM_UNIX
+// global string with additional search path
+ENGINE_API extern CTFileName _fnmAdditionalDirPath;
+#endif
// global string with user-specific writable directory.
ENGINE_API extern CTFileName _fnmUserDir;
// global string with current MOD path
--- a/SamTFE/Sources/Engine/Base/Stream.cpp 2024-02-15 12:44:53.057345383 +0300
+++ b/SamTFE/Sources/Engine/Base/Stream.cpp 2024-02-15 13:17:01.634702073 +0300
@@ -78,7 +78,9 @@
// global string with application path (utf-8)
CTFileName _fnmApplicationPath;
CTFileName _fnmApplicationPathTMP; // home dir or application path
-
+#ifdef PLATFORM_UNIX
+CTFileName _fnmAdditionalDirPath; // additional search path
+#endif
// global string with filename of the started application
CTFileName _fnmApplicationExe;
// global string with user-specific writable directory.
@@ -220,6 +222,16 @@
}
delete files;

+#ifdef PLATFORM_UNIX
+ // additional search path
+ files = _pFileSystem->FindFiles(_fnmAdditionalDirPath, "*.gro");
+ max = files->Count();
+ for (i = 0; i < max; i++) {
+ UNZIPAddArchive( _fnmAdditionalDirPath + ((*files)[i]) );
+ }
+ delete files;
+#endif
+
// if there is a mod active
if (_fnmMod!="") {
// for each group file in mod directory
--- a/SamTSE/Sources/Engine/Base/Stream.h 2024-02-15 12:44:53.057345383 +0300
+++ b/SamTSE/Sources/Engine/Base/Stream.h 2024-02-15 13:17:01.634702073 +0300
@@ -391,6 +391,10 @@

// global string with application path
ENGINE_API extern CTFileName _fnmApplicationPath;
+#ifdef PLATFORM_UNIX
+// global string with additional search path
+ENGINE_API extern CTFileName _fnmAdditionalDirPath;
+#endif
// global string with user-specific writable directory.
ENGINE_API extern CTFileName _fnmUserDir;
// global string with current MOD path
--- a/SamTSE/Sources/Engine/Base/Stream.cpp 2024-02-15 12:44:53.057345383 +0300
+++ b/SamTSE/Sources/Engine/Base/Stream.cpp 2024-02-15 13:17:01.634702073 +0300
@@ -78,7 +78,9 @@
// global string with application path (utf-8)
CTFileName _fnmApplicationPath;
CTFileName _fnmApplicationPathTMP; // home dir or application path
-
+#ifdef PLATFORM_UNIX
+CTFileName _fnmAdditionalDirPath; // additional search path
+#endif
// global string with filename of the started application
CTFileName _fnmApplicationExe;
// global string with user-specific writable directory.
@@ -194,15 +194,16 @@
}
}
// find eventual extension for the mod's dlls
- _strModExt = "";
+ _strModExt = "MP";
// DG: apparently both ModEXT.txt and ModExt.txt exist in the wild.
+/*
CTFileName tmp;
if(ExpandFilePath(EFP_READ, CTString("ModEXT.txt"), tmp) != EFP_NONE) {
LoadStringVar(CTString("ModEXT.txt"), _strModExt);
} else {
LoadStringVar(CTString("ModExt.txt"), _strModExt);
}
-
+*/

CPrintF(TRANSV("Loading group files...\n"));

@@ -220,6 +222,16 @@
}
delete files;

+#ifdef PLATFORM_UNIX
+ // additional search path
+ files = _pFileSystem->FindFiles(_fnmAdditionalDirPath, "*.gro");
+ max = files->Count();
+ for (i = 0; i < max; i++) {
+ UNZIPAddArchive( _fnmAdditionalDirPath + ((*files)[i]) );
+ }
+ delete files;
+#endif
+
// if there is a mod active
if (_fnmMod!="") {
// for each group file in mod directory
Loading

0 comments on commit 095531a

Please sign in to comment.