Jump to content
SubSpace Forum Network

Recommended Posts

Posted

Had the misfortune to find an awful bug today while playing with a tileset in DCME. It's reproduceable (I just did it again now). Here is what I did:

 

- Loaded map A.

- Loaded map B.

- Saved map B's tileset to a BMP.

- Opened the Tileset Editor.

- Opened the BMP just saved as the source image.

- Selected tiles in the source image, and copied them into map A's tileset.

- Hit close on the tileset window.

- When asked whether to apply the tiles, I hit yes.

- Closed the map -- decided I didn't like the tiles, and was going to Photoshop some new ones. At the prompt to save I said no.

- Opened the map afterward: the map is now completely blank, and the tileset change that I didn't like remains (probably was written to disk rather than memory at the tileset editor closing prompt?).

 

If it's useful to know, I used a tileset internal to the map rather than an external file, and was using 24bit color in the tileset.

 

Fortunately I have a pretty recent backup of the map on a server. If this is the worst DCME brings me, for all the time it's so far saved, I have no big complaints. (For example, the ability to move tiles around on the fly and observe the results on the map has made aesthetic decisions about tiles ... actually enjoyable.)

 

Thanks.

 

I forgot to mention: as the subject of the thread implies, the autosave file was also overwritten and was in every way the same as the regular file.

Posted

i'll look into it, can you add the relevant part of the DCME log file in [ spoiler ] tags. Thx smile.gif

 

This might be why my map went blank oO" (i didn't know what the !@#$%^&* happened because i only found out later)

 

 

Edit: i found out the problem

 

The tileset path stored in the map refers to a lvl file rather than a bmp file. So when you close the tileset form, it saves the tileset, and applies it to the current map. The "save tileset" call is the problem, because it just saves the tileset as a bitmap and doesn't take in account that it could be referring to a lvl file, and thus overwriting all tiles that comes after the bitmap data.

 

Solution (for me or sama): don't save (saving is used to be able to import it) but copy the data directly to the BMPData and blt to the tileset (hard but more efficient) or save to a temp file and import from the temp file, then kill the temp file (quite easy to do). Either way, change mapupdate to true because it isn't changed until the user saves the map (which should be the default behaviour)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...