Identify more WRAM labels, and start a <X>_DummyFunction label convention

This commit is contained in:
Rangi
2020-10-28 13:35:39 -04:00
parent 6d333bed5f
commit ea426a8879
42 changed files with 255 additions and 208 deletions

View File

@@ -258,7 +258,7 @@ StartTrainerBattle_NextScene:
StartTrainerBattle_SetUpBGMap:
call StartTrainerBattle_NextScene
xor a
ld [wcf64], a
ld [wBattleTransitionCounter], a
ldh [hBGMapMode], a
ret
@@ -272,7 +272,7 @@ StartTrainerBattle_Flash:
ld a, [wTimeOfDayPalset]
cp DARKNESS_PALSET
jr z, .done
ld hl, wcf64
ld hl, wBattleTransitionCounter
ld a, [hl]
inc [hl]
srl a
@@ -290,7 +290,7 @@ StartTrainerBattle_Flash:
.done
xor a
ld [wcf64], a
ld [wBattleTransitionCounter], a
scf
ret
@@ -322,12 +322,12 @@ StartTrainerBattle_SetUpForWavyOutro:
ld a, $90
ldh [hLYOverrideEnd], a
xor a
ld [wcf64], a
ld [wcf65], a
ld [wBattleTransitionCounter], a
ld [wBattleTransitionSineWaveOffset], a
ret
StartTrainerBattle_SineWave:
ld a, [wcf64]
ld a, [wBattleTransitionCounter]
cp $60
jr nc, .end
call .DoSineWave
@@ -339,10 +339,10 @@ StartTrainerBattle_SineWave:
ret
.DoSineWave:
ld hl, wcf65
ld hl, wBattleTransitionSineWaveOffset
ld a, [hl]
inc [hl]
ld hl, wcf64
ld hl, wBattleTransitionCounter
ld d, [hl]
add [hl]
ld [hl], a
@@ -372,13 +372,13 @@ StartTrainerBattle_SetUpForSpinOutro:
ldh [rSVBK], a
call StartTrainerBattle_NextScene
xor a
ld [wcf64], a
ld [wBattleTransitionCounter], a
ret
StartTrainerBattle_SpinToBlack:
xor a
ldh [hBGMapMode], a
ld a, [wcf64]
ld a, [wBattleTransitionCounter]
ld e, a
ld d, 0
ld hl, .spin_quadrants
@@ -388,13 +388,13 @@ endr
ld a, [hli]
cp -1
jr z, .end
ld [wcf65], a
ld [wBattleTransitionSineWaveOffset], a
call .load
ld a, 1
ldh [hBGMapMode], a
call DelayFrame
call DelayFrame
ld hl, wcf64
ld hl, wBattleTransitionCounter
inc [hl]
ret
@@ -464,7 +464,7 @@ ENDM
inc de
.loop1
ld [hl], BATTLETRANSITION_BLACK
ld a, [wcf65]
ld a, [wBattleTransitionSineWaveOffset]
bit RIGHT_QUADRANT_F, a
jr z, .leftside
inc hl
@@ -475,7 +475,7 @@ ENDM
dec c
jr nz, .loop1
pop hl
ld a, [wcf65]
ld a, [wBattleTransitionSineWaveOffset]
bit LOWER_QUADRANT_F, a
ld bc, SCREEN_WIDTH
jr z, .upper
@@ -490,7 +490,7 @@ ENDM
jr z, .loop
ld c, a
.loop2
ld a, [wcf65]
ld a, [wBattleTransitionSineWaveOffset]
bit RIGHT_QUADRANT_F, a
jr z, .leftside2
dec hl
@@ -514,13 +514,13 @@ StartTrainerBattle_SetUpForRandomScatterOutro:
ldh [rSVBK], a
call StartTrainerBattle_NextScene
ld a, $10
ld [wcf64], a
ld [wBattleTransitionCounter], a
ld a, 1
ldh [hBGMapMode], a
ret
StartTrainerBattle_SpeckleToBlack:
ld hl, wcf64
ld hl, wBattleTransitionCounter
ld a, [hl]
and a
jr z, .done

View File

@@ -3006,10 +3006,11 @@ PlayerMonFaintedAnimation:
jp MonFaintedAnimation
MonFaintedAnimation:
ld a, [wcfbe]
ld a, [wJoypadDisable]
push af
set 6, a
ld [wcfbe], a
set JOYPAD_DISABLE_MON_FAINT_F, a
ld [wJoypadDisable], a
ld b, 7
.OuterLoop:
@@ -3052,7 +3053,7 @@ MonFaintedAnimation:
jr nz, .OuterLoop
pop af
ld [wcfbe], a
ld [wJoypadDisable], a
ret
.Spaces:
@@ -4639,7 +4640,7 @@ CheckDanger:
PrintPlayerHUD:
ld de, wBattleMonNick
hlcoord 10, 7
call ret_3e138
call Battle_DummyFunction
call PlaceString
push bc
@@ -4725,7 +4726,7 @@ DrawEnemyHUD:
call GetBaseData
ld de, wEnemyMonNick
hlcoord 1, 0
call ret_3e138
call Battle_DummyFunction
call PlaceString
ld h, b
ld l, c
@@ -4854,7 +4855,8 @@ UpdateHPPal:
ret z
jp FinishBattleAnim
ret_3e138:
Battle_DummyFunction:
; called before placing either battler's nickname in the HUD
ret
BattleMenu: