Jump to content
SubSpace Forum Network

Recommended Posts

Posted

And I fixed most of the bugs that were pissing me off last time I worked on it...

 

Not bugs that you guys saw, but stuff that got there after some radical changes in the code.

 

I revamped the whole tileset thing, code-wise.

 

At the beginning, the tileset selection was just 2 numbers... left tile # and right tile #. Then we had walltiles on top of that... And now we have LVZ on top of that...

So it was starting to get messy. And I wanted to eventually add in a 'block' thing. A block would be a set of tiles/lvz images that you defined and you can put it as many times as you want. So it should be a bit easier to do that with the new Tileset class...

 

Tools should be a bit faster too, because I removed A LOT of parameters getting passed around functions. All the tileset related values and all tool-options related values are stored in just two objects available to the whole class.

 

For example, the DrawBaseLine header looked like:

Private Sub DrawBaseLine(tilenr As Integer, _
			 startx As Integer, startY As Integer, _
			 endX As Integer, endY As Integer, _
			 StepX As Integer, _
			 StepY As Integer, _
			 undoch As Changes, _
			 multTileX As Integer, _
			 multTileY As Integer, _
			 Optional onpreview As Boolean = True, Optional Refresh As Boolean = True, _
			 Optional appendundo As Boolean = True, _
			 Optional tagwalltiles As Boolean = False, _
			 Optional Left As Boolean = True)

 

It's now:

Private Sub DrawBaseLine(ByVal startx As Integer, ByVal startY As Integer, _
			 ByVal endX As Integer, ByVal endY As Integer, _
			 undoch As Changes, _
			 onpreview As Boolean, Refresh As Boolean, _
			 appendundo As Boolean)

 

 

And that method is probably the one slowing you down when drawing very thick lines and the preview is real slow...

So it will probably help.

 

 

But it's still far from being able to compile again. We basically need to go through the whole code and fix that.

Posted

Just an idea, for open ended development...

What about the ability to have "plugins" for DCME?

 

Like add on apps which can be managed to

expand on it to become more than a map editor.

And saves you the trouble and others of adding code to be compiled with the main app?

Posted
Noo 3.1.12 is bugged, you can't do regions in it without it corrupting them.

Really?

 

*tests*

 

What I see is the 'base' and 'no weapons' properties aren't saved properly... other than that, everything is fine

 

Haven't tested it ingame though

 

fixed... it actually saved a "rBAS" chunk for isBase, and "NWP" for No weapons, when it should be "rBSE" and "rNWP". But for loading, it was expecting the correct strings.

Posted

Here's the md5 of the version I used: 0323cd13c519e4df3d16e5c0ccfd9094

Steps to reproduce:

- create a new map.

- import a tileset.

- create a new region named "test".

- save the map then close it.

- double click on the new file.

 

The region name may change to "rTIL" or some other garbage, it seems to depend on what tileset you imported. In one case it changed the name to 0x04, you can see it in a hex editor but it doesn't show up at all in the editor.

Posted

Attach the log file after saving and re-opening the map

 

Can't seem to reproduce it...

 

Do you create regions from the region tool's toolbar, or from the eLVL form?

Posted

Ok here's the log. The interesting bit is probably near the bottom where it says "warning" blum.gif

29/01/2008 11:57:06 AM --- Drake Continuum Map Editor (v3.1.12) starting...

918866 +++ OtherInstance 0

918866 +++ Settings loaded

test.lvl @ OpenMap, Opening Map... C:\SubSpaceDev\Map Editors\test.lvl

test.lvl @ OpenMap, No tileset found ; usingDefaultTileset True

test.lvl @ InitTileset, tilesetpath= Default usingDefaultTileset True

test.lvl @ OpenMap, tile data starting at 1

test.lvl @ OpenMap, 0 tiles loaded. Now at 5

Map loaded successfully

DCME ready

test.lvl @ ImportTileset, importing: C:\SubSpaceDev\Map Editors\tiles.bmp

test.lvl @ Bitmap info header:

--- Color Depth: 8

--- Size: 304x160

--- BiSizeImage: 41664

--- Compression: 1

test.lvl @ ImportTileset, bmpdata is imported from: C:\SubSpaceDev\Map Editors\tiles.bmp

test.lvl @ InitTileset, tilesetpath= C:\SubSpaceDev\Map Editors\tiles.bmp usingDefaultTileset False

test.lvl @ SaveMap, saving map... C:\SubSpaceDev\Map Editors\test.lvl

test.lvl @ Flags = 65535

test.lvl @ SaveMap, C:\SubSpaceDev\Map Editors\test.lvl exists, checking for .bak file

test.lvl @ SaveMap, opening C:\SubSpaceDev\Map Editors\test.lvl for binary as #1

test.lvl @ SaveMap, bitmap header position: 1

test.lvl @ SaveMap, bfReserved1 set to: 42744 (42744)

test.lvl @ eLVL.saveRegionsFromMap, Saving Region(0) at 42757

test.lvl @ eLVL.saveRegionsFromMap, Putting Name at 42765

test.lvl @ eLVL.saveRegionsFromMap, Putting Tiledata at 42773

test.lvl @ eLVLdata.SaveRegionTileData, saving 1024 empty rows

test.lvl @ eLVL.saveRegionsFromMap, Putting Color at 42785

test.lvl @ eLVL.saveRegionsFromMap, End of region at 42797 - size was 32

test.lvl @ eLVL.PutELVLData, Saving Hashcode at 42797

test.lvl @ eLVL.PutELVLData, Rewriting total size: 72 at 42749

test.lvl @ SaveMap, total eLVL size returned: 72

test.lvl @ SaveMap, New bitmap bfSize: 42816 (42816)

test.lvl @ SaveMap, BMPData is stored into lvl, starting tile data at 42817

test.lvl @ SaveMap, 0 tiles were saved into lvl. Total file size: 42817 bytes.

test.lvl @ mapchanged set to False

Float tileset loaded

Unloading frmMain(0) 0 0

+++ Closing map test.lvl (ID: 0)

Unloading frmMain(0) 0 0

Float radar loaded

 

29/01/2008 11:57:33 AM --- Drake Continuum Map Editor (v3.1.12) starting...

264122 +++ OtherInstance 918866

+++ openedMapByArgs True

264122 +++ Other instance found, sending OPENMAP message to 918866

918866 +++ Received message: 49627

918866 +++ Read 'C:\SubSpaceDev\Map Editors\test.lvl' in paths

test.lvl @ OpenMap, Opening Map... C:\SubSpaceDev\Map Editors\test.lvl

test.lvl @ OpenMap, Tileset found

test.lvl @ OpenMap, Bitmap info header:

--- Color Depth: 8

--- Size: 304x160

--- BiSizeImage: 41664

--- Compression: 1

test.lvl @ OpenMap, Bitmap info header:

--- bfType: 19778

--- bfSize: 42816

--- bfReserved1: 42744 (42744)

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

test.lvl @ OpenMap, no eLVL data found

test.lvl @ Openmap, usingDefaultTileset False

test.lvl @ OpenMap, WARNING: Seek(f)=42743 bfSize+1=42817

test.lvl @ TileDataRecovery, attempting tile data recovery at 42817

test.lvl @ TileDataRecovery, with offset 0, 0 tiles found, 0 errors occured.

test.lvl @ TileDataRecovery, best offset found: 0 with 0 errors.

test.lvl @ InitTileset, tilesetpath= C:\SubSpaceDev\Map Editors\test.lvl usingDefaultTileset False

test.lvl @ OpenMap, tile data starting at 42817

test.lvl @ OpenMap, 0 tiles loaded. Now at 42821

Map loaded successfully

264122 +++ Other instance found, shutting down

DCME ended successfully

Unloading frmMain(0) 0 0

+++ Closing map test.lvl (ID: 0)

DCME ended successfully

I used the region toolbar and also tried the version you just posted

Posted

Send me that tileset... it has Compression bit to 1. How do you make bitmaps with compression anyway?

The 'warning' thing is because after it loaded the tileset, the 'cursor' isn't where it expected to be in the file. So it tries to load the tiles from there anyway, and if it gets errors, it will try again starting from another place. But yeah, "normally" it shouldn't need to do that.

It did start to load tile data from the correct place, though, so that's not exactly the problem here.

test.lvl @ SaveMap, BMPData is stored into lvl, starting tile data at 42817
[.......]
test.lvl @ OpenMap, tile data starting at 42817

 

But the thing is as soon as it loaded the tileset, it was already beyond the whole eLVL data.

 

 

Anyway, just send me that tileset, I'll test it out

Posted (edited)

Heres 3 things I saw.

 

  • On the line tool or any tool that uses the "Step" and "Size" feature doesn't tell you which is which meaning it does not say which thing is "step" and which one is "size".

  • Generate walltiles could use a fix.

  • When I exited it gave me an error saying "frmMain was not unloaded correctly" I kept on clicking ok. Had to click it 3 times and it closed.

Good job though :(

Edited by cReEmY
Posted

right... in the past, DCME ended with a 'End' statement, which resulted in Vista users getting some Crash report thing. Some forms were not unloaded correctly, so I added a check when closing, to be sure that every form is unloaded. If any form is still loaded, it reports it.

 

For now, ignore... We'll test and fix the memory management errors that cause the problem.

 

By size and step, you mean like there's no text on the sliders? Yeah I think I saw that too... didn't understand why was that.

 

For the generate walltiles, Aquarius will send me a video showing a full procedure to create a walltile set, with the shading and all. We should be able to improve it then smile.gif

Posted
Anyway, just send me that tileset, I'll test it out
I used the default tileset from cont's graphics directory. As a side note when it says "eLVL data could not be saved because this map does not have a tileset" it should ask you whether you want to use the default tileset, instead of making the user manually import the default tileset.
Posted
Anyway, just send me that tileset, I'll test it out
I used the default tileset from cont's graphics directory. As a side note when it says "eLVL data could not be saved because this map does not have a tileset" it should ask you whether you want to use the default tileset, instead of making the user manually import the default tileset.

 

Fixed the issue concerning tilesets using the length encoding (aka when it says Compression = 1 in the log when importing it)

Atleast I think it's fixed blum.gif

 

It was expecting a bfReserved value of 49720 when it was 8bit... Now I just set it as : if bfReserved is different than the size of the actual bitmap, try to get eLVL data.

 

Give it a try... might want to try it with various tilesets too, with or without eLVL, see if it tries to load eLVL when there is none or things like that

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