Sorry for the delay in getting this to you. Since it may be of use to others as well, I'm going to go ahead and post it rather than email it.
; --------------------------------------------------------
; Tile Studio Script for XNA Tile Engine Component
; from www.xnaresources.com
; --------------------------------------------------------
#file <ProjectName>.map
#tileset
#map
1\n<MapHeight>\n<MapWidth>\n
#mapdata
<TSBackTile>\n<TSMidTile>\n<TSFrontTile>\n<MapCode>\n
#end mapdata
#end map
#end tileset
#end file
Put that in a file called XNA.tsd in the same directory as the Tile Studio executable. Once you have created your map in Tile Studio, go to the Code->Code Generation Settings menu item and select XNA. Then select Code->Generate Code to create the file containing the map.
You can load it into your game using the following code from XNAResources Tile Engine Tutorial:
void ReadMapFromFile(string sFileName)
{
StreamReader srReader;
srReader = File.OpenText(sFileName);
int iReadVersion = Convert.ToInt32(srReader.ReadLine());
iMapHeight = Convert.ToInt32(srReader.ReadLine());
iMapWidth = Convert.ToInt32(srReader.ReadLine());
for (int y = 0; y < iMapHeight; y++ )
{
for (int x = 0; x < iMapWidth; x++ )
{
iMap[y,x] = Convert.ToInt32(srReader.ReadLine());
iMapTrans[y, x] = Convert.ToInt32(srReader.ReadLine());
iMapObjects[y, x] = Convert.ToInt32(srReader.ReadLine());
iMapWalkable[y, x] = Convert.ToInt32(srReader.ReadLine());
}
}
srReader.Close();
}