home *** CD-ROM | disk | FTP | other *** search
- on mMouseDown
- global mcast, fcommand, scommand, acwin, demo, framecnt, xy_copy, xy_past, xy_load, xy_save, xy_inse, xy_dele, xy_info, xy_ende, xy_paus, xy_halt, xy_mix, xy_rand, xy_setu, xy_l01, xy_l02, xy_l03, xy_l04, xy_l05, xy_l06, xy_l07, xy_l08, xy_l09, xy_l10, xy_l11, xy_l12, xy_m01, xy_m02, xy_s12, xy_s09, xy_s08, xy_s06, xy_s05, xy_s04, xy_s03, xy_s02, xy_s01, hp_r, hp_l, hp_x, hp_page, player, 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, ltl_mix
- if the mouseDown and (acwin = "MAIN") then
- set x to the mouseH
- set y to the mouseV
- set m_point to point(x, y)
- set mcast to the mouseCast
- if not (fcommand = EMPTY) then
- if mcast = the number of cast "lop_do" then
- circleloopstop()
- end if
- return
- else
- snd_stop()
- if inside(m_point, xy_copy) then
- set fcommand to "COPY"
- end if
- if inside(m_point, xy_past) then
- set fcommand to "PAST"
- end if
- if inside(m_point, xy_load) then
- set fcommand to "LOAD"
- end if
- if inside(m_point, xy_save) then
- set fcommand to "SAVE"
- end if
- if inside(m_point, xy_inse) then
- set fcommand to "INSE"
- end if
- if inside(m_point, xy_dele) then
- set fcommand to "PAUS"
- end if
- if inside(m_point, xy_info) then
- set fcommand to "INFO"
- end if
- if inside(m_point, xy_ende) then
- set fcommand to "ENDE"
- end if
- if inside(m_point, xy_mix) then
- set fcommand to "REMX"
- end if
- if inside(m_point, xy_rand) then
- set fcommand to "EFFE"
- end if
- if inside(m_point, xy_setu) then
- set fcommand to "SEUP"
- end if
- if inside(m_point, xy_l01) then
- set fcommand to "LD01"
- end if
- if inside(m_point, xy_l02) then
- set fcommand to "LD02"
- end if
- if inside(m_point, xy_l03) then
- set fcommand to "LD03"
- end if
- if inside(m_point, xy_l04) then
- set fcommand to "LD04"
- end if
- if inside(m_point, xy_l05) then
- set fcommand to "LD05"
- end if
- if inside(m_point, xy_l06) then
- set fcommand to "LD06"
- end if
- if inside(m_point, xy_l07) then
- set fcommand to "LD07"
- end if
- if inside(m_point, xy_l08) then
- set fcommand to "LD08"
- end if
- if inside(m_point, xy_l09) then
- set fcommand to "LD09"
- end if
- if inside(m_point, xy_l10) then
- set fcommand to "LD10"
- end if
- if inside(m_point, xy_l11) then
- set fcommand to "LD11"
- end if
- if inside(m_point, xy_l12) then
- set fcommand to "LD12"
- end if
- if inside(m_point, xy_s12) then
- set fcommand to "SG12"
- end if
- if inside(m_point, xy_s09) then
- set fcommand to "SG09"
- end if
- if inside(m_point, xy_s08) then
- set fcommand to "SG08"
- end if
- if inside(m_point, xy_s06) then
- set fcommand to "SG06"
- end if
- if inside(m_point, xy_s05) then
- set fcommand to "SG05"
- end if
- if inside(m_point, xy_s04) then
- set fcommand to "SG04"
- end if
- if inside(m_point, xy_s03) then
- set fcommand to "SG03"
- end if
- if inside(m_point, xy_s02) then
- set fcommand to "SG02"
- end if
- if inside(m_point, xy_s01) then
- set fcommand to "SG01"
- end if
- if not player then
- if inside(m_point, xy_halt) then
- set fcommand to "HALT"
- end if
- end if
- if hp_page = 0 then
- if inside(m_point, hp_itm01) then
- help_open(1)
- end if
- if inside(m_point, hp_itm02) then
- help_open(2)
- end if
- if inside(m_point, hp_itm03) then
- help_open(3)
- end if
- if inside(m_point, hp_itm04) then
- help_open(4)
- end if
- if inside(m_point, hp_itm05) then
- help_open(5)
- end if
- if inside(m_point, hp_itm06) then
- help_open(6)
- end if
- if inside(m_point, hp_itm07) then
- help_open(7)
- end if
- if inside(m_point, hp_itm08) then
- help_open(8)
- end if
- if inside(m_point, hp_itm09) then
- help_open(9)
- end if
- if inside(m_point, hp_itm10) then
- help_open(10)
- end if
- if inside(m_point, hp_itm11) then
- help_open(11)
- end if
- if inside(m_point, hp_itm12) then
- help_open(12)
- end if
- end if
- if inside(m_point, hp_r) then
- help_R()
- end if
- if inside(m_point, hp_l) then
- help_L()
- end if
- if inside(m_point, hp_x) then
- help_X()
- end if
- end if
- if mcast = the number of cast "volume" then
- set fcommand to "SLID"
- end if
- if mcast = the number of cast "title" then
- set fcommand to "TITL"
- end if
- if mcast = the number of cast "sndwin" then
- set fcommand to "MSTR"
- end if
- if mcast = the number of cast "DEL" then
- set fcommand to "DELE"
- end if
- if mcast = the number of cast "MIX" then
- set fcommand to "CMIX"
- end if
- if mcast = the number of cast "lop" then
- set fcommand to "LPCK"
- end if
- if mcast = the number of cast "fire" then
- set fcommand to "FIRE"
- end if
- if mcast >= the number of cast "10101" then
- set fcommand to "SEGS"
- end if
- if mcast = the number of cast "TRACK2" then
- set fcommand to "MU01"
- end if
- if mcast = the number of cast "TRACK1" then
- set fcommand to "MU02"
- end if
- if mcast = the number of cast "TRACKI" then
- set fcommand to "MU00"
- end if
- if mcast = the number of cast "BF_CP1" then
- set fcommand to "BFC1"
- end if
- if mcast = the number of cast "BF_CP2" then
- set fcommand to "BFC2"
- end if
- if fcommand = "SLID" then
- circleslider()
- else
- if fcommand = "MSTR" then
- circlemaster()
- else
- if fcommand = "TITL" then
- circlemaster()
- else
- if fcommand = "PLAY" then
- circleplay()
- else
- if fcommand = "STOP" then
- circlestop()
- else
- if fcommand = "LPCK" then
- circleloopinit()
- else
- if fcommand = "FIRE" then
- circlefire()
- else
- if fcommand = "SEGS" then
- segmentselect()
- else
- if fcommand = "LOOP" then
- circleloopplay()
- else
- if fcommand = "ENDE" then
- but_flash("QUIT", 591 + 18, 5 + 9)
- if demo then
- demowin(1)
- end if
- set fcommand to "ENDE"
- set framecnt to 2
- exit
- else
- if fcommand = "LOAD" then
- but_flash("LOAD", 539 + 18, 394 + 19)
- circleload()
- else
- if fcommand = "SAVE" then
- but_flash("SAVE", 591 + 18, 394 + 19)
- circlesave()
- else
- if fcommand = "INFO" then
- but_flash("HELP", 538 + 18, 5 + 9)
- help_open(0)
- else
- if fcommand = "INSE" then
- but_flash("ELEM", 514 + 31, 118 + 19)
- circleinsert()
- else
- if fcommand = "DELE" then
- sounddelete()
- else
- if fcommand = "COPY" then
- but_flash("COPY_R", 591 + 18, 60 + 19)
- d_copy(2)
- else
- if fcommand = "PAST" then
- but_flash("COPY_L", 538 + 18, 60 + 19)
- d_copy(1)
- else
- if fcommand = "PAUS" then
- but_flash("EMPTY", 591 + 18, 118 + 19)
- circlepause()
- else
- if fcommand = "CMIX" then
- circleshrink()
- else
- if fcommand = "REMX" then
- but_flash("REMIX", 539 + 18, 336 + 19)
- mkrandom()
- else
- if fcommand = "EFFE" then
- but_flash("EFX", 591 + 18, 336 + 19)
- soundeffect()
- else
- if fcommand = "HALT" then
- haltcircle()
- else
- if fcommand = "CWIN" then
- ci_sup_ok()
- else
- if fcommand = "SEUP" then
- but_flash("SETUP", 440 + 40, 5 + 9)
- ci_sup_open()
- else
- if fcommand = "BFC1" then
- d_paste(1)
- else
- if fcommand = "BFC2" then
- d_paste(2)
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- if chars(fcommand, 1, 2) = "LD" then
- ledklick(fcommand)
- end if
- if chars(fcommand, 1, 2) = "MU" then
- muteklick(fcommand)
- end if
- if chars(fcommand, 1, 2) = "SG" then
- segszklick(fcommand)
- end if
- end if
- end
-
- on circleslider
- global fcommand, backcast, sel_idx
- set fcommand to EMPTY
- if backcast <> 0 then
- slider(the name of cast backcast)
- set_remix(sel_idx)
- setwindow(the name of cast backcast)
- else
- slider("MASTER")
- setmastervol()
- end if
- end
-
- on slider cname
- global steps, stepsize, maxsegs, up_mvol
- set tmpsprite to getspritenum("VOLUME")
- repeat while the mouseDown
- set b to the mouseH
- set mxsteps to 15
- set slmax to 609
- set slmin to 458
- set sllen to slmax - slmin
- set stepsize to sllen / mxsteps
- if b >= slmax then
- set the locH of sprite tmpsprite to slmax
- set b to slmax
- else
- if b <= slmin then
- set the locH of sprite tmpsprite to slmin
- set b to slmin
- else
- set the locH of sprite tmpsprite to b
- end if
- end if
- updateStage()
- end repeat
- set steps to (b - slmin) / stepsize
- if cname <> "MASTER" then
- set t_idx to ar_get("CAST", cname)
- Ar1Vol(mput, t_idx, steps)
- else
- set up_mvol to steps
- end if
- end
-
- on setslider steps
- set mxsteps to 15
- set slmax to 609
- set slmin to 458
- set sllen to slmax - slmin
- set tmpsprite to getspritenum("VOLUME")
- set tmp to slmin + ((slmax - slmin) / mxsteps * steps)
- if steps = 16 then
- set the locH of sprite tmpsprite to slmax
- else
- set the locH of sprite tmpsprite to tmp
- end if
- end
-
- on initxy
- global xy_copy, xy_past, xy_load, xy_save, xy_inse, xy_dele, xy_info, xy_ende, xy_paus, xy_halt, xy_mix, xy_rand, xy_setu, xy_l01, xy_l02, xy_l03, xy_l04, xy_l05, xy_l06, xy_l07, xy_l08, xy_l09, xy_l10, xy_l11, xy_l12, xy_m01, xy_m02, xy_s12, xy_s09, xy_s08, xy_s06, xy_s05, xy_s04, xy_s03, xy_s02, xy_s01
- set xy_copy to rect(590, 61, 630, 101)
- set xy_past to rect(538, 61, 578, 101)
- set xy_load to rect(538, 394, 578, 435)
- set xy_save to rect(590, 394, 630, 435)
- set xy_inse to rect(512, 118, 578, 160)
- set xy_dele to rect(590, 118, 630, 160)
- set xy_info to rect(538, 5, 578, 26)
- set xy_ende to rect(590, 5, 630, 26)
- set xy_paus to rect(503, 115, 526, 153)
- set xy_halt to rect(1, 1, 90, 20)
- set xy_mix to rect(538, 335, 578, 377)
- set xy_rand to rect(590, 335, 630, 377)
- set xy_setu to rect(440, 5, 525, 26)
- set xy_l01 to rect(218, 1, 252, 38)
- set xy_l02 to rect(332, 48, 366, 65)
- set xy_l03 to rect(415, 107, 449, 143)
- set xy_l04 to rect(438, 224, 472, 261)
- set xy_l05 to rect(410, 341, 444, 379)
- set xy_l06 to rect(332, 415, 366, 452)
- set xy_l07 to rect(218, 441, 252, 478)
- set xy_l08 to rect(107, 415, 141, 452)
- set xy_l09 to rect(20, 341, 54, 379)
- set xy_l10 to rect(0, 224, 34, 261)
- set xy_l11 to rect(21, 107, 55, 143)
- set xy_l12 to rect(96, 48, 130, 65)
- set xy_m01 to rect(480, 64, 493, 77)
- set xy_m02 to rect(504, 64, 517, 77)
- set xy_s12 to rect(520, 320 - (1 * 16), 555, 320 - (0 * 16))
- set xy_s09 to rect(520, 320 - (2 * 16), 555, 320 - (1 * 16))
- set xy_s08 to rect(520, 320 - (3 * 16), 555, 320 - (2 * 16))
- set xy_s06 to rect(520, 320 - (4 * 16), 555, 320 - (3 * 16))
- set xy_s05 to rect(520, 320 - (5 * 16), 555, 320 - (4 * 16))
- set xy_s04 to rect(520, 320 - (6 * 16), 555, 320 - (5 * 16))
- set xy_s03 to rect(520, 320 - (7 * 16), 555, 320 - (6 * 16))
- set xy_s02 to rect(520, 320 - (8 * 16), 555, 320 - (7 * 16))
- set xy_s01 to rect(520, 320 - (9 * 16), 555, 320 - (8 * 16))
- end
-
- on snd_mdown
- set junk to the number of cast "MDOWN"
- end
-
- on waitforup
- repeat while 1
- if not (the mouseDown) then
- exit repeat
- end if
- end repeat
- end
-
- on mykeyup
- global fcommand, ecommand, acwin, fl_msg, scrollstep, fn_sel
- set myrkey to the key
- set myvkey to charToNum(myrkey)
- if myvkey >= 97 then
- set myvkey to myvkey - 32
- end if
- set mykey to numToChar(myvkey)
- if acwin = "MAIN" then
- if myrkey = "Q" then
- circleend()
- end if
- if mykey = " " then
- if fcommand = "LOOP" then
- circleloopstop()
- else
- circleloopinit()
- end if
- end if
- if mykey = "I" then
- circleinsert()
- end if
- if mykey = "D" then
- sounddelete()
- end if
- if mykey = "L" then
- circleload()
- end if
- if mykey = "S" then
- circlesave()
- end if
- if mykey = "P" then
- circleplay()
- end if
- if myvkey = 13 then
- circlestop()
- end if
- if mykey = "F" then
- circlefire()
- end if
- if mykey = "H" then
- help_open(0)
- end if
- if mykey = "C" then
- soundcopy()
- end if
- if mykey = "R" then
- mkrandom()
- end if
- if mykey = "U" then
- ci_sup_open()
- end if
- if mykey = "E" then
- circlepause()
- end if
- if mykey = "M" then
- circlemix()
- end if
- else
- if acwin = "FSEL" then
- if myrkey = 8 then
- fsel_back()
- end if
- if myvkey = 11 then
- fl_slup()
- end if
- if myvkey = 12 then
- fl_sldw()
- end if
- if myvkey = 13 then
- fl_load()
- end if
- if mykey = " " then
- fl_play()
- end if
- if myvkey = 31 then
- if fn_sel < scrollstep then
- set v to string(fn_sel + 1)
- if length(v) < 2 then
- set v to "0" & v
- end if
- set fl_msg to "fn" & v
- fl_fn()
- end if
- end if
- if myvkey = 30 then
- if fn_sel > 1 then
- set v to string(fn_sel - 1)
- if length(v) < 2 then
- set v to "0" & v
- end if
- set fl_msg to "fn" & v
- fl_fn()
- end if
- end if
- end if
- end if
- end
-
- on but_flash fcast, x, y
- global framecnt, butisflash
- if not butisflash then
- sprite_save(46)
- set sp to 46
- set the castNum of sprite sp to the number of cast fcast
- set the ink of sprite sp to 36
- sprite_show(sp, x, y)
- set butisflash to 1
- updateStage()
- end if
- end
-
- on but_reflash
- global framecnt, butisflash
- if butisflash then
- set sp to 46
- sprite_blank(sp)
- sprite_rest()
- set butisflash to 0
- end if
- end
-