home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p115 / 10.ddi / GCD4 / UPL / FIXCOLOR.UPL < prev    next >
Encoding:
Text File  |  1987-05-12  |  996 b   |  32 lines

  1. --This sinple UPL program is used to convert from Rev 2.0 color scheme
  2. --(bright colorss 1-7 & dim 9-15) to the post Rev 2.0 scheme (dim colors
  3. --1-7 & bright colors 9-15)
  4. --
  5. --Simply run this program and all entites will have their colors updated
  6. --If you accidentally run the program on an already converted part, simply
  7. --run the program agasin to change the colors back.
  8.  
  9. Proc Main
  10.  
  11. Integer NMib, MibData(8), Error, I
  12.  
  13. SysVarI(5, NMib)
  14. loop I = 1 to NMib
  15.     ReadEnt(I, MibData(1))
  16.     if MibData(1) > 0 then
  17.         if MibData(1) < 20 or MibData(1) > 1000 and MibData(1) < 1020 then
  18.             if MibData(8) > 8 then 
  19.                 MibData(8) = MibData(8)-8
  20.                 WriteEnt(I, MibData(1))
  21.                 RpntEnt(I, 1, Error)
  22.             else if MibData(8) < 8 then 
  23.                 MibData(8) = MibData(8)+8
  24.                 WriteEnt(I, MibData(1))
  25.                 RpntEnt(I, 1, Error)
  26.             endif
  27.         endif
  28.     endif
  29. end loop
  30.  
  31. end proc
  32.