home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
utilities
/
utilsp
/
qtmplay
/
!QTMPlay
/
!RunImage
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1995-08-27
|
34KB
|
1,464 lines
> <QTMPlay$Dir>.!RunImage
Copyright 1994,95 Chris Rutter, DIGITAL DREAM
> Hello people, I
m 14. I
m also very very sad.
error
setup_prevariables
do_preprocessing
"Wimp_Initialise",310,&4b534154,"QTM Player",block%
os_version%,task%
create_windows
find_icons
do_postprocessing
create_menus
read_from_file%=
#0:!error%=0:$(error%+4)=
msg("ChoicesCorrupt"):
"Wimp_ReportError",error%,1,
msg("LongTask"):read_from_file%=
:error_occured%=
setup_variables
error
put_choices
tune_loaded%=
tune_loaded%=
tune_loaded%
intercept_loaded
error
wimp_error
read_mode_variables
set_postvariables
"Wimp_Poll",0,block%
wimp_action%
deal_with(wimp_action%)
do_tickeractions
quit%
tidy_exit
deal_with(action%)
action%
1 :
poll_redraw
.#
thumbtack%
block%!28=-1
/$
"Wimp_OpenWindow",,block%
11
!block%<>qtmplay_handle%
menu_open%=
2%
"Wimp_CloseWindow",,block%
3;
block%!0=control_handle%
control_window_open%=
6 :
poll_mouse
7 :
poll_stopdrag
8 :
poll_key
9 :
poll_menu
17,18
block%!16
0 : quit%=
;%
2 :
poll_finalsave
<$
3 :
poll_loadfile
=%
5 :
intercept_load
>$
6 :
poll_ramfetch
?'
&502 :
acknowledge_help
@*
&400C1 :
read_mode_variables
A
poll_mouse
mx%=block%!0
my%=block%!4
mb%=block%!8
whan%=block%!12
ihan%=block%!16
menu_open%=
whan%
qtmplay_handle%
lastdrag%=2
lastdrag%<>2
PF block%!24=qtmplay_handle%:
"Wimp_GetWindowState",,block%+24
QD
block%!8=4
block%!52=-1:
"Wimp_OpenWindow",,block%+24
R. block%!20=qtmplay_handle%:block%!24=1
S%
"Wimp_DragBox",,block%+20
Tk !block%=qtmplay_handle%:
"Wimp_GetWindowState",,block%:wyd%=block%!16-block%!8:myd%=my%-block%!8
lastdrag%=2
V
W
mb%
ihan%
mb%
]7
4 :
tune_loaded%
"QTM_Start"
_& carousel_play%=1
`P
carousel$(1)=""
carousel_play%=
next_carousel_track(1)
aG
carousel_play%>0
play_carousel(carousel_play%)
dO block%!24=qtmplay_handle%:
"Wimp_GetWindowState",,block%+24
eH
mb%=4
block%!52=-1:
"Wimp_OpenWindow",,block%+24
fT block%!20=qtmplay_handle%:block%!24=1:
"Wimp_DragBox",,block%+20
gF
2 :
tune_loaded%
"QTM_Stop":carousel_playing%=
i, thumbtack%=thumbtack%
jE
thumbtack%
set_icon_state(qtmplay_handle%,3)
kE
thumbtack%
clear_icon_state(qtmplay_handle%,3)
mP
"XOS_CLI","Cat "+track_directory$+" { > null: }"
;worked%
n[
worked%
notify(
msg("SillyTrackDir")+" "+track_directory$):
oa
trackdirheight%<=0
notify(
msg("SillyTrackHeight")+" "+
(trackdirheight%))
p^
trackdirwidth%<=0
notify(
msg("SillyTrackWidth")+" "+
(trackdirwidth%))
q} tail$=track_directory$+" "+
(mx%+20)+" "+
(my%)+" "+
(trackdirwidth%)+" "+
(trackdirheight%)+" -SmallIcons"
r+
("Filer_OpenDir "+tail$)
s/
open_window(qtmplay_handle%)
u/
open_window(control_handle%)
v( control_window_open%=
w*
update_position_display
zP
"Wimp_CreateMenu",,menu%,mx%-75,my%+8:menu_open%=
:menu_time%=0
|
control_handle%
ihan%
9
ctrl_pause% :
tune_loaded%
"QTM_Pause"
ctrl_rewind%
mb%
!
tune_loaded%
,
"QTM_Pos",-1,-1
cseq%
&
cseq%>0
cseq%-=1
&
"QTM_Pos",cseq%,0
xseq%-=1
(
carousel_playing%>0
E lasttrack%=
last_carousel_track(carousel_playing%)
<
lasttrack%>0
play_carousel(lasttrack%)
ctrl_forward%
mb%
!
tune_loaded%
,
"QTM_Pos",-1,-1
cseq%
1
"QTM_ReadSongLength"
mseq%
,
cseq%<mseq%-1
cseq%+=1
&
"QTM_Pos",cseq%,0
(
carousel_playing%>0
E nexttrack%=
next_carousel_track(carousel_playing%)
<
nexttrack%>0
play_carousel(nexttrack%)
ctrl_carouselpath%
.
play_carousel(carousel_pointer%)
ctrl_viewing%
, carousel$(carousel_pointer%)=""
-
set_carousel(carousel_pointer%)
ctrl_carouselleft%
E
carousel_pointer%>1
set_carousel(carousel_pointer%-1)
ctrl_carouselright%
G
carousel_pointer%<255
set_carousel(carousel_pointer%+1)
ctrl_download%
save_drag_initiate
ctrl_samplesopen%
*
open_window(samples_handle%)
ctrl_toolbar%
+
open_window(carousel_handle%)
block%!0=whan%
-
"Wimp_GetWindowState",,block%
winx%=block%!4
winy%=block%!16
mx%>volminx%+winx%-block%!20
mx%<volmaxx%+winx%-block%!20
my%>winy%+volminy%-block%!24
my%<winy%+volmaxy%-block%!24
update_slider
!
update_position_display
choices_handle%
ihan%
get_choices
set_choices
save_config_file
4
mb%=4
close_window(choices_handle%)
get_choices
set_choices
4
mb%=4
close_window(choices_handle%)
put_choices
4
mb%=4
close_window(choices_handle%)
carousel_handle%
ihan%
2 cvol%=
get_icon(carousel_handle%,2))
"
cvol%<200
cvol%+=1
2
set_icon(carousel_handle%,2,
(cvol%))
2 cvol%=
get_icon(carousel_handle%,2))
cvol%>0
cvol%-=1
2
set_icon(carousel_handle%,2,
(cvol%))
-
play_carousel(carousel_pointer%)
+ carousel$(carousel_pointer%)=""
,
set_carousel(carousel_pointer%)
oldvol%=
volume
M carousel_vol%(carousel_pointer%)=
get_icon(carousel_handle%,2))
U
carousel_vol%(carousel_pointer%)=0
carousel_vol%(carousel_pointer%)=1
J
(carousel_playing%=carousel_pointer%)
set_volume(oldvol%)
5
mb%=4
close_window(carousel_handle%)
poll_menu
menu_open%=
(block%!0)+1
2 :
open_window(choices_handle%)
menu_items% : quit%=
error
("Error Error in error trapping procedure : "+
$+" at line "+
("Error "+
$+" at line "+
wimp_error
("Error Error in error trapping procedure : "+
$+" at line "+
!error%=
L$(error%+4)=
$+" at line "+
)+" (OK to continue, Cancel to quit)"+
"Wimp_ReportError",error%,(1<<0)
(1<<1),"QTM Player"
,selected%
selected%=2
quit%=
tidy_exit:
open_window(window_handle%)
!block%=window_handle%
"Wimp_GetWindowState",,block%
block%!28=-1
"Wimp_OpenWindow",,block%
close_window(window_handle%)
!block%=window_handle%
"Wimp_GetWindowState",,block%
"Wimp_CloseWindow",,block%
load_and_play(file$)
Hfile%=
(file$):
file%=0
msg("WhereIsIt")+" "+file$
#file%
"QTM_Load",file$,0
tune_loaded%=
"QTM_Start"
"QTM_Info"
track_address%,author_address%
set_icon(control_handle%,ctrl_tunepath%,file$)
set_icon(control_handle%,ctrl_tunename%,
string_address(track_address%))
author_address%=0
set_icon(control_handle%,ctrl_tuneauthor%,"Author unknown")
set_icon(control_handle%,ctrl_tuneauthor%,
string_address(author_address%))
update_position_display
xseq%=0
"Wimp_ForceRedraw",samples_handle%,-(1<<29),-(1<<29),1<<29,1<<29
intercept_loaded
"QTM_Info"
track_address%,author_address%
set_icon(control_handle%,ctrl_tunename%,
string_address(track_address%))
set_icon(control_handle%,ctrl_tunepath%,"<Tune not loaded by QTMPlay>")
author_address%=0
set_icon(control_handle%,ctrl_tuneauthor%,"Author unknown")
set_icon(control_handle%,ctrl_tuneauthor%,
string_address(author_address%))
update_position_display
xseq%=0
tune_loaded%=
intercept_load
track_type(block%!40)
block%!12,block%!8
block%!16=4
"Wimp_SendMessage",19,block%,block%!4
load_and_play(
string_address(block%+44))
carousel_playing%=
track_type(type%)
type%=&CB6
type%=0
typ