home *** CD-ROM | disk | FTP | other *** search
/ Sound, Music & MIDI Collection 2 / SMMVOL2.bin / DEMO / PRG / CIRCLES.ZIP / CI_MAIN.DIX / 00021_HELPSC.ls < prev    next >
Encoding:
Text File  |  1995-05-01  |  5.1 KB  |  179 lines

  1. on help_init
  2.   global hp_itm01, hp_itm02, hp_itm03, hp_itm04, hp_itm05, hp_itm06, hp_itm07, hp_itm08, hp_itm09, hp_itm10, hp_itm11, hp_itm12, hp_itm13, hp_r, hp_l, hp_x, hp_page, hp_max
  3.   set hp_page to -1
  4.   set hp_bas to 74
  5.   set hp_step to 28
  6.   set nx1 to 11
  7.   set nx2 to 203
  8.   set hp_max to 12
  9.   set hp_itm01 to rect(nx1, hp_bas + (hp_step * 0), nx2, hp_bas + ((hp_step * 1) - 2))
  10.   set hp_itm02 to rect(nx1, hp_bas + (hp_step * 1), nx2, hp_bas + ((hp_step * 2) - 2))
  11.   set hp_itm03 to rect(nx1, hp_bas + (hp_step * 2), nx2, hp_bas + ((hp_step * 3) - 2))
  12.   set hp_itm04 to rect(nx1, hp_bas + (hp_step * 3), nx2, hp_bas + ((hp_step * 4) - 2))
  13.   set hp_itm05 to rect(nx1, hp_bas + (hp_step * 4), nx2, hp_bas + ((hp_step * 5) - 2))
  14.   set hp_itm06 to rect(nx1, hp_bas + (hp_step * 5), nx2, hp_bas + ((hp_step * 6) - 2))
  15.   set hp_itm07 to rect(nx1, hp_bas + (hp_step * 6), nx2, hp_bas + ((hp_step * 7) - 2))
  16.   set hp_itm08 to rect(nx1, hp_bas + (hp_step * 7), nx2, hp_bas + ((hp_step * 8) - 2))
  17.   set hp_itm09 to rect(nx1, hp_bas + (hp_step * 8), nx2, hp_bas + ((hp_step * 9) - 2))
  18.   set hp_itm10 to rect(nx1, hp_bas + (hp_step * 9), nx2, hp_bas + ((hp_step * 10) - 2))
  19.   set hp_itm11 to rect(nx1, hp_bas + (hp_step * 10), nx2, hp_bas + ((hp_step * 11) - 2))
  20.   set hp_itm12 to rect(nx1, hp_bas + (hp_step * 11), nx2, hp_bas + ((hp_step * 12) - 2))
  21.   set hp_l to rect(0, 449, 60, 479)
  22.   set hp_r to rect(156, 449, 219, 479)
  23.   set hp_x to rect(61, 449, 155, 479)
  24. end
  25.  
  26. on help_open page
  27.   global fcommand, acwin, spritecount, scommand, up_lang, hp_r, hp_l, hp_x, hp_page, hp_max, hp_item, sp_help, up_load
  28.   set fcommand to EMPTY
  29.   cur_busy()
  30.   if hp_page >= 0 then
  31.     help_close()
  32.   end if
  33.   put "help_open>" & page
  34.   set hp_page to page
  35.   set hp_item to 0
  36.   set fcommand to "HPOP"
  37. end
  38.  
  39. on help_close
  40.   global fcommand, acwin, spritecount, scommand, hp_r, hp_l, hp_x, hp_page, hp_item, hp_max, sp_help, up_load
  41.   set fcommand to EMPTY
  42.   set sp_help to 47
  43.   cur_busy()
  44.   put "help_close>" & hp_page
  45.   if hp_page >= 0 then
  46.     if the number of cast "HP" <= 0 then
  47.     else
  48.       puppetTransition(2, 1, 5)
  49.       sprite_show(sp_help, 1500, 1500)
  50.       puppetSprite(sp_help, 0)
  51.     end if
  52.   end if
  53.   set hp_page to -1
  54.   cur_on()
  55. end
  56.  
  57. on help_X
  58.   global hp_r, hp_l, hp_x, hp_page, hp_max
  59.   help_close()
  60. end
  61.  
  62. on help_R
  63.   global hp_page, hp_max, hp_item, fcommand
  64.   set hp_old to hp_page
  65.   if hp_page >= 0 then
  66.     help_close()
  67.   end if
  68.   if (hp_item + 1) < 9 then
  69.     set hp_item to hp_item + 1
  70.   else
  71.     set hp_item to 0
  72.   end if
  73.   if chkfis(help_name(hp_old, hp_item)) then
  74.     set hp_page to hp_old
  75.   else
  76.     set hp_page to hp_old + 1
  77.     set hp_item to 0
  78.   end if
  79.   if hp_page > hp_max then
  80.     set hp_page to 0
  81.   end if
  82.   set fcommand to "HPOP"
  83. end
  84.  
  85. on help_L
  86.   global fcommand, hp_page, hp_max, hp_item
  87.   put "help_L>" & hp_page
  88.   set hp_old to hp_page
  89.   if hp_page >= 0 then
  90.     help_close()
  91.   end if
  92.   if (hp_item - 1) < 0 then
  93.     set hp_item to 0
  94.     set hp_page to hp_old - 1
  95.   else
  96.     set hp_item to hp_item - 1
  97.     if chkfis(help_name(hp_old, hp_item)) then
  98.       set hp_page to hp_old
  99.     else
  100.       set hp_page to hp_old - 1
  101.       set hp_item to 0
  102.     end if
  103.   end if
  104.   if hp_page < 0 then
  105.     set hp_page to hp_max
  106.   end if
  107.   set fcommand to "HPOP"
  108. end
  109.  
  110. on help_load page
  111.   global fcommand, acwin, spritecount, scommand, up_lang, hp_r, hp_l, hp_x, hp_page, hp_item, hp_max, sp_help, player, up_load, demo
  112.   set fcommand to EMPTY
  113.   set helpcast to "HP"
  114.   duplicate(cast "EMPTY", cast 59)
  115.   set the name of cast 59 to helpcast
  116.   set helpcastn to 59
  117.   set hp_file to help_name(page, hp_item)
  118.   importFileInto(cast helpcast, hp_file)
  119.   if up_lang = 2 then
  120.     set langchar to "G"
  121.   else
  122.     set langchar to "E"
  123.   end if
  124.   if the colorDepth >= 16 then
  125.     if demo then
  126.       set hlphlp to "08"
  127.     else
  128.       set hlphlp to "16"
  129.     end if
  130.   else
  131.     set hlphlp to "08"
  132.   end if
  133.   set helpcast to hlphlp & langchar & "_" & lzero(page) & string(hp_item) & ".pic"
  134.   if the name of cast helpcastn <> helpcast then
  135.     alertrd("Can`t find help page:" & RETURN & helpcast, "Hilfeseite nicht gefunden: " & RETURN & helpcast)
  136.   else
  137.     set the name of cast helpcast to "HP"
  138.     set sp_help to 47
  139.     set helpcast to "HP"
  140.     set hp_page to page
  141.     puppetTransition(1, 1, 5)
  142.     set the castNum of sprite sp_help to the number of cast "HP"
  143.     set the scriptText of cast "HP" to the text of cast "SC_MAIN"
  144.     set the ink of sprite sp_help to 0
  145.     if not player then
  146.       sprite_show(sp_help, 0, 0)
  147.     else
  148.       sprite_show(sp_help, 108, 239)
  149.     end if
  150.     puppetSprite(sp_help, 1)
  151.   end if
  152.   cur_on()
  153.   updateStage()
  154. end
  155.  
  156. on help_name page, itemhp
  157.   global up_lang, demo
  158.   if up_lang = 2 then
  159.     set langchar to "G"
  160.   else
  161.     set langchar to "E"
  162.   end if
  163.   if the colorDepth >= 16 then
  164.     if demo then
  165.       set hlphlp to "08"
  166.     else
  167.       set hlphlp to "16"
  168.     end if
  169.   else
  170.     set hlphlp to "08"
  171.   end if
  172.   if the machineType = 256 then
  173.     set hp_file to the pathName & "HELP" & langchar & "\" & hlphlp & langchar & "_" & lzero(page) & string(itemhp) & ".pic"
  174.   else
  175.     set hp_file to the pathName & "HELP" & langchar & ":" & hlphlp & langchar & "_" & lzero(page) & string(itemhp) & ".pic"
  176.   end if
  177.   return hp_file
  178. end
  179.