pokered/scripts/TradeCenter.asm

39 lines
760 B
NASM
Raw Normal View History

TradeCenter_Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
2016-10-29 17:32:03 +00:00
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
2015-07-18 15:17:29 +00:00
ld a, SPRITE_FACING_LEFT
jr z, .next
ld a, SPRITE_FACING_RIGHT
.next
ld [hSpriteFacingDirection], a
2014-05-18 18:19:10 +00:00
ld a, $1
2020-07-03 23:59:41 +00:00
ld [hSpriteIndex], a
call SetSpriteFacingDirection
ld hl, wd72d
2014-05-18 18:19:10 +00:00
bit 0, [hl]
set 0, [hl]
ret nz
ld hl, wSprite01StateData2MapY
2014-05-18 18:19:10 +00:00
ld a, $8
ld [hli], a
ld a, $a
ld [hl], a
ld a, SPRITE_FACING_LEFT
ld [wSprite01StateData1FacingDirection], a
2016-10-29 17:32:03 +00:00
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
2014-05-18 18:19:10 +00:00
ret z
ld a, $7
ld [wSprite01StateData2MapX], a
ld a, SPRITE_FACING_RIGHT
ld [wSprite01StateData1FacingDirection], a
2014-05-18 18:19:10 +00:00
ret
TradeCenter_TextPointers:
dw TradeCenterText1
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
TradeCenterText1:
text_far _TradeCenterText1
text_end