' Mystery At MyCroft Mews - Originally written for the C=64
' October 1985 issue of Ahoy! magazine. Originally written by : John R.Prager
' Converted to Creative BASIC by : Stafford White
' With help from :
'			1) aurelCB
'			2) GWS
'			3) Larry McCaughn
'			4) Egil
'			5} ZeroDog
' 			And a few others that I forgot to mention..

def frame,c1,c2,c3,c4:window
def a,building,bldg,bitmap,temp,temp2,i,j,mx,mv,mw,mr,pos,ix,iy,my,routine[4,16] :int
def l[75],u1[13],u2[13],g[13],al[13],h[13],l0[13],extra[4]:int
def al$[6],it$[17],item$[4],b$[17],s$[13],t$[4],h$[13],sx$[4,2],text$,cause$[5],extract$[4] :string

def z, pstep : float
def p,players,textW,textH,wW,wH,bW,bH :int
def run,irow,jcol,x,y :int
def a$,title$ :string
	my=1
def house[17,3]:int		:' House centre co-ordinates
' each building has an allocated centre of the image - the x,y co-ordinates 
' are stored in the house[ ] array.  'x' value in house[ ,1], and 'y' value in house[ ,2]
' (The zero elements of the array are not used, hence we specify the array as 17 by 3).

declare fnr(x:int)

	init          :' Set up variables

' set window size ...
	wW = 805
	wH = 670
' set button size ...
	bw = 70: bh = 30

AUTODEFINE "OFF"

	WINDOW frame,0,0,wW,wH,@MINBOX|@SIZE,0,"Mystery at Mycroft Mews",main
	WINDOW c1,0,0,wW,wH,@nocaption,frame,"",c1messages
	WINDOW c2,0,0,wW,wH,@nocaption,frame,"",c2messages
	WINDOW c3,0,0,wW,wH-50,@nocaption,frame,"",c3messages

	showwindow c1, @swrestore	:' Splash screen
	showwindow c2, @swhide		:' Buildings
	showwindow c3, @swhide		:'

'set up screen backgrounds ...
	setwindowcolor c1,rgb(0,0,30)
	setwindowcolor c2,rgb(0,40,0)
	setwindowcolor c3,rgb(0,0,60)

	centerwindow frame

' set button sizes ..
	bW = 70 : bH = 30

' set up Buildings screen controls ..
	control c1,"B,1 Player,.09(wW-bW)/3,560,bW,bH,@CTLBTNFLAT,1"
	setfont c1, "MS Sans Serif",10,600,0,1
	setcontrolcolor c1,1,rgb(100,200,250),rgb(10,10,120)

	control c1,"B,2 Players,.45*(wW-bW)/3,560,bW,bH,@CTLBTNFLAT,2"
	setfont c1, "MS Sans Serif",10,600,0,2
	setcontrolcolor c1,2,rgb(100,200,250),rgb(10,10,120)

	control c1,"B,3 Players,.95*(wW-bW)/3,560,bW,bH,@CTLBTNFLAT,3"
	setfont c1, "MS Sans Serif",10,600,0,3
	setcontrolcolor c1,3,rgb(100,200,250),rgb(10,10,120)

	control c1,"B,4 Players,1.45*(wW-bW)/3,560,bW,bH,@CTLBTNFLAT,4"
	setfont c1, "MS Sans Serif",10,600,0,4
	setcontrolcolor c1,4,rgb(100,200,250),rgb(10,10,120)
	
	control c1,"B,5 Players,1.95*(wW-bW)/3,560,bW,bH,@CTLBTNFLAT,5"
	setfont c1, "MS Sans Serif",10,600,0,5
	setcontrolcolor c1,5,rgb(100,200,250),rgb(10,10,120)

	control c1,"B,6 Players,2.45*(wW-bW)/3,560,bW,bH,@CTLBTNFLAT,6"
	setfont c1, "MS Sans Serif",10,600,0,6
	setcontrolcolor c1,6,rgb(100,200,250),rgb(10,10,120)
	
	control c1,"B,Quit,2.95*(wW-bW)/3,560,bW,bH,@CTLBTNFLAT,7"
	setfont c1, "MS Sans Serif",10,600,0,7
	setcontrolcolor c1,7,rgb(100,200,250),rgb(10,10,120)



	' set up Selected Building screen control ..
	control c3,"B,Proceed,(wW-bW)/2,560,bW,bH,@CTLBTNFLAT,1"
	setfont c3, "MS Sans Serif",10,600,0,1
	setcontrolcolor c3,1,rgb(100,200,250),rgb(10,10,120)


	' draw a gradient fill in main splash window ..
	pstep = 300.0 / 256 + 1
	for band = 0 To 255
		rect c1, 0, int(band * pstep), wW, int((band+1) * pstep), rgb(0,0,band), rgb(0,0,band)
	next band

	' load splash image ..
	'splash = LOADIMAGE (getstartpath + "splash.jpg", 4)
	'showimage win,splash,4,(wW-200)/2,225

	' set intro text ...
	title$ = "Mystery at Mycroft Mews"
	setfont c1, "Arial",28,700,0
	gettextsize c1, title$, textW, textH
	'move c1,(wW - textW)/2,36
	frontpen c1, rgb(20,130,255)
	drawmode c1,@TRANSPARENT
	move c1, 150,160
	print c1,"Mystery at"
	move c1, 300, 280
	print c1, "Mycroft"
	move c1,450, 400
	print c1,"Mews"
	
	run = 1

	waituntil run = 0
	closewindow c3
	closewindow c2
	closewindow c1
	closewindow frame
	end

main:
	' Frame window messages ..
	' not a lot to do with this window - shown only once.
	select @CLASS
		case @IDCLOSEWINDOW
			run = 0
	endselect
	return

sub c1messages
	' Splash window messages ..
	select @CLASS
		case @idcontrol
			select @controlid
				case 1
				  players = 1
				case 2
				  players = 2
				case 3
				  players = 3
				case 4
				  players = 4
				case 5
				  players = 5
				case 6
				  players = 6
				case 7
				  run = 0
			endselect
			l[57] = players
			for j = 1 to p
				l[36+j] = 5: l[42+j] = 7: l[30+j] = 17
			next j
			p=1
			' show Buildings screen ..
			showwindow c2,@swrestore
			showwindow c1,@swhide
			bldg = LoadImage(getstartpath + "house.jpg",@IMGSCALABLE)

			for jcol = 1 to 4
				for irow = 1 to 4
				' a bit of tricky stuff to position the house images neatly ..
					x = 0.1*wW + 170*(irow-1)
					y = 0.015*wH + 150*(jcol-1)
					ShowImage c2,bldg,@IMGSCALABLE,x,y
					' save the co-ordinates of the centre point of each house ..
					' houses are numbered 1 to 4 in the first row, 5 to 8 in the second row, etc ..
					house[(jcol-1)*4 + irow,1] = x + 65	:' add half the image width
					house[(jcol-1)*4 + irow,2] = y + 65	:' add half the image height
				next irow
			next jcol

			' set instruction text to pick a residence ...
			a$ = "Click on the building you wish to enter.."
			setfont c2, "Arial",12,700,0
			gettextsize c2, a$, textW, textH
			move c2,(wW - textW)/2,0.89*wH
			frontpen c2, rgb(20,130,255)
			drawmode c2,@TRANSPARENT 
			print c2,a$
	endselect
return

sub fnr(X)
return INT(RND(1.0)*X)+1

sub search
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 300, 300
	print c3, "You find :  "
	temp = 310
	i=0
	for j = 1 to 16
		if l[j+12]<>-building then jump nothing
		if rnd(1)<.6 | l[50+p]=15
			i=1
			temp = temp + 15
			move c3, 300,temp
			print c3,"The ",it$[j]
			l[j+12]=building
		endif
label nothing
	next j
	temp = temp + 15
	move c3,300,temp
	if i=0 then print c3,"Nothing of interest..."
label nothing
return

sub interrogate
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 300, 300
	print c3, "Interrogate which suspect?"
	temp=325
	routine[1,0]=1
	for j=1 to 12
		move c3, 300, temp
		if l[j]=building
			print c3, s$[j]
			routine[1,j]=1
			i=1 
		endif
		temp=temp+15
	next j
return

sub interrogate_about
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 300, 300
	routine[2,0]=1
	print c3, "Interrogate ",s$[j]," about whom?"
	temp=325
	for x=1 to 12
		move c3, 300, temp
		print c3, s$[x]
		routine[2,x]=1
		temp=temp+15
		i=1 
	next x
	move c3,300, temp
	print c3,"<< An Item >>"
	routine[2,13]=1 
return

sub interrogate_about_item
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 300, 300
	routine[3,0]=1
	print c3, "Interrogate ",s$[j]," about what?"
	temp=325
	for x=1 to 12
		move c3, 300, temp
		print c3, it$[x]
		routine[3,x]=1
		temp=temp+15
		i=1 
	next x
	move c3,300, temp
	print c3,"<< A suspect >>"
	routine[3,13]=1
return

sub interrogate_suspect
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 300, 300
	print c3,"We interrogate ",s$[j]," about ..."
return

sub take_item
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 200, 300
	print c3, "You take an item!!"
	l[50+p]=rnd(16)+1
return

sub fingerprint_item
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 200, 300
	print c3, "Police fingerprint an item!!"
return

sub accuse
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 200, 300
	print c3, "You accuse a suspect!!"
	solution
return

sub coroner_report
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3,200,280
	print c3,"Coroner's Report:"
	if mv<=6 then x=0 else x=1
	move c3,200,300
	print c3,"Subject is ",sx$[0,x],", approximately ",l[50],"years of age."
	temp=l[49]
	move c3,200,315
	print c3,"Subject apparently was",cause$[temp],"."
return

sub extract
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3,200,280
	print c3,"Extract from the ",it$[13]," of ",s$[mv]
	temp=310
	move c3,150,temp
	text$=extract$[mx]
	print c3,left$(extract$[mx],85)
	move c3,150,temp+15
	print c3,mid$(extract$[mx],86)
	a=extra[mx]
	temp=350
	move c3,150,temp
	for j=1 to 12
		if j=mv then g[j]=0
		x = g[j] & a
		move c3,150,temp
		if x 
			print c3,s$[j]
			temp=temp+15
		endif
	next j  
return

sub drop_hide
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 200, 300
	temp=l[50+p]
	print c3, "You drop the ",it$[temp],"."
	l[j+12]=building
	l[50+p]=0
return

sub examine_records
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3, 200, 300
	temp = rnd(12)+1
	print c3,b$[building]," report on ",s$[temp],"."
	temp = g[temp]&7
	move c3,200,325
	'print c3,
return

sub solution
	rect c3,0,50,335,200,rgb(0,0,60),rgb(0,0,60)
	rect c3,0,200,wW,wH,rgb(0,0,60),rgb(0,0,60)
	move c3,1,300
	print c3,"Here is the solution:"
	move c3,1,315
	print c3,s$[mr]," murdered ",s$[mv]," using the",it$[mw]
	move c3,1,330
	print c3,"because ",
	if mr<=6 then temp=0 else temp=1
	print c3,sx$[1,temp]," ",t$[mx],"."
return

sub In_the_building
	if building = mv & l[50+p]<>14
		move c3,368,119
		print c3, "LOCKED"
		move c3, 300,300
		print c3, "Murder scene. No one my enter"
		move c3, 300, 315
		print c3, "without the Police Master Key!"
		return
	endif
	move c3,(wW - textW)/2,0.05*wH
	print c3,a$	
	move c3,1,100
	temp = l[50+p]
	print c3, "You have ",
	if l[50+p] then print c3," the ",it$[temp], "." else print c3,"no item."
	move c3,1,135
	i=0
	print c3, "You see:"
	temp=150
	for j=1 to 12
		move c3, 1, temp
		if l[j]=building
			print c3, s$[j]
			i=1 
			temp=temp+15
			u2[1]=u2[1]+1
			u2[5]=j
		endif
	next j
	temp=temp+15
	for j=1 to 16
		move c3, 1, temp
		if l[j+12] = building
			print c3, "The ",it$[j]
			temp=temp+15
			u2[2]=u2[2]+1
			i=1
		endif
	next j
	if i=0 then print c3,"Nothing worth mentioning."
	move c3,350,300
	print c3,"Turn options:"
	routine[0,0]=1
	temp = 325
	move c3,300,temp
	u1[1]=1
	print c3,"Search"
	routine[0,1]=1
'endif			'<-----------no corresponding if
	temp = temp +15
	u1[2]=2
	if u2[1]
		move c3,300,temp
		print c3,"Interrogate suspect"
		u1[2]=2
		routine[0,2]=1
	endif
	temp = temp +15
	if u2[2] | u2[4]
		move c3,300,temp
		print c3,"Take an item"
		routine[0,3]=1
	endif
	temp = temp +15
	if building=16 & (u2[2]|l[50+p])
		move c3,300,temp
		print c3,"Fingerprint an item"
		routine[0,4]=1
	endif
	temp = temp +15
	if building=16
		move c3,300,temp
		print c3,"Accuse a suspect"
		u1[2]=2
		routine[0,5]=1
	endif
	temp = temp +15
	if building=14
		move c3,300,temp
		print c3,"Read Coroner's Report"
		routine[0,6]=1
	endif
	temp = temp +15
	if l[25]=100+p | l[25]=building
		move c3,300,temp
		print c3,"Read ",it$[13]
		u1[2]=2
		routine[0,7]=1
	endif
	temp = temp +15
	if l[51]
		move c3,300,temp
		print c3,"Drop or Hide item carried"
		routine[0,8]=1
	endif
	temp = temp +15  
	if building<3 | building=7
		move c3,300,temp
		print c3,"Examine ",b$[building]," records"
		routine[0,9]=1
	endif
	u2[1]=0
	u2[2]=0
return

sub init
	reset
	mx = fnr(3)
	mw = fnr(12)
label redo
	mv = fnr(12)
	mr = fnr(12)
	if mv = mr 
		redo
	endif
	b$[1]="Law Office","Mental Health Clinic","Delicatessen","Theatre","Hotel","Art Gallery","Bank","Library","Bakery","Pawn Shop","Church","Pub","Shopping Mall","Morgue","Warehouse","Police Station"
	it$[1]=" elephant gun"," antique crossbow"," baseball bat"," box of rat poison"," arquebus"," scimitar"," brass candelstick"," jar of sleeping pills"," .45 Automatic"," knitting needle"," ball-peen hammer"," vial of snake venom","item","master key","magnifying glass","police badge"
	item$[1]="Ledger","Will","Diary"
	it$[13]=item$[mx]
	s$[1]="Phyllis Writ","Dr. Wilma Libido","Hannah Nosh","Edith Scrim","Cheryl Valise","Desiree Ochre","Emilio Lucre","Morton Screed","Joseph Cruller","Norman Hock","Rev. Arthur Transept","Edgar Quaff"
	h$[0]=" stamp collector"," big-game hunter","n archery expert","sports fan","pest exterminator"," gun collector"," master fencer"," candelabra fancier","n insomniac"," marksman"," champion knitter"," tool collector"," herpetologist"
	t$[1]="was being blackmailed","will inherit millions","is a homicidal maniac"
	sx$[0,0]="female","she","her","her"
	sx$[0,1]="male","he","him","his"
	cause$[0]=" poisoned with an unidentified toxin"," shot with a gun"," impaled with a sharp weapon"," bludgeoned with a blunt instrument"
	al$[0]=" at home alone"," sick in bed"," out of town"," at a party"," at the theatre"," at church"
	extract$[1]="I have threatened to tell the police all that I know about their criminal activities if any of these people doesn't pay me another $9000 by midnight Sunday..."
	extract$[2]="I hereby bequeath two million dollars to each of these loyal and faithful friends..."
	extract$[3]="Dear Diary---, I found another anonymous letter in the mail this morning. My life is in danger from a jealous lunatic. The handwriting could be any of these people..."  
	extra[1]=16,32,64
	p=1
	for j=1 to 12
		l[j]=j
		al[j]=fnr(6)-1
		h[j]=fnr(12)
		l0[j]=fnr(15)
		l[j+12]=-l0[j]
		g[j]=fnr(7)
		z = rnd(1)
		if z <.5 then g[j] = g[j] + 16
		z = rnd(1)
		if z <.5 then g[j] = g[j] + 32
		z = rnd(1)
		if z <.5 then g[j] = g[j] + 64
	next j

	for j=1 to 16
LABEL tryagain
		x=fnr(16)
		if l[58+x]>0 then goto tryagain
		l[58+x]=j 
		if j>12
			l[12+j]=16
		endif
	next j
	l[30]=mx
	l[49]=3&mw
	l[50]=fnr(40)+20
	l[51]=0
	l[mv]=0: l[25]=-mv: al[mr]=fnr(3)-1: l0[mw]=mr
	if -l[12+mw]= mr
		l[12+mw]= -fnr(15)
	endif

	g[mv]=fnr(7)-8*(mx=2)
	if mx<3 then g[mv]=g[mv]|6
	g[mr]=g[mr]|2^(mx+3)
	if mx<3 then g[mr]=g[mr]&251
return

sub reset
	for x = 0 to 15
		for y = 0 to 3
			routine[y,x]=0
		next y
	next x
return

sub c2messages
' messages for the buildings screen ..

select @CLASS
	case @IDLBUTTONDN
	
' the screen co-ordinates where the mouse was clicked ..
		ix = @mousex: iy = @mousey
' check whether the mouse click was inside a house circle of
' radius 70px at co-ordinates stored for each house centre point ...
' the equation of the circle is:  (x - xcentre)^2 + (y - ycentre)^2 = radius^2

		building = 0			:' no building selected yet ..

		for i = 1 to 16
' check for a mouse click within a radius of 65px of the centre of each image ..
			if ((ix - house[i,1])^2 + (iy - house[i,2])^2 < 65^2)
' the point is inside a house circle ...
' find which residence corresponds to the ix,iy mouse co-ordinates ...		
				building = l[58+i]
' exit the for loop ..
				i = 16
			endif
		next i

' show the screen for the selected residence ..
		if bldg
			showwindow c3,@swrestore
			' clear any previous selection message ..
			rect c3,0,0,wW,wH,rgb(0,0,60),rgb(0,0,60)
			showwindow c2,@swhide
			ShowImage c3,bldg,@IMGSCALABLE,(wW - 130)/2,wH*0.1

' describe which residence was selected ...
			a$ = "You are at the " + b$[building]+ "."
			setfont c3, "Arial",12,700,0
			gettextsize c3, a$, textW, textH
			move c3,(wW - textW)/2,0.05*wH
			frontpen c3, rgb(20,130,255)
			drawmode c3,@TRANSPARENT
			'print c3,a$			
			In_the_building
	    endif
	endselect
return

sub c3messages
' messages for the selected building screen ..
	select @CLASS
		case @IDLBUTTONDN
			' the screen co-ordinates where the mouse was clicked ..
			ix = @mousex: iy = @mousey

			if ((ix > 290)&(ix < 590)) 
				' Options?
				if ((iy > 330)&(iy < 345)) & routine[0,1]=1
					search
					reset
				endif
				if ((iy > 345)&(iy < 360)) & routine[0,2]=1
					interrogate
					reset
				endif
				if ((iy > 360)&(iy < 375)) & routine[0,3]=1
					take_item
					reset
				endif
				if ((iy > 375)&(iy < 390)) & routine[0,4]=1
					fingerprint_item
					reset
				endif
				if ((iy > 390)&(iy < 405)) & routine[0,5]=1
					accuse
					reset
				endif
				if ((iy > 405)&(iy < 420)) & routine[0,6]=1
					coroner_report
					reset
				endif
				if ((iy > 420)&(iy < 435)) & routine[0,7]=1
					extract
					reset
				endif
				if ((iy > 435)&(iy < 450)) & routine[0,8]=1
					drop_hide
					reset
				endif
				if ((iy > 450)&(iy < 465)) & routine[0,9]=1
					examine_records
					reset
				endif
				' Interrogate which suspect?
				if ((iy > 330) & (iy < 345)) & routine[1,1]=1
					j=1
					interrogate_about
					reset
				endif
				if ((iy > 345) & (iy < 360)) & routine[1,2]=1
					j=2
					interrogate_about
					reset
				endif
				if ((iy > 360) & ( iy < 375)) & routine[1,3]=1
					j=3
					interrogate_about
					reset
				endif
				if ((iy > 375) & (iy < 390)) & routine[1,4]=1
					j=4
					interrogate_about
					reset
				endif
				if ((iy > 390) & (iy < 405)) & routine[1,5]=1
					j=5
					interrogate_about
					reset
				endif
				if ((iy > 405) & (iy < 420)) & routine[1,6]=1
					j=6
					interrogate_about
					reset
				endif
				if ((iy > 420) & (iy < 435)) & routine[1,7]=1
					j=7
					interrogate_about
					reset
				endif
				if ((iy > 435) & (iy < 450)) & routine[1,8]=1
					j=8
					interrogate_about
					reset
				endif
				if ((iy > 450) & (iy < 465)) & routine[1,9]=1
					j=9
					interrogate_about
					reset
				endif
				if ((iy > 465) & (iy < 480)) & routine[1,10]=1
					j=10
					interrogate_about
					reset
				endif
				if ((iy > 480) & (iy < 495)) & routine[1,11]=1
					j=11
					interrogate_about
					reset
				endif
				if ((iy > 495) & (iy < 510)) & routine[1,12]=1
					j=12
					interrogate_about
					reset
				endif
				if ((iy > 510) & (iy < 525)) & routine[1,13]=1
					interrogate_about_item
					reset
				endif
				' About what item?
				if ((iy > 330) & (iy < 345)) & routine[2,1]=1
					j=1
					interrogate_suspect
					reset
				endif
				if ((iy > 345) & (iy < 360)) & routine[2,2]=1
					j=2
					interrogate_suspect
					reset
				endif
				if ((iy > 360) & (iy < 375)) & routine[2,3]=1
					j=3
					interrogate_suspect
					reset
				endif
				if ((iy > 375) & (iy < 390)) & routine[2,4]=1
					j=4
					interrogate_suspect
					reset
				endif
				if ((iy > 390) & (iy < 405)) & routine[2,5]=1
					j=5
					interrogate_suspect
					reset
				endif
				if ((iy > 405) & (iy < 420)) & routine[2,6]=1
					j=6
					interrogate_suspect
					reset
				endif
				if ((iy > 420) & (iy < 435)) & routine[2,7]=1
					j=7
					interrogate_suspect
					reset
				endif
				if ((iy > 435) & (iy < 450)) & routine[2,8]=1
					j=8
					interrogate_suspect
					reset
				endif
				if ((iy > 450) & (iy < 465)) & routine[2,9]=1
					j=9
					interrogate_suspect
					reset
				endif
				if ((iy > 465) & (iy < 480)) & routine[2,10]=1
					j=10
					interrogate_suspect
					reset
				endif
				if ((iy > 480) & (iy < 495)) & routine[2,11]=1
					j=11
					interrogate_suspect
					reset
				endif
				if ((iy > 495) & (iy < 510)) & routine[2,12]=1
					j=12
					interrogate_suspect
					reset
				endif
				if ((iy > 510) & (iy < 525)) & routine[2,13]=1
					interrogate_about
					reset
				endif
			endif
		case @idcontrol
			select @controlid
				case 1
					showwindow c2,@swrestore
					showwindow c3,@swhide
			endselect
	endselect
return

sub c4messages

return
