mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
parent
f773fd1dd8
commit
7d3ea88611
@ -586,7 +586,7 @@ Edit [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/ma
|
|||||||
+ push af
|
+ push af
|
||||||
+ inc hl
|
+ inc hl
|
||||||
ld a, BANK(PokedexDataPointerTable)
|
ld a, BANK(PokedexDataPointerTable)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
+ pop de
|
+ pop de
|
||||||
|
|
||||||
.SkipText:
|
.SkipText:
|
||||||
@ -602,7 +602,7 @@ Edit [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/ma
|
|||||||
push bc
|
push bc
|
||||||
inc hl
|
inc hl
|
||||||
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):
|
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
|
+ inc hl
|
||||||
+ ; hl = address
|
+ ; hl = address
|
||||||
ld a, BANK(PokedexDataPointerTable)
|
ld a, BANK(PokedexDataPointerTable)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
- call PokedexShow_GetDexEntryBank
|
- call PokedexShow_GetDexEntryBank
|
||||||
+ ld a, b
|
+ ld a, b
|
||||||
push af
|
push af
|
||||||
|
@ -47,7 +47,7 @@ DoMove:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, BANK(MoveEffectsPointers)
|
ld a, BANK(MoveEffectsPointers)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
|
|
||||||
ld de, wBattleScriptBuffer
|
ld de, wBattleScriptBuffer
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ DoMove:
|
|||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
ld a, BANK(BattleCommandPointers)
|
ld a, BANK(BattleCommandPointers)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
|
|
||||||
call .DoMoveEffectCommand
|
call .DoMoveEffectCommand
|
||||||
|
|
||||||
@ -6731,7 +6731,7 @@ GetItemHeldEffect:
|
|||||||
ld a, ITEMATTR_STRUCT_LENGTH
|
ld a, ITEMATTR_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, BANK(ItemAttributes)
|
ld a, BANK(ItemAttributes)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld b, l
|
ld b, l
|
||||||
ld c, h
|
ld c, h
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -46,9 +46,9 @@ CheckForHiddenItems:
|
|||||||
jr nz, .next
|
jr nz, .next
|
||||||
; Has this item already been found? If not, set off the Itemfinder.
|
; Has this item already been found? If not, set off the Itemfinder.
|
||||||
ld a, [wCurMapScriptBank]
|
ld a, [wCurMapScriptBank]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld a, [wCurMapScriptBank]
|
ld a, [wCurMapScriptBank]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld b, CHECK_FLAG
|
ld b, CHECK_FLAG
|
||||||
|
@ -125,7 +125,7 @@ GetFrontpicPointer:
|
|||||||
push af
|
push af
|
||||||
inc hl
|
inc hl
|
||||||
ld a, d
|
ld a, d
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ GetMonBackpic:
|
|||||||
push af
|
push af
|
||||||
inc hl
|
inc hl
|
||||||
ld a, d
|
ld a, d
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld de, wDecompressScratch
|
ld de, wDecompressScratch
|
||||||
pop af
|
pop af
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
@ -301,7 +301,7 @@ GSIntro_GetMonFrontpic: ; unreferenced
|
|||||||
push af
|
push af
|
||||||
inc hl
|
inc hl
|
||||||
ld a, BANK(PokemonPicPointers)
|
ld a, BANK(PokemonPicPointers)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
pop af
|
pop af
|
||||||
pop de
|
pop de
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
@ -332,7 +332,7 @@ GetTrainerPic:
|
|||||||
push af
|
push af
|
||||||
inc hl
|
inc hl
|
||||||
ld a, BANK(TrainerPicPointers)
|
ld a, BANK(TrainerPicPointers)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
pop af
|
pop af
|
||||||
ld de, wDecompressScratch
|
ld de, wDecompressScratch
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
|
@ -474,7 +474,7 @@ PokeAnim_GetPointer:
|
|||||||
add hl, de
|
add hl, de
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wPokeAnimPointerBank]
|
ld a, [wPokeAnimPointerBank]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wPokeAnimCommand], a
|
ld [wPokeAnimCommand], a
|
||||||
ld a, h
|
ld a, h
|
||||||
@ -496,7 +496,7 @@ PokeAnim_GetBitmaskIndex:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [wPokeAnimFramesBank]
|
ld a, [wPokeAnimFramesBank]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld a, [wPokeAnimFramesBank]
|
ld a, [wPokeAnimFramesBank]
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
ld [wPokeAnimCurBitmask], a
|
ld [wPokeAnimCurBitmask], a
|
||||||
@ -915,7 +915,7 @@ GetMonAnimPointer:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wPokeAnimPointerBank], a
|
ld [wPokeAnimPointerBank], a
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wPokeAnimPointerAddr], a
|
ld [wPokeAnimPointerAddr], a
|
||||||
ld a, h
|
ld a, h
|
||||||
@ -982,7 +982,7 @@ GetMonFramesPointer:
|
|||||||
add hl, de
|
add hl, de
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, b
|
ld a, b
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wPokeAnimFramesAddr], a
|
ld [wPokeAnimFramesAddr], a
|
||||||
ld a, h
|
ld a, h
|
||||||
@ -1020,7 +1020,7 @@ GetMonBitmaskPointer:
|
|||||||
add hl, de
|
add hl, de
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wPokeAnimBitmaskBank]
|
ld a, [wPokeAnimBitmaskBank]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wPokeAnimBitmaskAddr], a
|
ld [wPokeAnimBitmaskAddr], a
|
||||||
ld a, h
|
ld a, h
|
||||||
|
@ -784,7 +784,7 @@ HeavyBallMultiplier:
|
|||||||
add hl, de
|
add hl, de
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, BANK(PokedexDataPointerTable)
|
ld a, BANK(PokedexDataPointerTable)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
|
|
||||||
.SkipText:
|
.SkipText:
|
||||||
call GetPokedexEntryBank
|
call GetPokedexEntryBank
|
||||||
@ -797,7 +797,7 @@ HeavyBallMultiplier:
|
|||||||
push bc
|
push bc
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
|
|
||||||
srl h
|
srl h
|
||||||
rr l
|
rr l
|
||||||
@ -901,7 +901,7 @@ MoonBallMultiplier:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, BANK(EvosAttacksPointers)
|
ld a, BANK(EvosAttacksPointers)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
|
@ -422,7 +422,7 @@ rept SCENE_SCRIPT_SIZE
|
|||||||
endr
|
endr
|
||||||
|
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
call CallScript
|
call CallScript
|
||||||
|
|
||||||
@ -722,7 +722,7 @@ TryBGEvent:
|
|||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
call CallScript
|
call CallScript
|
||||||
scf
|
scf
|
||||||
@ -739,7 +739,7 @@ CheckBGEventFlag:
|
|||||||
ld l, a
|
ld l, a
|
||||||
push hl
|
push hl
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
ld b, CHECK_FLAG
|
ld b, CHECK_FLAG
|
||||||
|
@ -1369,7 +1369,7 @@ StdScript:
|
|||||||
ld b, a
|
ld b, a
|
||||||
inc hl
|
inc hl
|
||||||
ld a, BANK(StdScripts)
|
ld a, BANK(StdScripts)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SkipTwoScriptBytes:
|
SkipTwoScriptBytes:
|
||||||
|
@ -889,7 +889,7 @@ RandomPhoneMon:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, BANK(TrainerGroups)
|
ld a, BANK(TrainerGroups)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
|
|
||||||
.skip_trainer
|
.skip_trainer
|
||||||
dec e
|
dec e
|
||||||
|
@ -113,7 +113,7 @@ DisplayDexEntry:
|
|||||||
ld a, b
|
ld a, b
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld d, l
|
ld d, l
|
||||||
ld e, h
|
ld e, h
|
||||||
pop hl
|
pop hl
|
||||||
@ -143,7 +143,7 @@ DisplayDexEntry:
|
|||||||
inc hl
|
inc hl
|
||||||
push hl
|
push hl
|
||||||
dec hl
|
dec hl
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld d, l
|
ld d, l
|
||||||
ld e, h
|
ld e, h
|
||||||
ld a, e
|
ld a, e
|
||||||
|
@ -689,7 +689,7 @@ PokedexShow2:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, BANK(PokedexDataPointerTable)
|
ld a, BANK(PokedexDataPointerTable)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
call PokedexShow_GetDexEntryBank
|
call PokedexShow_GetDexEntryBank
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
|
@ -428,7 +428,7 @@ GetEggMove:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, BANK(EggMovePointers)
|
ld a, BANK(EggMovePointers)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
.loop
|
.loop
|
||||||
ld a, BANK("Egg Moves")
|
ld a, BANK("Egg Moves")
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
@ -462,7 +462,7 @@ GetEggMove:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, BANK(EvosAttacksPointers)
|
ld a, BANK(EvosAttacksPointers)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
.loop3
|
.loop3
|
||||||
ld a, BANK("Evolutions and Attacks")
|
ld a, BANK("Evolutions and Attacks")
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
|
@ -1687,7 +1687,7 @@ GivePoke::
|
|||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld a, [wScriptBank]
|
ld a, [wScriptBank]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld bc, MON_NAME_LENGTH
|
ld bc, MON_NAME_LENGTH
|
||||||
ld a, [wScriptBank]
|
ld a, [wScriptBank]
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
@ -1695,7 +1695,7 @@ GivePoke::
|
|||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [wScriptBank]
|
ld a, [wScriptBank]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
pop bc
|
pop bc
|
||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
|
@ -27,7 +27,7 @@ GetDexNumber:: ; unreferenced
|
|||||||
ld bc, BASE_DATA_SIZE
|
ld bc, BASE_DATA_SIZE
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, BANK(BaseData)
|
ld a, BANK(BaseData)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld b, l
|
ld b, l
|
||||||
ld c, h
|
ld c, h
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -72,8 +72,8 @@ GetFarByte::
|
|||||||
ldh a, [hFarByte]
|
ldh a, [hFarByte]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetFarHalfword::
|
GetFarWord::
|
||||||
; retrieve a halfword from a:hl, and return it in hl.
|
; retrieve a word from a:hl, and return it in hl.
|
||||||
; bankswitch to new bank
|
; bankswitch to new bank
|
||||||
ldh [hTempBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
@ -81,7 +81,7 @@ GetFarHalfword::
|
|||||||
ldh a, [hTempBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
; get halfword from new bank, put it in hl
|
; get word from new bank, put it in hl
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
|
@ -1008,7 +1008,7 @@ TextCommand_STRINGBUFFER::
|
|||||||
add hl, de
|
add hl, de
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, BANK(StringBufferPointers)
|
ld a, BANK(StringBufferPointers)
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld h, b
|
ld h, b
|
||||||
|
@ -116,7 +116,7 @@ LoadTrainer_continue::
|
|||||||
ld hl, MAPOBJECT_SCRIPT_POINTER
|
ld hl, MAPOBJECT_SCRIPT_POINTER
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [wSeenTrainerBank]
|
ld a, [wSeenTrainerBank]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld de, wTempTrainer
|
ld de, wTempTrainer
|
||||||
ld bc, wTempTrainerEnd - wTempTrainer
|
ld bc, wTempTrainerEnd - wTempTrainer
|
||||||
ld a, [wSeenTrainerBank]
|
ld a, [wSeenTrainerBank]
|
||||||
@ -215,7 +215,7 @@ CheckTrainerFlag:: ; unreferenced
|
|||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
push de
|
push de
|
||||||
|
@ -117,7 +117,7 @@ Function1000ba:
|
|||||||
add hl, de
|
add hl, de
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wcd22]
|
ld a, [wcd22]
|
||||||
call GetFarHalfword
|
call GetFarWord
|
||||||
ld a, [wcd22]
|
ld a, [wcd22]
|
||||||
rst FarCall
|
rst FarCall
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user