Request Open *.map files in map editor

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,114
513
175
I registered map editor program (Akaras version) in windows registry and now when I launch a *.map file, it opens the editor just fine but the file is not loaded in it.

I need a hint what to change in the editor source code to enable maps to be loaded in the editor when launching *.map file in windows.

Pete107's editor mod has some tweak to have the maps loaded when they are launched from windows but it is now badly outdated as it only loads WemadeMir2 libraries up to Object23.lib, while the current lib count is 26 and the source for it is not available, never was.
That editor is jut plain original one, with just this tweak to open maps when you launch them in windows. Unfortunately, it is a very handy tweak to have.
 
Last edited:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,178
30
2,780
540
If you look at the library editor code, that has the code needed to open files.

You should be able to take most of it as is I expect
 
  • Like
Reactions: mir2pion

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,114
513
175
Launching a map in windows starts the map editor but the map tab pane stays black (as when you just start the editor without opening a map).

Then, while the program is opened, I tried to open a map in a standard way via the Open dialog and it would change that black screen background to white but no map would be visible. Program header info would show the map size and its path/name. Closing the editor and launching it again, maps could be opened as normal.

Changing the windows setting to point back to Pete107's map editor, maps launched from windows would open in that editor just fine.

I found the likely place in the code. On the left is the LibraryEditor, on right the MapEditor code.

1630916285640.png

I will try to add 'return;' to the end of line 4470 on the right. Also as a next step if that doesn't work I would change '==' on the right to '!=' as it is on the left in the library editor.
Otherwise the line 264 on the left in the library editor seems to do what is done on the right on lines 4471 to 4479 in the map editor.
 
Last edited:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,178
30
2,780
540
You're in the general correct area. You need to change OpenMap to allow a string to be passed in, and if thats got something in it then open the file using that, instead of showing the openFileDialog prompt.
 
  • Like
Reactions: mir2pion