Author Topic: MCD Edit by volutar  (Read 124350 times)

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: MCD Edit by volutar
« Reply #75 on: January 28, 2015, 03:38:34 pm »
i wish a feature for import a png true color and automaically convert to a pck by selection a specific UFO/TFTD palette
The color could be convert by minimum distance from allowed selected palette's color
[min sqrt2( sqr(tileColor.r - paletteColor.r) +  sqr(tileColor.g - paletteColor.g)   +  sqr(tileColor.b - paletteColor.b) ) ]

The reason is here:
https://openxcom.org/forum/index.php/topic,2980.msg35842.html#msg35842

« Last Edit: January 28, 2015, 03:45:54 pm by davide »

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: MCD Edit by volutar
« Reply #76 on: January 28, 2015, 03:51:52 pm »
It already works. with transparent PNG color for 0.
Just remove those purple gap lines.
Edit->Import PNG Sheet.

Btw, I noticed semi transparent things in the "lamp shaft".
It won't work. Better remove all transparency values except for 0 and 255.
« Last Edit: January 28, 2015, 04:12:09 pm by volutar »

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: MCD Edit by volutar
« Reply #77 on: January 28, 2015, 06:16:23 pm »
I will try it
thanks

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: MCD Edit by volutar
« Reply #78 on: January 29, 2015, 03:32:03 pm »
Did these updates of 1.17a make it better? Any feedback? Please?

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: MCD Edit by volutar
« Reply #79 on: January 29, 2015, 04:35:38 pm »
Sorry haven't had a chance to load it up yet. Hopefully tonight or by the weekend.

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: MCD Edit by volutar
« Reply #80 on: January 31, 2015, 10:55:19 pm »
Probably because I'm running in wine, but the area select highlights the pixels but after I release the mouse does not select the pixels. Line draw looks great. More info as I have it.

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: MCD Edit by volutar
« Reply #81 on: February 01, 2015, 03:33:05 am »
preview map resizing stopped working for me.

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: MCD Edit by volutar
« Reply #82 on: February 01, 2015, 06:23:18 am »
It's really weird, but the code responsible for resize has simply GONE from the source... I've been developing this thing in 3 different places, and I must have been messed with the proper actualization badly.
Area selection tho should be working. You may cover multiple pixels while holding LMB, and it should increase "orange" pre-selection area, which should become "white" upon LMB release. With Shift/Alt/Shift+Alt it should work as usual - add/sub/cross.

I've found that "dropped" resizing code and put it back in. Quickfix is in place.
« Last Edit: February 01, 2015, 06:46:58 am by volutar »

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: MCD Edit by volutar
« Reply #83 on: February 01, 2015, 07:28:50 pm »
I also have gotten a strange error since the last version, that sometimes when I use the select color tool and click on a color in the pallet, that it highlights the correct pixels, and then when I release the mouse button the selection shifts over to the left. But again, that's not consistent so I don't know that there's enough info for you to look into that yet.

Clarification on magic wand. If I click and release on a single pixel it doesn't select on release. If I click, hold, and then drag over one pixel the selection will happen on release, so as long as I'm dragging into the already highlighted area works as expected. Otherwise it will add to the magic wand selection, which is desired behavior.

I thought shortcuts were broken, but I was holding down Command key instead of CTRL since that's how adobe handles on osx, so user error on my part.

Is there a new download link for the fixed version or are you working on a newer version now?

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: MCD Edit by volutar
« Reply #84 on: February 01, 2015, 08:06:53 pm »
Is there a new download link for the fixed version or are you working on a newer version now?
Quote
I also have gotten a strange error since the last version, that sometimes when I use the select color tool and click on a color in the pallet, that it highlights the correct pixels, and then when I release the mouse button the selection shifts over to the left. But again, that's not consistent so I don't know that there's enough info for you to look into that yet.
Yeah I found the reason of that. Thank you. Forgot to bake selection on palette selecting. Updated same download file. Since it's stupid minor oversight, I didn't make new version.
Quote
Clarification on magic wand. If I click and release on a single pixel it doesn't select on release.
I can replicate same behaviour only when ALT key is pressed. But in this case cursor is with "-" sign.
Quote
If I click, hold, and then drag over one pixel the selection will happen on release, so as long as I'm dragging into the already highlighted area works as expected. Otherwise it will add to the magic wand selection, which is desired behavior.
I couldn't figure what's going on here. Can it be related to wine? Under which environment are you running it?

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: MCD Edit by volutar
« Reply #85 on: February 01, 2015, 08:14:43 pm »
Yeah I found the reason of that. Thank you. Forgot to bake selection on palette selecting. Updated same download file. Since it's stupid minor oversight, I didn't make new version.I can replicate same behaviour only when ALT key is pressed. But in this case cursor is with "-" sign.I couldn't figure what's going on here. Can it be related to wine? Under which environment are you running it?

Running Wine on OSX Yosemite. My guess would be wine issue, but maybe the right click function is different between windows and OSX, similar to Command vs CTRL key.

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: MCD Edit by volutar
« Reply #86 on: February 01, 2015, 08:23:26 pm »
Running Wine on OSX Yosemite. My guess would be wine issue, but maybe the right click function is different between windows and OSX, similar to Command vs CTRL key.
If it be RMB click difference, I doubt any RMB action could be possible, including menu and RMB drawing and colodpicking (btw, does it work?).

The difference between area and color selection shouldn't be that big. It's essentially the same with slight difference. Are you sure color selection works as intended even on single pixel click, and area - not?

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: MCD Edit by volutar
« Reply #87 on: February 01, 2015, 09:23:31 pm »
It's not all the time for the eyedropper color area selection going bad, so having a hard time testing to isolate the issue that causes it. Sometimes mcd selection menu becomes unresponsive, so i have to switch windows to get it back.

the magic wand preview of selection matches up so long as i move the cursor 1 pixel before releasing. I sort of agree that the mouse being different probably isn't the culprit since menus etc work fine as does secondary color for pen tool.

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: MCD Edit by volutar
« Reply #88 on: February 01, 2015, 09:32:40 pm »
So I guess wine for OSX casts mouse events somehow "wrong" comparing to the order and values of native win32. I doubt I could test it, since in my case it could be only win7(vmware(OSX(wine(mcdedit))), so events initiator still be win32. But I'll give it all try, tho it's a Maverics, not Yosemite. But I doubt they changed the way mouse events work.

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: MCD Edit by volutar
« Reply #89 on: February 02, 2015, 05:04:01 am »
My current workflow is
Create Images
Import as PNG's to Volutar's MCD edit (In Wind)  and try to work with map preview to make sure things line up.
Copy terrain file exports to my original xcom directory for map view, my git directory, and my testing directory for the nightly.
Edit map files using xcom directory (Virtualbox windows XP)
move map files and RMP files to git directory, openxcom directory.
Test in openxcom (OSX native)
revise as needed.

There's a lot of basic file loading/saving that could be improved and would make new files more streamlined.
Also kitbashing existing MCD/PCK files would be a big time savings.