shithub: pokecrystal

Download patch

ref: a5f5418faeb2ded9ddd898851ea0716e2d6ecf09
parent: 1fa6aecbfcc81b8794ca10e6d88837b1645f95e1
author: pikalaxalt <[email protected]>
date: Sat May 14 12:37:12 EDT 2016

Rename FixedWords to EZChat

--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -215,6 +215,22 @@
 NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES
 NUM_KANA EQU $2d
 
+	const_def
+	const EZCHAT_POKEMON
+	const EZCHAT_TYPES
+	const EZCHAT_GREETINGS
+	const EZCHAT_PEOPLE
+	const EZCHAT_BATTLE
+	const EZCHAT_EXCLAMATIONS
+	const EZCHAT_CONVERSATION
+	const EZCHAT_FEELINGS
+	const EZCHAT_CONDITIONS
+	const EZCHAT_LIFE
+	const EZCHAT_HOBBIES
+	const EZCHAT_ACTIONS
+	const EZCHAT_TIME
+	const EZCHAT_FAREWELLS
+	const EZCHAT_THISANDTHAT
 
 SWARM_DUNSPARCE EQU 0
 SWARM_YANMA     EQU 1
--- a/items/item_effects.asm
+++ b/items/item_effects.asm
@@ -2480,20 +2480,20 @@
 
 OldRod: ; f5a5
 	ld e, $0
-	jr Function_0xf5b1
+	jr UseRod
 ; f5a9
 
 GoodRod: ; f5a9
 	ld e, $1
-	jr Function_0xf5b1
+	jr UseRod
 ; f5ad
 
 SuperRod: ; f5ad
 	ld e, $2
-	jr Function_0xf5b1
+	jr UseRod
 ; f5b1
 
-Function_0xf5b1: ; f5b1
+UseRod: ; f5b1
 	callba FishFunction
 	ret
 ; f5b8
--- a/main.asm
+++ b/main.asm
@@ -3477,7 +3477,7 @@
 
 	ld bc, wMobileOpponentBattleMessage
 	decoord 1, 14
-	callba PrintFixedWordBattleMessage
+	callba PrintEZChatBattleMessage
 
 	pop af
 	ld [rSVBK], a
--- a/misc/fixed_words.asm
+++ b/misc/fixed_words.asm
@@ -4,19 +4,19 @@
 Function11c05d: ; 11c05d
 	ld a, e
 	or d
-	jr z, .asm_11c071
+	jr z, .error
 	ld a, e
 	and d
 	cp $ff
-	jr z, .asm_11c071
+	jr z, .error
 	push hl
-	call CopyMobileFixedWordToC608
+	call CopyMobileEZChatToC608
 	pop hl
 	call PlaceString
 	and a
 	ret
 
-.asm_11c071
+.error
 	ld c, l
 	ld b, h
 	scf
@@ -34,12 +34,13 @@
 ; 11c082
 
 Function11c082: ; 11c082
+; XXX
 	push de
 	ld a, c
 	call Function11c254
 	pop de
 	ld bc, wcd36
-	call PrintFixedWordBattleMessage
+	call PrintEZChatBattleMessage
 	ret
 ; 11c08f
 
@@ -47,8 +48,8 @@
 	ld l, e
 	ld h, d
 	push hl
-	ld a, $3
-.asm_11c094
+	ld a, 3
+.loop
 	push af
 	ld a, [bc]
 	ld e, a
@@ -58,21 +59,21 @@
 	inc bc
 	push bc
 	call Function11c05d
-	jr c, .asm_11c0a2
+	jr c, .okay
 	inc bc
 
-.asm_11c0a2
+.okay
 	ld l, c
 	ld h, b
 	pop bc
 	pop af
 	dec a
-	jr nz, .asm_11c094
+	jr nz, .loop
 	pop hl
-	ld de, $0028
+	ld de, 2 * SCREEN_WIDTH
 	add hl, de
 	ld a, $3
-.asm_11c0b0
+.loop2
 	push af
 	ld a, [bc]
 	ld e, a
@@ -82,20 +83,20 @@
 	inc bc
 	push bc
 	call Function11c05d
-	jr c, .asm_11c0be
+	jr c, .okay2
 	inc bc
 
-.asm_11c0be
+.okay2
 	ld l, c
 	ld h, b
 	pop bc
 	pop af
 	dec a
-	jr nz, .asm_11c0b0
+	jr nz, .loop2
 	ret
 ; 11c0c6
 
-PrintFixedWordBattleMessage: ; 11c0c6
+PrintEZChatBattleMessage: ; 11c0c6
 ; Use up to 6 words from bc to print text starting at de.
 	; Preserve $cf63, $cf64
 	ld a, [wJumptableIndex]
@@ -131,7 +132,7 @@
 	; preserving hl and bc, get the length of the word
 	push hl
 	push bc
-	call CopyMobileFixedWordToC608
+	call CopyMobileEZChatToC608
 	call GetLengthOfWordAtC608
 	ld e, c
 	pop bc
@@ -223,7 +224,7 @@
 	jr .loop
 ; 11c156
 
-CopyMobileFixedWordToC608: ; 11c156
+CopyMobileEZChatToC608: ; 11c156
 	ld a, [rSVBK]
 	push af
 	ld a, $1
@@ -235,7 +236,7 @@
 	ld a, d
 	and a
 	jr z, .get_name
-	ld hl, MobileFixedWordCategoryPointers
+	ld hl, MobileEZChatCategoryPointers
 	dec d
 	sla d
 	ld c, d
@@ -286,18 +287,18 @@
 ; 11c1b9
 
 Function11c1b9: ; 11c1b9
-	call Function11c1ca
+	call .InitKanaMode
 	ld a, [rSVBK]
 	push af
 	ld a, $5
 	ld [rSVBK], a
-	call Function11c283
+	call EZChat_MasterLoop
 	pop af
 	ld [rSVBK], a
 	ret
 ; 11c1ca
 
-Function11c1ca: ; 11c1ca
+.InitKanaMode: ; 11c1ca
 	xor a
 	ld [wJumptableIndex], a
 	ld [wcf64], a
@@ -342,8 +343,8 @@
 	call CopyBytes
 	pop af
 	ld [rSVBK], a
-	call Function11d4aa
-	call Function11d3ba
+	call EZChat_GetCategoryWordsByKana
+	call EZChat_GetSeenPokemonByKana
 	ret
 ; 11c254
 
@@ -362,13 +363,13 @@
 	ld b, $0
 	add hl, bc
 	ld de, wcd36
-	ld bc, $000c
+	ld bc, 12
 	call CopyBytes
 	call CloseSRAM
 	ret
 ; 11c277
 
-Function11c277: ; 11c277 (47:4277)
+EZChat_ClearBottom12Rows: ; 11c277 (47:4277)
 	ld a, " "
 	hlcoord 0, 6
 	ld bc, (SCREEN_HEIGHT - 6) * SCREEN_WIDTH
@@ -375,7 +376,7 @@
 	call ByteFill
 	ret
 
-Function11c283: ; 11c283
+EZChat_MasterLoop: ; 11c283
 .loop
 	call JoyTextDelay
 	ld a, [hJoyPressed]
@@ -558,7 +559,7 @@
 ; 11c3c2
 
 Function11c3c2: ; 11c3c2 (47:43c2)
-	call Function11c277
+	call EZChat_ClearBottom12Rows
 	ld de, Unknown_11cfbe
 	call Function11d035
 	hlcoord 1, 7
@@ -735,8 +736,8 @@
 ; 11c52c
 
 Function11c52c: ; 11c52c (47:452c)
-	call Function11c277
-	call Function11c5f0
+	call EZChat_ClearBottom12Rows
+	call EZChat_PlaceCategoryNames
 	call Function11c618
 	ld hl, wcd24
 	res 1, [hl]
@@ -784,12 +785,12 @@
 
 .a
 	ld a, [wcd21]
-	cp $f
-	jr c, .asm_11c59d
+	cp 15
+	jr c, .got_category
 	sub $f
-	jr z, .asm_11c5ab
+	jr z, .done
 	dec a
-	jr z, .asm_11c599
+	jr z, .mode
 	jr .b
 
 .start
@@ -800,7 +801,7 @@
 
 .b
 	ld a, $4
-	jr .asm_11c59f
+	jr .go_to_function
 
 .select
 	ld a, [wcd2b]
@@ -807,16 +808,16 @@
 	xor $1
 	ld [wcd2b], a
 	ld a, $15
-	jr .asm_11c59f
+	jr .go_to_function
 
-.asm_11c599
+.mode
 	ld a, $13
-	jr .asm_11c59f
+	jr .go_to_function
 
-.asm_11c59d
+.got_category
 	ld a, $8
 
-.asm_11c59f
+.go_to_function
 	ld hl, wcd24
 	set 1, [hl]
 	ld [wJumptableIndex], a
@@ -823,7 +824,7 @@
 	call PlayClickSFX
 	ret
 
-.asm_11c5ab
+.done
 	ld a, [wcd20] ; wcd20
 	call Function11ca6a
 	call PlayClickSFX
@@ -834,7 +835,7 @@
 	cp $3
 	ret c
 	sub $3
-	jr .asm_11c5ee
+	jr .finish_dpad
 
 .down
 	ld a, [hl]
@@ -841,7 +842,7 @@
 	cp $f
 	ret nc
 	add $3
-	jr .asm_11c5ee
+	jr .finish_dpad
 
 .left
 	ld a, [hl]
@@ -858,7 +859,7 @@
 	cp $f
 	ret z
 	dec a
-	jr .asm_11c5ee
+	jr .finish_dpad
 
 .right
 	ld a, [hl]
@@ -876,16 +877,16 @@
 	ret z
 	inc a
 
-.asm_11c5ee
+.finish_dpad
 	ld [hl], a
 	ret
 ; 11c5f0
 
-Function11c5f0: ; 11c5f0 (47:45f0)
-	ld de, MobileFixedWordCategoryNames
-	ld bc, Unknown_11c63a
-	ld a, $f
-.asm_11c5f8
+EZChat_PlaceCategoryNames: ; 11c5f0 (47:45f0)
+	ld de, MobileEZChatCategoryNames
+	ld bc, Coords_11c63a
+	ld a, 15
+.loop
 	push af
 	ld a, [bc]
 	inc bc
@@ -895,17 +896,20 @@
 	ld h, a
 	push bc
 	call PlaceString
-.asm_11c603
+	; The category names are padded with "@".
+	; To find the next category, the system must
+	; find the first character at de that is not "@".
+.find_next_string_loop
 	inc de
 	ld a, [de]
-	cp $50
-	jr z, .asm_11c603
+	cp "@"
+	jr z, .find_next_string_loop
 	pop bc
 	pop af
 	dec a
-	jr nz, .asm_11c5f8
+	jr nz, .loop
 	hlcoord 1, 17
-	ld de, String_11c62a
+	ld de, EZChatString_Stop_Mode_Cancel
 	call PlaceString
 	ret
 
@@ -918,11 +922,11 @@
 	ret
 ; 11c62a (47:462a)
 
-String_11c62a: ; 11c62a
+EZChatString_Stop_Mode_Cancel: ; 11c62a
 	db "けす    モード   やめる@"
 ; 11c63a
 
-Unknown_11c63a: ; 11c63a
+Coords_11c63a: ; 11c63a
 	dwcoord  1,  7
 	dwcoord  7,  7
 	dwcoord 13,  7
@@ -941,7 +945,7 @@
 ; 11c658
 
 Function11c658: ; 11c658 (47:4658)
-	call Function11c277
+	call EZChat_ClearBottom12Rows
 	call Function11c770
 	ld de, Unknown_11cfc2
 	call Function11d035
@@ -1125,7 +1129,7 @@
 	; load from data array
 	dec a
 	sla a
-	ld hl, MobileFixedWordData_WordAndPageCounts
+	ld hl, MobileEZChatData_WordAndPageCounts
 	ld c, a
 	ld b, 0
 	add hl, bc
@@ -1632,13 +1636,13 @@
 
 Function11ca5e: ; 11ca5e (47:4a5e)
 	xor a
-.asm_11ca5f
+.loop
 	push af
 	call Function11ca6a
 	pop af
 	inc a
 	cp $6
-	jr nz, .asm_11ca5f
+	jr nz, .loop
 	ret
 
 Function11ca6a: ; 11ca6a (47:4a6a)
@@ -1949,7 +1953,7 @@
 ; 11cd20
 
 Function11cd20: ; 11cd20 (47:4d20)
-	call Function11c277
+	call EZChat_ClearBottom12Rows
 	ld de, Unknown_11cfc6
 	call Function11cfce
 	hlcoord 1, 14
@@ -2061,12 +2065,12 @@
 ; 11ce0b
 
 Function11ce0b: ; 11ce0b (47:4e0b)
-	call Function11c277
+	call EZChat_ClearBottom12Rows
 	hlcoord 1, 7
 	ld de, String_11cf79
 	call PlaceString
 	hlcoord 1, 17
-	ld de, String_11c62a
+	ld de, EZChatString_Stop_Mode_Cancel
 	call PlaceString
 	call Function11c618
 	ld hl, wcd24
@@ -2117,9 +2121,9 @@
 	cp NUM_KANA
 	jr c, .place
 	sub NUM_KANA
-	jr z, .asm_11cea4
+	jr z, .done
 	dec a
-	jr z, .asm_11ce96
+	jr z, .mode
 	jr .b
 
 .start
@@ -2142,7 +2146,7 @@
 	ld a, $8
 	jr .load
 
-.asm_11ce96
+.mode
 	ld a, $13
 .load
 	ld [wJumptableIndex], a
@@ -2151,7 +2155,7 @@
 	call PlayClickSFX
 	ret
 
-.asm_11cea4
+.done
 	ld a, [wcd20] ; wcd20
 	call Function11ca6a
 	call PlayClickSFX
@@ -2622,7 +2626,7 @@
 	ret
 
 .seven ; 11d175 (47:5175)
-	ld a, [wFixedWordsCursorYCoord]
+	ld a, [wEZChatCursorYCoord]
 	cp $4
 	jr z, .frameset_26
 	ld a, SPRITE_ANIM_FRAMESET_28
@@ -2632,11 +2636,11 @@
 	ld a, SPRITE_ANIM_FRAMESET_26
 .got_frameset
 	call ReinitSpriteAnimFrame
-	ld a, [wFixedWordsCursorYCoord]
+	ld a, [wEZChatCursorYCoord]
 	cp $4
 	jr z, .asm_11d1b1
-	; X = [wFixedWordsCursorXCoord] * 8 + 32
-	ld a, [wFixedWordsCursorXCoord]
+	; X = [wEZChatCursorXCoord] * 8 + 32
+	ld a, [wEZChatCursorXCoord]
 	sla a
 	sla a
 	sla a
@@ -2644,8 +2648,8 @@
 	ld hl, SPRITEANIMSTRUCT_XCOORD
 	add hl, bc
 	ld [hli], a
-	; Y = [wFixedWordsCursorYCoord] * 16 + 72
-	ld a, [wFixedWordsCursorYCoord]
+	; Y = [wEZChatCursorYCoord] * 16 + 72
+	ld a, [wEZChatCursorYCoord]
 	sla a
 	sla a
 	sla a
@@ -2658,8 +2662,8 @@
 	ret
 
 .asm_11d1b1
-	; X = [wFixedWordsCursorXCoord] * 40 + 24
-	ld a, [wFixedWordsCursorXCoord]
+	; X = [wEZChatCursorXCoord] * 40 + 24
+	ld a, [wEZChatCursorXCoord]
 	sla a
 	sla a
 	sla a
@@ -3007,7 +3011,7 @@
 	RGB 00, 00, 00
 ; 11d3ba
 
-Function11d3ba: ; 11d3ba
+EZChat_GetSeenPokemonByKana: ; 11d3ba
 	ld a, [rSVBK]
 	push af
 	ld hl, $c648
@@ -3033,8 +3037,8 @@
 	ld a, $c64a / $100
 	ld [wcd34], a
 
-	ld hl, Unknown_11f23c
-	ld a, (Unknown_11f23cEnd - Unknown_11f23c) / 4
+	ld hl, EZChat_SortedWords
+	ld a, (EZChat_SortedWordsEnd - EZChat_SortedWords) / 4
 
 .MasterLoop: ; 11d3ef
 	push af
@@ -3203,7 +3207,7 @@
 	ret
 ; 11d4aa
 
-Function11d4aa: ; 11d4aa
+EZChat_GetCategoryWordsByKana: ; 11d4aa
 	ld a, [rSVBK]
 	push af
 	ld a, $3
@@ -3210,8 +3214,8 @@
 	ld [rSVBK], a
 
 	; load pointers
-	ld hl, MobileFixedWordCategoryPointers
-	ld bc, MobileFixedWordData_WordAndPageCounts
+	ld hl, MobileEZChatCategoryPointers
+	ld bc, MobileEZChatData_WordAndPageCounts
 
 	; init WRAM registers
 	xor a
@@ -3435,7 +3439,7 @@
 INCBIN "gfx/pokedex/slowpoke.2bpp.lz"
 ; 11da52
 
-MobileFixedWordCategoryNames: ; 11da52
+MobileEZChatCategoryNames: ; 11da52
 ; Fixed message categories
 	db "ポケモン@@" ; 00
 	db "タイプ@@@" ; 01
@@ -3454,7 +3458,7 @@
 	db "あれこれ@@" ; 0e
 ; 11daac
 
-MobileFixedWordCategoryPointers: ; 11daac
+MobileEZChatCategoryPointers: ; 11daac
 	dw .Types          ; 01
 	dw .Greetings      ; 02
 	dw .People         ; 03
@@ -4246,7 +4250,7 @@
 	db "なんの@@", $2, $4, $0
 ; 11f220
 
-MobileFixedWordData_WordAndPageCounts:
+MobileEZChatData_WordAndPageCounts:
 macro_11f220: macro
 ; parameter: number of words
 	db \1
@@ -4272,7 +4276,12 @@
     macro_11f220 66 ; 0d: Farewells
     macro_11f220 36 ; 0e: ThisAndThat
 
-Unknown_11f23c:
+EZChat_SortedWords:
+; Addresses in WRAM bank 3 where EZChat words beginning
+; with the given kana are sorted in memory, and the pre-
+; allocated size for each.
+; These arrays are expanded dynamically to accomodate
+; any Pokemon you've seen that starts with each kana.\
 macro_11f23c: macro
 	dw x - w3_d000, \1
 x = x + 2 * \1
@@ -4324,4 +4333,4 @@
 	macro_11f23c $15 ; wa
 x = $d000
 	macro_11f23c $09 ; end
-Unknown_11f23cEnd:
+EZChat_SortedWordsEnd:
--- a/misc/mobile_5f.asm
+++ b/misc/mobile_5f.asm
@@ -180,7 +180,7 @@
 
 CheckStringForErrors: ; 17d073
 ; Valid character ranges:
-; $00, $05 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff
+; $0, $5 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff
 .loop
 	ld a, [de]
 	inc de
@@ -612,7 +612,7 @@
 	call GetSRAMBank
 	xor a
 	ld hl, $aa73
-	ld bc, $000c
+	ld bc, $c
 	call ByteFill
 	call CloseSRAM
 	ld a, $2
@@ -747,7 +747,7 @@
 Function17d48d: ; 17d48d
 	ld hl, Palette_17eff6
 	ld de, $c608
-	ld bc, $0040
+	ld bc, $40
 	call CopyBytes
 	ld hl, TileAttrmap_17eb8e
 	decoord 0, 0
@@ -775,7 +775,7 @@
 	jr nz, .asm_17d4a8
 	pop hl
 	push bc
-	ld bc, $0040
+	ld bc, $40
 	add hl, bc
 	pop bc
 	pop af
@@ -876,7 +876,7 @@
 	dec a
 	jr nz, .asm_17d53a
 	ld de, CreditsTimer
-	ld bc, $000c
+	ld bc, $c
 	call CopyBytes
 	xor a
 	ld [wcd2e], a
@@ -885,7 +885,7 @@
 	ld [wcd30], a
 	ld [wcd31], a
 	ld de, wcd32
-	ld bc, $0010
+	ld bc, $10
 	call CopyBytes
 	ld a, [hli]
 	ld [wcd42], a
@@ -987,7 +987,7 @@
 	call GetSRAMBank
 	ld hl, $b1d3
 	ld de, $c608
-	ld bc, $0020
+	ld bc, $20
 	call CopyBytes
 	ld a, [$b1b1]
 	ld c, a
@@ -1012,7 +1012,7 @@
 	ld a, h
 	ld [de], a
 	inc de
-	ld bc, $000a
+	ld bc, $a
 	add hl, bc
 	pop bc
 	ld a, [hli]
@@ -1102,12 +1102,12 @@
 	ld a, h
 	ld [wcd5f], a
 	ld de, wcd60
-	ld bc, $0004
+	ld bc, $4
 	call CopyBytes
 	inc hl
 	inc hl
 	ld de, wcd64
-	ld bc, $0004
+	ld bc, $4
 	call CopyBytes
 	ld a, [hli]
 	ld [wcd69], a
@@ -1478,7 +1478,7 @@
 Function17d93a: ; 17d93a
 	call Function17e415
 	ld de, $c708
-	ld bc, $0005
+	ld bc, $5
 	call CopyBytes
 	call Function17e41e
 	call Function17e32b
@@ -1514,7 +1514,7 @@
 Function17d98b: ; 17d98b
 	call Function17e415
 	ld de, $c708
-	ld bc, $0004
+	ld bc, $4
 	call CopyBytes
 	call Function17e41e
 	call Function17e32b
@@ -1540,7 +1540,7 @@
 	pop hl
 	decoord 0, 0
 	add hl, de
-	ld bc, $0707
+	ld bc, $707
 	predef PlaceGraphic
 	pop af
 	ld [rSVBK], a
@@ -1551,7 +1551,7 @@
 Function17d9e3: ; 17d9e3
 	call Function17e415
 	ld de, $c708
-	ld bc, $0007
+	ld bc, $7
 	call CopyBytes
 	call Function17e41e
 	ld a, [$c70b]
@@ -1597,7 +1597,7 @@
 Function17da31: ; 17da31
 	call Function17e415
 	ld de, $c708
-	ld bc, $0004
+	ld bc, $4
 	call CopyBytes
 	call Function17e41e
 	ld a, [$c709]
@@ -1888,7 +1888,7 @@
 Function17dc1f: ; 17dc1f
 	call Function17e415
 	ld de, $c688
-	ld bc, $0006
+	ld bc, $6
 	call CopyBytes
 	call Function17e32b
 	ld a, [rSVBK]
@@ -1968,7 +1968,7 @@
 	ld a, $5
 	ld [rSVBK], a
 	ld hl, UnknBGPals
-	ld de, $0008
+	ld de, $8
 	ld c, $8
 .asm_17dcbb
 	push hl
@@ -2076,7 +2076,7 @@
 Function17dd49: ; 17dd49
 	call Function17e415
 	ld de, $c708
-	ld bc, $000a
+	ld bc, $a
 	call CopyBytes
 	ld a, [$c711]
 	ld c, a
@@ -2157,7 +2157,7 @@
 Function17ddcd: ; 17ddcd
 	call Function17e415
 	ld de, $c708
-	ld bc, $0008
+	ld bc, $8
 	call CopyBytes
 	ld a, [$c70a]
 	cp $c0
@@ -2219,7 +2219,7 @@
 Function17de32: ; 17de32
 	call Function17e415
 	ld de, $c708
-	ld bc, $0009
+	ld bc, $9
 	call CopyBytes
 	ld a, [$c710]
 	ld c, a
@@ -2278,7 +2278,7 @@
 Function17de91: ; 17de91
 	call Function17e415
 	ld de, $c708
-	ld bc, $0007
+	ld bc, $7
 	call CopyBytes
 	ld a, $6
 	call GetSRAMBank
@@ -2321,7 +2321,7 @@
 Function17ded9: ; 17ded9
 	call Function17e415
 	ld de, $c708
-	ld bc, $001f
+	ld bc, $1f
 	call CopyBytes
 	call Function17e32b
 	ld a, [rSVBK]
@@ -2363,7 +2363,7 @@
 	jr .asm_17df37
 
 .asm_17df33
-	ld de, $0006
+	ld de, $6
 	add hl, de
 
 .asm_17df37
@@ -2388,7 +2388,7 @@
 	jr .asm_17df5e
 
 .asm_17df5a
-	ld de, $0007
+	ld de, $7
 	add hl, de
 
 .asm_17df5e
@@ -2502,7 +2502,7 @@
 	ld e, l
 	pop hl
 	push de
-	ld bc, $0004
+	ld bc, $4
 	call CopyBytes
 	pop de
 	push hl
@@ -2520,7 +2520,7 @@
 	jp asm_17e0ee
 
 .asm_17e01f
-	ld de, $0004
+	ld de, $4
 	add hl, de
 	jp asm_17e0ee
 ; 17e026
@@ -2546,7 +2546,7 @@
 	bit 1, b
 	jr z, .asm_17e067
 	push bc
-	ld bc, $000b
+	ld bc, $b
 	ld de, sBoxMonNicknames
 	call CopyBytes
 	pop bc
@@ -2553,7 +2553,7 @@
 	jr .asm_17e06b
 
 .asm_17e067
-	ld de, $0006
+	ld de, $6
 	add hl, de
 
 .asm_17e06b
@@ -2560,7 +2560,7 @@
 	bit 2, b
 	jr z, .asm_17e08e
 	push bc
-	ld bc, $0006
+	ld bc, $6
 	ld de, sBoxMonOT
 	call CopyBytes
 	ld a, [hli]
@@ -2575,7 +2575,7 @@
 	jr .asm_17e092
 
 .asm_17e08e
-	ld de, $0007
+	ld de, $7
 	add hl, de
 
 .asm_17e092
@@ -2623,7 +2623,7 @@
 	jr z, .asm_17e0e1
 	push bc
 	ld de, sBoxMon1Moves
-	ld bc, $0004
+	ld bc, $4
 	call CopyBytes
 	push hl
 	ld hl, sBoxMon1Moves
@@ -2638,12 +2638,12 @@
 
 .asm_17e0e1
 	call CloseSRAM
-	ld de, $0006
+	ld de, $6
 	add hl, de
 	jr asm_17e0ee
 
 .asm_17e0ea
-	ld bc, $001a
+	ld bc, $1a
 	add hl, bc
 
 asm_17e0ee
@@ -2662,7 +2662,7 @@
 Function17e0fd: ; 17e0fd
 	call Function17e415
 	ld de, $c708
-	ld bc, $0006
+	ld bc, $6
 	call CopyBytes
 	ld a, [rSVBK]
 	push af
@@ -2696,7 +2696,7 @@
 Function17e133: ; 17e133
 	call Function17e415
 	ld de, $c708
-	ld bc, $0005
+	ld bc, $5
 	call CopyBytes
 	ld a, [rSVBK]
 	push af
@@ -2727,7 +2727,7 @@
 Function17e165: ; 17e165
 	call Function17e415
 	ld de, $c708
-	ld bc, $0005
+	ld bc, $5
 	call CopyBytes
 	ld a, [rSVBK]
 	push af
@@ -2764,7 +2764,7 @@
 Function17e1a1: ; 17e1a1
 	call Function17e415
 	ld de, $c708
-	ld bc, $000d
+	ld bc, $d
 	call CopyBytes
 	ld a, [$c70a]
 	cp $c0
@@ -2978,7 +2978,7 @@
 	call GetSRAMBank
 	ld hl, $aa73
 	ld de, $aa7f
-	ld bc, $000c
+	ld bc, $c
 	call CopyBytes
 	call CloseSRAM
 	ret
@@ -3016,10 +3016,10 @@
 	call GetSRAMBank
 	ld hl, $c608
 	ld de, $b0b1
-	ld bc, $0040
+	ld bc, $40
 	call CopyBytes
 	ld hl, BGMapBuffer
-	ld bc, $005b
+	ld bc, $5b
 	call CopyBytes
 	call CloseSRAM
 	ret
@@ -3030,10 +3030,10 @@
 	call GetSRAMBank
 	ld hl, $b0b1
 	ld de, $c608
-	ld bc, $0040
+	ld bc, $40
 	call CopyBytes
 	ld de, BGMapBuffer
-	ld bc, $005b
+	ld bc, $5b
 	call CopyBytes
 	call CloseSRAM
 	ret
@@ -3216,7 +3216,7 @@
 	add hl, bc
 	push hl
 	hlcoord 0, 0
-	ld bc, $0014
+	ld bc, $14
 	ld a, [wcd23]
 	call AddNTimes
 	ld a, [CreditsTimer]
@@ -3267,7 +3267,7 @@
 	jr nz, .asm_17e490
 	pop hl
 	ld a, [wcd27]
-	ld de, $0014
+	ld de, $14
 .asm_17e4cb
 	add hl, de
 	dec a
@@ -3294,7 +3294,7 @@
 	ret z
 	ld a, [wcd29]
 	hlcoord 0, 0
-	ld bc, $0014
+	ld bc, $14
 	call AddNTimes
 	ld a, [wcd28]
 	ld c, a
@@ -3308,7 +3308,7 @@
 
 .asm_17e4ff
 	ld a, [wcd2a]
-	ld bc, $0014
+	ld bc, $14
 	call AddNTimes
 	ld a, [wcd42]
 	ld c, a
@@ -3331,7 +3331,7 @@
 	inc a
 	ld [wcd4f], a
 	hlcoord 0, 0
-	ld bc, $0014
+	ld bc, $14
 	ld a, [wcd23]
 	dec a
 	call AddNTimes
@@ -3352,7 +3352,7 @@
 	ld a, $7f
 	call ByteFill
 	pop hl
-	ld bc, $0014
+	ld bc, $14
 	add hl, bc
 	pop af
 	dec a
@@ -3381,7 +3381,7 @@
 Function17e571: ; 17e571
 	push af
 	hlcoord 0, 0
-	ld bc, $0014
+	ld bc, $14
 	ld a, [wcd23]
 	call AddNTimes
 	ld a, [CreditsTimer]
@@ -3397,7 +3397,7 @@
 	call SimpleMultiply
 	ld l, $0
 	ld h, l
-	ld bc, $0014
+	ld bc, $14
 	call AddNTimes
 	ld a, [wcd30]
 	dec a
@@ -3470,7 +3470,7 @@
 	call ByteFill
 	pop bc
 	pop hl
-	ld de, $0014
+	ld de, $14
 	add hl, de
 	pop af
 	dec a
@@ -3481,7 +3481,7 @@
 Function17e613: ; 17e613
 	push hl
 	hlcoord 0, 0
-	ld bc, $0014
+	ld bc, $14
 	ld a, [de]
 	inc de
 	push af
@@ -3520,7 +3520,7 @@
 	add $2
 	ld [hl], a
 	pop hl
-	ld bc, $0014
+	ld bc, $14
 	add hl, bc
 	ld a, [de]
 	dec de
@@ -3550,7 +3550,7 @@
 	ld [hl], a
 	pop hl
 	push bc
-	ld bc, $0014
+	ld bc, $14
 	add hl, bc
 	pop bc
 	dec b
@@ -3583,7 +3583,7 @@
 Function17e691: ; 17e691
 	push hl
 	ld hl, NULL
-	ld bc, $0014
+	ld bc, $14
 	ld a, [de]
 	inc de
 	push af
@@ -3636,7 +3636,7 @@
 	dec a
 	jr nz, .asm_17e6af
 	pop hl
-	ld bc, $0014
+	ld bc, $14
 	add hl, bc
 	pop af
 	dec a
@@ -3663,7 +3663,7 @@
 	dec c
 	jr nz, .asm_17e6f1
 	pop hl
-	ld de, $0014
+	ld de, $14
 	add hl, de
 	dec b
 	jr nz, .asm_17e6ee
@@ -3733,14 +3733,14 @@
 	ld a, [de]
 	inc de
 	cp $50
-	jr z, .asm_17f05f
+	jr z, .finished
 	cp $10
-	jr nc, .asm_17f05f
+	jr nc, .finished
 	dec a
 	push de
 	ld e, a
 	ld d, 0
-	ld hl, Jumptable_17f061
+	ld hl, .Jumptable
 	add hl, de
 	add hl, de
 	ld a, [hli]
@@ -3748,28 +3748,28 @@
 	ld l, a
 	jp [hl]
 
-.asm_17f05f
+.finished
 	scf
 	ret
 ; 17f061
 
-Jumptable_17f061: ; 17f061
-	dw Function17f081
-	dw Function17f0f8
-	dw Function17f154
-	dw Function17f181
-	dw Function17f1d0
-	dw Function17f220
-	dw Function17f27b
-	dw Function17f2cb
-	dw Function17f2ff
-	dw Function17f334
-	dw Function17f382
-	dw Function17f3c9
-	dw Function17f3f0
-	dw Function17f41d
-	dw Function17f44f
-	dw Function17f44f
+.Jumptable: ; 17f061
+	dw Function17f081 ; 0
+	dw Function17f0f8 ; 1
+	dw Function17f154 ; 2
+	dw Function17f181 ; 3
+	dw Function17f1d0 ; 4
+	dw Function17f220 ; 5
+	dw Function17f27b ; 6
+	dw Function17f2cb ; 7
+	dw Function17f2ff ; 8
+	dw Function17f334 ; 9
+	dw Function17f382 ; a
+	dw Function17f3c9 ; b
+	dw Function17f3f0 ; c
+	dw Function17f41d ; d
+	dw Function17f44f ; e
+	dw Function17f44f ; f
 ; 17f081
 
 Function17f081: ; 17f081
@@ -3776,7 +3776,7 @@
 	pop hl
 	call Function17f524
 	jr c, .asm_17f09f
-	ld de, $0004
+	ld de, 4
 	add hl, de
 	ld a, [hli]
 	inc hl
@@ -3801,7 +3801,7 @@
 .asm_17f09f
 	push bc
 	ld de, wcd54
-	ld bc, $0007
+	ld bc, 7
 	call CopyBytes
 	pop bc
 	push hl
@@ -3864,7 +3864,7 @@
 	pop hl
 	call Function17f524
 	jr c, .asm_17f114
-	ld de, $0003
+	ld de, $3
 	add hl, de
 	ld a, [hli]
 	ld e, l
@@ -3887,7 +3887,7 @@
 .asm_17f114
 	push bc
 	ld de, wcd54
-	ld bc, $0004
+	ld bc, $4
 	call CopyBytes
 	pop bc
 	push hl
@@ -3963,7 +3963,7 @@
 	pop hl
 	call Function17f524
 	jr c, .asm_17f19d
-	ld de, $0002
+	ld de, $2
 	add hl, de
 	ld a, [hli]
 	ld e, l
@@ -4018,7 +4018,7 @@
 	pop hl
 	call Function17f524
 	jr c, .asm_17f1ec
-	ld de, $0002
+	ld de, $2
 	add hl, de
 	ld a, [hli]
 	ld e, l
@@ -4075,7 +4075,7 @@
 	pop hl
 	call Function17f524
 	jr c, .asm_17f23c
-	ld de, $0002
+	ld de, $2
 	add hl, de
 	ld a, [hli]
 	ld e, l
@@ -4139,7 +4139,7 @@
 	pop hl
 	call Function17f524
 	jr c, .asm_17f297
-	ld de, $0002
+	ld de, $2
 	add hl, de
 	ld a, [hli]
 	ld e, l
@@ -4236,7 +4236,7 @@
 	ld [rSVBK], a
 	ld hl, PlayerName
 	ld de, $c608
-	ld bc, $0006
+	ld bc, $6
 	call CopyBytes
 	ld a, $4
 	ld [rSVBK], a
@@ -4346,7 +4346,7 @@
 	push bc
 	ld hl, wcd36
 	ld de, $c708
-	ld bc, $000c
+	ld bc, 12
 	call CopyBytes
 	pop de
 	ld c, $0
@@ -4354,7 +4354,7 @@
 	push hl
 	ld hl, $c708
 	ld de, wcd36
-	ld bc, $000c
+	ld bc, $c
 	call CopyBytes
 	pop bc
 	pop de
@@ -4453,7 +4453,7 @@
 	pop hl
 	call Function17f524
 	jr c, .asm_17f46d
-	ld de, $0005
+	ld de, $5
 	add hl, de
 	ld a, [hli]
 	inc hl
@@ -4478,7 +4478,7 @@
 .asm_17f46d
 	push bc
 	ld de, wcd54
-	ld bc, $0008
+	ld bc, $8
 	call CopyBytes
 	pop bc
 	push hl
--- a/wram.asm
+++ b/wram.asm
@@ -1170,9 +1170,9 @@
 wcd49:: ds 1
 wcd4a:: ds 1
 wcd4b:: ds 1
-wFixedWordsCursorXCoord::
+wEZChatCursorXCoord::
 wcd4c:: ds 1
-wFixedWordsCursorYCoord::
+wEZChatCursorYCoord::
 wcd4d:: ds 1
 wcd4e:: ds 1
 wcd4f:: ds 1