--- a/source/page05/initial.asm Thu May 15 05:38:01 2014 -0400
+++ b/source/page05/initial.asm Tue May 20 02:59:10 2014 -0400
@@ -1,11 +1,11 @@
p05loc_4000:
call p05sub_4702
-Page05_3A11:
+InitMatrixEditorContext:
ld a, (keyExtend)
push af
ld hl, Page05Context1
- call page0_7C1
+ call AppInitEnoughMem50
set grfSplitOverride, (iy+sGrFlags)
pop af
call Page05_328B
@@ -95,7 +95,7 @@
call page0_1847
call PushRealO1
call CanAlphIns
- call page0_740
+ call ResetPromptEditFlag
call p05sub_40A3
call FINDSYM_GET_SIZE
ld (matrixDimensions), hl
@@ -681,7 +681,7 @@
cp 27h ; '''
jr nz, p05loc_43F0
call p05sub_57B8
- jp Page05_3A11
+ jp InitMatrixEditorContext
; ---------------------------------------------------------------------------
p05loc_43F0:
@@ -927,7 +927,7 @@
cp 27h ; '''
jp nz, j_CallCommon
call p05sub_57B8
- jp Page05_3A11
+ jp InitMatrixEditorContext
; =============== S U B R O U T I N E =======================================
@@ -1479,7 +1479,7 @@
p05sub_47FA:
call p05loc_5868
- jr Page05_3A17
+ jr InitStatEditorContext
; End of function p05sub_47FA
; ---------------------------------------------------------------------------
@@ -1489,10 +1489,10 @@
; p05sub_4DDF+2F3j ...
call p05loc_5874
-Page05_3A17:
+InitStatEditorContext:
call p05sub_5AEE
ld hl, Page05Context2
- call page0_7C1
+ call AppInitEnoughMem50
call page0_176F
call p05sub_4882
dec a
@@ -4002,7 +4002,7 @@
cp 43h ; 'C'
ld a, e
jr z, p05loc_55A0
- bit 3, (iy+15h)
+ bit DISP_ALT_STATS, (iy+NEWFLAGS3)
jr z, p05loc_554A
p05loc_55A0:
@@ -4545,14 +4545,14 @@
p05sub_58A7:
; p05sub_57B8+92j
- call page0_740
+ call ResetPromptEditFlag
res curLock, (iy+curFlags)
call j_resetStacks
call j_CleanAll
res grfSplitOverride, (iy+sGrFlags)
- bit 3, (iy+15h)
- ret z
- bit 4, (iy+15h)
+ bit DISP_ALT_STATS, (iy+NEWFLAGS3)
+ ret z
+ bit GR_ABOVE_BELOW, (iy+GSFLAG2)
ret z
call j_ClrScrn
ret
@@ -4654,7 +4654,7 @@
cp 27h ; '''
jp nz, j_CallCommon
call p05loc_584C
- jp Page05_3A17
+ jp InitStatEditorContext
; END OF FUNCTION CHUNK FOR p05sub_4DDF
; =============== S U B R O U T I N E =======================================
@@ -4985,12 +4985,12 @@
p05loc_5B1D:
call p05loc_57D8
-Page05_3A41:
+InitTableContext:
call p05sub_6FCD
res 4, (iy+1Dh)
res 7, (iy+15h)
ld hl, Page05Table1
- call page0_7C1
+ call AppInitEnoughMem50
call Bit_VertSplit
jr z, p05loc_5B3E
call j_ClrTxtShd
@@ -5050,8 +5050,8 @@
call p05sub_5C38
call Bit_VertSplit
jr z, p05loc_5BA3
- set 6, (iy+1Dh)
- set 7, (iy+1Dh)
+ set NEED_BUFCPY, (iy+VERTFLAG2)
+ set NEED_RETABLE, (iy+VERTFLAG2)
call j_ClrScrn
call j_PDspGrph
res appTextSave, (iy+appFlags)
@@ -5066,9 +5066,9 @@
p05sub_5BA7:
- bit 6, (iy+1Dh)
- ret z
- bit 7, (iy+1Dh)
+ bit NEED_BUFCPY, (iy+VERTFLAG2)
+ ret z
+ bit NEED_RETABLE, (iy+VERTFLAG2)
ret
; End of function p05sub_5BA7
@@ -5126,7 +5126,7 @@
ld (curRow), hl
set appTextSave, (iy+appFlags)
set appAutoScroll, (iy+appFlags)
- res 7, (iy+1Dh)
+ res NEED_RETABLE, (iy+VERTFLAG2)
ret
; End of function p05sub_5BE9
@@ -8491,7 +8491,7 @@
cp 27h ; '''
jr nz, p05loc_6D70
call p05loc_57FC
- jp Page05_3A41
+ jp InitTableContext
; ---------------------------------------------------------------------------
p05loc_6D70:
@@ -8908,7 +8908,7 @@
call p05sub_6FB2
ret z
call p05sub_6FBC
- set 7, (iy+1Dh)
+ set NEED_RETABLE, (iy+VERTFLAG2)
; End of function p05sub_6FCD
@@ -8983,7 +8983,7 @@
jp p05sub_72F9
; ---------------------------------------------------------------------------
-Page05_3A83:
+InitStatPlotContext:
ld a, (keyExtend)
ld (unk_92FC), a
ld hl, p05loc_7239
@@ -9277,7 +9277,7 @@
p05sub_722B:
- call page0_740
+ call ResetPromptEditFlag
ret
; End of function p05sub_722B
@@ -9304,7 +9304,7 @@
cp 49h ; 'I'
ret z
call p05sub_722B
- jp Page05_3A83
+ jp InitStatPlotContext
; ---------------------------------------------------------------------------
p05loc_7256:
@@ -9450,7 +9450,7 @@
cp 27h ; '''
jp nz, Page05_342F
call p05sub_722B
- jp Page05_3A83
+ jp InitStatPlotContext
; ---------------------------------------------------------------------------
p05loc_731D: