Skip to content

Commit

Permalink
Release 1.14.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Судаков Павел committed Jan 5, 2025
1 parent 9a1790d commit 0c1ae23
Show file tree
Hide file tree
Showing 11 changed files with 212 additions and 356 deletions.
Binary file modified master/.vs/TTG Tools/v17/.suo
Binary file not shown.
253 changes: 85 additions & 168 deletions master/.vs/TTG Tools/v17/DocumentLayout.backup.json

Large diffs are not rendered by default.

253 changes: 85 additions & 168 deletions master/.vs/TTG Tools/v17/DocumentLayout.json

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions master/About.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@
<value>TTG Tools
by Den Em (Е.Д.В.)
moded by pashok6798 (from Den Em's agreement)
Source code on GitFlic: https://gitflic.ru/project/pashok6798/ttg-tools
Source code on:
GitFlic: https://gitflic.ru/project/pashok6798/ttg-tools
GitHub: https://github.com/zenderovpaulo95/TTG-Tools
Gitverse: https://gitverse.ru/pashok6798/TTG-tools
Check all releases here: https://gitflic.ru/project/pashok6798/ttg-tools/release
or here: https://github.com/zenderovpaulo95/TTG-Tools/releases
(Original developer's e-mail: d3n123@rambler.ru)

Special thanks to:
Expand All @@ -136,11 +140,15 @@ Special thanks to:
- Hajin Jang for Zlib.Wrapper

List of supported games:
Tales of Monkey Island, Sam and Max: Season Two, Wallace and Gromit's Grand Adventures, CSI: Deadly Intent, Sam and Max: The Devil's Playhouse, Puzzle Agent, CSI: Fatal Conspiracy, Poker Night at the Inventory, Back to the Future: The Game, Strong Bad, Hector: The Badge of Carnage, Puzzle Agent 2, Jurassic Park: The Game, The Walking Dead, Poker Night 2, Wolf Among Us, The Walking Dead Season Two, Tales from the Borderlands, Game of Thrones, Minecraft: Story Mode (Seasons one and two), Walking Dead: Michonne, Batman (Seasons one and two), The Walking Dead: The Final Season, The Walking Dead : The Telltale Definitive Series, Sam &amp; Max Save the World Remastered, Sam &amp; Max Beyond Time and Space Remastered, Sam and Max The Devil's Playhouse Remastered.
Telltale's Texas Hold Em, Tales of Monkey Island, Sam &amp; Max: Season One, Sam &amp; Max: Season Two, Wallace and Gromit's Grand Adventures, CSI: Deadly Intent, Sam &amp; Max: The Devil's Playhouse, Puzzle Agent, CSI: Fatal Conspiracy, Poker Night at the Inventory, Back to the Future: The Game, Strong Bad, Hector: The Badge of Carnage, Puzzle Agent 2, Jurassic Park: The Game, The Walking Dead, Poker Night 2, Wolf Among Us, The Walking Dead Season Two, Tales from the Borderlands, Game of Thrones, Minecraft: Story Mode (Seasons one and two), Walking Dead: Michonne, Batman (Seasons one and two), The Walking Dead: The Final Season, The Walking Dead : The Telltale Definitive Series, Sam &amp; Max Save the World Remastered, Sam &amp; Max Beyond Time and Space Remastered, Sam &amp; Max The Devil's Playhouse Remastered.
Maybe some games doesn't work.

===
[Version history]
v.1.14.5 (05.01.2025)
+ Auto(De)Packer
Minor fixes import text files.

v.1.14.4 (16.11.2024)
+ Archive packer:
Fix packing ttarch archives with version 9
Expand Down
6 changes: 6 additions & 0 deletions master/ArchiveUnpacker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ private static byte[] decompressBlock(byte[] bytes, int algorithmCompress)
try
{
byte[] retBuf = null;

if(algorithmCompress == -1)
{
retBuf = decompressBlock(bytes);
}

switch (algorithmCompress)
{
case 0:
Expand Down
3 changes: 3 additions & 0 deletions master/Graphics/Swizzles/SwizzleUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* Special thanks to daemon1 and tge for PS4 swizzle algorithm *
***************************************************************/

//Для изучения алгоритмов
//https://github.com/Shadowth117/DrSwizzler

namespace TTG_Tools.Graphics.Swizzles
{
public class SwizzleUtilities
Expand Down
2 changes: 1 addition & 1 deletion master/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion master/TTG Tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TTG_Tools</RootNamespace>
<AssemblyName>TTG Tools</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>ttgtool.ico</ApplicationIcon>
<IsWebBootstrapper>false</IsWebBootstrapper>
Expand Down Expand Up @@ -48,6 +48,7 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down
5 changes: 1 addition & 4 deletions master/Texts/LangdbWorker.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TTG_Tools.ClassesStructs.Text;
using System.IO;
using System.Windows.Forms.VisualStyles;

namespace TTG_Tools.Texts
{
Expand Down Expand Up @@ -308,7 +305,7 @@ private static int CheckNumbers(List<CommonText> txts, LangdbClass langdb)
for (int j = 0; j < txts.Count; j++)
{
if (langdb.langdbs[i].anmID == txts[j].strNumber) countLangres++;
if (langdb.langdbs[i].stringNumber == txts[i].strNumber) countStrings++;
if (langdb.langdbs[i].stringNumber == txts[j].strNumber) countStrings++;
}
}

Expand Down
29 changes: 18 additions & 11 deletions master/Texts/ReadText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ private static int GetType(string FilePath)
private static List<CommonText> OldTextMode(string FilePath)
{
List<CommonText> txts = new List<CommonText>();
FileInfo fi = new FileInfo(FilePath);
FileStream fs = new FileStream(FilePath, FileMode.Open);
StreamReader sr = new StreamReader(fs, Encoding.UTF8);

Expand Down Expand Up @@ -66,11 +67,15 @@ private static List<CommonText> OldTextMode(string FilePath)
txts[lastListIndex] = tmpTxt;
}

int diff = 0;

try
{
tmpTxt.strNumber = (uint)curNum;
int numPos = tmpString.IndexOf(")") + 2;
tmpTxt.actorName = tmpString.Substring(numPos, tmpString.Length - numPos);
int numPos = tmpString.IndexOf(")") + 1;
if ((numPos < tmpString.Length) && (tmpString[numPos] == ' ')) numPos++;
diff = tmpString.Length - numPos;
tmpTxt.actorName = tmpString.Substring(numPos, diff);
tmpTxt.actorSpeechOriginal = "";
tmpTxt.actorSpeechTranslation = "";
tmpTxt.flags = "";
Expand All @@ -83,7 +88,7 @@ private static List<CommonText> OldTextMode(string FilePath)
}
catch
{
MessageBox.Show("Error in string \"" + tmpString + "\".", "Error");
MessageBox.Show("Error in file " + fi.Name + ". String \"" + tmpString + "\". Difference between end and start is " + Convert.ToString(diff), "Error");
if (sr != null) sr.Close();
if (fs != null) fs.Close();

Expand Down Expand Up @@ -156,6 +161,7 @@ private static List<CommonText> OldTextMode(string FilePath)
private static List<CommonText> TsvTextMode(string FilePath)
{
List<CommonText> txts = new List<CommonText>();
FileInfo fi = new FileInfo(FilePath);
FileStream fs = new FileStream(FilePath, FileMode.Open);
StreamReader sr = new StreamReader(fs, Encoding.UTF8);

Expand Down Expand Up @@ -193,7 +199,7 @@ private static List<CommonText> TsvTextMode(string FilePath)
}
catch
{
MessageBox.Show("Error in string \"" + tmpString + "\".", "Error");
MessageBox.Show("Error in file " + fi.Name + ". String \"" + tmpString + "\".", "Error");

if (sr != null) sr.Close();
if (fs != null) fs.Close();
Expand All @@ -203,7 +209,7 @@ private static List<CommonText> TsvTextMode(string FilePath)
}
else
{
MessageBox.Show("Error in string \"" + tmpString + "\".", "Error");
MessageBox.Show("Error in file " + fi.Name + ". String \"" + tmpString + "\".", "Error");

if (sr != null) sr.Close();
if (fs != null) fs.Close();
Expand All @@ -229,6 +235,7 @@ private static List<CommonText> TsvTextMode(string FilePath)
private static List<CommonText> NewTextMode(string FilePath)
{
List<CommonText> txts = new List<CommonText>();
FileInfo fi = new FileInfo(FilePath);
FileStream fs = new FileStream(FilePath, FileMode.Open);
StreamReader sr = new StreamReader(fs, Encoding.UTF8);

Expand All @@ -253,7 +260,7 @@ private static List<CommonText> NewTextMode(string FilePath)
switch(i)
{
case 0:
if (tmpString.IndexOf("langid=") != 0) throw new Exception("Error in string " + tmpString + ".");
if (tmpString.IndexOf("langid=") != 0) throw new Exception("File " + fi.Name + ". Error in string " + tmpString + ".");
try
{
tmpString = tmpString.Substring(7, tmpString.Length - 7);
Expand All @@ -271,15 +278,15 @@ private static List<CommonText> NewTextMode(string FilePath)
break;

case 1:
if (tmpString.IndexOf("actor=") != 0) throw new Exception("Error in string " + tmpString + ".");
if (tmpString.IndexOf("actor=") != 0) throw new Exception("File " + fi.Name + ". Error in string " + tmpString + ".");

try
{
tmpTxt.actorName = tmpString.Substring(6, tmpString.Length - 6);
}
catch
{
MessageBox.Show("Something wrong with file\r\n" + FilePath);
MessageBox.Show("Something wrong with file\r\n" + fi.Name);

if (sr != null) sr.Close();
if (fs != null) fs.Close();
Expand All @@ -289,7 +296,7 @@ private static List<CommonText> NewTextMode(string FilePath)
break;

case 2:
if (tmpString.IndexOf("speechOriginal=") != 0) throw new Exception("Error in string " + tmpString + ".");
if (tmpString.IndexOf("speechOriginal=") != 0) throw new Exception("File " + fi.Name + ". Error in string " + tmpString + ".");

try
{
Expand All @@ -307,7 +314,7 @@ private static List<CommonText> NewTextMode(string FilePath)
break;

case 3:
if (tmpString.IndexOf("speechTranslation=") != 0) throw new Exception("Error in string " + tmpString + ".");
if (tmpString.IndexOf("speechTranslation=") != 0) throw new Exception("File " + fi.Name + ". Error in string " + tmpString + ".");

try
{
Expand All @@ -325,7 +332,7 @@ private static List<CommonText> NewTextMode(string FilePath)
break;

case 4:
if (tmpString.IndexOf("flags=") != 0) throw new Exception("Error in string " + tmpString + ".");
if (tmpString.IndexOf("flags=") != 0) throw new Exception("File " + fi.Name + ". Error in string " + tmpString + ".");

try
{
Expand Down
2 changes: 1 addition & 1 deletion master/app.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0"?>
<configuration><startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
<configuration><startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>

0 comments on commit 0c1ae23

Please sign in to comment.