pokered/scripts/TradeCenter.asm

39 lines
774 B
NASM
Raw Normal View History

TradeCenter_Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
ldh a, [hSerialConnectionStatus]
2016-10-29 17:32:03 +00:00
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
ldh [hSpriteFacingDirection], a
2014-05-18 18:19:10 +00:00
ld a, $1
ldh [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
ld a, 8 ; y
2014-05-18 18:19:10 +00:00
ld [hli], a
ld a, 10 ; x
2014-05-18 18:19:10 +00:00
ld [hl], a
ld a, SPRITE_FACING_LEFT
ld [wSprite01StateData1FacingDirection], a
ldh a, [hSerialConnectionStatus]
2016-10-29 17:32:03 +00:00
cp USING_INTERNAL_CLOCK
2014-05-18 18:19:10 +00:00
ret z
ld a, 7 ; x
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