Advertisement
linesguy

hgr2 text printer with colors

Apr 19th, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 KB | None | 0 0
  1. 0 rem 0=black, 1=green, 2=voilet, 3=white, 5=orange, 6=blue
  2. 0 rem k$="":ifpeek(-16384)>127thengetk$:gosub1000
  3. 0 rem 360/(pi*2)=57.295
  4. 0 rem x=int(pdl(0)*1.094):y=int(pdl(1)*.749)
  5. 10 hgr : hcolor = 3
  6.  
  7.  
  8. 199Poke230,32:gosub 200:Poke49236,0:poke 230,64:gosub200:poke49237,0:goto199
  9. 200fr=fr+1:?"frame ";fr:call-3086
  10.  
  11. 210 rem demo:
  12. 220 sentence$ = "QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  13. 230 xtext = 1
  14. 240 ytext = 1
  15. 245 spacing = 2
  16. 250 gosub 1000 : rem Graphical Printer
  17.  
  18.  
  19. 999 return
  20. 1000 rem Graphical Printer (se$, xt, yt, sp)
  21. 1100 on asc(left$(sentence$, 1)) gosub 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290
  22. 1110 sentence$ = right$(sentence$, len(sentence$) - 1)
  23. 1115 if len(sentence$) =< 0 then return
  24. 1120 xtext = xtext + 5 + spacing
  25. 1125 ct = int(rnd(1)*5)+1 : hcolor = ct : if ct > 2 then hcolor = ct + 2
  26. 1130 goto 1100
  27. 1200 rem ctrl-@
  28. 1201 rem ctrl-A
  29. 1202 rem ctrl-B
  30. 1203 rem ctrl-C
  31. 1204 rem ctrl-D
  32. 1205 rem ctrl-E
  33. 1206 rem ctrl-F
  34. 1207 rem ctrl-G (Bell)
  35. 1208 rem ctrl-H (Left arrow)
  36. 1209 rem ctrl-I (Tab)
  37. 1210 rem ctrl-J (Down arrow)
  38. 1211 rem ctrl-K (Up arrow)
  39. 1212 rem ctrl-L
  40. 1213 rem ctrl-M (Return)
  41. 1214 rem ctrl-N
  42. 1215 rem ctrl-O
  43. 1216 rem ctrl-P
  44. 1217 rem ctrl-Q
  45. 1218 rem ctrl-R
  46. 1219 rem ctrl-S
  47. 1220 rem ctrl-T
  48. 1221 rem ctrl-U (Right arrow)
  49. 1222 rem ctrl-V
  50. 1223 rem ctrl-W
  51. 1224 rem ctrl-X
  52. 1225 rem ctrl-Y
  53. 1226 rem ctrl-Z
  54. 1227 rem ctrl-[ (esc)
  55. 1228 rem ctrl-\
  56. 1229 rem ctrl-]
  57. 1230 rem ctrl-^
  58. 1231 rem ctrtl-_
  59. 1232 return : rem space
  60. 1233 rem !
  61. 1234 rem "
  62. 1235 rem #
  63. 1236 rem $
  64. 1237 rem %
  65. 1238 rem &
  66. 1239 rem '
  67. 1240 rem (
  68. 1241 rem )
  69. 1242 rem *
  70. 1243 rem +
  71. 1244 rem ,
  72. 1245 rem _
  73. 1246 rem .
  74. 1247 rem /
  75. 1248 rem 0
  76. 1249 rem 1
  77. 1250 rem 2
  78. 1251 rem 3
  79. 1252 rem 4
  80. 1253 rem 5
  81. 1254 rem 6
  82. 1255 rem 7
  83. 1256 rem 8
  84. 1257 rem 9
  85. 1258 rem :
  86. 1259 rem ;
  87. 1260 rem <
  88. 1261 rem =
  89. 1262 rem >
  90. 1263 rem ?
  91. 1264 rem @
  92. 1265 hplot xt,yt+6 to xt,yt+2 to xt+2,yt to xt+4,yt+2 to xt+4,yt+6 : hplot xt,yt+4 to xt+4,yt+4 : return : rem A
  93. 1266 hplot xt+3,yt to xt,yt to xt,yt+6 to xt+3,yt+6 : hplot xt+4,yt+1 to xt+4,yt+2 : hplot xt+1,yt+3 to xt+3,yt+3 : hplot xt+4, yt+4 to xt+4,yt+5 : return : rem B
  94. 1267 hplot xt+4,yt+1 : hplot xt+3,yt to xt+1,yt : hplot xt,yt+1 to xt,yt+5 : hplot xt+1,yt+6 to xt+3,yt+6 : hplot xt+4,yt+5 : return : rem C
  95. 1268 hplot xt+3,yt to xt,yt to xt,yt+6 to xt+3,yt+6 : hplot xt+4,yt+1 to xt+4,yt+5 : return : rem D
  96. 1269 hplot xt+4,yt to xt,yt to xt,yt+6 to xt+4,yt+6 : hplot xt,yt+3 to xt+3,yt+3 : return : rem E
  97. 1270 hplot xt+4,yt to xt,yt to xt,yt+6 : hplot xt,yt+3 to xt+3,yt+3 : return : rem F
  98. 1271 hplot xt+4,yt to xt+1,yt : hplot xt,yt+1 to xt,yt+5 : hplot xt+1,yt+6 to xt+4,yt+6 to xt+4,yt+4 to xt+3,yt+4 : return : rem G
  99. 1272 hplot xt,yt to xt,yt+6 : hplot xt+1,yt+3 to xt+4,yt+3 : hplot xt+4,yt to xt+4,yt+6 : return : rem H
  100. 1273 hplot xt+1,yt to xt+3,yt : hplot xt+2,yt+1 to xt+2,yt+5 : hplot xt+1,yt+6 to xt+3,yt+6 : return : rem I
  101. 1274 hplot xt+4,yt to xt+4,yt+5 : hplot xt+3,yt+6 to xt+1,yt+6 : hplot xt,yt+5 : return : rem J
  102. 1275 hplot xt,yt to xt,yt+6 : hplot xt+4,yt to xt+1,yt+3 to xt+4,yt+6 : return : rem K
  103. 1276 hplot xt,yt to xt,yt+6 to xt+4,yt+6 : return : rem L
  104. 1277 hplot xt,yt+6 to xt,yt to xt+2,yt+2 to xt+4,yt to xt+4,yt+6 : hplot xt+2,yt+3 : return : rem M
  105. 1278 hplot xt,yt to xt,yt+6 : hplot xt+1,yt+2 to xt+3,yt+4 : hplot xt+4,yt to xt+4,yt+6 : return : rem N
  106. 1279 hplot xt+1,yt to xt+3,yt : hplot xt+4,yt+1 to xt+4,yt+5 : hplot xt+3,yt+6 to xt+1,yt+6 : hplot xt,yt+5 to xt,yt+1 : return : rem O
  107. 1280 hplot xt+3,yt to xt,yt to xt,yt+6 : hplot xt+4,yt+1 to xt+4,yt+2 : hplot xt+3,yt+3 to xt+1,yt+3 : return : rem P
  108. 1281 hplot xt+1,yt to xt+3,yt : hplot xt+4,yt+1 to xt+4,yt+4 : hplot xt,yt+1 to xt,yt+5 : hplot xt+1,yt+6 to xt+2,yt+6 : hplot xt+2,yt+4 to xt+4,yt+6 : return : rem Q
  109. 1282 hplot xt+3,yt to xt,yt to xt,yt+6 : hplot xt+4,yt+1 to xt+4,yt+2 : hplot xt+3,yt+3 to xt+1,yt+3 to xt+4,yt+6: return : rem R
  110. 1283 hplot xt+4,yt+1 : hplot xt+3,yt to xt+1,yt : hplot xt,yt+1 to xt,yt+2 : hplot xt+1,yt+3 to xt+3,yt+3 : hplot xt+4,yt+4 to xt+4,yt+5 : hplot xt+3,yt+6 to xt+1,yt+6 : hplot xt,yt+5: return : rem S
  111. 1284 hplot xt,yt to xt+4,yt : hplot xt+2,yt to xt+2,yt+6 : return : rem T
  112. 1285 hplot xt,yt to xt,yt+5 : hplot xt+1,yt+6 to xt+3,yt+6 : hplot xt+4,yt+5 to xt+4,yt : return : rem U
  113. 1286 hplot xt,yt to xt,yt+4 to xt+2,yt+6 to xt+4,yt+4 to xt+4,yt : return : rem V
  114. 1287 hplot xt,yt to xt,yt+6 to xt+2,yt+4 to xt+4,yt+6 to xt+4,yt : hplot xt+2,yt+3 : return : rem W
  115. 1288 hplot xt,yt to xt,yt+1 to xt+4,yt+5 to xt+4,yt+6 : hplot xt,yt+6 to xt,yt+5 to xt+4,yt+1 to xt+4,yt : return : rem X
  116. 1289 hplot xt,yt to xt,yt+1 to xt+2,yt+3 to xt+2,yt+6 : hplot xt+4,yt to xt+4,yt+1 to xt+3,yt+2 : return : rem Y
  117. 1290 hplot xt,yt to xt+4,yt to xt+4,yt+1 to xt,yt+5 to xt,yt+6 to xt+4,yt+6 : return : rem Z
  118. 1500 end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement