Jump to content
SubSpace Forum Network

Recommended Posts

Posted

since ive been using DCME ive always needed to copy a map i am editing coz ALOT of times when a map gets big and uses alot of tiles, and you try to save it it saves properly and does everything correct, but then when you close DCME and re-open the map the tileset is grey (thats what i copyed the map for so the tileset isnt lost).

How can this happen and can this be fixed? its realy annoying. mostly when you reopen the map and the tileset is grey and import a tileset again and then save it it is fixed but last time i kept having that problem for like 10 times. re-saving->re-open->re-importing tileset etc. etc.

 

This problem is realy weird coz sometimes it saves properly and sometimes it saves it grey.

Posted

ok these tileset problems are bugging me too much.

 

I've added debug lines at each change of usingDefaultTileset and bmp data byte array.

 

You can see and copy the debug info in the options, so if you import a good tileset, save it and then close it, it should all be logged into the debug. If you then afterwards open the map again and you see the tileset if !@#$%^&*ed up again; copy the debug info and post it here.

 

Note: debug info is gone when you close DCME, so don't close DCME, but close the map.

 

 

Its based on my current progress, so some new things have been added since the last version but they haven't been completely tested before. This is just a version to test the tileset anyway

DCME_withDebugInfo.zip

Posted

Ummm, where is the debug info to be seen to copy paste? smile.gif

I did send sama a map that it will happen every time for me...

 

Duh, I found it...

 

Opened map, edited a few tiles, saved it, edit more, saved...

 

Un!@#$%^&*led 1 @ Newmap, path = '' usingDefaultTileset True

Un!@#$%^&*led 1 @ InitTileset, path = '' usingDefaultTileset True

... @ Openmap, BMPData is read from lvl file

... @ Openmap, usingDefaultTileset False

... @ InitTileset, path= F:\Apps\Continuum\zones\a1work\fish.lvl usingDefaultTileset False

fish.lvl @ Importtileset, bmpdata is imported from: F:\Apps\Continuum\zones\SSCX Star Warzone\fish.lvl

fish.lvl @ InitTileset, path= F:\Apps\Continuum\zones\SSCX Star Warzone\fish.lvl usingDefaultTileset False

fish.lvl @ SaveMap : BMPData is stored into lvl

... @ Openmap, BMPData is read from lvl file

... @ Openmap, usingDefaultTileset False

... @ InitTileset, path= F:\Apps\Continuum\zones\a1work\fish.lvl usingDefaultTileset False

fish.lvl @ Importtileset, bmpdata is imported from: F:\Apps\Continuum\zones\SSCX Star Warzone\fish.lvl

fish.lvl @ InitTileset, path= F:\Apps\Continuum\zones\SSCX Star Warzone\fish.lvl usingDefaultTileset False

fish.lvl @ SaveMap : BMPData is stored into lvl

fish.lvl @ SaveMap : BMPData is stored into lvl

 

grey tiles on reopen... go reimport tileset...

 

open dcme, open map, edit two tiles, save, close map

 

Un!@#$%^&*led 1 @ Newmap, path = '' usingDefaultTileset True

Un!@#$%^&*led 1 @ InitTileset, path = '' usingDefaultTileset True

... @ Openmap, BMPData is read from lvl file

... @ Openmap, usingDefaultTileset False

... @ InitTileset, path= F:\Apps\Continuum\zones\a1work\fish.lvl usingDefaultTileset False

fish.lvl @ SaveMap : BMPData is stored into lvl

 

grey tileset again...

Posted

I open a map that was originally created in DCME.

It has the tileset in it, like it should have (had to open it in SMME and import a tileset, then save it in SSME for the tileset to show).

I don't even edit the map - I immediately go to save it in DCME.

Debug info after saving it:

Un!@#$%^&*led 1 @ Newmap, path = '' usingDefaultTileset True

Un!@#$%^&*led 1 @ InitTileset, path = '' usingDefaultTileset True

... @ Openmap, BMPData is read from lvl file

... @ Openmap, usingDefaultTileset False

... @ InitTileset, path= C:\Continuum\st4ff\kotr maps\kotr_1.lvl usingDefaultTileset False

kotr_1.lvl @ SaveMap : BMPData is stored into lvl

I close the map.

Open it up again in DCME, and the tileset is now black.

Debug info after opening it:

Un!@#$%^&*led 1 @ Newmap, path = '' usingDefaultTileset True

Un!@#$%^&*led 1 @ InitTileset, path = '' usingDefaultTileset True

... @ Openmap, BMPData is read from lvl file

... @ Openmap, usingDefaultTileset False

... @ InitTileset, path= C:\Continuum\st4ff\kotr maps\kotr_1.lvl usingDefaultTileset False

kotr_1.lvl @ SaveMap : BMPData is stored into lvl

... @ Openmap, BMPData is read from lvl file

... @ Openmap, usingDefaultTileset False

... @ InitTileset, path= C:\Continuum\st4ff\kotr maps\kotr_1.lvl usingDefaultTileset False

http://images5.theimagehosting.com/dcme_tilesetbug.th.PNG

Posted

can you send me the map where it happens too ?

 

Because its pretty normal whats in the debug :s

 

No matter what i try i can't seem to reproduce the bug :/

 

-i create a new map, draw some tiles, import a map, save, close.

open the map again, everything still works

-i draw some more, save , close.

open again, still works.

-import another tileset, still works.

open the map in ssme, draw in ssme, save in ssme, close

- opens it up again in dcme

still works.

- i deleted settings.dat and retested the things above

can't break it.

 

Maybe if i can take a closer look at that map i might be able to find it

Posted

i think i found the problem.

 

Its the tileset bmp format itself.

 

There is an indicator in the BMPInfoHeader if the bmp data is compressed or not. If the data is uncompressed the biSizeImage (image size in bytes) can be 0. This is however not always the case.

 

As DCME redimensioned the bmp data array based on the biSizeImage, the problem occurs when it's 0. It will load correctly, but when saving the tileset again it will only write 1 byte instead of the complete bmp, leading to grey or black bmp data.

 

Without the actual file i would never found it o-O", as i took the reading of the bmp file from other source code that was imo reliable :/

 

 

Edit: Yup that was the problem (hard to track, easy to fix). Fixed!

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...