home *** CD-ROM | disk | FTP | other *** search
- on load_ini
- global fcommand, up_2ndch, up_lang, up_mdicha, up_mdinot, up_load, up_save, up_temp, up_override, up_mem, ver_ifile, up_cload, up_csave, up_mvol, up_svcnt, up_rncnt
- set fcommand to EMPTY
- set version_OK to 0
- set file to FileIO(mnew, "read", the pathName & "CIRCLE.INI")
- if not objectp(file) then
- updateStage()
- return 0
- exit
- end if
- cur_busy()
- set s to "Start"
- repeat while 1
- set s to file(mReadLine)
- if s <> EMPTY then
- if s <> RETURN then
- set s to correct_s(s)
- set lncmd to chars(s, 1, 1)
- if lncmd = "-" then
- if (s & RETURN) = ver_ifile then
- set version_OK to 1
- end if
- else
- if version_OK then
- if value(chars(s, 2, 3)) <> 13 then
- set lncmd to chars(s, 1, 5)
- if lncmd = "LOAS=" then
- set up_load to chars(s, 6, length(s))
- else
- if lncmd = "SAVS=" then
- set up_save to chars(s, 6, length(s))
- else
- if lncmd = "LOAC=" then
- set up_cload to chars(s, 6, length(s))
- else
- if lncmd = "SAVC=" then
- set up_csave to chars(s, 6, length(s))
- else
- if lncmd = "TEMP=" then
- set up_temp to chars(s, 6, length(s))
- else
- if lncmd = "MEMO=" then
- set up_mem to value(chars(s, 6, length(s)))
- else
- if lncmd = "MVOL=" then
- set up_mvol to value(chars(s, 6, length(s)))
- else
- if lncmd = "RCNT=" then
- set up_rncnt to value(chars(s, 6, length(s))) + 1
- if up_rncnt > 999 then
- set rnsvcnt to 0
- end if
- else
- if lncmd = "LANG=" then
- set up_lang to value(chars(s, 6, length(s)))
- else
- if lncmd = "OVER=" then
- set up_override to value(chars(s, 6, length(s)))
- else
- if lncmd = "MCHA=" then
- set up_mdicha to value(chars(s, 6, length(s)))
- else
- if lncmd = "MNOT=" then
- set up_mdinot to value(chars(s, 6, length(s)))
- else
- if lncmd = "MONO=" then
- if value(chars(s, 6, 7)) = 2 then
- set up_2ndch to 1
- else
- set up_2ndch to 0
- 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
- next repeat
- end if
- exit repeat
- end repeat
- file(mdispose)
- set up_svcnt to 0
- if not version_OK then
- alert(" CIRCLE.INI file corrupted or created by a previsious" & " version of CIRCLE elements. Using defaults.")
- return 0
- else
- mem_update()
- return 1
- end if
- end
-
- on save_ini
- global fcommand, ver_ifile, up_2ndch, up_lang, up_mdicha, up_mdinot, up_load, up_save, up_temp, up_override, up_mem, up_cload, up_csave, up_mvol, up_svcnt, up_rncnt
- set fcommand to EMPTY
- set s to "Start"
- set file to FileIO(mnew, "write", the pathName & "CIRCLE.INI")
- if not objectp(file) then
- exit
- end if
- cur_busy()
- set s to ver_ifile
- file(mWriteString, s)
- set s to "LOAS=" & up_load & RETURN
- file(mWriteString, s)
- set s to "SAVS=" & up_save & RETURN
- file(mWriteString, s)
- set s to "LOAC=" & up_cload & RETURN
- file(mWriteString, s)
- set s to "SAVC=" & up_csave & RETURN
- file(mWriteString, s)
- set s to "TEMP=" & up_temp & RETURN
- file(mWriteString, s)
- set s to "MEMO=" & string(up_mem) & RETURN
- file(mWriteString, s)
- set s to "LANG=" & string(up_lang) & RETURN
- file(mWriteString, s)
- set s to "MVOL=" & string(up_mvol) & RETURN
- file(mWriteString, s)
- set s to "RCNT=" & string(up_rncnt) & RETURN
- file(mWriteString, s)
- set s to "MCHA=" & string(up_mdicha) & RETURN
- file(mWriteString, s)
- set s to "MNOT=" & string(up_mdinot) & RETURN
- set the floatPrecision to 4
- file(mWriteString, s)
- set s to "OVER=" & string(up_override) & RETURN
- file(mWriteString, s)
- if up_2ndch then
- set s to "MONO=1" & RETURN
- else
- set s to "MONO=2" & RETURN
- end if
- file(mWriteString, "--END" & RETURN & RETURN)
- file(mdispose)
- cur_on()
- end
-
- on ini_show
- global fcommand, ver_ifile, up_2ndch, up_mdicha, up_mdinot, up_load, up_save, up_temp, up_override, up_cload, up_csave, up_mem, up_lang
- put "up_load >" & up_load & "<"
- put "up_Cload >" & up_cload & "<"
- put "up_save >" & up_save & "<"
- put "up_Csave >" & up_csave & "<"
- put "up_temp >" & up_temp & "<"
- put "up_override >" & up_override & "<"
- put "up_2ndch >" & up_2ndch & "<"
- put "up_mem >" & up_mem & "<"
- put "up_lang >" & up_lang & "<"
- put "up_mdicha >" & up_mdicha
- put "up_mdinot >" & up_mdinot
- end
-
- on chk_ini
- global up_load, up_save, up_temp, up_override, up_mem, up_cload, up_csave
- if not chk_dir(spath(up_load), getffpath(up_load)) then
- set up_load to the pathName
- end if
- if not chk_dir(spath(up_save), getffpath(up_save)) then
- set up_save to the pathName
- end if
- if not chk_dir(spath(up_cload), getffpath(up_cload)) then
- set up_cload to the pathName
- end if
- if not chk_dir(spath(up_csave), getffpath(up_csave)) then
- set up_csave to the pathName
- end if
- if not chk_dir(spath(up_temp), getffpath(up_temp)) then
- set up_temp to the pathName
- end if
- end
-
- on spath up
- if the machineType = 256 then
- return getipath(up) & "*.*"
- else
- return getipath(up)
- end if
- end
-
- on ini_init
- global up_2ndch, up_mdicha, up_mdinot, up_load, up_save, up_temp, enterFrame, up_cload, up_csave, up_mem, up_lang, up_mvol, up_svcnt, up_rncnt, up_override, demo
- set up_save to the pathName
- set up_load to the pathName
- set up_csave to the pathName
- set up_cload to the pathName
- set up_temp to the pathName
- if demo then
- set up_save to the pathName
- set up_csave to the pathName
- if the machineType = 256 then
- set up_load to the pathName & "SOUNDS\"
- set up_cload to the pathName & "CIRCLES\"
- else
- set up_load to the pathName & "SOUNDS:"
- set up_cload to the pathName & "CIRCLES:"
- end if
- set up_temp to the pathName
- end if
- set up_2ndch to 0
- set up_override to 0.95999999999999996
- set up_lang to 1
- set up_mdicha to -1
- set up_mdinot to 24
- set up_mvol to 15
- set up_svcnt to 0
- set up_rncnt to 0
- end
-