Rename GetFarHalfword to GetFarWord

Fixes #796
This commit is contained in:
Rangi 2021-01-09 15:16:05 -05:00
parent f773fd1dd8
commit 7d3ea88611
18 changed files with 40 additions and 40 deletions

View File

@ -586,7 +586,7 @@ Edit [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/ma
+ push af
+ inc hl
ld a, BANK(PokedexDataPointerTable)
call GetFarHalfword
call GetFarWord
+ pop de
.SkipText:
@ -602,7 +602,7 @@ Edit [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/ma
push bc
inc hl
inc hl
call GetFarHalfword
call GetFarWord
```
And edit [engine/pokegear/radio.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokegear/radio.asm):
@ -624,7 +624,7 @@ And edit [engine/pokegear/radio.asm](https://github.com/pret/pokecrystal/blob/ma
+ inc hl
+ ; hl = address
ld a, BANK(PokedexDataPointerTable)
call GetFarHalfword
call GetFarWord
- call PokedexShow_GetDexEntryBank
+ ld a, b
push af

View File

@ -47,7 +47,7 @@ DoMove:
add hl, bc
add hl, bc
ld a, BANK(MoveEffectsPointers)
call GetFarHalfword
call GetFarWord
ld de, wBattleScriptBuffer
@ -98,7 +98,7 @@ DoMove:
pop bc
ld a, BANK(BattleCommandPointers)
call GetFarHalfword
call GetFarWord
call .DoMoveEffectCommand
@ -6731,7 +6731,7 @@ GetItemHeldEffect:
ld a, ITEMATTR_STRUCT_LENGTH
call AddNTimes
ld a, BANK(ItemAttributes)
call GetFarHalfword
call GetFarWord
ld b, l
ld c, h
pop hl

View File

@ -46,9 +46,9 @@ CheckForHiddenItems:
jr nz, .next
; Has this item already been found? If not, set off the Itemfinder.
ld a, [wCurMapScriptBank]
call GetFarHalfword
call GetFarWord
ld a, [wCurMapScriptBank]
call GetFarHalfword
call GetFarWord
ld d, h
ld e, l
ld b, CHECK_FLAG

View File

@ -125,7 +125,7 @@ GetFrontpicPointer:
push af
inc hl
ld a, d
call GetFarHalfword
call GetFarWord
pop bc
ret
@ -228,7 +228,7 @@ GetMonBackpic:
push af
inc hl
ld a, d
call GetFarHalfword
call GetFarWord
ld de, wDecompressScratch
pop af
call FarDecompress
@ -301,7 +301,7 @@ GSIntro_GetMonFrontpic: ; unreferenced
push af
inc hl
ld a, BANK(PokemonPicPointers)
call GetFarHalfword
call GetFarWord
pop af
pop de
call FarDecompress
@ -332,7 +332,7 @@ GetTrainerPic:
push af
inc hl
ld a, BANK(TrainerPicPointers)
call GetFarHalfword
call GetFarWord
pop af
ld de, wDecompressScratch
call FarDecompress

View File

@ -474,7 +474,7 @@ PokeAnim_GetPointer:
add hl, de
add hl, de
ld a, [wPokeAnimPointerBank]
call GetFarHalfword
call GetFarWord
ld a, l
ld [wPokeAnimCommand], a
ld a, h
@ -496,7 +496,7 @@ PokeAnim_GetBitmaskIndex:
add hl, bc
add hl, bc
ld a, [wPokeAnimFramesBank]
call GetFarHalfword
call GetFarWord
ld a, [wPokeAnimFramesBank]
call GetFarByte
ld [wPokeAnimCurBitmask], a
@ -915,7 +915,7 @@ GetMonAnimPointer:
add hl, de
ld a, c
ld [wPokeAnimPointerBank], a
call GetFarHalfword
call GetFarWord
ld a, l
ld [wPokeAnimPointerAddr], a
ld a, h
@ -982,7 +982,7 @@ GetMonFramesPointer:
add hl, de
add hl, de
ld a, b
call GetFarHalfword
call GetFarWord
ld a, l
ld [wPokeAnimFramesAddr], a
ld a, h
@ -1020,7 +1020,7 @@ GetMonBitmaskPointer:
add hl, de
add hl, de
ld a, [wPokeAnimBitmaskBank]
call GetFarHalfword
call GetFarWord
ld a, l
ld [wPokeAnimBitmaskAddr], a
ld a, h

View File

@ -784,7 +784,7 @@ HeavyBallMultiplier:
add hl, de
add hl, de
ld a, BANK(PokedexDataPointerTable)
call GetFarHalfword
call GetFarWord
.SkipText:
call GetPokedexEntryBank
@ -797,7 +797,7 @@ HeavyBallMultiplier:
push bc
inc hl
inc hl
call GetFarHalfword
call GetFarWord
srl h
rr l
@ -901,7 +901,7 @@ MoonBallMultiplier:
add hl, bc
add hl, bc
ld a, BANK(EvosAttacksPointers)
call GetFarHalfword
call GetFarWord
pop bc
push bc

View File

@ -422,7 +422,7 @@ rept SCENE_SCRIPT_SIZE
endr
call GetMapScriptsBank
call GetFarHalfword
call GetFarWord
call GetMapScriptsBank
call CallScript
@ -722,7 +722,7 @@ TryBGEvent:
inc hl
inc hl
call GetMapScriptsBank
call GetFarHalfword
call GetFarWord
call GetMapScriptsBank
call CallScript
scf
@ -739,7 +739,7 @@ CheckBGEventFlag:
ld l, a
push hl
call GetMapScriptsBank
call GetFarHalfword
call GetFarWord
ld e, l
ld d, h
ld b, CHECK_FLAG

View File

@ -1369,7 +1369,7 @@ StdScript:
ld b, a
inc hl
ld a, BANK(StdScripts)
call GetFarHalfword
call GetFarWord
ret
SkipTwoScriptBytes:

View File

@ -889,7 +889,7 @@ RandomPhoneMon:
add hl, bc
add hl, bc
ld a, BANK(TrainerGroups)
call GetFarHalfword
call GetFarWord
.skip_trainer
dec e

View File

@ -113,7 +113,7 @@ DisplayDexEntry:
ld a, b
push af
push hl
call GetFarHalfword
call GetFarWord
ld d, l
ld e, h
pop hl
@ -143,7 +143,7 @@ DisplayDexEntry:
inc hl
push hl
dec hl
call GetFarHalfword
call GetFarWord
ld d, l
ld e, h
ld a, e

View File

@ -689,7 +689,7 @@ PokedexShow2:
add hl, bc
add hl, bc
ld a, BANK(PokedexDataPointerTable)
call GetFarHalfword
call GetFarWord
call PokedexShow_GetDexEntryBank
push af
push hl

View File

@ -428,7 +428,7 @@ GetEggMove:
add hl, bc
add hl, bc
ld a, BANK(EggMovePointers)
call GetFarHalfword
call GetFarWord
.loop
ld a, BANK("Egg Moves")
call GetFarByte
@ -462,7 +462,7 @@ GetEggMove:
add hl, bc
add hl, bc
ld a, BANK(EvosAttacksPointers)
call GetFarHalfword
call GetFarWord
.loop3
ld a, BANK("Evolutions and Attacks")
call GetFarByte

View File

@ -1687,7 +1687,7 @@ GivePoke::
push bc
push hl
ld a, [wScriptBank]
call GetFarHalfword
call GetFarWord
ld bc, MON_NAME_LENGTH
ld a, [wScriptBank]
call FarCopyBytes
@ -1695,7 +1695,7 @@ GivePoke::
inc hl
inc hl
ld a, [wScriptBank]
call GetFarHalfword
call GetFarWord
pop bc
ld a, b
and a

View File

@ -27,7 +27,7 @@ GetDexNumber:: ; unreferenced
ld bc, BASE_DATA_SIZE
call AddNTimes
ld a, BANK(BaseData)
call GetFarHalfword
call GetFarWord
ld b, l
ld c, h
pop hl

View File

@ -72,8 +72,8 @@ GetFarByte::
ldh a, [hFarByte]
ret
GetFarHalfword::
; retrieve a halfword from a:hl, and return it in hl.
GetFarWord::
; retrieve a word from a:hl, and return it in hl.
; bankswitch to new bank
ldh [hTempBank], a
ldh a, [hROMBank]
@ -81,7 +81,7 @@ GetFarHalfword::
ldh a, [hTempBank]
rst Bankswitch
; get halfword from new bank, put it in hl
; get word from new bank, put it in hl
ld a, [hli]
ld h, [hl]
ld l, a

View File

@ -1008,7 +1008,7 @@ TextCommand_STRINGBUFFER::
add hl, de
add hl, de
ld a, BANK(StringBufferPointers)
call GetFarHalfword
call GetFarWord
ld d, h
ld e, l
ld h, b

View File

@ -116,7 +116,7 @@ LoadTrainer_continue::
ld hl, MAPOBJECT_SCRIPT_POINTER
add hl, bc
ld a, [wSeenTrainerBank]
call GetFarHalfword
call GetFarWord
ld de, wTempTrainer
ld bc, wTempTrainerEnd - wTempTrainer
ld a, [wSeenTrainerBank]
@ -215,7 +215,7 @@ CheckTrainerFlag:: ; unreferenced
ld h, [hl]
ld l, a
call GetMapScriptsBank
call GetFarHalfword
call GetFarWord
ld d, h
ld e, l
push de

View File

@ -117,7 +117,7 @@ Function1000ba:
add hl, de
add hl, de
ld a, [wcd22]
call GetFarHalfword
call GetFarWord
ld a, [wcd22]
rst FarCall