Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Zazou
Beginner


Joined: 19 Feb 2007
Posts: 13

PostPosted: Tue Jul 19, 2011 10:33 pm   

Format of MetaTbl.DrawData in the automapper database
 
I have a program which imports and renders [zC]MUD maps. Fortunately, the change in v3 to use SQLite databases makes reading the data *so* much easier.. unfortunately, the format of MetaTbl.DrawData has changed.

This column defines the shape of links which have bends inserted into them. Does anyone know the new structure of this data? Previously, it was a series of little endian four-byte integers which, paired up, represented the coordinates of the bends.

Ta,
Zazou
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jul 20, 2011 2:27 am   
 
This should not have changed. It is a binary field that contains the raw Windows Meta data for shapes. This is an internal Windows API data format. Someday it might change to something more standard such as SVG.

The use of the DrawData for links with bends should also be the same. This is a special case where the data does not represent the Windows Meta draw data format. It should just be the coordinates of the bends as you mentioned. I'm not aware of any change that I ever made to this.

But since the internal format of these kind of tables are not documented and subject to change, you really are on your own to figure it out.
Reply with quote
Zazou
Beginner


Joined: 19 Feb 2007
Posts: 13

PostPosted: Wed Jul 20, 2011 11:57 am   
 
Thanks for the reply. That's a bit odd; under zMUD and CMUD 2, the field always just contained the coordinates of bends for me [which was nice and easy to deal with! :)]. I don't suppose there's a way to coerce it into saving in that format?

Do you have a reference for the API you mentioned? Nearest thing I found from the terms you mentioned was the old Windows Metafile format, which I don't think it is (since the header isn't valid under that specification).
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jul 20, 2011 10:31 pm   
 
I think it *is* the old Windows Metafile format. I just do a SaveToStream call on the data in the raw Windows buffer and I don't know if that includes a header or not. Honestly it's been years since I messed with that stuff and it's the part of zMapper that no longer compiles and will be the first thing changed in any newer mapper data format.

For the bends though, can you post an example of the raw data in the field between CMUD2 and CMUD3? As I said, I don't remember making any changes to this. The only difference should be SQLite2 vs SQLite 3.
Reply with quote
Zazou
Beginner


Joined: 19 Feb 2007
Posts: 13

PostPosted: Fri Jul 22, 2011 8:59 pm   
 
Sorry, I was somewhat wrong! The only change is that in the stream of integers, there's now a replacement of 0x00 to 0x2530.. which is a tad confusing if you don't realise that quickly. Makes it look like each integer has a variable byte length. Any idea why that's happening?

[When you come to change the format, it would be great if you could keep it as something readable--ie, not Windows Metafile ;)]
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Jul 23, 2011 3:45 pm   
 
That's really strange. I wonder if that is something SQLite is doing? CMUD certainly doesn't replace any of the zero bytes with anything.

And yes, if I change the format it will be to some industry standard like SVG. Don't know how "readable" it is, but it's better than Metafile!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net