summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchaos-lord <dd4791.mariokarter@hotmail.co.uk>2017-07-09 18:13:47 +0100
committerchaos-lord <dd4791.mariokarter@hotmail.co.uk>2017-07-09 18:13:47 +0100
commit6c9e09ef62dc4016ee46e65144c73c4d9ebf2bc2 (patch)
tree3d62de5c1851f2fe8507ed3103487c8c0770f1ce
parentb63c562549bbf4f37156ac89d16c491df5a3ac88 (diff)
fix
-rw-r--r--home/text.asm40
-rw-r--r--main.asm14
-rw-r--r--wram.asm16
3 files changed, 35 insertions, 35 deletions
diff --git a/home/text.asm b/home/text.asm
index 147051e..cf5145c 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -8,7 +8,7 @@ Func_30db: ; 0x30db
ld [wd5cb], a
ret
-FillBottomMessageBufferWithBlackTile: ; 0x30e8
+FillBottomMessageBufferWithBlackTile: ; 0x30e8 wipes the message buffer and disables all text
ld a, $81
ld hl, wBottomMessageBuffer
ld b, $40
@@ -584,27 +584,27 @@ Func_33a7: ; 0x33a7
inc de
ret
-HandleStationaryText: ; 0x33c3 Handles stationary text HandleStationaryText
+HandleStationaryText: ; 0x33c3 Handles stationary text
ld a, [hli] ;+1
and a
- ret z ;ret if var 1 is 0
- ld a, [hli] ;+2 load var2 into e
+ ret z ;ret if not enabled
+ ld a, [hli] ;load buffer offset into e
ld e, a
ld d, wBottomMessageBuffer / $100
push hl
- ld l, [hl] ;Place text from var 2 in buffer into var3 in text
+ ld l, [hl] ;Place text from buffer into text
ld h, wBottomMessageText / $100
call PlaceTextLow
pop hl
- inc hl ;+3 dec Var4, ret if var not 0
+ inc hl ;decrement timer
ld a, [hl]
dec a
- ld [hli], a ;+4
+ ld [hli], a
ret nz
- ld a, [hl] ;dec Var5
+ ld a, [hl]
dec a
- ld [hld], a ;+3
- bit 7, a ;if Var5 <= 128, ret, else toggle off
+ ld [hld], a
+ bit 7, a ;if Var5 <= 128, which is to say has not underflowed, ret, else disable text
ret z
dec hl
dec hl
@@ -615,7 +615,7 @@ HandleStationaryText: ; 0x33c3 Handles stationary text HandleStationaryText
Func_33e3: ; 0x33e3
ld a, [wd5ca]
and a
- jr nz, .asm_33ed ;if ??? = nz, load into ???, else jump
+ jr nz, .asm_33ed ;if ??? = z, load 0 into ???, else jump
ld [wd5cb], a
ret
@@ -650,36 +650,36 @@ Func_33e3: ; 0x33e3
.Scrolling3Off
ld a, [wStationaryText1]
and a
- jr z, .asm_342b
+ jr z, .Stationary1Off
push bc
ld hl, wStationaryText1
call HandleStationaryText
pop bc
inc c
-.asm_342b
+.Stationary1Off
ld a, [wStationaryText2]
and a
- jr z, .asm_343a
+ jr z, .Stationary2Off
push bc
ld hl, wStationaryText2
call HandleStationaryText
pop bc
inc c
-.asm_343a
+.Stationary2Off
ld a, [wStationaryText3]
and a
- jr z, .asm_3449
+ jr z, .Stationary3Off
push bc
ld hl, wStationaryText3
call HandleStationaryText
pop bc
inc c
-.asm_3449
+.Stationary3Off
ld a, c
and a
- ret nz
- ld [wd5ca], a
- call FillBottomMessageBufferWithBlackTile
+ ret nz ;if text has displayed, we are done, else
+ ld [wd5ca], a ;place 0 in ???
+ call FillBottomMessageBufferWithBlackTile ;fill with default data?
ld a, [hGameBoyColorFlag]
and a
jr nz, .gameboyColor
diff --git a/main.asm b/main.asm
index a2d5c61..9f32cfe 100644
--- a/main.asm
+++ b/main.asm
@@ -186,13 +186,13 @@ SECTION "bank4", ROMX
Func_10000: ; 0x10000
ld c, a
- ld a, [wInSpecialMode]
+ ld a, [wInSpecialMode] ;special mode in c
and a
- ret z
+ ret z ;if mot in special mode, ret
ld a, c
ld [wd54c], a
ld a, [wSpecialMode]
- cp SPECIAL_MODE_CATCHEM
+ cp SPECIAL_MODE_CATCHEM ;branch based on mode
jp z, Func_10a95
cp SPECIAL_MODE_EVOLUTION
jr nz, .next
@@ -1500,11 +1500,11 @@ CallTable_3021f: ; 0x3021f
Func_3022b: ; 0x3022b
xor a
- ld [wd5ca], a
- call FillBottomMessageBufferWithBlackTile
+ ld [wd5ca], a ;turn text off
+ call FillBottomMessageBufferWithBlackTile ;clear text
xor a
ld [wInSpecialMode], a
- ld [wSpecialMode], a
+ ld [wSpecialMode], a ;no longer in special modes
callba StopTimer
ld a, [wCurrentStage]
rst JumpTable ; calls JumpToFuncInTable
@@ -2081,7 +2081,7 @@ Func_31660: ; 0x31660
ret
Func_31672: ; 0x31672
- ld a, [wd5ca]
+ ld a, [wd5ca] ;if text is off
and a
ret nz
call FillBottomMessageBufferWithBlackTile
diff --git a/wram.asm b/wram.asm
index d64b08c..51cbf93 100644
--- a/wram.asm
+++ b/wram.asm
@@ -554,7 +554,7 @@ wInSpecialMode:: ; 0xd54b
; Set to 1 if currently in special game mode. See wSpecialMode.
ds $1
-wd54c:: ; 0xd54c
+wd54c:: ; 0xd54c 10000 sets it to c. red evo mode checks it for it's contents
ds $1
wd54d:: ; 0xd54d
@@ -728,7 +728,7 @@ wWildMonCollision:: ; 0xd5c7
ds $1
-wd5ca:: ; 0xd5ca set to 1 by a commonly called text function that is called at the start of catch and raises the score bar
+wd5ca:: ; 0xd5ca set to 1 by a commonly called text function that is called at the start of catch and raises the score bar. set off by text handler if no text is ready to run. Possibly toggles if text is running?
ds $1
wd5cb:: ; 0xd5cb set to 0 if the above is 0 during Func_33e3
@@ -753,22 +753,22 @@ wScrollingText3:: ; 0xd5dc
scrolling_text wScrollingText3
stationary_text: MACRO
-\1Enabled:: ds 1 ; Toggles if enabled. 0 is off, non-0 is on
+\1Enabled::ds 1 ; Toggles if enabled. 0 is off, non-0 is on
\1MessageBoxOffset:: ds 1 ; Offset in wBottomMessageBuffer to place first character of text
\1SourceTextOffset:: ds 1 ; Offset in wBottomMessageText for the text to be displayed
-\1DurationLowByte:: ;how many frames to stay on screen
+\1DurationLowByte:: ;how many frames to stay on screen.
\1Duration:: ds 1
-\1DurationHighByte:: ds 1
+\1DurationHighByte:: ds 1 ;thiswill trigger as 0 if >= 128
ENDM
wStationaryText1:: ; 0xd5e4
- ds $5
+ stationary_text wStationaryText1
wStationaryText2:: ; 0xd5e9
- ds $5
+ stationary_text wStationaryText2
wStationaryText3:: ; 0xd5ee
- ds $5
+ stationary_text wStationaryText3
wCapturingMon:: ; 0xd5f3
; Set to 1 when the capturing animation starts.