mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Use STRING_BUFFER_LENGTH for the wStringBuffers
This commit is contained in:
parent
4ca9f45db7
commit
4613bcfadf
@ -9,6 +9,8 @@ LAST_TALKED EQU -2
|
|||||||
const STRING_BUFFER_5 ; use wStringBuffer5
|
const STRING_BUFFER_5 ; use wStringBuffer5
|
||||||
NUM_STRING_BUFFERS EQU const_value
|
NUM_STRING_BUFFERS EQU const_value
|
||||||
|
|
||||||
|
STRING_BUFFER_LENGTH EQU 19
|
||||||
|
|
||||||
; checkmoney/takemoney accounts
|
; checkmoney/takemoney accounts
|
||||||
const_def
|
const_def
|
||||||
const YOUR_MONEY ; 0
|
const YOUR_MONEY ; 0
|
||||||
|
@ -1750,7 +1750,7 @@ The exact cause of this bug is unknown.
|
|||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
ld a, BANK("Evolutions and Attacks")
|
ld a, BANK("Evolutions and Attacks")
|
||||||
- ld bc, 10
|
- ld bc, 10
|
||||||
+ ld bc, wStringBuffer2 - wStringBuffer1
|
+ ld bc, STRING_BUFFER_LENGTH
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -4711,7 +4711,7 @@ GetStatName:
|
|||||||
|
|
||||||
.Copy:
|
.Copy:
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
ld bc, wStringBuffer3 - wStringBuffer2
|
ld bc, STRING_BUFFER_LENGTH
|
||||||
jp CopyBytes
|
jp CopyBytes
|
||||||
|
|
||||||
INCLUDE "data/battle/stat_names.asm"
|
INCLUDE "data/battle/stat_names.asm"
|
||||||
|
@ -73,7 +73,7 @@ AskTeachTMHM:
|
|||||||
ChooseMonToLearnTMHM:
|
ChooseMonToLearnTMHM:
|
||||||
ld hl, wStringBuffer2
|
ld hl, wStringBuffer2
|
||||||
ld de, wTMHMMoveNameBackup
|
ld de, wTMHMMoveNameBackup
|
||||||
ld bc, 12
|
ld bc, MOVE_NAME_LENGTH - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
ChooseMonToLearnTMHM_NoRefresh:
|
ChooseMonToLearnTMHM_NoRefresh:
|
||||||
@ -97,7 +97,7 @@ ChooseMonToLearnTMHM_NoRefresh:
|
|||||||
push bc
|
push bc
|
||||||
ld hl, wTMHMMoveNameBackup
|
ld hl, wTMHMMoveNameBackup
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
ld bc, 12
|
ld bc, MOVE_NAME_LENGTH - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af ; now contains the original contents of af
|
pop af ; now contains the original contents of af
|
||||||
ret
|
ret
|
||||||
|
@ -1590,7 +1590,7 @@ GetStringBuffer:
|
|||||||
|
|
||||||
CopyConvertedText:
|
CopyConvertedText:
|
||||||
ld hl, wStringBuffer3
|
ld hl, wStringBuffer3
|
||||||
ld bc, wStringBuffer4 - wStringBuffer3
|
ld bc, STRING_BUFFER_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
call CopyName2
|
call CopyName2
|
||||||
ret
|
ret
|
||||||
|
13
wram.asm
13
wram.asm
@ -1675,7 +1675,8 @@ wBufferMonNick:: ds MON_NAME_LENGTH
|
|||||||
wBufferMonOT:: ds NAME_LENGTH
|
wBufferMonOT:: ds NAME_LENGTH
|
||||||
wBufferMon:: party_struct wBufferMon
|
wBufferMon:: party_struct wBufferMon
|
||||||
ds 8
|
ds 8
|
||||||
wMonOrItemNameBuffer:: ds 22
|
wMonOrItemNameBuffer:: ds NAME_LENGTH
|
||||||
|
ds NAME_LENGTH
|
||||||
|
|
||||||
NEXTU
|
NEXTU
|
||||||
; poke seer
|
; poke seer
|
||||||
@ -2019,11 +2020,11 @@ ENDU
|
|||||||
|
|
||||||
wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH
|
wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH
|
||||||
|
|
||||||
wStringBuffer1:: ds 19
|
wStringBuffer1:: ds STRING_BUFFER_LENGTH
|
||||||
wStringBuffer2:: ds 19
|
wStringBuffer2:: ds STRING_BUFFER_LENGTH
|
||||||
wStringBuffer3:: ds 19
|
wStringBuffer3:: ds STRING_BUFFER_LENGTH
|
||||||
wStringBuffer4:: ds 19
|
wStringBuffer4:: ds STRING_BUFFER_LENGTH
|
||||||
wStringBuffer5:: ds 19
|
wStringBuffer5:: ds STRING_BUFFER_LENGTH
|
||||||
|
|
||||||
wBattleMenuCursorBuffer:: dw
|
wBattleMenuCursorBuffer:: dw
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user