Skip to content

Commit

Permalink
Fixed text manager issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrdacor committed Jun 7, 2023
1 parent 60167d8 commit 72daa0c
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Authors>Robert Schneckenhaus</Authors>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
<PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="Avalonia" Version="0.10.21" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.21" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<RepositoryUrl>https://github.com/Pyrdacor/Ambermoon</RepositoryUrl>
<RepositoryType>Github</RepositoryType>
<PackageTags>Ambermoon ADF Extract File Legacy Amiga Disk</PackageTags>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
<Configurations>Debug;Release;ReleaseLinux</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion AmbermoonTools/AmbermoonEditor/AmbermoonEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Common" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Authors>Robert Schneckenhaus</Authors>
<Description>Command line tool to edit map or NPC events.</Description>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<PackageProjectUrl>https://github.com/Pyrdacor/Ambermoon</PackageProjectUrl>
<RepositoryUrl>https://github.com/Pyrdacor/Ambermoon</RepositoryUrl>
<RepositoryType>Github</RepositoryType>
Expand All @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Authors>Robert Schneckenhaus</Authors>
<Description>Command line tool to convert Ambermoon graphics.</Description>
<PackageProjectUrl>https://github.com/Pyrdacor/Ambermoon</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions AmbermoonTools/AmbermoonItemEditor/AmbermoonItemEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Authors>Robert Schneckenhaus</Authors>
<Description>Command line tool to edit, create or delete items.</Description>
<PackageProjectUrl>https://github.com/Pyrdacor/Ambermoon</PackageProjectUrl>
Expand All @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Authors>Robert Schneckenhaus</Authors>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Common" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
<UseWindowsForms>true</UseWindowsForms>
<Configurations>Debug;Release;ReleaseLinux</Configurations>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Authors>Robert Schneckenhaus</Authors>
</PropertyGroup>

Expand All @@ -28,7 +28,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
<PackageReference Include="NAudio" Version="2.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="SonicArranger" Version="1.0.12" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Ambermoon.Common" Version="10.8.3" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<Authors>Robert Schneckenhaus</Authors>
<Description>Command line tool to show and edit monster values of legacy Ambermoon game data.</Description>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Configurations>Debug;Release;ReleaseLinux</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions AmbermoonTools/AmbermoonPack/AmbermoonPack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<RepositoryType>Github</RepositoryType>
<PackageTags>Ambermoon Packer File Legacy Amiga Compression Encryption</PackageTags>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Configurations>Debug;Release;ReleaseLinux</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions AmbermoonTools/AmbermoonTextImport/AmbermoonTextImport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<Authors>Robert Schneckenhaus</Authors>
<Description>Command line tool to export and import texts from/into legacy Ambermoon game data.</Description>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Configurations>Debug;Release;ReleaseLinux</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<Authors>Robert Schneckenhaus</Authors>
<Description>Command line tool to export and import all texts from/into legacy Ambermoon game data.</Description>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
<Version>1.0.14</Version>
<Version>1.0.15</Version>
<Configurations>Debug;Release;ReleaseLinux</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.5" />
<PackageReference Include="Ambermoon.Data.Legacy" Version="10.8.6" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions AmbermoonTools/AmbermoonTextManager/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ bool CheckAndGetFile(string name, out IFileContainer fileContainer)
}

var reader = dictionary.Files[1];
reader.Position = 0;
int numEntries = reader.ReadWord();

Console.WriteLine($"Writing {numEntries} dictionary entries.");
Expand Down Expand Up @@ -370,6 +371,7 @@ void WriteTexts(string folderName, List<string> texts)
{
outPath = Path.Combine(outputPath, textAmb.Name);
var reader = textAmb.Files[1];
reader.Position = 0;
var textContainerReader = new TextContainerReader();
var textContainer = new TextContainer();
textContainerReader.ReadTextContainer(textContainer, reader, false);
Expand Down Expand Up @@ -483,6 +485,7 @@ void ExportCharNames(string filename, string fallbackFilename = null)
return;
}

container.Files[1].Position = 0;
var placeReader = new PlacesReader();
var places = Places.Load(placeReader, container.Files[1]);

Expand Down Expand Up @@ -510,6 +513,7 @@ void ExportCharNames(string filename, string fallbackFilename = null)
}

var reader = container.Files[1];
reader.Position = 0;
int numItems = reader.ReadWord();

for (int i = 0; i < numItems; ++i)
Expand Down Expand Up @@ -568,6 +572,7 @@ void WriteGotoPointNames(string filename)
if (file.Value.Size == 0)
continue;

file.Value.Position = 0;
var mapReader = new MapReader();
if ((file.Value.PeekDword() & 0x0000ff00) != 0x00000100)
continue; // no 3D map
Expand Down Expand Up @@ -633,6 +638,7 @@ void WriteGotoPointNames(string filename)

try
{
textFile.Value.Position = 0;
texts = Ambermoon.Data.Legacy.Serialization.TextReader.ReadTexts(textFile.Value, new char[] { ' ', '\0' });
}
catch
Expand Down

0 comments on commit 72daa0c

Please sign in to comment.