source/page04/initial.asm
changeset 38 a4c5f839b738
parent 36 2fca899545cf
child 41 9ef17625274f
equal deleted inserted replaced
37:9cdbb6464f89 38:a4c5f839b738
  1134 ; =============== S U B	R O U T	I N E =======================================
  1134 ; =============== S U B	R O U T	I N E =======================================
  1135 
  1135 
  1136 
  1136 
  1137 CentCursor:
  1137 CentCursor:
  1138 		; Regraph+3Ap ...
  1138 		; Regraph+3Ap ...
  1139 		bit		0, (iy+2)
  1139 		bit		allowCursor, (iy+plotFlags)
  1140 		ret		nz
  1140 		ret		nz
  1141 		push	hl
  1141 		push	hl
  1142 		push	af
  1142 		push	af
  1143 		ld		a, (lcdTallP+1)
  1143 		ld		a, (lcdTallP+1)
  1144 		srl	a
  1144 		srl	a
  1357 		call	p04sub_5CA7
  1357 		call	p04sub_5CA7
  1358 		jr		nz, p04sub_465B
  1358 		jr		nz, p04sub_465B
  1359 
  1359 
  1360 p04loc_4652:
  1360 p04loc_4652:
  1361 		; ForceGraphKeypress+A6j
  1361 		; ForceGraphKeypress+A6j
  1362 		set		0, (iy+2)
  1362 		set		allowCursor, (iy+plotFlags)
  1363 		ld		a, 5
  1363 		ld		a, 5
  1364 		call	ForceGraphKeypress
  1364 		call	ForceGraphKeypress
  1365 ; End of function ForceGraphKeypress
  1365 ; End of function ForceGraphKeypress
  1366 
  1366 
  1367 
  1367 
  1455 
  1455 
  1456 ; ---------------------------------------------------------------------------
  1456 ; ---------------------------------------------------------------------------
  1457 ; START	OF FUNCTION CHUNK FOR ForceGraphKeypress
  1457 ; START	OF FUNCTION CHUNK FOR ForceGraphKeypress
  1458 
  1458 
  1459 p04loc_46FA:
  1459 p04loc_46FA:
  1460 		bit		0, (iy+2)
  1460 		bit		allowCursor, (iy+plotFlags)
  1461 		jr		nz, p04loc_4706
  1461 		jr		nz, p04loc_4706
  1462 		ld		hl, (freeSaveY)
  1462 		ld		hl, (freeSaveY)
  1463 		ld		(curGY), hl
  1463 		ld		(curGY), hl
  1464 
  1464 
  1465 p04loc_4706:
  1465 p04loc_4706:
  1468 		ld		b, a
  1468 		ld		b, a
  1469 		ld		a, 1
  1469 		ld		a, 1
  1470 		bit		graphHookActive, (iy+hookflags3)
  1470 		bit		graphHookActive, (iy+hookflags3)
  1471 		call	nz, Page0Call_330F
  1471 		call	nz, Page0Call_330F
  1472 		ret		nz
  1472 		ret		nz
  1473 		bit		0, (iy+2)
  1473 		bit		allowCursor, (iy+plotFlags)
  1474 		jr		z, p04loc_474E
  1474 		jr		z, p04loc_474E
  1475 		ld		a, (curPlotNumber)
  1475 		ld		a, (curPlotNumber)
  1476 		or		a
  1476 		or		a
  1477 		jr		nz, p04loc_474E
  1477 		jr		nz, p04loc_474E
  1478 		ld		a, (curGStyle)
  1478 		ld		a, (curGStyle)
  1480 		jr		z, p04loc_474E
  1480 		jr		z, p04loc_474E
  1481 		cp		67h ; 'g'
  1481 		cp		67h ; 'g'
  1482 		jr		z, p04loc_474E
  1482 		jr		z, p04loc_474E
  1483 		ld		hl, (EQS)
  1483 		ld		hl, (EQS)
  1484 		ld		(FPS), hl
  1484 		ld		(FPS), hl
  1485 		res		0, (iy+2)
  1485 		res		allowCursor, (iy+plotFlags)
  1486 		set		2, (iy+17h)
  1486 		set		2, (iy+17h)
  1487 		push	bc
  1487 		push	bc
  1488 		push	af
  1488 		push	af
  1489 		call	p04sub_4F71
  1489 		call	p04sub_4F71
  1490 		pop		af
  1490 		pop		af
  1599 		call	nz, Page0Call_330F
  1599 		call	nz, Page0Call_330F
  1600 		ret		nz
  1600 		ret		nz
  1601 		ld		a, (curGStyle)
  1601 		ld		a, (curGStyle)
  1602 		cp		4Dh ; 'M'
  1602 		cp		4Dh ; 'M'
  1603 		jr		z, p04loc_4811
  1603 		jr		z, p04loc_4811
  1604 		bit		0, (iy+2)
  1604 		bit		allowCursor, (iy+plotFlags)
  1605 		jr		z, p04loc_4817
  1605 		jr		z, p04loc_4817
  1606 		cp		5
  1606 		cp		5
  1607 		jr		z, p04loc_4811
  1607 		jr		z, p04loc_4811
  1608 		cp		4Fh ; 'O'
  1608 		cp		4Fh ; 'O'
  1609 		ld		a, d
  1609 		ld		a, d
  1776 		ret		z
  1776 		ret		z
  1777 		cp		2Fh ; '/'
  1777 		cp		2Fh ; '/'
  1778 		ret		z
  1778 		ret		z
  1779 		cp		5
  1779 		cp		5
  1780 		jp		z, PutXY
  1780 		jp		z, PutXY
  1781 		bit		0, (iy+2)
  1781 		bit		allowCursor, (iy+plotFlags)
  1782 		jr		z, p04loc_4948
  1782 		jr		z, p04loc_4948
  1783 		ld		a, (curPlotNumber)
  1783 		ld		a, (curPlotNumber)
  1784 		or		a
  1784 		or		a
  1785 		jr		z, p04loc_48F4
  1785 		jr		z, p04loc_48F4
  1786 		call	j_SPLOTCOORD
  1786 		call	j_SPLOTCOORD
  1849 
  1849 
  1850 p04loc_4956:
  1850 p04loc_4956:
  1851 		set		6, (iy+1Dh)
  1851 		set		6, (iy+1Dh)
  1852 		call	IsFunctionMode
  1852 		call	IsFunctionMode
  1853 		jr		z, p04loc_498D
  1853 		jr		z, p04loc_498D
  1854 		bit		0, (iy+2)
  1854 		bit		allowCursor, (iy+plotFlags)
  1855 		jr		z, p04loc_498D
  1855 		jr		z, p04loc_498D
  1856 		bit		3, (iy+2)
  1856 		bit		3, (iy+2)
  1857 		jr		z, p04loc_4983
  1857 		jr		z, p04loc_4983
  1858 		call	CLRGRAPHXY
  1858 		call	CLRGRAPHXY
  1859 		bit		grfPolar, (iy+grfDBFlags)
  1859 		bit		grfPolar, (iy+grfDBFlags)
  1905 		call	popErrorHandleR
  1905 		call	popErrorHandleR
  1906 		call	PushRealO2
  1906 		call	PushRealO2
  1907 		call	j_StoR
  1907 		call	j_StoR
  1908 		call	PopRealO1
  1908 		call	PopRealO1
  1909 		call	j_StoTheta
  1909 		call	j_StoTheta
  1910 		bit		0, (iy+2)
  1910 		bit		allowCursor, (iy+plotFlags)
  1911 		jp		z, p04sub_7685
  1911 		jp		z, p04sub_7685
  1912 		bit		3, (iy+2)
  1912 		bit		3, (iy+2)
  1913 		jr		z, p04loc_49FD
  1913 		jr		z, p04loc_49FD
  1914 		call	CLRGRAPHXY
  1914 		call	CLRGRAPHXY
  1915 		call	p04sub_7685
  1915 		call	p04sub_7685
  1926 		jp		nz, p04loc_7682
  1926 		jp		nz, p04loc_7682
  1927 		jp		p04sub_7685
  1927 		jp		p04sub_7685
  1928 ; ---------------------------------------------------------------------------
  1928 ; ---------------------------------------------------------------------------
  1929 
  1929 
  1930 p04loc_4A06:
  1930 p04loc_4A06:
  1931 		bit		0, (iy+2)
  1931 		bit		allowCursor, (iy+plotFlags)
  1932 		jp		z, PutXY
  1932 		jp		z, PutXY
  1933 		call	IsRecursiveMode
  1933 		call	IsRecursiveMode
  1934 		jr		z, p04loc_4A1F
  1934 		jr		z, p04loc_4A1F
  1935 		bit		3, (iy+2)
  1935 		bit		3, (iy+2)
  1936 		jp		z, p04loc_765C
  1936 		jp		z, p04loc_765C
  1984 
  1984 
  1985 p04loc_4A51:
  1985 p04loc_4A51:
  1986 		; ForceGraphKeypress+23Ej
  1986 		; ForceGraphKeypress+23Ej
  1987 		cp		5
  1987 		cp		5
  1988 		jp		nz, p04loc_4ED0
  1988 		jp		nz, p04loc_4ED0
  1989 		bit		0, (iy+2)
  1989 		bit		allowCursor, (iy+plotFlags)
  1990 		jp		z, p04loc_4DB3
  1990 		jp		z, p04loc_4DB3
  1991 		call	j_CursorOff
  1991 		call	j_CursorOff
  1992 		ld		a, (curGStyle)
  1992 		ld		a, (curGStyle)
  1993 		cp		51h ; 'Q'
  1993 		cp		51h ; 'Q'
  1994 		jp		z, p04loc_4D7D
  1994 		jp		z, p04loc_4D7D
  2974 		call	GRBUFCPY_V
  2974 		call	GRBUFCPY_V
  2975 		call	GRLABELS
  2975 		call	GRLABELS
  2976 		pop		hl
  2976 		pop		hl
  2977 
  2977 
  2978 p04loc_507D:
  2978 p04loc_507D:
  2979 		; p04sub_465B+A18j
       
  2980 		res		6, (iy+17h)
  2979 		res		6, (iy+17h)
  2981 		ld		(curInc), hl
  2980 		ld		(curInc), hl
  2982 		bit		2, (iy+17h)
  2981 		bit		2, (iy+17h)
  2983 		jr		nz, p04loc_5099
  2982 		jr		nz, p04loc_5099
  2984 		ld		hl, 0
  2983 		ld		hl, 0
  2989 
  2988 
  2990 p04loc_5099:
  2989 p04loc_5099:
  2991 		call	j_CMPBOXINFO
  2990 		call	j_CMPBOXINFO
  2992 		xor		a
  2991 		xor		a
  2993 		ld		(curPlotNumber), a
  2992 		ld		(curPlotNumber), a
  2994 		set		0, (iy+2)
  2993 		set		allowCursor, (iy+plotFlags)
  2995 		call	FNDSELEQ
  2994 		call	FNDSELEQ
  2996 		bit		2, (iy+17h)
  2995 		bit		2, (iy+17h)
  2997 		jr		z, p04loc_50DC
  2996 		jr		z, p04loc_50DC
  2998 		set		7, (iy+0)
  2997 		set		7, (iy+0)
  2999 		call	IsRecursiveMode
  2998 		call	IsRecursiveMode
  3124 
  3123 
  3125 p04loc_5182:
  3124 p04loc_5182:
  3126 		set		7, (iy+0)
  3125 		set		7, (iy+0)
  3127 		ld		a, 0Bh
  3126 		ld		a, 0Bh
  3128 		ld		(curGY2+1), a
  3127 		ld		(curGY2+1), a
  3129 		bit		6, (iy+0Ch)
  3128 		bit		cmdExec, (iy+cmdFlags)
  3130 		jr		nz, p04loc_519C
  3129 		jr		nz, p04loc_519C
  3131 		call	IsOnInterruptSet
  3130 		call	IsOnInterruptSet
  3132 		jr		z, p04loc_51A2
  3131 		jr		z, p04loc_51A2
  3133 		call	GRBUFCPY_V
  3132 		call	GRBUFCPY_V
  3134 		call	GRLABELS
  3133 		call	GRLABELS
  4938 
  4937 
  4939 
  4938 
  4940 p04sub_5CEA:
  4939 p04sub_5CEA:
  4941 		; ForceGraphKeypress+26Fp ...
  4940 		; ForceGraphKeypress+26Fp ...
  4942 		push	af
  4941 		push	af
  4943 		bit		0, (iy+2)
  4942 		bit		allowCursor, (iy+plotFlags)
  4944 		jr		z, p04loc_5D04
  4943 		jr		z, p04loc_5D04
  4945 		push	hl
  4944 		push	hl
  4946 		push	de
  4945 		push	de
  4947 		ld		hl, (EQS)
  4946 		ld		hl, (EQS)
  4948 		ld		de, (FPS)
  4947 		ld		de, (FPS)
  4953 p04loc_5D02:
  4952 p04loc_5D02:
  4954 		pop		de
  4953 		pop		de
  4955 		pop		hl
  4954 		pop		hl
  4956 
  4955 
  4957 p04loc_5D04:
  4956 p04loc_5D04:
  4958 		res		0, (iy+2)
  4957 		res		allowCursor, (iy+plotFlags)
  4959 		xor		a
  4958 		xor		a
  4960 		ld		(curGStyle), a
  4959 		ld		(curGStyle), a
  4961 		res		graphCursor, (iy+graphFlags)
  4960 		res		graphCursor, (iy+graphFlags)
  4962 		pop		af
  4961 		pop		af
  4963 		ret
  4962 		ret
  5714 		add		a, a
  5713 		add		a, a
  5715 		add		a, a
  5714 		add		a, a
  5716 		ld		b, a
  5715 		ld		b, a
  5717 
  5716 
  5718 p04loc_61BB:
  5717 p04loc_61BB:
  5719 		bit		0, (iy+2)
  5718 		bit		allowCursor, (iy+plotFlags)
  5720 		jr		z, p04loc_61D3
  5719 		jr		z, p04loc_61D3
  5721 		bit		3, (iy+2)
  5720 		bit		3, (iy+2)
  5722 		jr		z, p04loc_61D3
  5721 		jr		z, p04loc_61D3
  5723 		ld		a, b
  5722 		ld		a, b
  5724 		sub		7
  5723 		sub		7
  5931 		bit		5, (hl)
  5930 		bit		5, (hl)
  5932 		jr		z, p04loc_634E
  5931 		jr		z, p04loc_634E
  5933 
  5932 
  5934 p04loc_62DF:
  5933 p04loc_62DF:
  5935 		ld		a, (OP2M)
  5934 		ld		a, (OP2M)
  5936 		bit		0, (iy+2)
  5935 		bit		allowCursor, (iy+plotFlags)
  5937 		jr		nz, p04loc_62FF
  5936 		jr		nz, p04loc_62FF
  5938 		cp		6
  5937 		cp		6
  5939 		jr		z, p04loc_62FF
  5938 		jr		z, p04loc_62FF
  5940 		ld		a, (mcxCurApp)
  5939 		ld		a, (mcxCurApp)
  5941 		cp		4Ah ; 'J'
  5940 		cp		4Ah ; 'J'
  6292 ; ---------------------------------------------------------------------------
  6291 ; ---------------------------------------------------------------------------
  6293 
  6292 
  6294 BLINKGCUR:
  6293 BLINKGCUR:
  6295 		bit		graphCursor, (iy+graphFlags)
  6294 		bit		graphCursor, (iy+graphFlags)
  6296 		ret		z
  6295 		ret		z
  6297 		bit		0, (iy+2)
  6296 		bit		allowCursor, (iy+plotFlags)
  6298 		jr		nz, p04loc_64AB
  6297 		jr		nz, p04loc_64AB
  6299 		ld		a, 5
  6298 		ld		a, 5
  6300 		bit		graphHookActive, (iy+hookflags3)
  6299 		bit		graphHookActive, (iy+hookflags3)
  6301 		call	nz, Page0Call_330F
  6300 		call	nz, Page0Call_330F
  6302 		ret		nz
  6301 		ret		nz
  6314 		ld		d, 2
  6313 		ld		d, 2
  6315 		jp		p04sub_6580
  6314 		jp		p04sub_6580
  6316 ; ---------------------------------------------------------------------------
  6315 ; ---------------------------------------------------------------------------
  6317 
  6316 
  6318 NBCURSOR:
  6317 NBCURSOR:
  6319 		bit		0, (iy+2)
  6318 		bit		allowCursor, (iy+plotFlags)
  6320 		jr		nz, p04loc_64CF
  6319 		jr		nz, p04loc_64CF
  6321 		ld		a, 4
  6320 		ld		a, 4
  6322 		bit		graphHookActive, (iy+hookflags3)
  6321 		bit		graphHookActive, (iy+hookflags3)
  6323 		call	nz, Page0Call_330F
  6322 		call	nz, Page0Call_330F
  6324 		ret		nz
  6323 		ret		nz
  6931 p04loc_67A6:
  6930 p04loc_67A6:
  6932 		ld		(unk_966D), a
  6931 		ld		(unk_966D), a
  6933 		res		6, (iy+18h)
  6932 		res		6, (iy+18h)
  6934 		res		7, (iy+0)
  6933 		res		7, (iy+0)
  6935 		res		grfSChanged, (iy+sGrFlags)
  6934 		res		grfSChanged, (iy+sGrFlags)
  6936 		bit		0, (iy+2)
  6935 		bit		allowCursor, (iy+plotFlags)
  6937 		jr		nz, p04loc_67C6
  6936 		jr		nz, p04loc_67C6
  6938 		ld		hl, 8D1Eh
  6937 		ld		hl, 8D1Eh
  6939 		ld		(hl), 0
  6938 		ld		(hl), 0
  6940 		inc		hl
  6939 		inc		hl
  6941 		ld		(hl), 1
  6940 		ld		(hl), 1
  8213 		jr		z, p04loc_707C
  8212 		jr		z, p04loc_707C
  8214 		bit		webMode, (iy+seqFlags)
  8213 		bit		webMode, (iy+seqFlags)
  8215 		jr		z, p04loc_707C
  8214 		jr		z, p04loc_707C
  8216 		call	page0_172A
  8215 		call	page0_172A
  8217 		jr		nz, p04loc_7075
  8216 		jr		nz, p04loc_7075
  8218 		bit		0, (iy+2)
  8217 		bit		allowCursor, (iy+plotFlags)
  8219 		jr		z, p04loc_707C
  8218 		jr		z, p04loc_707C
  8220 
  8219 
  8221 p04loc_7075:
  8220 p04loc_7075:
  8222 		ld		a, (OP2)
  8221 		ld		a, (OP2)
  8223 		ld		(hl), a
  8222 		ld		(hl), a
 10214 
 10213 
 10215 ; =============== S U B	R O U T	I N E =======================================
 10214 ; =============== S U B	R O U T	I N E =======================================
 10216 
 10215 
 10217 
 10216 
 10218 PDspGrph:
 10217 PDspGrph:
 10219 
       
 10220 		res		plotLoc, (iy+plotFlags)
 10218 		res		plotLoc, (iy+plotFlags)
 10221 		bit		graphDraw, (iy+graphFlags)
 10219 		bit		graphDraw, (iy+graphFlags)
 10222 		call	nz, Regraph
 10220 		call	nz, Regraph
 10223 		bit		6, (iy+0Ch)
 10221 		bit		cmdExec, (iy+cmdFlags)
 10224 		jr		z, p04loc_7ADA
 10222 		jr		z, p04loc_7ADA
 10225 		call	Bit_VertSplit
 10223 		call	Bit_VertSplit
 10226 		jr		z, p04loc_7AD4
 10224 		jr		z, p04loc_7AD4
 10227 		bit		6, (iy+1Dh)
 10225 		bit		6, (iy+1Dh)
 10228 		jr		nz, p04loc_7ADA
 10226 		jr		nz, p04loc_7ADA