Skip to content

Commit

Permalink
+ fixed some lights
Browse files Browse the repository at this point in the history
  • Loading branch information
andreakarasho committed May 20, 2020
1 parent ca3e9b3 commit 3c1643b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Game/Data/LightColors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static ushort GetHue(ushort id)
color = 62;
}
else
color = 60;
color = 50;
}
else
color = 60;
Expand All @@ -110,19 +110,19 @@ public static ushort GetHue(ushort id)
color = 31;
}
else
color = 666;
color = 0;
}
else
color = 666;
color = 0;
}
else
color = 666;
color = 0;
}
else
color = 666;
color = 0;
}
else
color = 30;
color = 47;

if (id == 0x1FD4 || id == 0x0F6C) color = 2;

Expand Down
10 changes: 7 additions & 3 deletions src/Game/Scenes/GameScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ public void AddLight(GameObject obj, GameObject lightObject, int x, int y)

ushort graphic = lightObject.Graphic;

if (graphic >= 0x3E02 && graphic <= 0x3E0B ||
graphic >= 0x3914 && graphic <= 0x3929 ||
if ((graphic >= 0x3E02 && graphic <= 0x3E0B) ||
(graphic >= 0x3914 && graphic <= 0x3929) ||
graphic == 0x0B1D)
light.ID = 2;
else
Expand All @@ -414,7 +414,11 @@ public void AddLight(GameObject obj, GameObject lightObject, int x, int y)
if (light.ID >= Constants.MAX_LIGHTS_DATA_INDEX_COUNT)
return;

light.Color = ProfileManager.Current.UseColoredLights ? LightColors.GetHue(graphic) : (ushort) 0;
light.Color = (ushort) (ProfileManager.Current.UseColoredLights ? LightColors.GetHue(graphic) : (ushort) 0);

if (light.Color != 0)
light.Color++;

light.DrawX = x;
light.DrawY = y;
_lightCount++;
Expand Down

0 comments on commit 3c1643b

Please sign in to comment.