diff options
Diffstat (limited to 'engine/battle/sliding_intro.asm')
-rw-r--r-- | engine/battle/sliding_intro.asm | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/engine/battle/sliding_intro.asm b/engine/battle/sliding_intro.asm new file mode 100644 index 00000000..f872a8de --- /dev/null +++ b/engine/battle/sliding_intro.asm @@ -0,0 +1,57 @@ +BattleIntroSlidingPics: + ld b, $70 + ld c, $90 + ld a, c + ldh [hSCX], a + call DelayFrame + ld a, %11100100 + call DmgToCgbBGPals + lb de, %11100100, %11100100 + call DmgToCgbObjPals + +.loop1 + push bc + ld h, b + ld l, $40 + call .subfunction2 + ld h, $00 + ld l, $60 + call .subfunction2 + call .subfunction1 + pop bc + ld a, c + ldh [hSCX], a + inc b + inc b + dec c + dec c + jr nz, .loop1 + ret + +.subfunction1 + push bc + ld hl, wVirtualOAMSprite00XCoord + ld c, $12 ; 18 + ld de, SPRITEOAMSTRUCT_LENGTH +.loop2 + dec [hl] + dec [hl] + add hl, de + dec c + jr nz, .loop2 + pop bc + ret + +.subfunction2 +.loop3 + ldh a, [rLY] + cp l + jr nz, .loop3 + ld a, h + ldh [rSCX], a + +.loop4 + ldh a, [rLY] + cp h + jr z, .loop4 + ret |