
------------- begin maze #7 = orange maze to white castle -------------

	iswall(7,-10,-2):=true;
	iswall(7,-10,-3):=true;
	iswall(7,-10,-4):=true;
	iswall(7,-10,-5):=true;
	iswall(7,-10,-6):=true;
	iswall(7,-10,-7):=true;
	iswall(7,-10,-8):=true;
	iswall(7,-10,-9):=true;
	iswall(7,-10,-10):=true;

	iswall(7,-9,-7):=true;

	iswall(7,-8,-0):=true;
	iswall(7,-8,-1):=true;
	iswall(7,-8,-2):=true;
	iswall(7,-8,-3):=true;
	iswall(7,-8,-4):=true;
	iswall(7,-8,-7):=true;
	iswall(7,-8,-9):=true;
	iswall(7,-8,-10):=true;

	iswall(7,-7,0):=true;
	iswall(7,-7,-7):=true;

	iswall(7,-6,-0):=true;
	iswall(7,-6,-4):=true;
	iswall(7,-6,-5):=true;
	iswall(7,-6,-7):=true;
	iswall(7,-6,-8):=true;
	iswall(7,-6,-9):=true;
	iswall(7,-6,-10):=true;

	iswall(7,-5,-0):=true;
	iswall(7,-5,-4):=true;
	iswall(7,-5,-5):=true;
	iswall(7,-5,-7):=true;
	iswall(7,-5,-8):=true;
	iswall(7,-5,-9):=true;
	iswall(7,-5,-10):=true;

	iswall(7,-4,-0):=true;
	iswall(7,-4,-4):=true;
	iswall(7,-4,-5):=true;


	iswall(7,-3,-0):=true;
	iswall(7,-3,-2):=true;
	iswall(7,-3,-4):=true;
	iswall(7,-3,-5):=true;
	iswall(7,-3,-6):=true;
	iswall(7,-3,-7):=true;
	iswall(7,-3,-8):=true;
	iswall(7,-3,-9):=true;
	iswall(7,-3,-10):=true;

	iswall(7,-2,0):=true;
	iswall(7,-2,-2):=true;

	iswall(7,-1,-0):=true;
	iswall(7,-1,-2):=true;
	iswall(7,-1,-3):=true;
	iswall(7,-1,-4):=true;
	iswall(7,-1,-8):=true;
	iswall(7,-1,-9):=true;
	iswall(7,-1,-10):=true;

	iswall(7,0,-4):=true; --last of upper half

	iswall(7,1,0):=true;
	iswall(7,1,-1):=true;
	iswall(7,1,-2):=true;
	iswall(7,1,-4):=true;
	iswall(7,1,-6):=true;
	iswall(7,1,-7):=true;
	iswall(7,1,-8):=true;
	iswall(7,1,-9):=true;
	iswall(7,1,-10):=true;

	iswall(7,2,-2):=true;
	iswall(7,2,-4):=true;
	iswall(7,2,-6):=true;
	iswall(7,2,-7):=true;
	iswall(7,2,-8):=true;
	iswall(7,2,-9):=true;
	iswall(7,2,-10):=true;

	iswall(7,3,0):=true;
	iswall(7,3,-2):=true;
	iswall(7,3,-4):=true;
	iswall(7,3,-6):=true;

	iswall(7,4,0):=true;
	iswall(7,4,-2):=true;
	iswall(7,4,-4):=true;
	iswall(7,4,-6):=true;
	iswall(7,4,-8):=true;
	iswall(7,4,-9):=true;
	iswall(7,4,-10):=true;

	iswall(7,5,0):=true;
	iswall(7,5,-2):=true;
	iswall(7,5,-6):=true;
	iswall(7,5,-8):=true;
	iswall(7,5,-9):=true;
	iswall(7,5,-10):=true;


	iswall(7,6,0):=true;
	iswall(7,6,-2):=true;
	iswall(7,6,-3):=true;
	iswall(7,6,-4):=true;
	iswall(7,6,-6):=true;

	iswall(7,7,0):=true;

	iswall(7,8,0):=true;
	iswall(7,8,-2):=true;
	iswall(7,8,-3):=true;
	iswall(7,8,-4):=true;
	iswall(7,8,-6):=true;


	iswall(7,9,0):=true;
	iswall(7,9,-6):=true;

	iswall(7,10, 0):=true;
	iswall(7,10,-1):=true;
	iswall(7,10,-2):=true;
	iswall(7,10,-3):=true;
	iswall(7,10,-4):=true;
	iswall(7,10,-5):=true;
	iswall(7,10,-6):=true;
	iswall(7,10,-7):=true;
	iswall(7,10,-8):=true;
	iswall(7,10,-9):=true;
	iswall(7,10,-10):=true;


------ now, repeat maze#7 but negating 3rd coord ----------------------


	iswall(7,-10,2):=true;
	iswall(7,-10,3):=true;
	iswall(7,-10,4):=true;
	iswall(7,-10,5):=true;
	iswall(7,-10,6):=true;
	iswall(7,-10,7):=true;
	iswall(7,-10,8):=true;
	iswall(7,-10,9):=true;
	iswall(7,-10,10):=true;

	iswall(7,-9,7):=true;

	iswall(7,-8,1):=true;
	iswall(7,-8,2):=true;
	iswall(7,-8,3):=true;
	iswall(7,-8,4):=true;
	iswall(7,-8,7):=true;
	iswall(7,-8,9):=true;
	iswall(7,-8,10):=true;

	iswall(7,-7,7):=true;

	iswall(7,-6,4):=true;
	iswall(7,-6,5):=true;
	iswall(7,-6,7):=true;
	iswall(7,-6,8):=true;
	iswall(7,-6,9):=true;
	iswall(7,-6,10):=true;

	iswall(7,-5,4):=true;
	iswall(7,-5,5):=true;
	iswall(7,-5,7):=true;
	iswall(7,-5,8):=true;
	iswall(7,-5,9):=true;
	iswall(7,-5,10):=true;

	iswall(7,-4,4):=true;
	iswall(7,-4,5):=true;

	iswall(7,-3,2):=true;
	iswall(7,-3,4):=true;
	iswall(7,-3,5):=true;
	iswall(7,-3,6):=true;
	iswall(7,-3,7):=true;
	iswall(7,-3,8):=true;
	iswall(7,-3,9):=true;
	iswall(7,-3,10):=true;

	iswall(7,-2,2):=true;

	iswall(7,-1,2):=true;
	iswall(7,-1,3):=true;
	iswall(7,-1,4):=true;
	iswall(7,-1,8):=true;
	iswall(7,-1,9):=true;
	iswall(7,-1,10):=true;

	iswall(7,0,4):=true; --last of upper half

	iswall(7,1,1):=true;
	iswall(7,1,2):=true;
	iswall(7,1,4):=true;
	iswall(7,1,6):=true;
	iswall(7,1,7):=true;
	iswall(7,1,8):=true;
	iswall(7,1,9):=true;
	iswall(7,1,10):=true;

	iswall(7,2,2):=true;
	iswall(7,2,4):=true;
	iswall(7,2,6):=true;
	iswall(7,2,7):=true;
	iswall(7,2,8):=true;
	iswall(7,2,9):=true;
	iswall(7,2,10):=true;

	iswall(7,3,2):=true;
	iswall(7,3,4):=true;
	iswall(7,3,6):=true;

	iswall(7,4,2):=true;
	iswall(7,4,4):=true;
	iswall(7,4,6):=true;
	iswall(7,4,8):=true;
	iswall(7,4,9):=true;
	iswall(7,4,10):=true;

	iswall(7,5,2):=true;
	iswall(7,5,6):=true;
	iswall(7,5,8):=true;
	iswall(7,5,9):=true;
	iswall(7,5,10):=true;


	iswall(7,6,2):=true;
	iswall(7,6,3):=true;
	iswall(7,6,4):=true;
	iswall(7,6,6):=true;


	iswall(7,8,2):=true;
	iswall(7,8,3):=true;
	iswall(7,8,4):=true;
	iswall(7,8,6):=true;


	iswall(7,9,6):=true;

	iswall(7,10,1):=true;
	iswall(7,10,2):=true;
	iswall(7,10,3):=true;
	iswall(7,10,4):=true;
	iswall(7,10,5):=true;
	iswall(7,10,6):=true;
	iswall(7,10,7):=true;
	iswall(7,10,8):=true;
	iswall(7,10,9):=true;
	iswall(7,10,10):=true;


-------- transitions (letter,z,x) ------------------------
-- (-9,-10)  7A  (-2,+10)		dxme:=+(20+step)/-(20+step);
-- (-7,-10)  7B  ( 0,+10)
-- (-4,-10)  7C  (+3,+10)
-- (-2,-10)  7D  (-9,+10)
-- ( 0,-10)  7E  (-7,+10)
-- (+3,-10)  7F  (-4,+10)

-- entry @ (-10,0)
-- exit  @ (+7,-10)
-- exit  @ (+7,+10)
-------------------------------------------


--example function (for gameutils.adb):

cross7f: float:=0.0;
function at7d(now: float; dxme: out float) return boolean is
	near: constant float := here;
	dist1, dist2 : float;
	dt : float := now - cross7f;
begin
	dxme:=0.0;
if dt>repassage then
	if (scene/=7) then return false;
	else
		dist1 := fmath.sqrt( sqr(+10.0-xme) + sqr(-4.0-zme) );
		dist2 := fmath.sqrt( sqr(-10.0-xme) + sqr(+3.0-zme) );
		if dist1<near then
			cross7f:=now;
			dxme:=-20.0-step;
			return true;
		elsif dist2<near then
			cross7f:=now;
			dxme:=+20.0+step;
			return true;
		else
			return false;
		end if;
	end if;
else
	return false;
end if;
end at7f;










cross7e: float:=0.0;
function at7d(now: float; dxme: out float) return boolean is
	near: constant float := here;
	dist1, dist2 : float;
	dt : float := now - cross7e;
begin
	dxme:=0.0;
if dt>repassage then
	if (scene/=7) then return false;
	else
		dist1 := fmath.sqrt( sqr(+10.0-xme) + sqr(-7.0-zme) );
		dist2 := fmath.sqrt( sqr(-10.0-xme) + sqr(-0.0-zme) );
		if dist1<near then
			cross7e:=now;
			dxme:=-20.0-step;
			return true;
		elsif dist2<near then
			cross7e:=now;
			dxme:=+20.0+step;
			return true;
		else
			return false;
		end if;
	end if;
else
	return false;
end if;
end at7e;









cross7d: float:=0.0;
function at7d(now: float; dxme: out float) return boolean is
	near: constant float := here;
	dist1, dist2 : float;
	dt : float := now - cross7d;
begin
	dxme:=0.0;
if dt>repassage then
	if (scene/=7) then return false;
	else
		dist1 := fmath.sqrt( sqr(+10.0-xme) + sqr(-9.0-zme) );
		dist2 := fmath.sqrt( sqr(-10.0-xme) + sqr(-2.0-zme) );
		if dist1<near then
			cross7d:=now;
			dxme:=-20.0-step;
			return true;
		elsif dist2<near then
			cross7d:=now;
			dxme:=+20.0+step;
			return true;
		else
			return false;
		end if;
	end if;
else
	return false;
end if;
end at7d;








cross7c: float:=0.0;
function at7c(now: float; dxme: out float) return boolean is
	near: constant float := here;
	dist1, dist2 : float;
	dt : float := now - cross7c;
begin
	dxme:=0.0;
if dt>repassage then
	if (scene/=7) then return false;
	else
		dist1 := fmath.sqrt( sqr(+10.0-xme) + sqr(+3.0-zme) );
		dist2 := fmath.sqrt( sqr(-10.0-xme) + sqr(-4.0-zme) );
		if dist1<near then
			cross7c:=now;
			dxme:=-20.0-step;
			return true;
		elsif dist2<near then
			cross7c:=now;
			dxme:=+20.0+step;
			return true;
		else
			return false;
		end if;
	end if;
else
	return false;
end if;
end at7c;







cross7b: float:=0.0;
function at7b(now: float; dxme: out float) return boolean is
	near: constant float := here;
	dist1, dist2 : float;
	dt : float := now - cross7b;
begin
	dxme:=0.0;
if dt>repassage then
	if (scene/=7) then return false;
	else
		dist1 := fmath.sqrt( sqr(+10.0-xme) + sqr(-0.0-zme) );
		dist2 := fmath.sqrt( sqr(-10.0-xme) + sqr(-7.0-zme) );
		if dist1<near then
			cross7b:=now;
			dxme:=-20.0-step;
			return true;
		elsif dist2<near then
			cross7b:=now;
			dxme:=+20.0+step;
			return true;
		else
			return false;
		end if;
	end if;
else
	return false;
end if;
end at7b;






cross7a: float:=0.0;
function at7a(now: float; dxme: out float) return boolean is
	near: constant float := here;
	dist1, dist2 : float;
	dt : float := now - cross7a;
begin
	dxme:=0.0;
if dt>repassage then
	if (scene/=7) then return false;
	else
		dist1 := fmath.sqrt( sqr(+10.0-xme) + sqr(-2.0-zme) );
		dist2 := fmath.sqrt( sqr(-10.0-xme) + sqr(-9.0-zme) );
		if dist1<near then
			cross7a:=now;
			dxme:=-20.0-step;
			return true;
		elsif dist2<near then
			cross7a:=now;
			dxme:=+20.0+step;
			return true;
		else
			return false;
		end if;
	end if;
else
	return false;
end if;
end at7a;






