home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / grafix / 3d / imtguide_1a.lha / IMTguide.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1994-12-03  |  29.4 KB  |  613 lines

  1. /*
  2.                         IMTguide.rexx v1.0a 03-Dec-94
  3.        Generate Texture.guide from Imagine 3.0 texture.txt & litetex.txt
  4.           Sample pics, Guide layout and Inspiration by Randy R. Wall
  5.                           ARexx code by D.F. Duck
  6.  
  7. */
  8. options results
  9. signal on syntax
  10. signal on break_c
  11.  
  12. max_wid = 75   /* max chars wide to trim text down to */
  13.  
  14. if ~show('L',"rexxsupport.library") then do
  15.   if addlib('rexxsupport.library',0,-30,0) then nop
  16.   else do
  17.     say 'Can''t find the rexxsupport.library!'
  18.     exit 10
  19.   end
  20. end
  21.  
  22. cls='0C'x;nl='0A'x;more=0;icon='Yes';req_wrap=0   /* init a few vars */
  23.  
  24. call Title
  25. say center('Press CTRL-C at any time to abort.',77)nl
  26. call delay(10)
  27. call Q1
  28. call Q2
  29. call Q3
  30.  
  31. Edit:
  32. say cls
  33. say ' 1.  Write Texture.guide to  >> 'gui_path
  34. say ' 2.  Move sample pictures to >> 'pic_path
  35. say ' 3.  Your SHOW program is... >> 'show_cmd
  36. say ' 4.  Icon for Texture.guide  >> 'icon
  37. say
  38. say ' Q.  Quit'
  39. say
  40. options prompt ' Number to edit or RETURN to accept. >> '
  41. pull ans
  42. say cls
  43. select
  44.   when ans='' then signal Ask4Disk
  45.   when ans='Q' then signal Die
  46.   when ans=1 then call Q1
  47.   when ans=2 then call Q2
  48.   when ans=3 then call Q3
  49.   when ans=4 then call Q4
  50.   otherwise nop
  51. end
  52. signal Edit
  53.  
  54. Q1:  /* get user path to write output file to */
  55. options prompt 'Path to write the Texture.guide to.   >> '
  56. parse pull path
  57. if ~exists(path) then do
  58.   options prompt 'Path "'path'" does not exist.  Create it? (Y/n/q)? '
  59.   pull ans
  60.   if ans='Q' then signal Die
  61.   if ans='Y' | ans='' then do
  62.     call makedir(path)
  63.     if ~exists(path) then do
  64.       say 'There seems to be a problem creating "'path'".'
  65.       signal Q1
  66.     end
  67.   end
  68.   if ans='N' then signal Q1
  69. end
  70. if path~='' then gui_path=path
  71. if right(gui_path,1) ~=':' & right(gui_path,1) ~='/' then gui_path=gui_path'/'
  72. return
  73.  
  74. Q2:  /* get user path to move pic files to */
  75. options prompt 'Path to move the sample pictures to.  >> '
  76. parse pull path
  77. if ~exists(path) then do
  78.   options prompt 'Path "'path'" does not exist.  Create it? (Y/n/q)? '
  79.   pull ans
  80.   if ans='Q' then signal Die
  81.   if ans='Y' | ans='' then do
  82.     call makedir(path)
  83.     if ~exists(path) then do
  84.       say 'There seems to be a problem creating "'path'".'
  85.       signal Q2
  86.     end
  87.   end
  88.   if ans='N' then signal Q2
  89. end
  90. if path~='' then pic_path=path
  91. if right(pic_path,1) ~=':' & right(pic_path,1) ~='/' then pic_path=pic_path'/'
  92. return
  93.  
  94. Q3:  /* get full path and filename to users SHOW program */
  95. options prompt 'Path & filename of your SHOW program. >> '
  96. parse pull cmd
  97. if ~exists(cmd) then do
  98.   say 'I don''t find 'cmd'. Try again.'
  99.   signal Q3
  100. end
  101. if cmd~='' then show_cmd=cmd
  102. return
  103.  
  104. Q4: /* toggle icon creation for Texture.guide */
  105. if icon='Yes' then icon='No'
  106. else if icon='No' then icon='Yes'
  107. return
  108.  
  109. Ask4Disk: /* check for disk - note you don't need to press return! */
  110. call pragma('W','N')       /* turn off requesters */
  111. if ~exists('ram:litetex.txt') then do
  112.   say cls||center('Insert Imagine 3.0 install "DISK1" in any drive.',77)
  113.   do loop = 1
  114.     if exists('DISK1:') then leave loop
  115.   end
  116.   say center('Copying litetex.txt to RAM:',77)
  117.   shell command('copy DISK1:litetex.txt ram:')
  118. end
  119. if ~exists('ram:texture.txt') then do
  120.   say cls||center('Insert Imagine 3.0 install "DISK3" in any drive.',77)
  121.   do loop = 1
  122.     if exists('DISK3:') then leave loop
  123.   end
  124.   say center('Extracting texture.txt to ram:',77)
  125.   old_dir = pragma('D') ; call pragma('D','ram:')
  126.   shell command('DISK3:lharc x DISK3:IM30_3.LZH texture.txt')
  127.   call pragma('D',old_dir) ; drop old_dir
  128. end
  129.  
  130. say cls||center('Ok, now just sit back for a few minutes while I do my magic.',77)
  131. call delay(120)
  132.  
  133. /* Move sample pics */
  134. say cls||center('Moving sample pictures to 'pic_path,77)
  135. if ~exists('pics/') then do
  136.   say center('Error: Can''t find the sample pics directory.',77)
  137.   say center('Be sure your current directory is where you unarched IMTguide.lha to.',77)
  138.   options prompt copies(' ',28)'Continue anyway (y/N)? '
  139.   parse pull ans
  140.   if upper(ans) ~='Y' then signal Die
  141.   else signal Main
  142. end
  143. shell command('copy >nil: pics 'pic_path' ALL CLONE')
  144. shell command('delete >nil: pics ALL')
  145.  
  146. Main: /* Open output file for writing, write Main node */
  147. say cls||center('Writing 'gui_path'Texture.guide',77)
  148. say center('Reading ram:texture.txt',77)
  149. call open(y,gui_path'Texture.guide','W')
  150. call writeln(y,'@database Texture.guide'nl'@index TextureAll')
  151. call writeln(y,'@author Generated by IMTguide.rexx v1.0a by Randy R. Wall & D.F. Duck')
  152. call writeln(y,'@rem THIS DATABASE IS NOT FOR REDISTRIBUTION IN ANY WAY SHAPE OR FORM.'nl)
  153.  
  154. call node('Main','Imagine 3.0 Texture Guide')
  155. call writeln(y,copies(' ',18)'AmigaGuide For Imagine 3.0 Textures'nl)
  156. call writeln(y,copies(' ',22)'@{"    About This Database    " link "About"}'nl||nl)
  157. call writeln(y,copies(' ',22)'@{"   What Are 3.0 Textures   " link "Textures"}')
  158. call writeln(y,copies(' ',22)'@{" Overall Notes On Textures " link "Notes"}'nl)
  159. call writeln(y,'     @{"    Space Filling Textures   " link "SpaceFilling"}      @{"Specific Application Textures" link "SpecificApplication"}')
  160. call writeln(y,'     @{"         2D Textures         " link "2D_Textures"}      @{"     Animatable Textures     " link "Animatable"}')
  161. call writeln(y,'     @{" Specific Primative Textures " link "SpecificPrims"}      @{"        Fog Textures         " link "Fog"}'nl)
  162. call writeln(y,copies(' ',22)'@{"      Light Textures       " link "Lights"}'nl)
  163. call writeln(y,'     @{"    Texture List  (index)    " link "TextureAll"}      @{"      View Sample Pics       " link "View_Pics"}')
  164. call endnode
  165.  
  166. /* open texture.txt file for reading */
  167. call open(x,'RAM:texture.txt','R')
  168.  
  169. /* Textures node */
  170. line=readln(x)
  171. call node('Textures',strip(line,'T','0D'x))
  172. call waste(1)
  173. count=26 ;call copy_text
  174. call endnode
  175.  
  176. /* Over all texture notes */
  177. call waste(1)
  178. call node('Notes',strip(readln(x),'T','0D'x))
  179. count=30 ;call copy_text
  180. call endnode
  181.  
  182. /* Space Filling Textures */
  183. call waste(2)
  184. call node('SpaceFilling',strip(readln(x),'T','0D'x':'))
  185. call writeln(y,copies(nl,3)copies(' ',13)'@{"     Agate      " link "Agate"} @{"    EasyWood    " link "EasyWood"} @{"    Peened      " link "Peened"}')
  186. call writeln(y,copies(' ',13)'@{"    Brushed     " link "Brushed"} @{"     Fakely     " link "Fakely"} @{"    Rainbow     " link "Rainbow"}')
  187. call writeln(y,copies(' ',13)'@{"    BumpNoiz    " link "BumpNoiz"} @{"    FrogSkin    " link "FrogSkin"} @{"    Scratch     " link "Scratch"}')
  188. call writeln(y,copies(' ',13)'@{"    ColorNoiz   " link "ColrNoiz"} @{"     Jersey     " link "Jersey"} @{"    Splotch     " link "Splotch"}')
  189. call writeln(y,copies(' ',13)'@{"    Concrete    " link "Concrete"} @{"    Leather     " link "Leather"} @{"    StainGls    " link "StainGls"}')
  190. call writeln(y,copies(' ',13)'@{"    Confetti    " link "Confetti"} @{"    Marble      " link "Marble"} @{"    Statue      " link "Statue"}')
  191. call writeln(y,copies(' ',13)'@{"    Crumpled    " link "Crumpled"} @{"    Monster     " link "Monster"} @{"     Terra      " link "Terra"}')
  192. call writeln(y,copies(' ',13)'@{"    DinoSkin    " link "DinoSkin"} @{"    Mosaic      " link "Mosaic"} @{"    WormVein    " link "WormVein"}')
  193. call writeln(y,copies(' ',13)'@{"      Dirt      " link "Dirt"} @{"  Noiz2 Family  " link "Noiz2_Family"} @{"    Wrinkle     " link "Wrinkle"}')
  194. call writeln(y,copies(' ',13)'@{"    DrtPaint    " link "DrtPaint"} @{"    Pebbled     " link "Pebbled"} @{"     Zooloo     " link "Zooloo"}')
  195. call endnode
  196.  
  197. my_arg = '1 Agate 26'        ;call write_node
  198. my_arg = '2 Brushed 33'        ;call write_node
  199. my_arg = '2 BumpNoiz 23'    ;call write_node
  200. my_arg = '2 ColrNoiz 51'    ;call write_node
  201. my_arg = '2 Concrete 25'    ;call write_node
  202. my_arg = '2 Confetti 37'    ;call write_node
  203. my_arg = '2 Crumpled 41'    ;call write_node
  204. my_arg = '1 DinoSkin 45'    ;call write_node
  205. my_arg = '1 Dirt 25'        ;call write_node
  206. my_arg = '2 DrtPaint 29'    ;call write_node
  207. my_arg = '2 EasyWood 27'    ;call write_node
  208. my_arg = '1 Fakely 24'        ;call write_node
  209. my_arg = '2 FrogSkin 30'    ;call write_node
  210. my_arg = '2 Jersey 23'        ;call write_node
  211. my_arg = '2 Leather 18'        ;call write_node
  212. my_arg = '1 Marble 28'        ;call write_node
  213. my_arg = '2 Monster 41'        ;call write_node
  214. my_arg = '1 Mosaic 38'        ;call write_node
  215.  
  216. /* Noiz2 Family */
  217. call waste(1)
  218. call node('Noiz2_Family',strip(readln(x),'T','0D'x))
  219. call waste(1)
  220. count=27 ;call copy_text
  221. call writeln(y,nl||copies(' ',13)'@{"   ClrNoize2    " link "ClrNoiz2"} @{"    RefNoiz2    " link "RefNoiz2"} @{"    FilNoiz2    " link "FilNoiz2"}')
  222. call endnode
  223. my_arg = '1 ClrNoiz2 2'        ;call write_node
  224. my_arg = '1 RefNoiz2 2'        ;call write_node
  225. my_arg = '1 FilNoiz2 2'        ;call write_node
  226.  
  227. /* now back to more space filling textures */
  228. my_arg = '1 Pebbled 41'        ;call write_node
  229. my_arg = '1 Peened 37'        ;call write_node
  230. my_arg = '1 Rainbow 24'        ;call write_node
  231. my_arg = '1 Scratch 41'        ;call write_node
  232. my_arg = '1 Splotch 26'        ;call write_node
  233. my_arg = '2 StainGls 40'    ;call write_node
  234. my_arg = '1 Statue 40'        ;call write_node
  235. my_arg = '2 Terra 39'        ;call write_node
  236. my_arg = '2 WormVein 30'    ;call write_node
  237. my_arg = '2 Wrinkle 27'        ;call write_node
  238. my_arg = '2 Zooloo 37'        ;call write_node
  239.  
  240. /* 2D Textures */
  241. call waste(3)
  242. call node('2D_Textures',strip(readln(x),'T','0D'x':'))
  243. call writeln(y,copies(nl,4))
  244. call writeln(y,copies(' ',14)'@{"     BathTile     " link "BathTile"}           @{"     Stamped     " link "Stamped"}')
  245. call writeln(y,copies(' ',14)'@{"      Blast       " link "Blast"}           @{"     TriChex     " link "TriChex"}')         
  246. call writeln(y,copies(' ',14)'@{"     BmpBrnch     " link "BmpBrnch"}           @{"      Tracer     " link "Tracer"}')
  247. call writeln(y,copies(' ',14)'@{"     Branches     " link "Branches"}           @{"     TriTile     " link "TriTile"}')
  248. call writeln(y,copies(' ',14)'@{"     Shingles     " link "Shingles"}           @{"      Weave      " link "Weave"}')
  249. call endnode
  250. my_arg = '1 BathTile 48'    ;call write_node
  251. my_arg = '2 Blast 31'        ;call write_node
  252. my_arg = '2 BmpBrnch 31'    ;call write_node
  253. my_arg = '2 Branches 30'    ;call write_node
  254. my_arg = '2 Shingles 38'    ;call write_node
  255. my_arg = '1 Stamped 39'        ;call write_node
  256. my_arg = '2 TriChex 35'        ;call write_node
  257. my_arg = '1 Tracer 24'        ;call write_node
  258. my_arg = '2 TriTile 29'        ;call write_node
  259. my_arg = '2 Weave 36'        ;call write_node
  260.  
  261. /* Specific Primative Textures */
  262. call waste(3)
  263. call node('SpecificPrims',strip(readln(x),'T','0D'x':'))
  264. call writeln(y,copies(nl,2))
  265. call writeln(y,copies(' ',15)'@{"  Checks Family    " link "Checks_Family"}       @{" DeathStar Family " link "DeathStar_Family"}')
  266. call writeln(y,copies(' ',19)'@{" RectChex " link "RectChex"}                @{" DethStar " link "DethStar"}')
  267. call writeln(y,copies(' ',19)'@{" RadCheks " link "RadCheks"}                @{" RdDthStr " link "RdDthStr"}')
  268. call writeln(y,copies(' ',19)'@{" SprlChex " link "SprlChex"}'nl)
  269. call writeln(y,copies(' ',30)'@{" Plaid Texture " link "Plaid"}'nl)
  270. call writeln(y,copies(' ',15)'@{" Honey Comb Family " link "Honey_Comb_Family"}       @{"  Window Family   " link "Window_Family"}')
  271. call writeln(y,copies(' ',19)'@{" HonyComb " link "HonyComb"}                @{" RadWind  " link "RadWind"}')
  272. call writeln(y,copies(' ',19)'@{" RadComb  " link "RadComb"}                @{" RectWind " link "RectWind"}')
  273. call writeln(y,copies(' ',19)'@{"  Hexez   " link "Hexez"}                @{" TubeWind " link "TubeWind"}')
  274. call endnode
  275.  
  276. /* Checks Family */
  277. call waste(1)
  278. call node('Checks_Family',strip(readln(x),'T','0D'x':'))
  279. req_wrap=1 ;count=33 ;call copy_text
  280. call writeln(y,nl||copies(' ',9)'@{" RectChex Texture " link "RectChex"} @{" RadCheks Texture " link "RadCheks"} @{" SprlChex Texture " link "SprlChex"}')
  281. call endnode
  282. my_arg = '2 RectChex 18'    ;call write_node
  283. my_arg = '1 RadCheks 20'    ;call write_node
  284. my_arg = '2 SprlChex 22'    ;call write_node
  285.  
  286. call waste(2)
  287. call node('DeathStar_Family',strip(readln(x),'T','0D'x':'))
  288. count=34 ;call copy_text
  289. call writeln(y,nl||copies(' ',15)'@{" DethStar Texture " link "DethStar"}       @{" RdDthStr Texture " link "RdDthStr"}')
  290. call endnode
  291. my_arg = '2 DethStar 7'        ;call write_node
  292. my_arg = '1 RdDthStr 12'    ;call write_node
  293.  
  294. call waste(2)
  295. call node('Honey_Comb_Family',strip(readln(x),'T','0D'x':'))
  296. count=23 ;call copy_text
  297. call writeln(y,nl||copies(' ',13)'@{" HonyComb Texture " link "HonyComb"} @{" Hexez Texture " link "Hexez"} @{" RadComb Texture " link "RadComb"}')
  298. call endnode
  299. my_arg = '2 HonyComb 1'        ;call write_node
  300. my_arg = '2 RadComb 1'        ;call write_node
  301. my_arg = '2 Hexez 1'        ;call write_node
  302.  
  303. /* Plaid Texture */
  304. my_arg = '2 Plaid 30'        ;call write_node
  305.  
  306. /* Window Family */
  307. call waste(1)
  308. call node('Window_Family',strip(readln(x),'T','0D'x':'))
  309. count=52 ;call copy_text
  310. call writeln(y,nl||copies(' ',8)'@{" RadWind Texture " link "RadWind"} @{" RectWind Texture " link "RectWind"} @{" TubeWind Texture " link "TubeWind"}')           
  311. call endnode
  312. my_arg = '2 RadWind 16'        ;call write_node
  313. my_arg = '1 RectWind 11'    ;call write_node
  314. my_arg = '1 TubeWind 16'    ;call write_node
  315.  
  316. /* Specific Application Textures */
  317. call waste(3)
  318. call node('SpecificApplication',strip(readln(x),'T','0D'x':'))
  319. call writeln(y,copies(nl,4)copies(' ',16)'@{"    Antique    " link "Antique"}              @{"      Iris      " link "Iris"}')
  320. call writeln(y,copies(' ',16)'@{"    CndyAppl   " link "CndyAppl"}              @{"    LensFlar    " link "LensFlar"}')
  321. call writeln(y,copies(' ',16)'@{"    CoolFir    " link "CoolFir"}              @{"     Metals     " link "Metals"}')
  322. call writeln(y,copies(' ',16)'@{"     Cracks    " link "Cracks"}              @{"    MntnTop     " link "MntnTop"}')
  323. call writeln(y,copies(' ',16)'@{"    DashLine   " link "DashLine"}              @{"     Ribbed     " link "Ribbed"}')
  324. call writeln(y,copies(' ',16)'@{"    FireBall   " link "FireBall"}              @{"    SftStrip    " link "SftStrip"}')
  325. call writeln(y,copies(' ',16)'@{"    GasGiant   " link "GasGiant"}              @{"    Transpar    " link "Transpar"}')
  326. call writeln(y,copies(' ',16)'@{"    HardWood   " link "HardWood"}              @{"    Venitian    " link "Venitian"}')
  327. call writeln(y,copies(' ',16)'@{"    HrdStrip   " link "HrdStrip"}              @{"    Z Buffer    " link "Z_Buffer"}')
  328. call endnode
  329. my_arg = '1 Antique 31'        ;call write_node
  330. my_arg = '1 CndyAppl 11'    ;call write_node
  331. my_arg = '1 CoolFir 22'        ;call write_node
  332. my_arg = '1 Cracks 39'        ;call write_node
  333. my_arg = '2 DashLine 37'    ;call write_node
  334. my_arg = '2 FireBall 37'    ;call write_node
  335. my_arg = '2 GasGiant 53'    ;call write_node
  336. my_arg = '1 HardWood 35'    ;call write_node
  337. my_arg = '2 HrdStrip 22'    ;call write_node
  338. my_arg = '1 Iris 39'        ;call write_node
  339. my_arg = '1 LensFlar 29'    ;call write_node
  340. my_arg = '1 Metals 26'        ;call write_node
  341. my_arg = '1 MntnTop 26'        ;call write_node
  342. my_arg = '1 Ribbed 36'        ;call write_node
  343. my_arg = '2 SftStrip 33'    ;call write_node
  344. my_arg = '1 Transpar 27'    ;call write_node
  345. my_arg = '1 Venitian 13'    ;call write_node
  346. req_wrap=1
  347. my_arg = '2 Z_Buffer 15'    ;call write_node
  348.  
  349. call waste(27) /* dump the FORMAT: stuff */
  350.  
  351. /* Amimatable Textures */ 
  352. call node('Animatable',strip(readln(x),'T','0D'x':'))
  353. call writeln(y,copies(nl,4)copies(' ',31)'@{"  BeamMeUp  " link "BeamMeUp"}')
  354. call writeln(y,copies(' ',31)'@{"  DancSprk  " link "DancSprk"}')
  355. call writeln(y,copies(' ',31)'@{"  DripDrop  " link "DripDrop"}')
  356. call writeln(y,copies(' ',31)'@{"    Rain    " link "Rain"}')
  357. call writeln(y,copies(' ',31)'@{"    Spark   " link "Spark"}')
  358. call writeln(y,copies(' ',31)'@{"   TieDye   " link "TieDye"}')
  359. call endnode
  360. my_arg = '1 BeamMeUp 36'    ;call write_node
  361. my_arg = '2 DancSprk 38'    ;call write_node
  362. my_arg = '2 DripDrop 27'    ;call write_node
  363. my_arg = '2 Rain 41'        ;call write_node
  364. my_arg = '2 Spark 27'        ;call write_node
  365. my_arg = '2 TieDye 27'        ;call write_node
  366.  
  367. /* Fog Textures */
  368. call waste(3)
  369. call node('Fog',strip(readln(x),'T','0D'x':'))
  370. call writeln(y,copies(nl,4)copies(' ',28)'@{"   Ghost Texture  " link "Ghost"}')
  371. call writeln(y,copies(' ',28)'@{"  FogTop Texture  " link "FogTop"}')
  372. call writeln(y,copies(' ',28)'@{" FogPaint Texture " link "FogPaint"}')
  373. call writeln(y,copies(' ',28)'@{"  Nebula Texture  " link "Nebula"}')
  374. call endnode
  375. my_arg = '1 Ghost 22'        ;call write_node
  376. my_arg = '2 FogTop 28'        ;call write_node
  377. my_arg = '2 FogPaint 31'    ;call write_node
  378. my_arg = '2 Nebula 34'        ;call write_node
  379.  
  380. call close(x)                /* all done with texture.txt    */
  381. call delete('RAM:texture.txt')
  382.  
  383. call open(x,'ram:litetex.txt','R')    /* open litetex.txt for reading */
  384. say '1B'x'[2H'center('Reading ram:litetex.txt',77)
  385. /* Light Textures */
  386. call node('Lights',strip(readln(x),'T','0D'x':'))
  387. call writeln(y,copies(nl,5)copies(' ',16)'@{"  FrnchWin - French Windows Light Texture  " link "FrnchWin"}')
  388. call writeln(y,copies(' ',16)'@{"   SoftEdge - Soft Edge Lighting Texture   " link "SoftEdge"}')
  389. call writeln(y,copies(' ',16)'@{"     Strobe - Strobe Lighting Texture      " link "Strobe"}')
  390. call writeln(y,copies(' ',16)'@{" VenLite - Venitian Blind Lighting Texture " link "VenLite"}')
  391. call endnode
  392.  
  393. call waste(3)
  394. call node('FrnchWin',strip(readln(x),'T','0D'x':'))
  395. req_wrap=1 ;count=17 ;call copy_text
  396. call endnode
  397.  
  398. call waste(3)
  399. call node('SoftEdge',strip(readln(x),'T','0D'x':'))
  400. req_wrap=1 ;count=12 ;call copy_text
  401. call endnode
  402.  
  403. call waste(3)
  404. call node('Strobe',strip(readln(x),'T','0D'x':'))
  405. req_wrap=1 ;count=19 ;call copy_text
  406. call endnode
  407.  
  408. call waste(3)
  409. call node('VenLite',strip(readln(x),'T','0D'x':'))
  410. req_wrap=1 ;count=18 ;call copy_text
  411. call endnode
  412.  
  413. call close(x)                /* all done with litetex.txt    */
  414. call delete('RAM:litetex.txt')
  415. say '1B'x'[2H'center(' ',77)
  416.  
  417. /* About */
  418. call node('About','About This Database')
  419. call writeln(y,' Neither R.W. Wall, D.F. Duck, or IMTguide.rexx are in any way associated')
  420. call writeln(y,' with Impulse Inc.'nl)
  421. call writeln(y,' The Texture.guide AmigaGuide database is not for redistribution in any')
  422. call writeln(y,' way shape or form. Texture.guide contains text that is copyrighted by')
  423. call writeln(y,' Impulse Inc. Do not include Texture.guide in any Public Domain /')
  424. call writeln(y,' Shareware collection or User Group file library.'nl)
  425. call writeln(y,' Texture.guide may be used ONLY by registered owners of Imagine v3.0.'nl)
  426. call writeln(y,copies(' ',8)'This AmigaGuide database was generated with IMLguide.rexx v1.0a')
  427. call writeln(y,copies(' ',10)'Sample pics, Guide layout and Inspiration by Randy R. Wall')
  428. call writeln(y,copies(' ',27)'ARexx code by D.F. Duck')
  429. call writeln(y,copies(' ',25)'Beta Tested By: Randy R. Wall'nl||nl)
  430. call writeln(y,' This AmigaGuide database was made to facilitate the proccess of finding')
  431. call writeln(y,' and learning to use the many textures available in Imagine 3.0.')
  432. call writeln(y,' Other people have converted the texture.txt file into AmigaGuide hyper-')
  433. call writeln(y,' text format, but they could not distribute it due to Impulses'' copyright')
  434. call writeln(y,' on the text. But it is perfectly legal to write a program to convert your')
  435. call writeln(y,' legal copy of the text. So, that is what we did.'nl||nl)
  436. call writeln(y,' o AmigaGuide is © Copyright 1990-1993 by;'nl)
  437. call writeln(y,'   Commodore-Amiga, Inc.'copies(nl,2))
  438. call writeln(y,' o ARexx is © Copyright 1987 by;'nl)
  439. call writeln(y,'   William S. Hawes   P.O. Box 308   Maynard, MA  01754'nl)
  440. call writeln(y,'   508 568-8695'copies(nl,2))
  441. call writeln(y,' o Imagine 3.0, texture.txt & litetex.txt files, and parts of')
  442. call writeln(y,'   Texture.guide are © Copyright 1994 by;'nl)
  443. call writeln(y,'   Impulse Inc.  8416 Xerxes Ave. North  Minneapolis, MN  55444'nl)
  444. call writeln(y,'   612 425-0557')
  445. call endnode
  446.  
  447. /* TextureAll (Index) */
  448. call node('TextureAll','Imagine 3.0 Textures')
  449. call writeln(y,'@{" Noiz2 Fmly " link "Noiz2_Family"} @{" Checks Fmly " link "Checks_Family"} @{" DeathStar Fmly " link "DeathStar_Family"} @{" HoneyComb Fmly " link "Honey_Comb_Family"} @{" WindowFmly " link "Window_Family"}')
  450. call writeln(y,copies(' ',9)'@{" Agate     " link "Agate"} @{" Jersey   " link "Jersey"} @{" Wrinkle  " link "Wrinkle"} @{" CndyAppl " link "CndyAppl"} @{" Transpar " link "Transpar"}')
  451. call writeln(y,copies(' ',9)'@{" Brushed   " link "Brushed"} @{" Leather  " link "Leather"} @{" Zooloo   " link "Zooloo"} @{" CoolFir  " link "CoolFir"} @{" Venitian " link "Venitian"}')
  452. call writeln(y,copies(' ',9)'@{" BumpNoiz  " link "BumpNoiz"} @{" Marble   " link "Marble"} @{" BathTile " link "BathTile"} @{" Cracks   " link "Cracks"} @{" Z Buffer " link "Z_Buffer"}')
  453. call writeln(y,copies(' ',9)'@{" ColorNoiz " link "ColrNoiz"} @{" Monster  " link "Monster"} @{" Blast    " link "Blast"} @{" DashLine " link "DashLine"} @{" BeamMeUp " link "BeamMeUp"}')
  454. call writeln(y,copies(' ',9)'@{" Concrete  " link "Concrete"} @{" Mosaic   " link "Mosaic"} @{" BmpBrnch " link "BmpBrnch"} @{" FireBall " link "FireBall"} @{" DancSprk " link "DancSprk"}')
  455. call writeln(y,copies(' ',9)'@{" Confetti  " link "Confetti"} @{" Pebbled  " link "Pebbled"} @{" Branches " link "Branches"} @{" GasGiant " link "GasGiant"} @{" DripDrop " link "DripDrop"}')
  456. call writeln(y,copies(' ',9)'@{" Crumpled  " link "Crumpled"} @{" Peened   " link "Peened"} @{" Shingles " link "Shingles"} @{" HardWood " link "HardWood"} @{" Rain     " link "Rain"}')
  457. call writeln(y,copies(' ',9)'@{" DinoSkin  " link "DinoSkin"} @{" Rainbow  " link "Rainbow"} @{" Stamped  " link "Stamped"} @{" HrdStrip " link "HrdStrip"} @{" Spark    " link "Spark"}')
  458. call writeln(y,copies(' ',9)'@{" Dirt      " link "Dirt"} @{" Scratch  " link "Scratch"} @{" Tracer   " link "Tracer"} @{" Iris     " link "Iris"} @{" TieDye   " link "TieDye"}')
  459. call writeln(y,copies(' ',9)'@{" DrtPaint  " link "DrtPaint"} @{" Splotch  " link "Splotch"} @{" TriChex  " link "TriChex"} @{" LensFlar " link "LensFlar"} @{" Ghost    " link "Ghost"}')
  460. call writeln(y,copies(' ',9)'@{" EasyWood  " link "EasyWood"} @{" StainGls " link "StainGls"} @{" TriTile  " link "TriTile"} @{" Metals   " link "Metals"} @{" FogTop   " link "FogTop"}')
  461. call writeln(y,copies(' ',9)'@{" Fakely    " link "Fakely"} @{" Statue   " link "Statue"} @{" Weave    " link "Weave"} @{" MntnTop  " link "MntnTop"} @{" FogPaint " link "FogPaint"}')
  462. call writeln(y,copies(' ',9)'@{" FrogSkin  " link "FrogSkin"} @{" Terra    " link "Terra"} @{" Plaid    " link "Plaid"} @{" Ribbed   " link "Ribbed"} @{" Nebula   " link "Nebula"}')
  463. call writeln(y,copies(' ',21)'@{" WormVein " link "WormVein"} @{" Antique  " link "Antique"} @{" SftStrip " link "SftStrip"}')
  464. call endnode
  465.  
  466. /* View Sample Pics */
  467. cmd=show_cmd' 'pic_path
  468. call node('View_Pics','View Sample Texture Pictures')
  469. call writeln(y,'@{" Noiz2 Fmly " link "Noiz2_View"} @{" Checks Fmly " link "Checks_View"} @{" DeathStar Fmly " link "DeathStar_View"} @{" HoneyComb Fmly " link "HoneyComb_View"} @{" WindowFmly " link "Window_View"}')
  470. call writeln(y,copies(' ',9)'@{" Agate     " system "'cmd'Agate.pic"} @{" Jersey   " system "'cmd'Jersey.pic"} @{" Wrinkle  " system "'cmd'Wrinkle.pic"} @{" CndyAppl " system "'cmd'CndyAppl.pic"} @{" Transpar " system "'cmd'Transpar.pic"}')
  471. call writeln(y,copies(' ',9)'@{" Brushed   " system "'cmd'Brushed.pic"} @{" Leather  " system "'cmd'Leather.pic"} @{" Zooloo   " system "'cmd'Zooloo.pic"} @{" CoolFir  " system "'cmd'CoolFir.pic"} @{" Venitian " system "'cmd'Venitian.pic"}')
  472. call writeln(y,copies(' ',9)'@{" BumpNoiz  " system "'cmd'BumpNoiz.pic"} @{" Marble   " system "'cmd'Marble.pic"} @{" BathTile " system "'cmd'BathTile.pic"} @{" Cracks   " system "'cmd'Cracks.pic"} @{" Z Buffer " system "'cmd'Z_Buffer.pic"}')
  473. call writeln(y,copies(' ',9)'@{" ColorNoiz " system "'cmd'ColrNoiz.pic"} @{" Monster  " system "'cmd'Monster.pic"} @{" Blast    " system "'cmd'Blast.pic"} @{" DashLine " system "'cmd'DashLine.pic"} @{" BeamMeUp " system "'cmd'BeamMeUp.pic"}')
  474. call writeln(y,copies(' ',9)'@{" Concrete  " system "'cmd'Concrete.pic"} @{" Mosaic   " system "'cmd'Mosaic.pic"} @{" BmpBrnch " system "'cmd'BmpBrnch.pic"} @{" FireBall " system "'cmd'FireBall.pic"} @{" DancSprk " system "'cmd'DancSprk.pic"}')
  475. call writeln(y,copies(' ',9)'@{" Confetti  " system "'cmd'Confetti.pic"} @{" Pebbled  " system "'cmd'Pebbled.pic"} @{" Branches " system "'cmd'Branches.pic"} @{" GasGiant " system "'cmd'GasGiant.pic"} @{" DripDrop " system "'cmd'DripDrop.pic"}')
  476. call writeln(y,copies(' ',9)'@{" Crumpled  " system "'cmd'Crumpled.pic"} @{" Peened   " system "'cmd'Peened.pic"} @{" Shingles " system "'cmd'Shingles.pic"} @{" HardWood " system "'cmd'HardWood.pic"} @{" Rain     " system "'cmd'Rain.pic"}')
  477. call writeln(y,copies(' ',9)'@{" DinoSkin  " system "'cmd'DinoSkin.pic"} @{" Rainbow  " system "'cmd'Rainbow.pic"} @{" Stamped  " system "'cmd'Stamped.pic"} @{" HrdStrip " system "'cmd'HrdStrip.pic"} @{" Spark    " system "'cmd'Spark.pic"}')
  478. call writeln(y,copies(' ',9)'@{" Dirt      " system "'cmd'Dirt.pic"} @{" Scratch  " system "'cmd'Scratch.pic"} @{" Tracer   " system "'cmd'Tracer.pic"} @{" Iris     " system "'cmd'Iris.pic"} @{" TieDye   " system "'cmd'TieDye.pic"}')
  479. call writeln(y,copies(' ',9)'@{" DrtPaint  " system "'cmd'DrtPaint.pic"} @{" Splotch  " system "'cmd'Splotch.pic"} @{" TriChex  " system "'cmd'TriChex.pic"} @{" LensFlar " system "'cmd'LensFlar.pic"} @{" Ghost    " system "'cmd'Ghost.pic"}')
  480. call writeln(y,copies(' ',9)'@{" EasyWood  " system "'cmd'EasyWood.pic"} @{" StainGls " system "'cmd'StainGls.pic"} @{" TriTile  " system "'cmd'TriTile.pic"} @{" Metals   " system "'cmd'Metals.pic"} @{" FogTop   " system "'cmd'FogTop.pic"}')
  481. call writeln(y,copies(' ',9)'@{" Fakely    " system "'cmd'Fakely.pic"} @{" Statue   " system "'cmd'Statue.pic"} @{" Weave    " system "'cmd'Weave.pic"} @{" MntnTop  " system "'cmd'MntnTop.pic"} @{" FogPaint " system "'cmd'FogPaint.pic"}')
  482. call writeln(y,copies(' ',9)'@{" FrogSkin  " system "'cmd'FrogSkin.pic"} @{" Terra    " system "'cmd'Terra.pic"} @{" Plaid    " system "'cmd'Plaid.pic"} @{" Ribbed   " system "'cmd'Ribbed.pic"} @{" Nebula   " system "'cmd'Nebula.pic"}')
  483. call writeln(y,copies(' ',21)'@{" WormVein " system "'cmd'WormVein.pic"} @{" Antique  " system "'cmd'Antique.pic"} @{" SftStrip " system "'cmd'SftStrip.pic"}')
  484. call endnode
  485.  
  486. /* View "Family" Sample Pics */
  487. call node('Noiz2_View','Noiz2 Family Sample Pictures')
  488. call writeln(y,nl||copies(' ',13)'@{"   ClrNoize2    " system "'cmd'ClrNoiz2.pic"} @{"    RefNoiz2    " system "'cmd'RefNoiz2.pic"} @{"    FilNoiz2    " system "'cmd'FilNoiz2.pic"}')
  489. call endnode
  490. call node('Checks_View','Checks Family Sample Pictures')
  491. call writeln(y,nl||copies(' ',9)'@{" RectChex Texture " system "'cmd'RectChex.pic"} @{" RadCheks Texture " system "'cmd'RadCheks.pic"} @{" SprlChex Texture " system "'cmd'SprlChex.pic"}')
  492. call endnode
  493. call node('DeathStar_View','DeathStar Family Sample Pictures')
  494. call writeln(y,nl||copies(' ',15)'@{" DethStar Texture " system "'cmd'DethStar.pic"}       @{" RdDthStr Texture " system "'cmd'RdDthStr.pic"}')
  495. call endnode
  496. call node('HoneyComb_View','HoneyComb Family Sample Pictures')
  497. call writeln(y,nl||copies(' ',13)'@{" HonyComb Texture " system "'cmd'HonyComb.pic"} @{" Hexez Texture " system "'cmd'Hexez.pic"} @{" RadComb Texture " system "'cmd'RadComb.pic"}')
  498. call endnode
  499. call node('Window_View','Window Family Sample Pictures')
  500. call writeln(y,nl||copies(' ',8)'@{" RadWind Texture " system "'cmd'RadWind.pic"} @{" RectWind Texture " system "'cmd'RectWind.pic"} @{" TubeWind Texture " system "'cmd'TubeWind.pic"}')           
  501. call endnode
  502.  
  503. if icon='Yes' then do
  504.   say '1B'x'[4H'center('- Creating Icon -',77)
  505.   shell command('copy icon 'gui_path'Texture.guide.info')
  506. end
  507. call delete('icon')
  508.  
  509. /***** procedures & subroutines *****/
  510.  
  511. Die: /* Clean up and exit */
  512. call close x
  513. call close y
  514. call Title
  515. exit
  516.  
  517. Title:    /* The cat is fat. The dog is with the cat. My feet are flat. */
  518. say cls||sourceline(2)
  519. do i = 3 to 5
  520.   say sourceline(i)
  521. end
  522. call delay(60)
  523. say
  524. return
  525.  
  526. node: procedure
  527. parse arg node_name,node_title
  528. node_title=strip(node_title,'L',' ')
  529. say '1B'x'[4H'center('- 'node_title' -',77)
  530. call writeln(y,'@node "'node_name'" "'strip(center('- 'node_title' -',67),'T',' ')'"')
  531. return
  532.  
  533. waste: procedure /* dump blank and unwanted lines in the bit bucket */
  534. arg count
  535. do for count
  536.   call readln(x)
  537. end
  538. return
  539.  
  540. copy_text:  /* copy text from texture.txt to Texture.guide */
  541. wrap=''
  542. do i= 1 to count
  543.   if length(wrap) >max_wid then do
  544.     line=' 'wrap
  545.     call do_wrap
  546.   end
  547.   line=' 'wrap||strip(readln(x),'B','0D20'x)
  548.  
  549.   if index(line,'Requester:')>0 then do  /* separate Requester: lines */
  550.     req_wrap=1
  551.     if last_len<1 then call writeln(y,'')
  552.   end
  553.   if word(line,1)='Type:' then do
  554.     line=line' 'strip(readln(x),'B','0D'x' ')
  555.     i=(i+1)
  556.   end
  557.   else if (req_wrap) & index(line,':') >0 & length(line)>index(line,':') then do
  558.     if last_len>1 then call writech(y,nl)
  559.     call writeln(y,left(line,index(line,':')))
  560.     line = ' 'strip(right(line,length(line)-index(line,':')),'L',' ')
  561.     line = line' 'strip(readln(x),'B','0D'x' ')
  562.     i=(i+1)
  563.   end
  564.   wrap=''
  565.   if length(line) >max_wid then call do_wrap
  566.   else call writeln(y,line)
  567.   last_len = length(compress(line))
  568.   if i=count then return
  569. end
  570.  
  571. do_wrap:
  572. new_len = lastpos(' ',line,max_wid)
  573. wrap = right(line,(length(line)-new_len))' '
  574. wrap_len=length(wrap)
  575. call writeln(y,left(line,new_len-1))
  576. return
  577.  
  578. sample: procedure /* make button to show sample pic */
  579. parse arg picture
  580. line=strip(readln(x),'T','0D'x)
  581. if last_len>1 then call writeln(y,'')
  582. call writeln(y,' @{" sample object " system "'picture'"}:')
  583. call writech(y,' 'strip(right(line,length(line)-index(line,':')),'L',' '))
  584. return
  585.  
  586. write_node: /* write node text to output */
  587. parse var my_arg waste_num' 'node_txt' 'copy_num
  588. say '1B'x'[4H'center('- 'node_txt' -',77)
  589. pic_name=node_txt'.pic'
  590. call waste(waste_num)
  591. call node(node_txt,strip(readln(x),'T','0D'x))
  592. count=copy_num ;call copy_text
  593. call sample(show_cmd' 'pic_path||pic_name)
  594. if node_txt='TriChex' | node_txt='TriTile' | node_txt='Antique' then,
  595. call writeln(y,strip(readln(x),'B','0D'x' '))
  596. else call writeln(y,'')
  597. call endnode
  598. return
  599.  
  600. endnode:
  601. call writeln(y,'@endnode'nl)
  602. req_wrap=0
  603. return
  604.  
  605. break_c:
  606. signal Die
  607.  
  608. syntax:
  609. say 'Syntax error line number 'SIGL
  610. say errortext(rc)
  611. say sourceline(SIGL)
  612. exit
  613.