Harmonize engine/{battle, battle_anims, events, games} with pokegold

This commit is contained in:
Rangi
2020-06-16 19:32:36 -04:00
parent c552390a15
commit f76dabedcc
13 changed files with 97 additions and 85 deletions

View File

@@ -1,9 +1,9 @@
; PrintDayCareText.TextTable indexes
const_def
const DAYCARETEXT_MAN_INTRO
const DAYCARETEXT_MAN_EGG
const DAYCARETEXT_MAN_ODD_EGG
const DAYCARETEXT_LADY_INTRO
const DAYCARETEXT_LADY_EGG
const DAYCARETEXT_LADY_ODD_EGG
const DAYCARETEXT_WHICH_ONE
const DAYCARETEXT_DEPOSIT
const DAYCARETEXT_CANT_BREED_EGG

View File

@@ -204,7 +204,7 @@ Cut_SpawnAnimateLeaves:
ret
Cut_StartWaiting:
ld a, $1
ld a, 1
ldh [hBGMapMode], a
; Cut_WaitAnimSFX
ld hl, wJumptableIndex
@@ -445,8 +445,8 @@ FlyFunction_FrameTimer:
sla a
add 8 * 8 ; gives a number in [$40, $50, $60, $70]
ld d, a
ld e, $0
ld a, SPRITE_ANIM_INDEX_FLY_LEAF ; fly land
ld e, 0
ld a, SPRITE_ANIM_INDEX_FLY_LEAF
call InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc

View File

@@ -278,7 +278,7 @@ HOF_SlideBackpic:
ldh a, [hSCX]
cp $70
ret z
add $4
add 4
ldh [hSCX], a
call DelayFrame
jr .backpicloop

View File

@@ -103,6 +103,7 @@ CheckForLuckyNumberWinners:
ld a, [wScriptVar]
and a
ret z ; found nothing
farcall StubbedTrainerRankings_LuckyNumberShow
ld a, [wTempByteValue]
and a

View File

@@ -78,6 +78,7 @@ MagnetTrain:
ldh [hSCX], a
xor a
ldh [hBGMapMode], a
pop af
ldh [rSVBK], a
ret
@@ -127,7 +128,7 @@ MagnetTrain_LoadGFX_PlayMusic:
ldh [hSCX], a
ldh [hSCY], a
; Load the player sprite
; Load the player sprite's standing frames
ldh a, [rSVBK]
push af
ld a, BANK(wPlayerGender)
@@ -139,7 +140,7 @@ MagnetTrain_LoadGFX_PlayMusic:
ld c, 4
call Request2bpp
; Load the trainer walking frame
; Load the player sprite's walking frames
ld hl, 12 tiles
add hl, de
ld d, h

View File

@@ -349,7 +349,7 @@ SurfFunction:
.TrySurf:
ld de, ENGINE_FOGBADGE
call CheckBadge
jr c, .asm_c956
jr c, .nofogbadge
ld hl, wBikeFlags
bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl]
jr nz, .cannotsurf
@@ -368,7 +368,7 @@ SurfFunction:
jr c, .cannotsurf
ld a, $1
ret
.asm_c956
.nofogbadge
ld a, $80
ret
.alreadyfail
@@ -407,7 +407,7 @@ UsedSurfScript:
waitbutton
closetext
callasm .empty_fn ; empty function
callasm .stubbed_fn
readmem wBuffer2
writevar VAR_MOVEMENT
@@ -419,7 +419,7 @@ UsedSurfScript:
applymovement PLAYER, wMovementBuffer
end
.empty_fn
.stubbed_fn
farcall StubbedTrainerRankings_Surf
ret
@@ -1369,7 +1369,7 @@ RockSmashScript:
special WaitSFX
playsound SFX_STRENGTH
earthquake 84
applymovementlasttalked MovementData_0xcf55
applymovementlasttalked MovementData_RockSmash
disappear -2
callasm RockMonEncounter
@@ -1381,7 +1381,7 @@ RockSmashScript:
.done
end
MovementData_0xcf55:
MovementData_RockSmash:
rock_smash 10
step_end
@@ -1591,11 +1591,11 @@ Script_FishCastRod:
loademote EMOTE_ROD
callasm LoadFishingGFX
loademote EMOTE_SHOCK
applymovement PLAYER, MovementData_0xd093
applymovement PLAYER, MovementData_CastRod
pause 40
end
MovementData_0xd093:
MovementData_CastRod:
fish_cast_rod
step_end
@@ -1787,10 +1787,10 @@ AskCutScript:
opentext
writetext AskCutText
yesorno
iffalse .script_d1b8
iffalse .declined
callasm .CheckMap
iftrue Script_Cut
.script_d1b8
.declined
closetext
end