Build ASCII Map from Coordinate file?

Various / CUSTOM BUILT
August 10, 2015 at 00:22:37
Specs: Windows 7 Professional, Intel i7 4770k, 16GB 1600MHz RAM
I had this idea if I could build an ASCII map from a set of coordinates that looks like this:

x1;y1=X
x2;y1=-
x3;y1=|
x4;y1=/
x5;y1=|
x6;y1=\
x7;y1=_
x8;y1=/
x9;y1=_

etc. etc.
The x coordinate specifies the horizontal position (coloumn number), and the y is the vertical position (line number).

I came up with this script to assemble the map inside cmd:

@Echo off
setlocal enabledelayedexpansion
Echo Drawing world...
Echo.
for /f "tokens=1,2* delims=;" %%A in (asciiMap.txt) do (
	for /f "tokens=1,2 delims==" %%C in ("%%B") do (
		call :sr_Draw "%%D"		
	)
	call :sr_NewLine
)
Echo.
Echo.
Echo Done.
pause > nul
exit

:sr_Draw
echo | set /p drawChar=%1
goto :eof

:sr_NewLine
Echo.
goto :eof


But every time a special character is attempted to be drawn, it outputs

The system cannot find the drive specified

I know I can comment out the special chars, but I don't know how to make it work with ALL characters. Is there a way around this? (Doesn't have to be compatible with all chars, only the most common ones in ASCII drawings).

99 little bugs in the code,
99 little bugs.
Take one down, patch it around,
129 little bugs in the code.

message edited by RainBawZ


See More: Build ASCII Map from Coordinate file?

Report •


#1
August 28, 2015 at 08:18:34
Nothing?

Did I ask incorrectly, or is it simply a stupid question?

99 little bugs in the code,
99 little bugs.
Take one down, patch it around,
129 little bugs in the code.


Report •
Related Solutions


Ask Question