diff options
author | Daniel Harding <33dannye@gmail.com> | 2020-05-16 21:42:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 21:42:24 -0500 |
commit | 8a924f1f783572ff395f617f99546b4c949c8b04 (patch) | |
tree | 1b6c7de331cb983256651b11b8adf413a3a434f1 /engine/battle/sliding_intro.asm | |
parent | 88d7e9a34a8b610b358cec1ccc6660634ca9ce80 (diff) | |
parent | ed94962edf1668aba3f60938e8a5ba8040e2a59c (diff) |
Merge pull request #30 from entrpntr/spring-cleaning
Spring Cleaning
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 |