Skip to content

Commit 4f82611

Browse files
committed
bump to .net 8.0
1 parent 33a1cb2 commit 4f82611

17 files changed

Lines changed: 77 additions & 36 deletions

.idea/.idea.cge-tools/.idea/git_toolbox_blame.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.cge-tools/.idea/git_toolbox_prj.xml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CftConverter/CftConverter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
using System.Collections;
22
using System.Reflection;
33
using SixLabors.Fonts;
4+
using SixLabors.ImageSharp;
45
using SixLabors.ImageSharp.Drawing.Processing;
6+
using SixLabors.ImageSharp.PixelFormats;
7+
using SixLabors.ImageSharp.Processing;
58

69
namespace CgeTools.CftConverter;
710

CftConverter/CftConverter.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<RootNamespace>CgeTools.CftConverter</RootNamespace>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>
@@ -15,8 +15,8 @@
1515

1616
<ItemGroup>
1717
<PackageReference Include="CommandLineParser" Version="2.9.1"/>
18-
<PackageReference Include="SixLabors.ImageSharp" Version="3.0.2"/>
19-
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.0.0" />
18+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12"/>
19+
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.7"/>
2020
</ItemGroup>
2121

2222
<ItemGroup>

CftConverter/CmdLineOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using CommandLine;
22
using CommandLine.Text;
33

4+
#pragma warning disable CS8618
5+
46
namespace CgeTools.CftConverter;
57

68
public class CmdLineOptions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A collection of tools that allows the modification (and translation) of cge/cge2
66

77
## Requirements
88

9-
You need to use .net 6.0 in order to use the tools provided within this repository.
9+
You need to use .net 8.0 in order to use the tools provided within this repository.
1010

1111
## Usage "cft-converter"
1212

VbmConverter/BaseCmdLineOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using CommandLine;
22

3+
#pragma warning disable CS8618
4+
35
namespace CgeTools.VbmConverter;
46

57
public abstract class BaseCmdLineOptions

VbmConverter/Converter/Palette.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace CgeTools.VbmConverter.Converter;
1+
using SixLabors.ImageSharp.PixelFormats;
2+
3+
namespace CgeTools.VbmConverter.Converter;
24

35
public class Palette
46
{
@@ -19,12 +21,9 @@ public Rgb24 this[int index]
1921

2022
private static Rgb24[] ValidateColors(Rgb24[] colors)
2123
{
22-
if (colors.Length != CountColorsPerPalette)
23-
{
24-
throw new ArgumentException($"Expected {CountColorsPerPalette} colors, but received {colors.Length}");
25-
}
26-
27-
return colors;
24+
return colors.Length != CountColorsPerPalette
25+
? throw new ArgumentException($"Expected {CountColorsPerPalette} colors, but received {colors.Length}")
26+
: colors;
2827
}
2928

3029
public void WriteToAct(string outp)

VbmConverter/Converter/SoltysSystemColors.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
namespace CgeTools.VbmConverter.Converter;
1+
using SixLabors.ImageSharp.PixelFormats;
2+
3+
namespace CgeTools.VbmConverter.Converter;
24

35
public static class SoltysSystemColors
46
{
57
private static readonly Rgb24 Black = new(0, 0, 0);
68

79
private static readonly Dac[] Gst =
8-
{
10+
[
911
new() { R = 0, G = 60, B = 0 }, // 198
1012
new() { R = 0, G = 104, B = 0 }, // 199
1113
new() { R = 20, G = 172, B = 0 }, // 200
@@ -64,7 +66,7 @@ public static class SoltysSystemColors
6466
new() { R = 0, G = 214, B = 255 }, // 253
6567
new() { R = 96, G = 224, B = 96 }, // 254
6668
new() { R = 255, G = 255, B = 255 } // 255
67-
};
69+
];
6870

6971
public static void Modify(Palette? palette)
7072
{

VbmConverter/Converter/ToVbmConverter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
namespace CgeTools.VbmConverter.Converter;
1+
using SixLabors.ImageSharp;
2+
using SixLabors.ImageSharp.PixelFormats;
3+
4+
namespace CgeTools.VbmConverter.Converter;
25

36
// Convert images from and to .vbm files
47
// The majority of this code comes from ScummVM (https://github.com/scummvm/scummvm/tree/master/engines/cge)

0 commit comments

Comments
 (0)