Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
moddedmcplayer committed Sep 10, 2023
1 parent ba43593 commit 20fb18e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ScuffedVideoPlayer/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="PluginAPI" publicKeyToken="null" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.1.1.0" newVersion="13.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
10 changes: 9 additions & 1 deletion ScuffedVideoPlayer/Playback/TextPlayback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,24 @@ public static IEnumerator<string> Play(LoadedVideo video)
public static string ImageToText(Bitmap bitmap)
{
StringBuilder sb = new StringBuilder();
Color _lastColor = Color.White;
for (int i = 0; i < bitmap.Height; i++)
{
sb.Append("<size=33%><line-height=75%>");
for (int y = 0; y < bitmap.Width; y++)
{
var pixel = bitmap.GetPixel(y, i);
sb.Append($"<color={ToHex(pixel)}>█</color>");
if (pixel != _lastColor)
{
sb.Append($"<color={ToHex(pixel)}>");
_lastColor = pixel;
}
sb.Append("█");
}
sb.Append("\n");
}

sb.Append("</color>");
return sb.ToString();
}

Expand Down
4 changes: 2 additions & 2 deletions ScuffedVideoPlayer/ScuffedVideoPlayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
<Reference Include="NWAPIPermissionSystem">
<HintPath>C:\Users\admin\AppData\Roaming\SCP Secret Laboratory\PluginAPI\NWAPIPermissionSystem.dll</HintPath>
</Reference>
<Reference Include="PluginAPI, Version=12.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\Northwood.PluginAPI.12.0.0\lib\net48\PluginAPI.dll</HintPath>
<Reference Include="PluginAPI, Version=13.1.1.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\Northwood.PluginAPI.13.1.1\lib\net48\PluginAPI.dll</HintPath>
</Reference>
<Reference Include="SCPSLAudioApi">
<HintPath>C:\Users\admin\AppData\Roaming\SCP Secret Laboratory\PluginAPI\SCPSLAudioApi.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion ScuffedVideoPlayer/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<package id="MonoMod.ILHelpers" version="1.0.0-prerelease.2" targetFramework="net48" />
<package id="MonoMod.Utils" version="25.0.0-prerelease.2" targetFramework="net48" />
<package id="NVorbis" version="0.10.5" targetFramework="net48" />
<package id="Northwood.PluginAPI" version="12.0.0" targetFramework="net48" />
<package id="Northwood.PluginAPI" version="13.1.1" targetFramework="net48" />
<package id="System.Buffers" version="4.4.0" targetFramework="net48" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net48" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net48" />
Expand Down

0 comments on commit 20fb18e

Please sign in to comment.