Skip to content

Commit

Permalink
disable import images button since its functionality doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
LeftofZen committed Feb 12, 2024
1 parent b483f90 commit 8534d01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Gui/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions Gui/MainForm.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using NAudio.Gui;
using NAudio.Wave;
using OpenLoco.ObjectEditor;
using OpenLoco.ObjectEditor.DatFileParsing;
using OpenLoco.ObjectEditor.Headers;
using OpenLoco.ObjectEditor.Objects;
using OpenLoco.ObjectEditor.Types;
using OpenLoco.ObjectEditor.Logging;
using System.Data;
Expand Down Expand Up @@ -1071,17 +1069,18 @@ static IEnumerable<Bitmap> CreateImages(List<G1Element32> G1Elements, Color[] pa
{
var paletteIndex = imageData[(y * currElement.Width) + x];

// the issue with greyscale here is it isn't normalised so all heightmaps are really dark and hard to see
//var colour = obj.Object is HillShapesObject
// ? Color.FromArgb(paletteIndex, paletteIndex, paletteIndex) // for hillshapes, its just a heightmap so lets put it in greyscale
// : palette[paletteIndex];

if (paletteIndex == 0 && useTransparency)
{
// transparent pixel - no need to set anything as that's the default pixel value
//ImageHelpers.SetPixel(dstImgData, x, y, colour);
//Debugger.Break();
}
else
{
//if (paletteIndex >= 154 && paletteIndex <= 165)
//{
// //Debugger.Break();
//}
var colour = palette[paletteIndex];
ImageHelpers.SetPixel(dstImgData, x, y, colour);
}
Expand Down
Binary file modified palette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8534d01

Please sign in to comment.