View Full Version : Map Modify SEQ

04-06-2004, 03:27 PM
Hello all
I recently downloaded maps for SEQ format which has a MAP ext.
How do I modify those? I tried converting to text and just plain opening

Whoopus (Still learning)

04-06-2004, 08:43 PM
Hello all
I recently downloaded maps for SEQ format which has a MAP ext.
How do I modify those? I tried converting to text and just plain opening

Whoopus (Still learning)
Mappie does not natively support SEQ format, however it CAN do it.
If you have a little bit of programming skill, you can modify the file format DLL and store it in the directory you have the maps.

Here's how:
When you install Mappie, click "Custom" and have it install the DLL Source.
Modify it to where it should be for an SEQ file.
Compile it, and place it in the map folder.
Mappie should then be able to understand the file format.

I am pretty sure that someone has a Mappie SEQ DLL floating around somewhere, but I've never seen it. I would have written and released one, but I've never had SEQ maps. Might put it on my to-do list...

Hope this helps. If not, let me know.

04-07-2004, 03:03 PM
Ok I did a search on this web site plus search engines. Unalble to find that DLL. I still keep on looking though.

Thanks for the the idea

05-28-2004, 03:19 PM
I had a look quite a while back, but the problem with the API is that the function to process a map lnput line expects a single line segment (or point) as a return, which is exactly what you want for a SOE map, but cannot be used for a SEQ Map as a SEQ map has multiple line segments per input file line.

E.g. consider the line A-B-C-D with which is coloured red
a SOE map would look like this


SEQ map looks like this

M,LineName,RED,4, Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Dx,Dy,Dz

We either need a way to return an array of points/line segments.
Or we need to have a way to tell mappie that we have not fully processed the line and it should send it back to us, with an integer that we set to tell us how far through the line we have processed.


FILEFORMAT_API int ReadData(char* InputString,SFileFormat* Data, int PointCount)

Then the Read Map Function in Mappie should call ReadData multiple times for each input line until PointCount is set to 0.

Read Map Logic.

Open Map File
InputString = ReadLine
PointCount = 0
ReadData InputString, Data, PointCount
StoreData Data
Loop Until PointCount = 0


For the above Map line the code the SEQ code could then take the line
L RED 4pts, A, B, C, D

On the first call the dll would return the line segment A-B and set PointCount =1 to indicate there are more points to process in this line.
On the second call the dll would know to skip the first point because PointCount =1 and would return the 2nd segment from B-C and set PointCount = 2.
On the 3rd call the dll would return C-D and set the PointCount to 0 to indicate the line has been fully processed.

for your reference these are what a SEQ map looks like:
Map Long Name, Short Name, ????
M,Line Name,Colour,Point Count,X1,Y1,Z1,X2,Y2,Z2,X3...
L,Line Name,Colour,Point Count,X1,Y1,X2,Y2,X3,Y3...
P,Point Name,Colour,X,Y

Note colour will either be a name or RGB value in the format #RRGGBB

Misty Thicket,Misty Thicket,212,274,593,550,4023,2345
L,line_name,gray,38,-2575,418,-2568,418,-2557,430,-2556,490,-2545,502,-2496,501,-2475,512,-2431,511,-2440,1167,-1898,1158,-1510,1152,-664,1134,-48,1129,-48,648,-98,650,-100,633,-110,632,-110,584,-48,594,-48,139,-102,139,-100,86,-48,85,-48,-90,-26,-91,-26,1129,1248,1167,1252,831,1254,645,1256,455,1258, 271,1261,86,1263,-142,1267,-457,1269,-775,1332,-778,1416,-789,1442,-815
P,Druid Ring,white,-1826,-498
P,Succor Point,white,0,0

05-29-2004, 03:59 AM
Oh wow... that's a problem.... When I wrote the fileformat API I hadn't thought of that...

Thanks for a sample file, I can probably get something worked out in both the API and in native code for SEQ files now.

Thanks! Hopefully Mappie 1.5 will be released soon... It's having performance issues with line manipulation tools that I want solved before it goes public.

06-01-2004, 09:17 AM
Couple of points I should mention:

Filename - same name as SOE, but without the _1, and has .MAP extension.

End of line character - May be just LF rather than CRLF as many of the files originate from a linux file system.

06-01-2004, 12:05 PM
The colour names that are recognised come from UNIX's RGB.txt

The white space rules for this file are a little relaxed, but here is a copy i cleaned up a bit.

I have a preprocessor for colour names that strips spaces, changes grey -> gray and converts it to lower case. This saves quite a bit of memory as many of the entries in the file are essentially the same but with different case, spelling + use of spaces.

private string FixName(string sInput)
string sFixed = sInput.ToLower();
sFixed = sFixed.Replace(" ", "");
sFixed = sFixed.Replace("grey", "gray");
return sFixed;