2018-06-24 07:09:41 -07:00
|
|
|
BattleIntroSlidingPics:
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rSVBK]
|
2015-11-10 17:18:49 -08:00
|
|
|
push af
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, BANK(wLYOverrides)
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rSVBK], a
|
2015-11-10 17:18:49 -08:00
|
|
|
call .subfunction1
|
2018-08-25 11:34:25 -07:00
|
|
|
ld a, LOW(rSCX)
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hLCDCPointer], a
|
2015-11-10 17:18:49 -08:00
|
|
|
call .subfunction2
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hLCDCPointer], a
|
2015-11-10 17:18:49 -08:00
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rSVBK], a
|
2015-11-10 17:18:49 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.subfunction1
|
2015-11-10 17:18:49 -08:00
|
|
|
call .subfunction4
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCX], a
|
2015-11-10 17:18:49 -08:00
|
|
|
ld a, %11100100
|
|
|
|
call DmgToCgbBGPals
|
|
|
|
lb de, %11100100, %11100100
|
|
|
|
call DmgToCgbObjPals
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.subfunction2
|
2015-11-10 17:18:49 -08:00
|
|
|
ld d, $90
|
|
|
|
ld e, $72
|
|
|
|
ld a, $48
|
|
|
|
inc a
|
|
|
|
.loop1
|
|
|
|
push af
|
|
|
|
.loop2
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rLY]
|
2015-11-10 17:18:49 -08:00
|
|
|
cp $60
|
|
|
|
jr c, .loop2
|
|
|
|
ld a, d
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hSCX], a
|
2015-11-10 17:18:49 -08:00
|
|
|
call .subfunction5
|
|
|
|
inc e
|
2016-05-04 08:46:23 -07:00
|
|
|
inc e
|
|
|
|
dec d
|
2015-11-10 17:18:49 -08:00
|
|
|
dec d
|
|
|
|
pop af
|
|
|
|
push af
|
|
|
|
cp $1
|
|
|
|
jr z, .skip1
|
|
|
|
push de
|
|
|
|
call .subfunction3
|
|
|
|
pop de
|
|
|
|
|
|
|
|
.skip1
|
|
|
|
call DelayFrame
|
|
|
|
pop af
|
|
|
|
dec a
|
|
|
|
jr nz, .loop1
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.subfunction3
|
2018-01-30 11:52:46 -08:00
|
|
|
ld hl, wVirtualOAMSprite00XCoord
|
2015-11-10 17:18:49 -08:00
|
|
|
ld c, $12 ; 18
|
2018-01-10 10:47:57 -08:00
|
|
|
ld de, SPRITEOAMSTRUCT_LENGTH
|
2015-11-10 17:18:49 -08:00
|
|
|
.loop3
|
|
|
|
dec [hl]
|
2016-05-04 08:46:23 -07:00
|
|
|
dec [hl]
|
2015-11-10 17:18:49 -08:00
|
|
|
add hl, de
|
|
|
|
dec c
|
|
|
|
jr nz, .loop3
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.subfunction4
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wLYOverrides
|
2015-11-10 17:18:49 -08:00
|
|
|
ld a, $90
|
|
|
|
ld bc, SCREEN_HEIGHT_PX
|
|
|
|
call ByteFill
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.subfunction5
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wLYOverrides
|
2015-11-10 17:18:49 -08:00
|
|
|
ld a, d
|
|
|
|
ld c, $3e ; 62
|
|
|
|
.loop4
|
|
|
|
ld [hli], a
|
|
|
|
dec c
|
|
|
|
jr nz, .loop4
|
|
|
|
ld a, e
|
|
|
|
ld c, $22 ; 34
|
|
|
|
.loop5
|
|
|
|
ld [hli], a
|
|
|
|
dec c
|
|
|
|
jr nz, .loop5
|
|
|
|
xor a
|
|
|
|
ld c, $30 ; 48
|
|
|
|
.loop6
|
|
|
|
ld [hli], a
|
|
|
|
dec c
|
|
|
|
jr nz, .loop6
|
|
|
|
ret
|