Thanks for trying to make this work in Mono, kevL.
np. you did the groundwork, i had the time, it was interesting ....... tks.
To answer your question on GitHub: I treated all black pixels as transparent, because not drawing only colour #0 did not have the desired effect. As far as I can tell, you replaced my check with (palid != Palette.TransparentId) in case the transparent colour isn't 0. This makes sense.
note that (const)Palette.TransparentId is defined as "0" in the code elsewhere -- it's not, eg, getting the transparency ID out of an image and using that, it's just avoiding the use of "0" (as a magic number).
The thing is, if you want to test against palette ids, this is the necessary step:
palid = bindata[++i];
bindata is retrieved from an XCImage object, in this case a terrain-sprite at the right animation frame
ps. LOCKBITS is an experimental routine that draws sprites pixel by pixel; but i didn't notice any speed increase so its on hold indefinitely.
UPDATE 2: Found "Use Mono" option. Now everything is fine.
i guess I should make note of that on the Distribution page ... a bit of my bad
Stoddard's latest build https://lxnt.wtf/oxem/builds//MapView/MapView-ab4868ec-2019-02-08-mono.7z does not work in my system (Ubuntu 16.04), giving the error:
For System.MissingMethodException: Method 'String.Format' not found.
at YamlDotNet.RepresentationModel.YamlStream.Load (IParser parser) <0x40cbb760 + 0x0003b> in <filename unknown>:0
at YamlDotNet.RepresentationModel.YamlStream.Load (System.IO.TextReader input) <0x40cb99b0 + 0x00047> in <filename unknown>:0
at MapView.XCMainWindow.LoadOptions () <0x40cb7f20 + 0x0013b> in <filename unknown>:0
at MapView.XCMainWindow..ctor () <0x40c17b80 + 0x006bb> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) MapView.XCMainWindow:.ctor ()
at MapView.Startup.RunProgram () <0x40bd6fe0 + 0x000db> in <filename unknown>:0
hm, appears Mono doesn't interpret something in YamlDotNet quite right. perhaps @Stoddard can give it a run and get the line # of the offending String.Format() ? Does it happen with an empty /settings folder? Ie, try deleting MapViewers.yml (window positions)
hm, i googled for "mono MissingMethodException string.format"
a couple of possible leads ...
a) Unable to execute build.sh in Ubuntu due to "Error: Method 'String.Format' not found."
https://github.com/cake-build/cake/issues/1929(resolution: upgrade Mono)
b) Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object)
https://stackoverflow.com/questions/30558827/method-not-found-system-string-system-string-formatsystem-iformatprovider-sy(resolution: force a different overload for String.Format())
here's a better stacktrace of what i think is going on,
https://github.com/kevL/OpenXCOM.Tools/blob/master/YamlDotNet/Core/ParserExtensions.cs#L46called from
https://github.com/kevL/OpenXCOM.Tools/blob/master/YamlDotNet/RepresentationModel/YamlStream.cs#L100called from
https://github.com/kevL/OpenXCOM.Tools/blob/master/MapView/Forms/MainWindow/XCMainWindow.cs#L573which means parser.Allow<T>() is null, which means parser.Accept<T>() is false, which means parser.Current is *not* T, which throws a YamlException with the string.Format() call that borks.
Try deleting MapViewers.yml