|
|
|
@@ -93,25 +93,25 @@ Function11c08f:
|
|
|
|
|
|
|
|
|
|
PrintEZChatBattleMessage:
|
|
|
|
|
; Use up to 6 words from bc to print text starting at de.
|
|
|
|
|
; Preserve $cf63, $cf64
|
|
|
|
|
; Preserve [wJumptableIndex], [wcf64]
|
|
|
|
|
ld a, [wJumptableIndex]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcf64]
|
|
|
|
|
ld h, a
|
|
|
|
|
push hl
|
|
|
|
|
; reset value at c618 (not preserved)
|
|
|
|
|
ld hl, $c618
|
|
|
|
|
; reset value at [wc618] (not preserved)
|
|
|
|
|
ld hl, wc618
|
|
|
|
|
ld a, $0
|
|
|
|
|
ld [hli], a
|
|
|
|
|
; preserve de
|
|
|
|
|
push de
|
|
|
|
|
; $cf63 keeps track of which line we're on (0, 1, or 2)
|
|
|
|
|
; $cf64 keeps track of how much room we have left in the current line
|
|
|
|
|
; [wJumptableIndex] keeps track of which line we're on (0, 1, or 2)
|
|
|
|
|
; [wcf64] keeps track of how much room we have left in the current line
|
|
|
|
|
xor a
|
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
|
ld a, 18
|
|
|
|
|
ld [wcf64], a
|
|
|
|
|
ld a, $6 ; up to 6 times
|
|
|
|
|
ld a, 6
|
|
|
|
|
.loop
|
|
|
|
|
push af
|
|
|
|
|
; load the 2-byte word data pointed to by bc
|
|
|
|
@@ -178,7 +178,7 @@ PrintEZChatBattleMessage:
|
|
|
|
|
; deduct the length of the word
|
|
|
|
|
sub e
|
|
|
|
|
ld [wcf64], a
|
|
|
|
|
ld de, $c608
|
|
|
|
|
ld de, wc608
|
|
|
|
|
.place_string_loop
|
|
|
|
|
; load the string from de to hl
|
|
|
|
|
ld a, [de]
|
|
|
|
@@ -195,11 +195,11 @@ PrintEZChatBattleMessage:
|
|
|
|
|
jr nz, .loop
|
|
|
|
|
; we're finished, place "<DONE>"
|
|
|
|
|
ld [hl], "<DONE>"
|
|
|
|
|
; now, let's place the string from c618 to bc
|
|
|
|
|
; now, let's place the string from wc618 to bc
|
|
|
|
|
pop bc
|
|
|
|
|
ld hl, $c618
|
|
|
|
|
ld hl, wc618
|
|
|
|
|
call PlaceHLTextAtBC
|
|
|
|
|
; restore the original values of $cf63 and $cf64
|
|
|
|
|
; restore the original values of [wJumptableIndex] and [wcf64]
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, l
|
|
|
|
|
ld [wJumptableIndex], a
|
|
|
|
@@ -209,7 +209,7 @@ PrintEZChatBattleMessage:
|
|
|
|
|
|
|
|
|
|
GetLengthOfWordAtC608:
|
|
|
|
|
ld c, $0
|
|
|
|
|
ld hl, $c608
|
|
|
|
|
ld hl, wc608
|
|
|
|
|
.loop
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
cp "@"
|
|
|
|
@@ -223,7 +223,7 @@ CopyMobileEZChatToC608:
|
|
|
|
|
ld a, $1
|
|
|
|
|
ldh [rSVBK], a
|
|
|
|
|
ld a, "@"
|
|
|
|
|
ld hl, $c608
|
|
|
|
|
ld hl, wc608
|
|
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
|
call ByteFill
|
|
|
|
|
ld a, d
|
|
|
|
@@ -252,9 +252,9 @@ CopyMobileEZChatToC608:
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
|
|
|
|
.copy_string
|
|
|
|
|
ld de, $c608
|
|
|
|
|
ld de, wc608
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld de, $c608
|
|
|
|
|
ld de, wc608
|
|
|
|
|
pop af
|
|
|
|
|
ldh [rSVBK], a
|
|
|
|
|
ret
|
|
|
|
@@ -327,7 +327,7 @@ Function11c1b9:
|
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
|
|
|
|
ldh [rSVBK], a
|
|
|
|
|
ld hl, $c6d0
|
|
|
|
|
ld hl, wc6d0
|
|
|
|
|
ld de, wLYOverrides
|
|
|
|
|
ld bc, $100
|
|
|
|
|
call CopyBytes
|
|
|
|
@@ -341,7 +341,7 @@ Function11c254:
|
|
|
|
|
push af
|
|
|
|
|
ld a, $4
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $a007
|
|
|
|
|
ld hl, s4_a007
|
|
|
|
|
pop af
|
|
|
|
|
sla a
|
|
|
|
|
sla a
|
|
|
|
@@ -560,7 +560,7 @@ Function11c3c2:
|
|
|
|
|
call Function11cfb5
|
|
|
|
|
|
|
|
|
|
Function11c3ed:
|
|
|
|
|
ld hl, wcd20 ; wcd20
|
|
|
|
|
ld hl, wcd20
|
|
|
|
|
ld de, hJoypadPressed
|
|
|
|
|
ld a, [de]
|
|
|
|
|
and $8
|
|
|
|
@@ -595,11 +595,11 @@ Function11c3ed:
|
|
|
|
|
jr .asm_11c475
|
|
|
|
|
.asm_11c426
|
|
|
|
|
ld a, $8
|
|
|
|
|
ld [wcd20], a ; wcd20
|
|
|
|
|
ld [wcd20], a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_11c42c
|
|
|
|
|
ld a, [wcd20] ; wcd20
|
|
|
|
|
ld a, [wcd20]
|
|
|
|
|
cp $6
|
|
|
|
|
jr c, .asm_11c472
|
|
|
|
|
sub $6
|
|
|
|
@@ -778,7 +778,7 @@ Function11c53d:
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
set 0, [hl]
|
|
|
|
|
ld a, $8
|
|
|
|
|
ld [wcd20], a ; wcd20
|
|
|
|
|
ld [wcd20], a
|
|
|
|
|
|
|
|
|
|
.b
|
|
|
|
|
ld a, $4
|
|
|
|
@@ -806,7 +806,7 @@ Function11c53d:
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.done
|
|
|
|
|
ld a, [wcd20] ; wcd20
|
|
|
|
|
ld a, [wcd20]
|
|
|
|
|
call Function11ca6a
|
|
|
|
|
call PlayClickSFX
|
|
|
|
|
ret
|
|
|
|
@@ -1132,8 +1132,8 @@ Function11c770:
|
|
|
|
|
jr .load
|
|
|
|
|
|
|
|
|
|
.cd2b_is_nonzero
|
|
|
|
|
; compute from [c6a8 + 2 * [cd22]]
|
|
|
|
|
ld hl, $c6a8 ; $c68a + 30
|
|
|
|
|
; compute from [wc6a8 + 2 * [wcd22]]
|
|
|
|
|
ld hl, wc6a8
|
|
|
|
|
ld a, [wcd22]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
@@ -1212,7 +1212,7 @@ Function11c7bc:
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_11c814
|
|
|
|
|
ld hl, $c648
|
|
|
|
|
ld hl, wc648
|
|
|
|
|
ld a, [wcd22]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, $0
|
|
|
|
@@ -1366,7 +1366,7 @@ MobileString_Next:
|
|
|
|
|
db "つぎ@"
|
|
|
|
|
|
|
|
|
|
Function11c8f6:
|
|
|
|
|
ld a, [wcd20] ; wcd20
|
|
|
|
|
ld a, [wcd20]
|
|
|
|
|
call Function11c95d
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd2b]
|
|
|
|
@@ -1386,7 +1386,7 @@ Function11c8f6:
|
|
|
|
|
push de
|
|
|
|
|
call Function11c05d
|
|
|
|
|
pop de
|
|
|
|
|
ld a, [wcd20] ; wcd20
|
|
|
|
|
ld a, [wcd20]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
ld hl, wcd36
|
|
|
|
@@ -1408,7 +1408,7 @@ Function11c8f6:
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
jr .asm_11c911
|
|
|
|
|
.asm_11c938
|
|
|
|
|
ld hl, $c648
|
|
|
|
|
ld hl, wc648
|
|
|
|
|
ld a, [wcd22]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, $0
|
|
|
|
@@ -1528,7 +1528,7 @@ Function11c9c3:
|
|
|
|
|
jr nz, .asm_11c9e9
|
|
|
|
|
call Function11ca5e
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcd20], a ; wcd20
|
|
|
|
|
ld [wcd20], a
|
|
|
|
|
.asm_11c9e9
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
set 4, [hl]
|
|
|
|
@@ -1764,7 +1764,7 @@ Function11cb66:
|
|
|
|
|
jr nz, .asm_11cbd4
|
|
|
|
|
ld a, $4
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $a007
|
|
|
|
|
ld hl, s4_a007
|
|
|
|
|
ld a, [wMenuCursorY]
|
|
|
|
|
dec a
|
|
|
|
|
sla a
|
|
|
|
@@ -2083,7 +2083,7 @@ Function11ce2b:
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
set 0, [hl]
|
|
|
|
|
ld a, $8
|
|
|
|
|
ld [wcd20], a ; wcd20
|
|
|
|
|
ld [wcd20], a
|
|
|
|
|
.b
|
|
|
|
|
ld a, $4
|
|
|
|
|
jr .load
|
|
|
|
@@ -2109,7 +2109,7 @@ Function11ce2b:
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.done
|
|
|
|
|
ld a, [wcd20] ; wcd20
|
|
|
|
|
ld a, [wcd20]
|
|
|
|
|
call Function11ca6a
|
|
|
|
|
call PlayClickSFX
|
|
|
|
|
ret
|
|
|
|
@@ -2480,7 +2480,7 @@ AnimateEZChatCursor:
|
|
|
|
|
dw .ten
|
|
|
|
|
|
|
|
|
|
.zero
|
|
|
|
|
ld a, [wcd20] ; wcd20
|
|
|
|
|
ld a, [wcd20]
|
|
|
|
|
sla a
|
|
|
|
|
ld hl, .Coords_Zero
|
|
|
|
|
ld e, $1
|
|
|
|
@@ -2959,7 +2959,7 @@ Palette_11d33a:
|
|
|
|
|
EZChat_GetSeenPokemonByKana:
|
|
|
|
|
ldh a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld hl, $c648
|
|
|
|
|
ld hl, wc648
|
|
|
|
|
ld a, LOW(w5_d800)
|
|
|
|
|
ld [wcd2d], a
|
|
|
|
|
ld [hli], a
|
|
|
|
@@ -2972,14 +2972,14 @@ EZChat_GetSeenPokemonByKana:
|
|
|
|
|
ld a, HIGH(EZChat_SortedPokemon)
|
|
|
|
|
ld [wcd30], a
|
|
|
|
|
|
|
|
|
|
ld a, LOW($c6a8)
|
|
|
|
|
ld a, LOW(wc6a8)
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld a, HIGH($c6a8)
|
|
|
|
|
ld a, HIGH(wc6a8)
|
|
|
|
|
ld [wcd32], a
|
|
|
|
|
|
|
|
|
|
ld a, LOW($c64a)
|
|
|
|
|
ld a, LOW(wc64a)
|
|
|
|
|
ld [wcd33], a
|
|
|
|
|
ld a, HIGH($c64a)
|
|
|
|
|
ld a, HIGH(wc64a)
|
|
|
|
|
ld [wcd34], a
|
|
|
|
|
|
|
|
|
|
ld hl, EZChat_SortedWords
|
|
|
|
@@ -3089,7 +3089,7 @@ EZChat_GetSeenPokemonByKana:
|
|
|
|
|
; Push pop to bc.
|
|
|
|
|
push hl
|
|
|
|
|
pop bc
|
|
|
|
|
; Load the pointer from [wcd31] (default: $c6a8)
|
|
|
|
|
; Load the pointer from [wcd31] (default: wc6a8)
|
|
|
|
|
ld a, [wcd31]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd32]
|
|
|
|
@@ -3104,7 +3104,7 @@ EZChat_GetSeenPokemonByKana:
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd32], a
|
|
|
|
|
; Recover the pointer from [wcd33] (default: $c64a)
|
|
|
|
|
; Recover the pointer from [wcd33] (default: wc64a)
|
|
|
|
|
ld a, [wcd33]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd34]
|
|
|
|
@@ -4088,7 +4088,7 @@ macro_11f23c: MACRO
|
|
|
|
|
dw x - w3_d000, \1
|
|
|
|
|
x = x + 2 * \1
|
|
|
|
|
ENDM
|
|
|
|
|
x = $d012
|
|
|
|
|
x = $d012 ; w3_d012
|
|
|
|
|
macro_11f23c $2f ; a
|
|
|
|
|
macro_11f23c $1e ; i
|
|
|
|
|
macro_11f23c $11 ; u
|
|
|
|
@@ -4133,6 +4133,6 @@ x = $d012
|
|
|
|
|
macro_11f23c $02 ; re
|
|
|
|
|
macro_11f23c $02 ; ro
|
|
|
|
|
macro_11f23c $15 ; wa
|
|
|
|
|
x = $d000
|
|
|
|
|
x = $d000 ; w3_d000
|
|
|
|
|
macro_11f23c $09 ; end
|
|
|
|
|
.End
|
|
|
|
|