Skip to content

Commit

Permalink
Fix crash when rendering materials in the Additional Community Materi…
Browse files Browse the repository at this point in the history
…als category
  • Loading branch information
SlimeCubed committed Mar 5, 2024
1 parent c0c00d7 commit ab9712e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.2.0.8</Version>
<Version>0.2.0.9</Version>
<DefineConstants Condition="'$(FullRelease)' == 'true'">$(DefineConstants);FULL_RELEASE</DefineConstants>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>11</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion Drizzle.Lingo.Runtime/LingoImage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
Expand Down
11 changes: 10 additions & 1 deletion Drizzle.Logic/Rendering/LevelRenderer.RenderColors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,12 @@ public void RenderColorsNewFrame()
{
if (dcGet == Movie.gPEcolors[1][2])
{
if (!DoesGreenValueMeanRainbow(greenCol))
if (grimeActive
&& (grimeOnGradients || greenCol is not 1 or 2 or 3)
&& !DoesGreenValueMeanRainbow(greenCol))
{
greenCol += 4;
}
}
else
{
Expand All @@ -213,6 +217,11 @@ public void RenderColorsNewFrame()
decalColor = (int) gDecalColors.count;
}

if (bkgFix && decalColor < 2)
{
decalColor = 2;
}

col.BlueByte = (byte)(256 - decalColor);
greenCol += 8;
}
Expand Down
4 changes: 3 additions & 1 deletion LingoSource/renderStart.lingo
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ on exitFrame me
if (tlPs <> void) then
if (tlPs.locH > 2) and (tlPs.locH <= gTiles.count) then
if tlPs.locV <= gTiles[tlPs.locH].tls.count then
ad = (gTiles[tlPs.locH].tls[tlPs.locV].tags.getPos("nonSolid")=0)
if gTiles[tlPs.locH].tls[tlPs.locV].tags <> void then
ad = (gTiles[tlPs.locH].tls[tlPs.locV].tags.getPos("nonSolid")=0)
end if
end if
end if
end if
Expand Down

0 comments on commit ab9712e

Please sign in to comment.