n = nLineDefsSelected
if NotEqual("n,1")
	Show "You must select one linedef."
	End
endif
GetSelectedLineDef n
;
GetLineDefProperty MapAngle, n, ANGLE
GetLineDefProperty ev, n, EndVertex
GetLineDefProperty Fl, n, Flags
SetLineDefProperty n, Flags, Fl + LF_UPPERUNPEGGED + LF_LOWERUNPEGGED
Up
TurnAround
Move 2
Right
Down
;
GetLineDefProperty sec, n, FrontSector
GetSectorProperty f, sec, FloorHeight
NewSector f + 38, f + 38 + 7, "FLAT23", "FLAT23", 192

LineDefFrontSector = nSectors

UserInput ( t, "Text?", "ABCDEFGHIJKLMNOPQRSTUVWXYZ" )
len = Length ( t )
tl = 0

; one pixel on left side
LineDefFrontMainTexture = "BRNPOIS"
LineDefFrontXOffset = 16
LineDefFrontYOffset = 63
l = 1
call line

for i, 1, len
	c = mid ( "t, i, 1" )
	k = asc ( c )
	l = 0
	if equal("k,65")
		;show "A"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 30
		LineDefFrontYOffset = 22
		l = 5
		call line
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
		l = 1
	else
	if equal("k,66")
		;show "B"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 17
		LineDefFrontYOffset = 63
		l = 2
		call line
		LineDefFrontXOffset = 33
		LineDefFrontYOffset = 63
		l = 2
		call line
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 12
		LineDefFrontYOffset = 22
		l = 3
	else     
	if equal("k,67")
		;show "C"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 37
		LineDefFrontYOffset = 63
		l = 3
		call line               
		LineDefFrontXOffset = 25
		LineDefFrontYOffset = 63
		l = 1
		call line
		call line             
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else     
	if equal("k,68")
		;show "D"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 21
		LineDefFrontYOffset = 22
		l = 6
	else     
	if equal("k,69")
		;show "E"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 17
		LineDefFrontYOffset = 63
		l = 2
		call line
		LineDefFrontXOffset = 33
		LineDefFrontYOffset = 63
		l = 1
		call line
		LineDefFrontXOffset = 25
		LineDefFrontYOffset = 63
		call line
		call line             
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else     
	if equal("k,70")
		;show "F"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 17
		LineDefFrontYOffset = 63
		l = 3
		call line
		LineDefFrontXOffset = 19
		LineDefFrontYOffset = 63
		l = 1
		call line 
		call line               
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else     
	if equal("k,71")
		;show "G"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 23
		LineDefFrontYOffset = 63
		l = 3
		call line               
		LineDefFrontXOffset = 34
		LineDefFrontYOffset = 63
		l = 1
		call line
		call line             
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else     
	if equal("k,72")
		;show "H"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 27
		LineDefFrontYOffset = 22
		l = 2
		call line
		LineDefFrontXOffset = 23
		LineDefFrontYOffset = 24
		l = 1    
		call line
		LineDefFrontXOffset = 27
		LineDefFrontYOffset = 22
		l = 3
	else     
	if equal("k,73")
		;show "I"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 27
		LineDefFrontYOffset = 22
		l = 3
	else     
	if equal("k,74")
		;show "J"                           
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 31
		LineDefFrontYOffset = 66
		l = 1
		call line
		call line
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 27
		LineDefFrontYOffset = 22
		l = 3
	else     
	if equal("k,75")
		;show "K"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 27
		LineDefFrontYOffset = 22
		l = 2
		call line
		LineDefFrontXOffset = 23
		LineDefFrontYOffset = 24
		l = 1    
		call line
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 12
		LineDefFrontYOffset = 22
		l = 3
	else     
	if equal("k,76")
		;show "L"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 43
		LineDefFrontYOffset = 63
		l = 2
		call line
		LineDefFrontXOffset = 31
		LineDefFrontYOffset = 66
		l = 1
		call line
		call line
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else     
	if equal("k,77")
		;show "M"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 43
		LineDefFrontYOffset = 63
		l = 5
		call line               
		LineDefFrontXOffset = 45
		LineDefFrontYOffset = 63
		l = 4
	else     
	if equal("k,78")
		;show "N"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 43
		LineDefFrontYOffset = 63
		l = 6
	else     
	if equal("k,79")
		;show "O"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 23
		LineDefFrontYOffset = 63
		l = 6
	else     
	if equal("k,80")
		;show "P"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 17
		LineDefFrontYOffset = 63
		l = 6
	else     
	if equal("k,81")
		;show "Q"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 23
		LineDefFrontYOffset = 63
		l = 3
		call line
		LineDefFrontXOffset = 46
		LineDefFrontYOffset = 63
		l = 2
		call line               
		LineDefFrontXOffset = 31
		LineDefFrontYOffset = 66
		l = 1
		call line               
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else     
	if equal("k,82")
		;show "R"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 9 
		LineDefFrontYOffset = 22
		l = 6
	else     
	if equal("k,83")
		;show "S"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 32
		LineDefFrontYOffset = 63
		l = 5
	else     
	if equal("k,84")
		;show "T"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 35
		LineDefFrontYOffset = 22
		l = 6
	else     
	if equal("k,85")
		;show "U"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 29
		LineDefFrontYOffset = 63
		l = 2
		call line               
		LineDefFrontXOffset = 24
		LineDefFrontYOffset = 70
		l = 1
		call line
		LineDefFrontXOffset = 29
		LineDefFrontYOffset = 63
		l = 2
		call line
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
		l = 1
	else     
	if equal("k,86")
		;show "V"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 23
		LineDefFrontYOffset = 64
		l = 1
		call line
		LineDefFrontXOffset = 34
		LineDefFrontYOffset = 77
		call line
		LineDefFrontXOffset = 24
		LineDefFrontYOffset = 70
		call line
		LineDefFrontXOffset = 34
		LineDefFrontYOffset = 77
		call line
		LineDefFrontXOffset = 23
		LineDefFrontYOffset = 64
		call line
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else     
	if equal("k,87")
		;show "W"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 29
		LineDefFrontYOffset = 63
		l = 2
		call line               
		LineDefFrontXOffset = 24
		LineDefFrontYOffset = 70
		l = 1
		call line
		LineDefFrontXOffset = 29
		LineDefFrontYOffset = 63
		l = 2
		call line
		LineDefFrontXOffset = 24
		LineDefFrontYOffset = 70
		l = 1
		call line
		LineDefFrontXOffset = 29
		LineDefFrontYOffset = 63
		l = 2
		call line
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
		l = 1
	else     
	if equal("k,88")
		;show "X"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 13
		LineDefFrontYOffset = 22
		l = 1
		call line
		LineDefFrontXOffset = 12
		LineDefFrontYOffset = 22
		call line
		LineDefFrontXOffset = 23
		LineDefFrontYOffset = 24
		call line
		LineDefFrontXOffset = 12
		LineDefFrontYOffset = 22
		l = 3
	else     
	if equal("k,89")
		;show "Y"                           
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 31
		LineDefFrontYOffset = 80
		l = 1
		call line
		LineDefFrontXOffset = 20
		LineDefFrontYOffset = 63
		call line
		LineDefFrontXOffset = 28
		LineDefFrontYOffset = 74
		call line               
		call line
		LineDefFrontXOffset = 20
		LineDefFrontYOffset = 63
		call line
		LineDefFrontXOffset = 31
		LineDefFrontYOffset = 80
		call line
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else     
	if equal("k,90")
		;show "Z"
		LineDefFrontXOffset = 27
		LineDefFrontYOffset = 25
		l = 2
		call line               
		LineDefFrontXOffset = 29
		LineDefFrontYOffset = 23
	else     
	if equal("k,32")
		;show " "               
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 49
		LineDefFrontYOffset = 63
		l = 4
	else     
	if equal("k,42")
		;show "*"
		LineDefFrontXOffset = 31
		LineDefFrontYOffset = 37
		l = 4
	else     
	if equal("k,45")
		;show "-"
		LineDefFrontXOffset = 36
		LineDefFrontYOffset = 38
		l = 3
	else            
	if equal("k,33")
		;show "!"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 28
		LineDefFrontYOffset = 76
		l = 1
		call line
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else
	if equal("k,39")
		;show "'"
		LineDefFrontMainTexture = "GRAYPOIS"
		LineDefFrontXOffset = 36
		LineDefFrontYOffset = 35
		l = 1
		call line
		LineDefFrontXOffset = 14
		LineDefFrontYOffset = 22
	else
	if equal("k,46")
		;show "."
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 25
		LineDefFrontYOffset = 77
		l = 1
		call line
		call line
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	else
	if equal("k,58")
		;show ":"
		LineDefFrontMainTexture = "BRNPOIS"
		LineDefFrontXOffset = 26
		LineDefFrontYOffset = 73
		l = 1
		call line
		LineDefFrontXOffset = 16
		LineDefFrontYOffset = 63
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	endif
	
	call line
next

LineDefFrontXOffset = 0
LineDefFrontYOffset = 0
LineDefFrontMainTexture = "SHAWN2"

right
move 2
right 

SetVertexProperty ev, X, MapX
SetVertexProperty ev, Y, MapY

move tl
right
move 2

stop

sub line
	move l
	tl = tl  + l
endsub
