Skip to content

Remove Dakutens and Handakutens feature

YakiNeen edited this page Dec 29, 2022 · 1 revision

In the japanese alphabets, exist the accents " ゙" (dakuten) and "゚" (handakuten). Obviously, English doesn't use that accents, but the code remains yet in the international releases of Pokémon RGBY.

For delete this codes:

Go to DisplayNamingScreen.didNotPressCaseSwtich in engine/menus/naming_screen.asm

...
.didNotPressCaseSwtich
	ld hl, wMenuCursorLocation
	ld a, [hli]
	ld h, [hl]
	ld l, a
	inc hl
	ld a, [hl]
	ld [wNamingScreenLetter], a
	call CalcStringLength
-	ld a, [wNamingScreenLetter]
-	cp "゙"
-	ld de, Dakutens
-	jr z, .dakutensAndHandakutens
-	cp "゚"
-	ld de, Handakutens
-	jr z, .dakutensAndHandakutens
	ld a, [wNamingScreenType]
	cp NAME_MON_SCREEN
	jr nc, .checkMonNameLength
	ld a, [wNamingScreenNameLength]
	cp $7 ; max length of player/rival names
	jr .checkNameLength
.checkMonNameLength
	ld a, [wNamingScreenNameLength]
	cp $a ; max length of pokemon nicknames
.checkNameLength
	jr c, .addLetter
	ret

-.dakutensAndHandakutens
-	push hl
-	call DakutensAndHandakutens
-	pop hl
-	ret nc
-	dec hl
.addLetter
	ld a, [wNamingScreenLetter]
	ld [hli], a
	ld [hl], "@"
	ld a, SFX_PRESS_AB
	call PlaySound
...
.emptySpacesRemaining
	ld c, a
	ld b, $0
	hlcoord 10, 3
	add hl, bc
	ld [hl], $77 ; raised underscore tile id
	ret

-DakutensAndHandakutens:
-	push de
-	call CalcStringLength
-	dec hl
-	ld a, [hl]
-	pop hl
-	ld de, $2
-	call IsInArray
-	ret nc
-	inc hl
-	ld a, [hl]
-	ld [wNamingScreenLetter], a
-	ret
-
-INCLUDE "data/text/dakutens.asm"

; calculates the length of the string at wStringBuffer and stores it in c
CalcStringLength:
...

Now you can delete the file data/text/dakutens.asm.

Clone this wiki locally