Author Topic: MAPVIEW upgrade  (Read 59745 times)

Offline kevL

  • Colonel
  • ****
  • Posts: 211
    • View Profile
Re: MAPVIEW upgrade
« Reply #405 on: February 16, 2019, 01:05:23 am »
hey Stoddard,
unfortunately the first call in SaveGifFile() is CreateTransparent() which SEEMS to create the bitmap-area and fill all pixels w/ paletteId #0

but there are several other drawing and cropping calls going on after that, I don't understand them atm ... this'll wait for a better day,


EDIT:
I just pushed a commit to master : output MainView screenshot as PNG

Stoddard's auto-mono build should pick it up soon ... (but is not in windows build yet)
« Last Edit: February 17, 2019, 02:44:50 am by kevL »

Offline tkzv

  • Colonel
  • ****
  • Posts: 468
    • View Profile
Re: MAPVIEW upgrade
« Reply #406 on: February 19, 2019, 07:57:56 am »
Saving as GIF is no longer available. Saving as PNG works, but fills black with garbage too. (Staircases in the air and missing walls and roof are correct.)

Offline kevL

  • Colonel
  • ****
  • Posts: 211
    • View Profile
Re: MAPVIEW upgrade
« Reply #407 on: February 19, 2019, 11:42:20 am »
huh, ok

unfortunately i'm not setup to build or debug Mono ... I'd just be chasing cats up trees.

maybe someone who is can give it a go,


EDIT: back on the ranch ... implemented an overhead ScanG viewer.
https://github.com/kevL/OpenXCOM.Tools/blob/master/Distribution/README.md

File->ScanG view
- mousewheel does levelup/down
- doubleclick toggles between multilevel view and single-level view
- requires ScanG.Dat in the GEODATA folder of the Configurator's basepath

EDIT: 2019 feb 21
- added check to ensure that a tilepart's ScanG reference doesn't exceed those available in the .Dat file

EDIT: screenshot3
- rigging PckView to view/edit ScanG.Dat (not done)
« Last Edit: February 22, 2019, 08:27:01 pm by kevL »

Offline luke83

  • Commander
  • *****
  • Posts: 1402
    • View Profile
    • openxcommods
Re: MAPVIEW upgrade
« Reply #408 on: February 24, 2019, 12:01:32 pm »
EDIT: back on the ranch ... implemented an overhead ScanG viewer.
https://github.com/kevL/OpenXCOM.Tools/blob/master/Distribution/README.md

File->ScanG view
- mousewheel does levelup/down
- doubleclick toggles between multilevel view and single-level view
- requires ScanG.Dat in the GEODATA folder of the Configurator's basepath

EDIT: 2019 feb 21
- added check to ensure that a tilepart's ScanG reference doesn't exceed those available in the .Dat file

EDIT: screenshot3
- rigging PckView to view/edit ScanG.Dat (not done)

So for all the maps i have built i have never even tried to correct the ScanG data ( and i am embarrass for it, with my new maps i wont have a choice as they are very different to the original data so at some point i will need to fix all these.),  Are you planning just a viewer OR are you going to allow us to create new artwork and correct these from mapview?

Offline kevL

  • Colonel
  • ****
  • Posts: 211
    • View Profile
Re: MAPVIEW upgrade
« Reply #409 on: February 24, 2019, 06:21:55 pm »
are you going to allow us to create new artwork and correct these from mapview?

tl;dr yes


hey luke,

I'm adapting PckView to open/edit/save SCANG.DAT (UFO/TFTD, although as usual i can't test TFTD's scang.dat) -- it's halfway done.

hopefully OXC/E doesn't cap the quantity of entries when loading the ScanG file (i wouldn't expect it to but it's a possibility). That is, hopefully we can add icons to ScanG.Dat and assign MCD records to use them and it all works fine.

Note that OXC and probly E *might* already be able to add extra scang-icons. I forget the specifics, and perhaps i did a bit of recoding to make it work, but it's sorta like defining a new icon as an extraSprite then specifying it as an ID in extraMapdata or whatever it is ...

anyway, personally i want to be able to add new icons directly to SCANG.DAT and reference them in MCD files seamlessly.


/Let the mayhem continue as ~25 variations of the DAT become available...

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 4683
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: MAPVIEW upgrade
« Reply #410 on: February 24, 2019, 07:36:10 pm »
hopefully OXC/E doesn't cap the quantity of entries when loading the ScanG file (i wouldn't expect it to but it's a possibility). That is, hopefully we can add icons to ScanG.Dat and assign MCD records to use them and it all works fine.

No, we don't limit the number of entries.

Offline kevL

  • Colonel
  • ****
  • Posts: 211
    • View Profile
Re: MAPVIEW upgrade
« Reply #411 on: February 24, 2019, 07:59:49 pm »
what about mod design?

I'm not familiar with OXC/E mod design/adaptability... offhand, do you think it will handle something like this:

my_mod_override_files/GEODATA/SCANG.DAT

ie, use a mod's custom SCANG.DAT instead of the standard (UFO/TFTD) SCANG.DAT ?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 4683
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: MAPVIEW upgrade
« Reply #412 on: February 24, 2019, 08:21:03 pm »
yes

Offline kevL

  • Colonel
  • ****
  • Posts: 211
    • View Profile
Re: MAPVIEW upgrade
« Reply #413 on: February 24, 2019, 08:30:01 pm »
thank ya (excellent work, guys)


EDIT:
2019 February 25

 - PckView: support for SCANG.DAT files
 - PNG output sets palette-id #0 transparent
 - minor fixes and code improvements

https://github.com/kevL/OpenXCOM.Tools/blob/master/Distribution/README.md

attached: stock ScanG iconset w/ 14 green shoreline icons added


EDIT:
2019 February 26

 - more integration of ScanG viewer; update when the Map changes; etc.
 - ScanG view: double right-click to reload SCANG.DAT from disk
 - File->ReloadTerrains: reload Map/Routes/Terrains from disk (without having to click to a different Map and back, or reload the app)
 - MCD Info: fix TU_Slide/TU_Fly inversion
 - extend MainView's SpriteShade setting to TileView and TopView sprites and refresh all sprites when user changes the shade
« Last Edit: February 27, 2019, 12:11:28 am by kevL »

Offline Alex_D

  • Colonel
  • ****
  • Posts: 221
    • View Profile
Re: MAPVIEW upgrade
« Reply #414 on: February 27, 2019, 08:51:57 am »
Thanks for the new version. The ScanG is a great feature.

Is there any plans on viewing the LOFTS?

- File->ReloadTerrains: reload Map/Routes/Terrains from disk (without having to click to a different Map and back, or reload the app)

I downloaded the 2019-Feb-26 version, installed on a clean folder except for the "settings", ran it and I don't see the option above . Do I need to modify something else?

By the way, my antivirus program keeps on warning the file is so uncommon that might be dangerous, blah, blah. Please (to others), keep using the program so there is a proper database and the flag can be removed by the AV database.

Offline kevL

  • Colonel
  • ****
  • Posts: 211
    • View Profile
Re: MAPVIEW upgrade
« Reply #415 on: February 27, 2019, 08:01:57 pm »
oops i goofed. (i put the feb25 files in the feb26 archive)

go for the MapView2_190226b.7z arch. "Reload terrains" should appear just beneath "ScanG view" -- sry and thanks for the catch


Thanks for the new version. The ScanG is a great feature.

refresher:
double LMB - toggle between single-level ("1" is appended to the titlebar caption) and multi-level (default)
double RMB - reload ScanG.Dat from disk (shows message success or fail)
mousewheel - level up/down

Quote
Is there any plans on viewing the LOFTS?

not in Mapview at present. I am however currently coding McdView... based on the appearance of Volutar's MCDEdit but it won't have PCKEdit (if i can help it.. I'm not an artist and have no clue what's going on in PCKEdit..)

McdView ought show the LofTs like MCDEdit does. If you have a more specific request to show the LofTs within the design of Mapview i'd consider it ....


Quote
By the way, my antivirus program keeps on warning the file is so uncommon that might be dangerous, blah, blah. Please (to others), keep using the program so there is a proper database and the flag can be removed by the AV database.

i know so little about coding viruses ... but I suppose it's due to the over-complexity that Mapview was coded with (originally, Daishiva had his reasons for doing it that way)

... watching those in the know at the AV companies could be humorous to watch analyzing it, scratching their heads going, huh whot?

/anyway :|


if i goofed again, pls let me know


EDIT: screenshot -- McdView in progress...
« Last Edit: March 10, 2019, 09:59:31 am by kevL »