found the sliding animation at the start of battle

This commit is contained in:
PikalaxALT 2015-11-10 20:18:49 -05:00
parent 8fb01de917
commit 03f0815679
4 changed files with 119 additions and 119 deletions

View File

@ -8473,7 +8473,7 @@ StartBattle: ; 3f4c1
ld a, [TimeOfDayPal]
push af
call Function3f4dd
call BattleIntro
call Function3c000
call Function3f69e
pop af
@ -8489,7 +8489,7 @@ Function3f4d9: ; 3f4d9
; 3f4dd
Function3f4dd: ; 3f4dd
BattleIntro: ; 3f4dd
callba MobileFn_106050 ; mobile
call LoadTrainerOrWildMonPic
xor a
@ -8508,7 +8508,7 @@ Function3f4dd: ; 3f4dd
call GetSGBLayout
ld hl, rLCDC
res 6, [hl]
call Function3fb6c
call InitBattleDisplay
call BattleStartMessage
ld hl, rLCDC
set 6, [hl]
@ -9393,8 +9393,8 @@ Function3fb54: ; 3fb54
ret
; 3fb6c
Function3fb6c: ; 3fb6c
call Function3fbf8
InitBattleDisplay: ; 3fb6c
call .InitBackPic
hlcoord 0, 12
ld b, 4
ld c, 18
@ -9405,7 +9405,7 @@ Function3fb6c: ; 3fb6c
call ClearBox
call LoadStandardFont
call _LoadBattleFontsHPBar
call Function3fbd6
call .BlankBGMap
xor a
ld [hMapAnims], a
ld [hSCY], a
@ -9415,7 +9415,7 @@ Function3fb6c: ; 3fb6c
call WaitBGMap
xor a
ld [hBGMapMode], a
callba Function4e980
callba SlideBattlePics
ld a, $1
ld [hBGMapMode], a
ld a, $31
@ -9438,7 +9438,7 @@ Function3fb6c: ; 3fb6c
ret
; 3fbd6
Function3fbd6: ; 3fbd6
.BlankBGMap: ; 3fbd6
ld a, [rSVBK]
push af
ld a, $6
@ -9451,7 +9451,7 @@ Function3fbd6: ; 3fbd6
ld de, w6_d000
ld hl, VBGMap0
lb bc, BANK(Function3fbd6), $40
lb bc, BANK(.BlankBGMap), $40
call Request2bpp
pop af
@ -9459,7 +9459,7 @@ Function3fbd6: ; 3fbd6
ret
; 3fbf8
Function3fbf8: ; 3fbf8
.InitBackPic: ; 3fbf8
call GetTrainerBackpic
call CopyBackpic
ret

107
battle/sliding_intro.asm Executable file
View File

@ -0,0 +1,107 @@
SlideBattlePics: ; 4e980
ld a, [rSVBK]
push af
ld a, $5
ld [rSVBK], a
call .subfunction1
ld a, rSCX - $ff00
ld [hLCDStatCustom], a
call .subfunction2
xor a
ld [hLCDStatCustom], a
pop af
ld [rSVBK], a
ret
; 4e998
.subfunction1: ; 4e998
call .subfunction4
ld a, $90
ld [hSCX], a
ld a, %11100100
call DmgToCgbBGPals
lb de, %11100100, %11100100
call DmgToCgbObjPals
ret
; 4e9ab
.subfunction2: ; 4e9ab
ld d, $90
ld e, $72
ld a, $48
inc a
.loop1
push af
.loop2
ld a, [rLY]
cp $60
jr c, .loop2
ld a, d
ld [hSCX], a
call .subfunction5
rept 2
inc e
endr
rept 2
dec d
endr
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
; 4e9d6
.subfunction3: ; 4e9d6
ld hl, Sprites + 1
ld c, $12 ; 18
ld de, $4
.loop3
rept 2
dec [hl]
endr
add hl, de
dec c
jr nz, .loop3
ret
; 4e9e5
.subfunction4: ; 4e9e5
ld hl, LYOverrides
ld a, $90
ld bc, SCREEN_HEIGHT_PX
call ByteFill
ret
; 4e9f1
.subfunction5: ; 4e9f1
ld hl, LYOverrides
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
; 4ea0a

109
main.asm
View File

@ -37911,114 +37911,7 @@ FemaleTrainersEnd:
; 4e980
Function4e980: ; 4e980
ld a, [rSVBK]
push af
ld a, $5
ld [rSVBK], a
call Function4e998
ld a, rSCX - $ff00
ld [hLCDStatCustom], a
call Function4e9ab
xor a
ld [hLCDStatCustom], a
pop af
ld [rSVBK], a
ret
; 4e998
Function4e998: ; 4e998
call Function4e9e5
ld a, $90
ld [hSCX], a
ld a, $e4
call DmgToCgbBGPals
ld de, $e4e4
call DmgToCgbObjPals
ret
; 4e9ab
Function4e9ab: ; 4e9ab
ld d, $90
ld e, $72
ld a, $48
inc a
.asm_4e9b2
push af
.asm_4e9b3
ld a, [rLY]
cp $60
jr c, .asm_4e9b3
ld a, d
ld [hSCX], a
call Function4e9f1
rept 2
inc e
endr
rept 2
dec d
endr
pop af
push af
cp $1
jr z, .asm_4e9ce
push de
call Function4e9d6
pop de
.asm_4e9ce
call DelayFrame
pop af
dec a
jr nz, .asm_4e9b2
ret
; 4e9d6
Function4e9d6: ; 4e9d6
ld hl, Sprites + 1
ld c, $12
ld de, $4
.asm_4e9de
rept 2
dec [hl]
endr
add hl, de
dec c
jr nz, .asm_4e9de
ret
; 4e9e5
Function4e9e5: ; 4e9e5
ld hl, LYOverrides
ld a, $90
ld bc, SCREEN_HEIGHT_PX
call ByteFill
ret
; 4e9f1
Function4e9f1: ; 4e9f1
ld hl, LYOverrides
ld a, d
ld c, $3e
.asm_4e9f7
ld [hli], a
dec c
jr nz, .asm_4e9f7
ld a, e
ld c, $22
.asm_4e9fe
ld [hli], a
dec c
jr nz, .asm_4e9fe
xor a
ld c, $30
.asm_4ea05
ld [hli], a
dec c
jr nz, .asm_4ea05
ret
; 4ea0a
INCLUDE "battle/sliding_intro.asm"
Function4ea0a: ; 4ea0a

View File

@ -4039,7 +4039,7 @@ Function101a21: ; 101a21
ld [hl], a
ld a, $1
ld [wc2d7], a
callba Function3f4dd
callba BattleIntro
callba Function3c000
callba Function3f759
xor a