Skip to content

Commit

Permalink
Better handling of Surface.Type = BASE1_SOLID (solid color surfaces) (#…
Browse files Browse the repository at this point in the history
…68)

* Updated to .NET6, so compatible with ACE. Handled solid color surfaces better

* Update appveyor.yml

Co-authored-by: Ty Conner <[email protected]>
  • Loading branch information
OptimShi and LtRipley36706 authored Dec 19, 2022
1 parent 29b266e commit 1928d5e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ACViewer/ACViewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon />
<StartupObject />
Expand Down
9 changes: 9 additions & 0 deletions ACViewer/ACViewer.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<ItemGroup>
<Compile Update="Extensions\ColorDialogEx.cs">
<SubType>Component</SubType>
</Compile>
</ItemGroup>
</Project>
6 changes: 4 additions & 2 deletions ACViewer/Render/TextureCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,10 @@ public static Texture2D Get(uint fileID, Dictionary<uint, uint> textureChanges =
var r = (surface.ColorValue >> 16) & 0xFF;
var g = (surface.ColorValue >> 8) & 0xFF;
var b = surface.ColorValue & 0xFF;
a = 0;
swatch.SetDataAsync(new Microsoft.Xna.Framework.Color[] { new Microsoft.Xna.Framework.Color(r, g, b, a) });

if (surface.Translucency == 1) a = 0;

swatch.SetDataAsync(new Microsoft.Xna.Framework.Color[] { new Microsoft.Xna.Framework.Color(Convert.ToByte(r), Convert.ToByte(g), Convert.ToByte(b), Convert.ToByte(a)) });
return swatch;
}

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branches:
only:
- master
skip_tags: true
image: Visual Studio 2019
image: Visual Studio 2022
configuration:
- Release
- Debug
Expand Down

0 comments on commit 1928d5e

Please sign in to comment.