source/page05/initial.asm
changeset 41 9ef17625274f
parent 38 a4c5f839b738
child 43 486c42a314bc
equal deleted inserted replaced
40:ba7bd14b7d7b 41:9ef17625274f
     1 p05loc_4000:
     1 p05loc_4000:
     2 		call	p05sub_4702
     2 		call	p05sub_4702
     3 
     3 
     4 Page05_3A11:
     4 InitMatrixEditorContext:
     5 		ld		a, (keyExtend)
     5 		ld		a, (keyExtend)
     6 		push	af
     6 		push	af
     7 		ld		hl, Page05Context1
     7 		ld		hl, Page05Context1
     8 		call	page0_7C1
     8 		call	AppInitEnoughMem50
     9 		set		grfSplitOverride, (iy+sGrFlags)
     9 		set		grfSplitOverride, (iy+sGrFlags)
    10 		pop		af
    10 		pop		af
    11 		call	Page05_328B
    11 		call	Page05_328B
    12 		call	p05sub_407A
    12 		call	p05sub_407A
    13 
    13 
    93 
    93 
    94 p05loc_408D:
    94 p05loc_408D:
    95 		call	page0_1847
    95 		call	page0_1847
    96 		call	PushRealO1
    96 		call	PushRealO1
    97 		call	CanAlphIns
    97 		call	CanAlphIns
    98 		call	page0_740
    98 		call	ResetPromptEditFlag
    99 		call	p05sub_40A3
    99 		call	p05sub_40A3
   100 		call	FINDSYM_GET_SIZE
   100 		call	FINDSYM_GET_SIZE
   101 		ld		(matrixDimensions), hl
   101 		ld		(matrixDimensions), hl
   102 		ret
   102 		ret
   103 ; End of function p05sub_407A
   103 ; End of function p05sub_407A
   679 		cp		0Bh
   679 		cp		0Bh
   680 		ret		z
   680 		ret		z
   681 		cp		27h ; '''
   681 		cp		27h ; '''
   682 		jr		nz, p05loc_43F0
   682 		jr		nz, p05loc_43F0
   683 		call	p05sub_57B8
   683 		call	p05sub_57B8
   684 		jp		Page05_3A11
   684 		jp		InitMatrixEditorContext
   685 ; ---------------------------------------------------------------------------
   685 ; ---------------------------------------------------------------------------
   686 
   686 
   687 p05loc_43F0:
   687 p05loc_43F0:
   688 		cp		9
   688 		cp		9
   689 		jr		z, p05loc_43FB
   689 		jr		z, p05loc_43FB
   925 
   925 
   926 p05loc_453E:
   926 p05loc_453E:
   927 		cp		27h ; '''
   927 		cp		27h ; '''
   928 		jp		nz, j_CallCommon
   928 		jp		nz, j_CallCommon
   929 		call	p05sub_57B8
   929 		call	p05sub_57B8
   930 		jp		Page05_3A11
   930 		jp		InitMatrixEditorContext
   931 
   931 
   932 ; =============== S U B	R O U T	I N E =======================================
   932 ; =============== S U B	R O U T	I N E =======================================
   933 
   933 
   934 
   934 
   935 p05sub_4549:
   935 p05sub_4549:
  1477 ; =============== S U B	R O U T	I N E =======================================
  1477 ; =============== S U B	R O U T	I N E =======================================
  1478 
  1478 
  1479 
  1479 
  1480 p05sub_47FA:
  1480 p05sub_47FA:
  1481 		call	p05loc_5868
  1481 		call	p05loc_5868
  1482 		jr		Page05_3A17
  1482 		jr		InitStatEditorContext
  1483 ; End of function p05sub_47FA
  1483 ; End of function p05sub_47FA
  1484 
  1484 
  1485 ; ---------------------------------------------------------------------------
  1485 ; ---------------------------------------------------------------------------
  1486 ; START	OF FUNCTION CHUNK FOR p05sub_4DDF
  1486 ; START	OF FUNCTION CHUNK FOR p05sub_4DDF
  1487 
  1487 
  1488 p05loc_47FF:
  1488 p05loc_47FF:
  1489 		; p05sub_4DDF+2F3j ...
  1489 		; p05sub_4DDF+2F3j ...
  1490 		call	p05loc_5874
  1490 		call	p05loc_5874
  1491 
  1491 
  1492 Page05_3A17:
  1492 InitStatEditorContext:
  1493 		call	p05sub_5AEE
  1493 		call	p05sub_5AEE
  1494 		ld		hl, Page05Context2
  1494 		ld		hl, Page05Context2
  1495 		call	page0_7C1
  1495 		call	AppInitEnoughMem50
  1496 		call	page0_176F
  1496 		call	page0_176F
  1497 		call	p05sub_4882
  1497 		call	p05sub_4882
  1498 		dec		a
  1498 		dec		a
  1499 		ld		(winTop), a
  1499 		ld		(winTop), a
  1500 		ld		a, (unk_970F)
  1500 		ld		a, (unk_970F)
  4000 		jr		z, p05loc_554A
  4000 		jr		z, p05loc_554A
  4001 		ld		a, (mcxCurApp)
  4001 		ld		a, (mcxCurApp)
  4002 		cp		43h ; 'C'
  4002 		cp		43h ; 'C'
  4003 		ld		a, e
  4003 		ld		a, e
  4004 		jr		z, p05loc_55A0
  4004 		jr		z, p05loc_55A0
  4005 		bit		3, (iy+15h)
  4005 		bit		DISP_ALT_STATS, (iy+NEWFLAGS3)
  4006 		jr		z, p05loc_554A
  4006 		jr		z, p05loc_554A
  4007 
  4007 
  4008 p05loc_55A0:
  4008 p05loc_55A0:
  4009 		call	j_VPutMap
  4009 		call	j_VPutMap
  4010 		ret
  4010 		ret
  4543 ; =============== S U B	R O U T	I N E =======================================
  4543 ; =============== S U B	R O U T	I N E =======================================
  4544 
  4544 
  4545 
  4545 
  4546 p05sub_58A7:
  4546 p05sub_58A7:
  4547 		; p05sub_57B8+92j
  4547 		; p05sub_57B8+92j
  4548 		call	page0_740
  4548 		call	ResetPromptEditFlag
  4549 		res		curLock, (iy+curFlags)
  4549 		res		curLock, (iy+curFlags)
  4550 		call	j_resetStacks
  4550 		call	j_resetStacks
  4551 		call	j_CleanAll
  4551 		call	j_CleanAll
  4552 		res		grfSplitOverride, (iy+sGrFlags)
  4552 		res		grfSplitOverride, (iy+sGrFlags)
  4553 		bit		3, (iy+15h)
  4553 		bit		DISP_ALT_STATS, (iy+NEWFLAGS3)
  4554 		ret		z
  4554 		ret		z
  4555 		bit		4, (iy+15h)
  4555 		bit		GR_ABOVE_BELOW, (iy+GSFLAG2)
  4556 		ret		z
  4556 		ret		z
  4557 		call	j_ClrScrn
  4557 		call	j_ClrScrn
  4558 		ret
  4558 		ret
  4559 ; End of function p05sub_58A7
  4559 ; End of function p05sub_58A7
  4560 
  4560 
  4652 
  4652 
  4653 p05loc_5949:
  4653 p05loc_5949:
  4654 		cp		27h ; '''
  4654 		cp		27h ; '''
  4655 		jp		nz, j_CallCommon
  4655 		jp		nz, j_CallCommon
  4656 		call	p05loc_584C
  4656 		call	p05loc_584C
  4657 		jp		Page05_3A17
  4657 		jp		InitStatEditorContext
  4658 ; END OF FUNCTION CHUNK	FOR p05sub_4DDF
  4658 ; END OF FUNCTION CHUNK	FOR p05sub_4DDF
  4659 
  4659 
  4660 ; =============== S U B	R O U T	I N E =======================================
  4660 ; =============== S U B	R O U T	I N E =======================================
  4661 
  4661 
  4662 
  4662 
  4983 ; ---------------------------------------------------------------------------
  4983 ; ---------------------------------------------------------------------------
  4984 
  4984 
  4985 p05loc_5B1D:
  4985 p05loc_5B1D:
  4986 		call	p05loc_57D8
  4986 		call	p05loc_57D8
  4987 
  4987 
  4988 Page05_3A41:
  4988 InitTableContext:
  4989 		call	p05sub_6FCD
  4989 		call	p05sub_6FCD
  4990 		res		4, (iy+1Dh)
  4990 		res		4, (iy+1Dh)
  4991 		res		7, (iy+15h)
  4991 		res		7, (iy+15h)
  4992 		ld		hl, Page05Table1
  4992 		ld		hl, Page05Table1
  4993 		call	page0_7C1
  4993 		call	AppInitEnoughMem50
  4994 		call	Bit_VertSplit
  4994 		call	Bit_VertSplit
  4995 		jr		z, p05loc_5B3E
  4995 		jr		z, p05loc_5B3E
  4996 		call	j_ClrTxtShd
  4996 		call	j_ClrTxtShd
  4997 		call	p05sub_5BA7
  4997 		call	p05sub_5BA7
  4998 		jr		z, p05loc_5B41
  4998 		jr		z, p05loc_5B41
  5048 		res		appAutoScroll, (iy+appFlags)
  5048 		res		appAutoScroll, (iy+appFlags)
  5049 		call	p05sub_6DEC
  5049 		call	p05sub_6DEC
  5050 		call	p05sub_5C38
  5050 		call	p05sub_5C38
  5051 		call	Bit_VertSplit
  5051 		call	Bit_VertSplit
  5052 		jr		z, p05loc_5BA3
  5052 		jr		z, p05loc_5BA3
  5053 		set		6, (iy+1Dh)
  5053 		set		NEED_BUFCPY, (iy+VERTFLAG2)
  5054 		set		7, (iy+1Dh)
  5054 		set		NEED_RETABLE, (iy+VERTFLAG2)
  5055 		call	j_ClrScrn
  5055 		call	j_ClrScrn
  5056 		call	j_PDspGrph
  5056 		call	j_PDspGrph
  5057 		res		appTextSave, (iy+appFlags)
  5057 		res		appTextSave, (iy+appFlags)
  5058 		ret
  5058 		ret
  5059 ; ---------------------------------------------------------------------------
  5059 ; ---------------------------------------------------------------------------
  5064 
  5064 
  5065 ; =============== S U B	R O U T	I N E =======================================
  5065 ; =============== S U B	R O U T	I N E =======================================
  5066 
  5066 
  5067 
  5067 
  5068 p05sub_5BA7:
  5068 p05sub_5BA7:
  5069 		bit		6, (iy+1Dh)
  5069 		bit		NEED_BUFCPY, (iy+VERTFLAG2)
  5070 		ret		z
  5070 		ret		z
  5071 		bit		7, (iy+1Dh)
  5071 		bit		NEED_RETABLE, (iy+VERTFLAG2)
  5072 		ret
  5072 		ret
  5073 ; End of function p05sub_5BA7
  5073 ; End of function p05sub_5BA7
  5074 
  5074 
  5075 ; ---------------------------------------------------------------------------
  5075 ; ---------------------------------------------------------------------------
  5076 
  5076 
  5124 		ld		(winLeftEdge), a
  5124 		ld		(winLeftEdge), a
  5125 		pop		hl
  5125 		pop		hl
  5126 		ld		(curRow), hl
  5126 		ld		(curRow), hl
  5127 		set		appTextSave, (iy+appFlags)
  5127 		set		appTextSave, (iy+appFlags)
  5128 		set		appAutoScroll, (iy+appFlags)
  5128 		set		appAutoScroll, (iy+appFlags)
  5129 		res		7, (iy+1Dh)
  5129 		res		NEED_RETABLE, (iy+VERTFLAG2)
  5130 		ret
  5130 		ret
  5131 ; End of function p05sub_5BE9
  5131 ; End of function p05sub_5BE9
  5132 
  5132 
  5133 p05loc_5C21:
  5133 p05loc_5C21:
  5134 		res		2, (iy+1Fh)
  5134 		res		2, (iy+1Fh)
  8489 
  8489 
  8490 p05loc_6D66:
  8490 p05loc_6D66:
  8491 		cp		27h ; '''
  8491 		cp		27h ; '''
  8492 		jr		nz, p05loc_6D70
  8492 		jr		nz, p05loc_6D70
  8493 		call	p05loc_57FC
  8493 		call	p05loc_57FC
  8494 		jp		Page05_3A41
  8494 		jp		InitTableContext
  8495 ; ---------------------------------------------------------------------------
  8495 ; ---------------------------------------------------------------------------
  8496 
  8496 
  8497 p05loc_6D70:
  8497 p05loc_6D70:
  8498 		call	j_ProcessBufKeys
  8498 		call	j_ProcessBufKeys
  8499 		cp		9
  8499 		cp		9
  8906 p05sub_6FCD:
  8906 p05sub_6FCD:
  8907 
  8907 
  8908 		call	p05sub_6FB2
  8908 		call	p05sub_6FB2
  8909 		ret		z
  8909 		ret		z
  8910 		call	p05sub_6FBC
  8910 		call	p05sub_6FBC
  8911 		set		7, (iy+1Dh)
  8911 		set		NEED_RETABLE, (iy+VERTFLAG2)
  8912 ; End of function p05sub_6FCD
  8912 ; End of function p05sub_6FCD
  8913 
  8913 
  8914 
  8914 
  8915 ; =============== S U B	R O U T	I N E =======================================
  8915 ; =============== S U B	R O U T	I N E =======================================
  8916 
  8916 
  8981 		xor		a
  8981 		xor		a
  8982 		ld		(unk_97A2), a
  8982 		ld		(unk_97A2), a
  8983 		jp		p05sub_72F9
  8983 		jp		p05sub_72F9
  8984 ; ---------------------------------------------------------------------------
  8984 ; ---------------------------------------------------------------------------
  8985 
  8985 
  8986 Page05_3A83:
  8986 InitStatPlotContext:
  8987 		ld		a, (keyExtend)
  8987 		ld		a, (keyExtend)
  8988 		ld		(unk_92FC), a
  8988 		ld		(unk_92FC), a
  8989 		ld		hl, p05loc_7239
  8989 		ld		hl, p05loc_7239
  8990 		call	AppInit
  8990 		call	AppInit
  8991 		set		grfSplitOverride, (iy+sGrFlags)
  8991 		set		grfSplitOverride, (iy+sGrFlags)
  9275 
  9275 
  9276 ; =============== S U B	R O U T	I N E =======================================
  9276 ; =============== S U B	R O U T	I N E =======================================
  9277 
  9277 
  9278 
  9278 
  9279 p05sub_722B:
  9279 p05sub_722B:
  9280 		call	page0_740
  9280 		call	ResetPromptEditFlag
  9281 		ret
  9281 		ret
  9282 ; End of function p05sub_722B
  9282 ; End of function p05sub_722B
  9283 
  9283 
  9284 ; ---------------------------------------------------------------------------
  9284 ; ---------------------------------------------------------------------------
  9285 
  9285 
  9302 		jr		nz, p05loc_7256
  9302 		jr		nz, p05loc_7256
  9303 		ld		a, (mcxCurApp)
  9303 		ld		a, (mcxCurApp)
  9304 		cp		49h ; 'I'
  9304 		cp		49h ; 'I'
  9305 		ret		z
  9305 		ret		z
  9306 		call	p05sub_722B
  9306 		call	p05sub_722B
  9307 		jp		Page05_3A83
  9307 		jp		InitStatPlotContext
  9308 ; ---------------------------------------------------------------------------
  9308 ; ---------------------------------------------------------------------------
  9309 
  9309 
  9310 p05loc_7256:
  9310 p05loc_7256:
  9311 		ld		ix, (unk_97A3)
  9311 		ld		ix, (unk_97A3)
  9312 		ld		b, a
  9312 		ld		b, a
  9448 
  9448 
  9449 p05loc_7312:
  9449 p05loc_7312:
  9450 		cp		27h ; '''
  9450 		cp		27h ; '''
  9451 		jp		nz, Page05_342F
  9451 		jp		nz, Page05_342F
  9452 		call	p05sub_722B
  9452 		call	p05sub_722B
  9453 		jp		Page05_3A83
  9453 		jp		InitStatPlotContext
  9454 ; ---------------------------------------------------------------------------
  9454 ; ---------------------------------------------------------------------------
  9455 
  9455 
  9456 p05loc_731D:
  9456 p05loc_731D:
  9457 		ld		hl, p05loc_7312
  9457 		ld		hl, p05loc_7312
  9458 		ld		(mcxMain), hl
  9458 		ld		(mcxMain), hl