home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / ST_NEWS / STN_02_1.MSA / PROGRAMS / SUBE1_4.BAS < prev   
Encoding:
BASIC Source File  |  1986-02-05  |  14.5 KB  |  486 lines

  1. 62000 SETWIND:
  2. 62002 ' -----> XPOS   ; YPOS ; WIDTH
  3. 62004 ' -----> HEIGHT ; WINDOWNUMBER
  4. 62006 poke gintin    , windownumber
  5. 62008 poke gintin + 2, 5
  6. 62010 poke gintin + 4, xpos
  7. 62012 poke gintin + 6, ypos
  8. 62014 poke gintin + 8, widthe
  9. 62016 poke gintin + 10, height
  10. 62018 gemsys 105
  11. 62020 return
  12. 62022 ' --------------------------------------------------
  13. 62050 FULLWIND:
  14. 62052 '
  15. 62054 poke gintin    , 3        :' OUTPUT-window
  16. 62056 poke gintin + 2, 5        :' with/ without edge
  17. 62058 poke gintin + 4, 0        :'  0  : (  -1) ; x1
  18. 62060 poke gintin + 6, 1        :'  1  : (   0) ; y1
  19. 62062 poke gintin + 8, 658      :' 658 : ( 660) ; x2
  20. 62064 poke gintin + 10,417      :' 417 : ( 419) ; y2
  21. 62066 gemsys 105
  22. 62068 return
  23. 62070 ' --------------------------------------------------
  24. 62080 CLEARDESK:
  25. 62082 ' merge "RECTANGLE.bas"
  26. 62084 color 1,0,1 :
  27. 62086 xpos1 = -1 : xpos2 = 638 : ypos1 = -40 : ypos2 = -20
  28. 62088 gosub rectangle: color 1,1,1
  29. 62090 return
  30. 62092 ' --------------------------------------------------
  31. 62100 SHRINXBOX:  
  32. 62102 ' ----->  XOLD ; YOLD ; WIDTH1 ; HEIGHT1
  33. 62104 ' ----->  XNEW ; YNEW ; WIDTH2 ; HEIGHT2
  34. 62106 shrinx% = 1
  35. 62108 '
  36. 62110 GROWBOX:
  37. 62112 ' ----->  SEE SHRINXBOX  
  38. 62114 '
  39. 62116 poke contrl + 2, 8
  40. 62118 poke contrl + 4, 1
  41. 62120 poke gintin     , xold
  42. 62122 poke gintin + 2 , yold
  43. 62124 poke gintin + 4 , width1
  44. 62126 poke gintin + 6 , height1
  45. 62128 poke gintin + 8 , xnew  + 1
  46. 62130 poke gintin + 10, ynew  + 38
  47. 62132 poke gintin + 12, width2
  48. 62134 poke gintin + 14, height2
  49. 62136 gemsys 73 + shrinx%
  50. 62138 shrinx% = 0
  51. 62140 return
  52. 62142 ' --------------------------------------------------
  53. 62150 MOVEBOX:
  54. 62152 ' -----> WIDTHE; HEIGHT ; XOLD ; YOLD
  55. 62154 ' -----> XNEW  ; YNEW  
  56. 62156 poke contrl + 2, 6
  57. 62158 poke contrl + 4, 1
  58. 62160 poke gintin    , widthe
  59. 62162 poke gintin + 2, height
  60. 62164 poke gintin + 4, xold + 1
  61. 62166 poke gintin + 6, yold + 38
  62. 62168 poke gintin + 8, xnew + 1
  63. 62170 poke gintin + 10,ynew + 38
  64. 62172 gemsys 72
  65. 62174 return
  66. 62176 ' --------------------------------------------------
  67. 62200 RUBBERBOX:
  68. 62202 ' -----> MUISX ; MUISY
  69. 62204 ' <----- WIDTHE ; HEIGHT
  70. 62206 poke gintin    , mousex + 1
  71. 62208 poke gintin + 2, mousey + 38
  72. 62210 poke gintin + 4, 1
  73. 62212 poke gintin + 6, 1
  74. 62214 AES.3: gemsys 70
  75. 62216 widthe = peek(gintout + 2)
  76. 62218 height = peek(gintout + 4)
  77. 62220 if height<3 or widthe<3 then goto AES.3
  78. 62222 return
  79. 62224 ' -------------------------------------------------
  80. 62250 DRAGBOX:
  81. 62252 ' -----> WIDTHE ; HEIGHT
  82. 62254 '        X.MIN   ; Y.MIN
  83. 62256 '        X.MAX   ; Y.MAX
  84. 62258 ' <----- XPOS1   ; YPOS1
  85. 62260 poke contrl + 2, 8
  86. 62262 poke contrl + 4, 3
  87. 62264 poke gintin    , widthe
  88. 62266 poke gintin + 2, height
  89. 62268 poke gintin + 4, mousex + 1
  90. 62270 poke gintin + 6, mousey + 38
  91. 62272 poke gintin + 8, x.min + 1
  92. 62274 poke gintin +10, y.min + 38
  93. 62276 poke gintin +12, x.max + 1
  94. 62278 poke gintin +14, y.max + 38
  95. 62280 gemsys 71
  96. 62282 xpos1 = peek(gintout + 2)-1
  97. 62284 ypos1 = peek(gintout + 4)-38
  98. 62286 return
  99. 62288 '-------------------------------------------------
  100. 62500 EVENTMOUSE:
  101. 62502 ' -----> XPOS1 ; YPOS1
  102. 62504 ' -----> WIDTHE ; HEIGHT
  103. 62506 poke gintin    , 0
  104. 62508 poke gintin + 2, xpos1 + 1
  105. 62510 poke gintin + 4, ypos1 + 38
  106. 62512 poke gintin + 6, widthe
  107. 62514 poke gintin + 8, height
  108. 62516 gemsys 22
  109. 62518 return
  110. 62520 ' ------------------------------------------------
  111. 62550 MOUSE2:
  112. 62552 ' <----- MOUSEX ; MOUSEY
  113. 62554 ' <----- KEYA  ; KEYB
  114. 62556 mousex = peek(gintout + 2)-1
  115. 62558 mousey = peek(gintout + 4)-38
  116. 62560 keya  = peek(gintout + 6)
  117. 62562 keyb  = peek(gintout + 8)
  118. 62564 gemsys 79
  119. 62566 return
  120. 62568 ' ------------------------------------------------
  121. 62700 COLORSET:
  122. 62702 ' -----> RED ; GREEN ; BLUE 
  123. 62704 '        COLORNUMBER
  124. 62706 poke contrl, 14
  125. 62708 poke intin, colornumber
  126. 62710 poke intin + 2, red  * 140
  127. 62712 poke intin + 4, green * 140
  128. 62714 poke intin + 6, blue * 140
  129. 62716 vdisys
  130. 62718 return
  131. 62720 ' --------------------------------------------------
  132. 62750 POLYMARKCOLOR:
  133. 62752 ' -----> MARKCOLOR
  134. 62754 poke contrl, 20
  135. 62756 poke intin, markcolor
  136. 62758 vdisys
  137. 62760 return
  138. 62762 ' --------------------------------------------------
  139. 62900 INIT:
  140. 62902 aes# = gb
  141. 62904 control = peek(aes#)
  142. 62906 global  = peek(aes# + 4)
  143. 62908 gintin  = peek(aes# + 8)
  144. 62910 gintout = peek(aes# + 12)
  145. 62912 addrin  = peek(aes# + 16)
  146. 62914 addrout = peek(aes# + 20)
  147. 62916 return
  148. 62918 ' --------------------------------------------------
  149. 63000 MOUSE:
  150. 63002 '<----- XMOUSE ; YMOUSE ; KEY
  151. 63004 poke contrl, 124
  152. 63006 vdisys
  153. 63008 xmouse = peek(ptsout) - 1
  154. 63010 ymouse = peek(ptsout + 2) - 38
  155. 63012 key = peek(intout)
  156. 63014 return
  157. 63015 '---------------------------------------------------
  158. 63030 SHOWMOUSE:
  159. 63032 poke contrl, 122
  160. 63034 poke intin, 0
  161. 63036 vdisys
  162. 63038 return
  163. 63039 '---------------------------------------------------
  164. 63042 HIDEMOUSE:
  165. 63044 poke contrl    , 123
  166. 63046 vdisys
  167. 63048 return
  168. 63049 ' ------------------------------------------------
  169. 63050 MOUSEEDITOR:
  170. 63052 dim a$(16),b$(16)
  171. 63054 a$( 0)="---*--*----*----":b$( 0)="--******--***---"
  172. 63056 a$( 1)="--*--*----*-----":b$( 1)="-******--****---"
  173. 63058 a$( 2)="---*--*---*-----":b$( 2)="--**********----"
  174. 63060 a$( 3)="---*--*--*------":b$( 3)="--*********-----"
  175. 63062 a$( 4)="---*---*--*-----":b$( 4)="--*********-----"
  176. 63064 a$( 5)="----*-*--*------":b$( 5)="---*******------"
  177. 63066 a$( 6)="----------------":b$( 6)="--********------"
  178. 63068 a$( 7)="--*********-----":b$( 7)="-*************--"
  179. 63070 a$( 8)="--************--":b$( 8)="-**************-"
  180. 63072 a$( 9)="--*********--**-":b$( 9)="-***************"
  181. 63074 a$(10)="--*********---*-":b$(10)="-***************"
  182. 63076 a$(11)="--*********--**-":b$(11)="-***************"
  183. 63078 a$(12)="--************--":b$(12)="-***************"
  184. 63080 a$(13)="--*********-----":b$(13)="-**************-"
  185. 63082 a$(14)="---*******------":b$(14)="--*********-----"
  186. 63084 a$(15)="----------------":b$(15)="---*******------"
  187. 63086 for a = 0 to 15
  188. 63088 gridfront = 0: gridback = 0
  189. 63090 for b = 15 to 0 step -1
  190. 63092 if mid$(a$(a),b+1,1)="*" then bit = 1 else bit = 0
  191. 63094 gridfront = gridfront + 2 ^(15 - b) * bit
  192. 63096 if mid$(b$(a),b+1,1)="*" then bit = 1 else bit = 0
  193. 63098 gridback = gridback + 2^(15 - b) * bit
  194. 63100 next
  195. 63102 poke intin + a * 2 + 42, gridfront
  196. 63104 poke intin + a * 2 + 10, gridback
  197. 63106 print gridfront, gridback
  198. 63108 next
  199. 63110 goto mousenew
  200. 63112 '---------------------------------------------------
  201. 63140 '--------------- MOUSEDATA -------------------------
  202. 63141 HAMMER:
  203. 63142 data 96,480,960,1984,3968,8064
  204. 63143 data 7936,16256,15872,32512,32512,65408
  205. 63144 data 65408,65472,63424,65504,25568,65520
  206. 63145 data 496,62456,248,508,124,254
  207. 63146 data 62,127,31,63,14,31
  208. 63147 data 4,14
  209. 63150 COFFEE:
  210. 63151 data 4624,16184,9248,32376,4640,16368
  211. 63152 data 4672,16352,4384,16352,2624,8128
  212. 63153 data 0,16320,16352,32764,16380,32766
  213. 63154 data 16358,32767,16354,32767,16358,32767
  214. 63155 data 16380,32767,16352,32766,8128,16352
  215. 63156 data 0,8128
  216. 63160 WORM:
  217. 63161 data 0,8064,8064,16320,16320,32736
  218. 63162 data 26208,65520,30560,65520,32736,65532
  219. 63163 data 29132,65534,16318,32767,8054,16383
  220. 63164 data 7782,16383,7372,16382,7384,16380
  221. 63165 data 4080,8184,2022,4095,60,2046
  222. 63166 data 24,62
  223. 63199 '-------------------------------------------------
  224. 63200 MOUSEDATA:
  225. 63202 '---> restore line
  226. 63204 for a = 0 to 15
  227. 63206 read gridfront,gridback
  228. 63208 poke intin + a * 2 + 42, gridfront
  229. 63210 poke intin + a * 2 + 10, gridback
  230. 63212 next
  231. 63214 '-------------------------------------------------
  232. 63250 MOUSENEW:
  233. 63252 poke contrl    , 111
  234. 63254 poke contrl + 6, 37
  235. 63256 poke intin    , 5
  236. 63258 poke intin + 2, 5
  237. 63260 poke intin + 4, 1
  238. 63262 poke intin + 6, 0
  239. 63264 poke intin + 8, 1
  240. 63266 vdisys
  241. 63268 out 2,7
  242. 63270 return
  243. 63272 '---------------------------------------------------
  244. 63280 MOUSESHAPE:
  245. 63282 '-----> MOUSENUMBER
  246. 63286 if mousenumber > 7 then return
  247. 63288 add# = gb
  248. 63290 gintin = peek(add# + 8)
  249. 63292 addrin = peek(add# + 16)
  250. 63294 poke gintin, mousenumber
  251. 63296 poke addrin, 0
  252. 63298 gemsys(78)
  253. 63300 return
  254. 63301 '---------------------------------------------------
  255. 63302 '
  256. 63400 POLYMARK:
  257. 63402 ' ----> XPOS ; YPOS
  258. 63404 ' ----> MARKFORM ; MARKSIZE
  259. 63406 '
  260. 63408 poke contrl    , 18
  261. 63410 poke contrl + 2, 0
  262. 63412 poke contrl + 6, 1
  263. 63414 poke intin, markform
  264. 63416 vdisys
  265. 63418 poke contrl    , 19
  266. 63420 poke contrl + 2, 1
  267. 63422 poke contrl + 6, 0
  268. 63424 poke ptsin    , 0
  269. 63426 poke ptsin + 2, marksize
  270. 63428 vdisys
  271. 63430 '
  272. 63432 MARKSETTING:
  273. 63434 ' (----> XPOS ; YPOS )
  274. 63436 poke contrl    , 7
  275. 63438 poke contrl + 2, 1 : ' or more
  276. 63440 poke ptsin    , xpos + 1
  277. 63442 poke ptsin + 2, ypos + 38
  278. 63444 vdisys
  279. 63446 return
  280. 63448 '---------------------------------------------------
  281. 63500 FILLPATTERN:
  282. 63502 ' -----> restore MONSTER
  283. 63504 poke contrl    , 112
  284. 63506 poke contrl + 6, 16
  285. 63508 for st = 0 to 30 step 2
  286. 63510 read MONSTER
  287. 63512 poke intin + st, monster
  288. 63514 next: vdisys
  289. 63516 return
  290. 63518 ' -----------------------------------------------
  291. 64000 RECTANGLE:
  292. 64002 ' -----> XPOS1 : YPOS1 : XPOS2 : YPOS2
  293. 64004 poke contrl    , 11
  294. 64006 poke contrl + 2, 2
  295. 64008 poke contrl + 6, 0
  296. 64010 poke contrl + 10, 1
  297. 64012 poke ptsin    , XPOS1 + 1
  298. 64014 poke ptsin + 2, YPOS1 + 38
  299. 64016 poke ptsin + 4, XPOS2 + 1
  300. 64018 poke ptsin + 6, YPOS2 + 38
  301. 64020 vdisys
  302. 64022 return
  303. 64024 ' --------------------------------------------------
  304. 64026 '
  305. 64030 RECTANGLEROUND:
  306. 64032 ' -----> XPOS1 ; YPOS1 ; XPOS2 ; YPOS2
  307. 64034 ' -----> FILLING  0  or <> 0
  308. 64035 '
  309. 64036 poke contrl    , 11
  310. 64038 poke contrl + 2, 2
  311. 64040 poke contrl + 6, 0
  312. 64042 if FILLING = 0 then poke contrl + 10,8 else poke contrl + 10,9
  313. 64044 poke ptsin    , XPOS1 + 1
  314. 64046 poke ptsin + 2, YPOS1 + 38
  315. 64048 poke ptsin + 4, XPOS2 + 1
  316. 64050 poke ptsin + 6, YPOS2 + 38
  317. 64052 vdisys
  318. 64054 return
  319. 64056 '--------------------------------------------------
  320. 64057 '
  321. 64100 POLYGON2:
  322. 64102 ' -----> XPOS ; YPOS
  323. 64104 '        RADIUS ; ANGLES
  324. 64106 phi = 3.141593/angles/2
  325. 64108 STAR:
  326. 64110 ' -----> PHI
  327. 64112 poke contrl    , 9
  328. 64114 poke contrl + 6, 0
  329. 64116 poke contrl + 2, angles
  330. 64118 for angle = 0 to angles * 4 step 4
  331. 64120 poke ptsin+angle    ,  1+xpos+cos(phi*angle)*radius
  332. 64122 poke ptsin+(angle+2), 38+ypos+sin(phi*angle)*radius
  333. 64124 next
  334. 64126 vdisys
  335. 64128 return
  336. 64130 '--------------------------------------------------
  337. 64140 POLYGON:
  338. 64142 ' -----> ANGLES ; XCOORD ; YCOORD
  339. 64144 poke contrl    , 9
  340. 64146 poke contrl + 6, 0
  341. 64148 poke contrl + 2, angles
  342. 64150 for i = 1 to angles
  343. 64152 poke ptsin + (i - 1) * 4, xcoord(i) + 1
  344. 64154 poke ptsin + 2 + (i - 1) * 4, ycoord(i) + 38
  345. 64156 next
  346. 64158 vdisys
  347. 64160 return
  348. 64162 '---------------------------------------------------
  349. 64200 LINESEND:
  350. 64201 ' -----> BEGINFORM ; ENDFORM
  351. 64202 poke contrl    , 108
  352. 64204 poke contrl + 2, 1
  353. 64206 poke contrl + 6, 0
  354. 64208 poke intin    , BEGINFORM
  355. 64210 poke intin + 2, ENDFORM
  356. 64212 vdisys
  357. 64214 return
  358. 64216 '--------------------------------------------------
  359. 64217 '
  360. 64220 LINETHICKNESS:
  361. 64222 ' -----> THICK
  362. 64224 poke contrl    , 16
  363. 64226 poke contrl + 2, 1
  364. 64228 poke contrl + 6, 0
  365. 64230 poke ptsin, THICK
  366. 64232 poke ptsin + 2, 0
  367. 64234 vdisys
  368. 64236 return
  369. 64238 '-------------------------------------------------
  370. 64239 '
  371. 64240 LINEPATTERN:
  372. 64242 ' -----> PATTERN
  373. 64244 '        1 - 7
  374. 64246 poke contrl    , 15
  375. 64248 poke contrl + 2, 0
  376. 64250 poke contrl + 6, 1
  377. 64252 poke intin, PATTERN
  378. 64254 vdisys
  379. 64256 return
  380. 64258 '------------------------------------------------
  381. 64259 '
  382. 64300 POLYLINE:
  383. 64301 ' -----> NUMBER ; XCOORD ; YCOORD
  384. 64302 poke contrl    , 6
  385. 64304 poke contrl + 6, 0
  386. 64306 poke contrl + 2, number
  387. 64308 for i = 0 to number
  388. 64310 poke ptsin + i * 4, xcoord(i) + 1
  389. 64312 poke ptsin + 2 + i * 4, ycoord(i) + 38
  390. 64314 next
  391. 64316 vdisys
  392. 64318 return
  393. 64320 '---------------------------------------------------
  394. 65000 TEXTMODE:
  395. 65002 ' -----> TEXTKIND:
  396. 65004 '        0 = normal     1 = double strike   2 = light
  397. 65006 '        4 = italics    8 = underlined     16 = hollow
  398. 65008 '             or combinations
  399. 65010 '
  400. 65012 poke contrl    , 106
  401. 65014 poke contrl + 2, 0
  402. 65016 poke contrl + 6, 1
  403. 65018 poke intin, TEXTKIND
  404. 65020 vdisys
  405. 65022 return
  406. 65024 '------------------------------------------------
  407. 65025 '
  408. 65030 TEXTSIZE:
  409. 65032 ' -----> SIZE:
  410. 65034 '           < 9 = very small          9 = small
  411. 65036 '       10 - 15 = normal        16 - 17 = big
  412. 65038 '       18 - 19 = very big
  413. 65040 '
  414. 65042 poke contrl    , 107
  415. 65044 poke contrl + 2, 0
  416. 65046 poke contrl + 6, 1
  417. 65048 poke intin, SIZE
  418. 65050 vdisys
  419. 65052 return
  420. 65054 '-------------------------------------------------
  421. 65055 '
  422. 65060 TEXTOUTPUT:
  423. 65062 ' -----> TEXT$  ; XPOS ; YPOS
  424. 65064 '   text on scale
  425. 65066 for i = 0 to len(TEXT$ ) - 1
  426. 65068 poke intin + i * 2, asc(mid$(TEXT$ , i + 1, 1))
  427. 65070 next i
  428. 65072 poke intin + i * 2, 0
  429. 65074 poke contrl    , 8
  430. 65076 poke contrl + 2, 1
  431. 65078 poke contrl + 6, len(TEXT$ ) + 1
  432. 65080 poke ptsin    , XPOS + 1
  433. 65082 poke ptsin + 2, YPOS + 38
  434. 65084 vdisys
  435. 65086 return
  436. 65088 '------------------------------------------------
  437. 65089 '
  438. 65100 TEXTANGLE:
  439. 65102 ' -----> ANGLE:
  440. 65104 '      angle = 0 ; 900 ; 1800 ; 2700 degrees
  441. 65106 poke contrl    , 13
  442. 65108 poke contrl + 2, 0
  443. 65110 poke contrl + 6, 1
  444. 65112 poke intin, ANGLE
  445. 65114 vdisys
  446. 65116 return
  447. 65118 '-----------------------------------------------
  448. 65119 '
  449. 65130 TEXTFORM:
  450. 65132 ' -----> FORM (1 - 4)
  451. 65134 '
  452. 65136 '        3 = XOR               4 = revers, mix
  453. 65138 poke contrl    ,32
  454. 65140 poke contrl + 2,0
  455. 65142 poke contrl + 6,1
  456. 65144 poke intin, form
  457. 65146 vdisys
  458. 65148 return
  459. 65150 '-----------------------------------------------
  460. 65151 '
  461. 65200 CLIPPING:
  462. 65202 ' -----> XPOS1, YPOS1, XPOS2, YPOS2
  463. 65204 poke contrl   , 129
  464. 65210 poke intin    , 1       : 'Clipping on (0 = uit)
  465. 65212 poke ptsin    , xpos1   : '0
  466. 65214 poke ptsin + 2, ypos1   : '0
  467. 65216 poke ptsin + 4, xpos2   : '600
  468. 65218 poke ptsin + 6, ypos2   : '400
  469. 65220 vdisys
  470. 65222 return
  471. 65224 ' -----------------------------------------------
  472. 65250 FRAMING:
  473. 65252 ' -----> FRAME (0,1)
  474. 65254 poke contrl    , 104
  475. 65256 poke intin     , frame
  476. 65258 vdisys
  477. 65260 return
  478. 65262 ' -----------------------------------------------
  479. 65300 LETTERSIZING:
  480. 65302 ' -----> LETTERSIZE
  481. 65304 poke contrl    , 12
  482. 65306 poke ptsin + 2 , lettersize
  483. 65308 vdisys
  484. 65310 return
  485. 65312 ' -----------------------------------------------
  486. ə