player animations, emotion bubbles, etc.

This commit is contained in:
YamaArashi 2015-07-14 14:32:49 -07:00
parent b1cb378893
commit 01631a2e59
13 changed files with 166 additions and 110 deletions

View file

@ -104,12 +104,12 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
jr nc, .highLevelEnemy jr nc, .highLevelEnemy
res 1, c res 1, c
ld a, $1 ld a, $1
ld [wcd47], a ld [wBattleTransitionSpiralDirection], a
ret ret
.highLevelEnemy .highLevelEnemy
set 1, c set 1, c
xor a xor a
ld [wcd47], a ld [wBattleTransitionSpiralDirection], a
ret ret
; fails to recognize VICTORY_ROAD_2, VICTORY_ROAD_3, all ROCKET_HIDEOUT maps, ; fails to recognize VICTORY_ROAD_2, VICTORY_ROAD_3, all ROCKET_HIDEOUT maps,
@ -196,7 +196,7 @@ BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
; outward spiral if enemy is at least 3 levels ; outward spiral if enemy is at least 3 levels
; higher than player and does an inward spiral otherwise ; higher than player and does an inward spiral otherwise
BattleTransition_Spiral: ; 70a72 (1c:4a72) BattleTransition_Spiral: ; 70a72 (1c:4a72)
ld a, [wcd47] ld a, [wBattleTransitionSpiralDirection]
and a and a
jr z, .outwardSpiral jr z, .outwardSpiral
call BattleTransition_InwardSpiral call BattleTransition_InwardSpiral

View file

@ -177,9 +177,9 @@ InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1)
ld bc, $b ld bc, $b
call InGameTrade_CopyData call InGameTrade_CopyData
ld hl, InGameTrade_TrainerString ld hl, InGameTrade_TrainerString
ld de, wcd4e ld de, wTradedEnemyMonOT
call InGameTrade_CopyData call InGameTrade_CopyData
ld de, W_GRASSRATE ld de, wLinkEnemyTrainerName
call InGameTrade_CopyData call InGameTrade_CopyData
ld hl, wPartyMon1OTID ld hl, wPartyMon1OTID
ld bc, wPartyMon2 - wPartyMon1 ld bc, wPartyMon2 - wPartyMon1

View file

@ -1783,7 +1783,7 @@ SuperRodCode: ; e283 (3:6283)
call ReadSuperRodData call ReadSuperRodData
ld a, e ld a, e
RodResponse: ; e28d (3:628d) RodResponse: ; e28d (3:628d)
ld [wWhichTrade], a ld [wRodResponse], a
dec a ; is there a bite? dec a ; is there a bite?
jr nz, .next jr nz, .next
@ -1801,7 +1801,7 @@ RodResponse: ; e28d (3:628d)
push af push af
push hl push hl
ld [hl], 0 ld [hl], 0
callba Func_707b6 callba FishingAnim
pop hl pop hl
pop af pop af
ld [hl], a ld [hl], a

View file

@ -73,7 +73,7 @@ UsedCutText: ; eff2 (3:6ff2)
AnimateCutTree: ; eff7 (3:6ff7) AnimateCutTree: ; eff7 (3:6ff7)
xor a xor a
ld [wcd50], a ld [wWhichAnimationOffsets], a
ld a, $e4 ld a, $e4
ld [rOBP1], a ld [rOBP1], a
ld a, [wcd4d] ld a, [wcd4d]
@ -138,7 +138,7 @@ GetCutTreeBoulderDustAnimationOffsets: ; f068 (3:7068)
srl a srl a
ld e, a ld e, a
ld d, $0 ; de holds direction (00: down, 02: up, 04: left, 06: right) ld d, $0 ; de holds direction (00: down, 02: up, 04: left, 06: right)
ld a, [wcd50] ld a, [wWhichAnimationOffsets]
and a and a
ld hl, CutTreeAnimationOffsets ld hl, CutTreeAnimationOffsets
jr z, .asm_f084 jr z, .asm_f084

View file

@ -1,7 +1,7 @@
EmotionBubble: ; 17c47 (5:7c47) EmotionBubble: ; 17c47 (5:7c47)
ld a, [wcd50] ld a, [wWhichEmotionBubble]
ld c, a ld c, a
ld b, $0 ld b, 0
ld hl, EmotionBubblesPointerTable ld hl, EmotionBubblesPointerTable
add hl, bc add hl, bc
add hl, bc add hl, bc
@ -16,15 +16,18 @@ EmotionBubble: ; 17c47 (5:7c47)
ld a, $ff ld a, $ff
ld [wUpdateSpritesEnabled], a ld [wUpdateSpritesEnabled], a
ld a, [wd736] ld a, [wd736]
bit 6, a bit 6, a ; are the last 4 OAM entries reserved for a shadow or fishing rod?
ld hl, wOAMBuffer + $8f ld hl, wOAMBuffer + $8f
ld de, wOAMBuffer + $9f ld de, wOAMBuffer + $9f
jr z, .asm_17c7a jr z, .next
ld hl, wOAMBuffer + $7f ld hl, wOAMBuffer + $7f
ld de, wOAMBuffer + $8f ld de, wOAMBuffer + $8f
.asm_17c7a
; Copy OAM data 16 bytes forward to make room for emotion bubble OAM data at the
; start of the OAM buffer.
.next
ld bc, $90 ld bc, $90
.asm_17c7d .loop
ld a, [hl] ld a, [hl]
ld [de], a ld [de], a
dec hl dec hl
@ -32,12 +35,14 @@ EmotionBubble: ; 17c47 (5:7c47)
dec bc dec bc
ld a, c ld a, c
or b or b
jr nz, .asm_17c7d jr nz, .loop
; get the screen coordinates of the sprite the bubble is to be displayed above
ld hl, wSpriteStateData1 + 4 ld hl, wSpriteStateData1 + 4
ld a, [wcd4f] ld a, [wEmotionBubbleSpriteIndex]
swap a swap a
ld c, a ld c, a
ld b, $0 ld b, 0
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
ld b, a ld b, a
@ -45,6 +50,7 @@ EmotionBubble: ; 17c47 (5:7c47)
ld a, [hl] ld a, [hl]
add $8 add $8
ld c, a ld c, a
ld de, EmotionBubblesOAM ld de, EmotionBubblesOAM
xor a xor a
call WriteOAMBlock call WriteOAMBlock

View file

@ -144,10 +144,14 @@ PrepareOAMData:
ld de, $4 ld de, $4
ld b, $a0 ld b, $a0
ld a, [wd736] ld a, [wd736]
bit 6, a bit 6, a ; jumping down ledge or fishing animation?
ld a, $a0 ld a, $a0
jr z, .clear jr z, .clear
; Don't clear the last 4 entries because they are used for the shadow in the
; jumping down ledge animation and the rod in the fishing animation.
ld a, $90 ld a, $90
.clear .clear
cp l cp l
ret z ret z

View file

@ -1,5 +1,5 @@
EnterMapAnim: ; 70510 (1c:4510) EnterMapAnim: ; 70510 (1c:4510)
call InitFacingDirectionBuffer call InitFacingDirectionList
ld a, $ec ld a, $ec
ld [wSpriteStateData1 + 4], a ; player's sprite Y screen position ld [wSpriteStateData1 + 4], a ; player's sprite Y screen position
call Delay3 call Delay3
@ -32,7 +32,7 @@ EnterMapAnim: ; 70510 (1c:4510)
ld a, $8 ld a, $8
ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue
ld [hl], $ff ; wPlayerSpinInPlaceAnimSoundID ld [hl], $ff ; wPlayerSpinInPlaceAnimSoundID
ld hl, wcd48 ld hl, wFacingDirectionList
call PlayerSpinInPlace call PlayerSpinInPlace
.restoreDefaultMusic .restoreDefaultMusic
call PlayDefaultMusic call PlayDefaultMusic
@ -91,7 +91,7 @@ PlayerSpinWhileMovingDown: ; 705aa (1c:45aa)
jp PlayerSpinWhileMovingUpOrDown jp PlayerSpinWhileMovingUpOrDown
_LeaveMapAnim: ; 705ba (1c:45ba) _LeaveMapAnim: ; 705ba (1c:45ba)
call InitFacingDirectionBuffer call InitFacingDirectionList
call IsPlayerStandingOnWarpPadOrHole call IsPlayerStandingOnWarpPadOrHole
ld a, b ld a, b
and a and a
@ -134,7 +134,7 @@ _LeaveMapAnim: ; 705ba (1c:45ba)
xor a xor a
ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue
ld [hl], (SFX_02_4d - SFX_Headers_02) / 3 ; wPlayerSpinInPlaceAnimSoundID ld [hl], (SFX_02_4d - SFX_Headers_02) / 3 ; wPlayerSpinInPlaceAnimSoundID
ld hl, wcd48 ld hl, wFacingDirectionList
call PlayerSpinInPlace call PlayerSpinInPlace
jr .spinWhileMovingUp jr .spinWhileMovingUp
.flyAnimation .flyAnimation
@ -214,7 +214,7 @@ LeaveMapThroughHoleAnim: ; 7067d (1c:467d)
ld [wOAMBuffer + 1 * 4], a ld [wOAMBuffer + 1 * 4], a
ld c, 2 ld c, 2
call DelayFrames call DelayFrames
; hide lower half of player's sprite ; hide upper half of player's sprite
ld a, $a0 ld a, $a0
ld [wOAMBuffer + 2 * 4], a ld [wOAMBuffer + 2 * 4], a
ld [wOAMBuffer + 3 * 4], a ld [wOAMBuffer + 3 * 4], a
@ -231,7 +231,7 @@ DoFlyAnimation: ; 706ae (1c:46ae)
call Delay3 call Delay3
ld a, [wFlyAnimUsingCoordList] ld a, [wFlyAnimUsingCoordList]
cp $ff cp $ff
jr z, .asm_706cd jr z, .skipCopyingCoords ; if the bird is flapping its wings in place
ld hl, wSpriteStateData1 + 4 ld hl, wSpriteStateData1 + 4
ld a, [de] ld a, [de]
inc de inc de
@ -240,7 +240,7 @@ DoFlyAnimation: ; 706ae (1c:46ae)
ld a, [de] ld a, [de]
inc de inc de
ld [hl], a ld [hl], a
.asm_706cd .skipCopyingCoords
ld a, [wFlyAnimCounter] ld a, [wFlyAnimCounter]
dec a dec a
ld [wFlyAnimCounter], a ld [wFlyAnimCounter], a
@ -252,22 +252,23 @@ LoadBirdSpriteGraphics: ; 706d7 (1c:46d7)
ld hl, vNPCSprites ld hl, vNPCSprites
ld bc, (BANK(BirdSprite) << 8) + $0c ld bc, (BANK(BirdSprite) << 8) + $0c
call CopyVideoData call CopyVideoData
ld de, BirdSprite + $c0 ; moving amination sprite ld de, BirdSprite + $c0 ; moving animation sprite
ld hl, vNPCSprites2 ld hl, vNPCSprites2
ld bc, (BANK(BirdSprite) << 8) + $0c ld bc, (BANK(BirdSprite) << 8) + $0c
jp CopyVideoData jp CopyVideoData
InitFacingDirectionBuffer: ; 706ef (1c:46ef) InitFacingDirectionList: ; 706ef (1c:46ef)
ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images) ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images)
ld [wcd50], a ld [wSavedPlayerFacingDirection], a
ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position
ld [wcd4f], a ld [wSavedPlayerScreenY], a
ld hl, PlayerSpinningFacingOrder ld hl, PlayerSpinningFacingOrder
ld de, wcd48 ld de, wFacingDirectionList
ld bc, $4 ld bc, 4
call CopyData call CopyData
ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images) ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images)
ld hl, wcd48 ld hl, wFacingDirectionList
; find the place in the list that matches the current facing direction
.loop .loop
cp [hl] cp [hl]
inc hl inc hl
@ -281,15 +282,16 @@ PlayerSpinningFacingOrder: ; 70713 (1c:4713)
db SPRITE_FACING_DOWN, SPRITE_FACING_LEFT, SPRITE_FACING_UP, SPRITE_FACING_RIGHT db SPRITE_FACING_DOWN, SPRITE_FACING_LEFT, SPRITE_FACING_UP, SPRITE_FACING_RIGHT
SpinPlayerSprite: ; 70717 (1c:4717) SpinPlayerSprite: ; 70717 (1c:4717)
; copy the current value from the list into the sprite data and rotate the list
ld a, [hl] ld a, [hl]
ld [wSpriteStateData1 + 2], a ; player's sprite facing direction (image index is locked to standing images) ld [wSpriteStateData1 + 2], a ; player's sprite facing direction (image index is locked to standing images)
push hl push hl
ld hl, wcd48 ld hl, wFacingDirectionList
ld de, wcd47 ld de, wFacingDirectionList - 1
ld bc, $4 ld bc, 4
call CopyData call CopyData
ld a, [wcd47] ld a, [wFacingDirectionList - 1]
ld [wcd4b], a ld [wFacingDirectionList + 3], a
pop hl pop hl
ret ret
@ -298,11 +300,12 @@ PlayerSpinInPlace: ; 70730 (1c:4730)
ld a, [wPlayerSpinInPlaceAnimFrameDelay] ld a, [wPlayerSpinInPlaceAnimFrameDelay]
ld c, a ld c, a
and $3 and $3
jr nz, .asm_70743 jr nz, .skipPlayingSound
; when the last delay was a multiple of 4, play a sound if there is one
ld a, [wPlayerSpinInPlaceAnimSoundID] ld a, [wPlayerSpinInPlaceAnimSoundID]
cp $ff cp $ff
call nz, PlaySound call nz, PlaySound
.asm_70743 .skipPlayingSound
ld a, [wPlayerSpinInPlaceAnimFrameDelayDelta] ld a, [wPlayerSpinInPlaceAnimFrameDelayDelta]
add c add c
ld [wPlayerSpinInPlaceAnimFrameDelay], a ld [wPlayerSpinInPlaceAnimFrameDelay], a
@ -330,9 +333,9 @@ PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755)
jr PlayerSpinWhileMovingUpOrDown jr PlayerSpinWhileMovingUpOrDown
RestoreFacingDirectionAndYScreenPos: ; 70772 (1c:4772) RestoreFacingDirectionAndYScreenPos: ; 70772 (1c:4772)
ld a, [wcd4f] ld a, [wSavedPlayerScreenY]
ld [wSpriteStateData1 + 4], a ld [wSpriteStateData1 + 4], a
ld a, [wcd50] ld a, [wSavedPlayerFacingDirection]
ld [wSpriteStateData1 + 2], a ld [wSpriteStateData1 + 2], a
ret ret
@ -378,11 +381,11 @@ IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787)
db INTERIOR, $55, 1 ; warp pad db INTERIOR, $55, 1 ; warp pad
db $FF db $FF
Func_707b6: ; 707b6 (1c:47b6) FishingAnim: ; 707b6 (1c:47b6)
ld c, 10 ld c, 10
call DelayFrames call DelayFrames
ld hl, wd736 ld hl, wd736
set 6, [hl] set 6, [hl] ; reserve the last 4 OAM entries
ld de, RedSprite ld de, RedSprite
ld hl, vNPCSprites ld hl, vNPCSprites
ld bc, (BANK(RedSprite) << 8) + $0c ld bc, (BANK(RedSprite) << 8) + $0c
@ -393,55 +396,67 @@ Func_707b6: ; 707b6 (1c:47b6)
ld a, [wSpriteStateData1 + 2] ld a, [wSpriteStateData1 + 2]
ld c, a ld c, a
ld b, $0 ld b, $0
ld hl, FishingRodGfxProperties ld hl, FishingRodOAM
add hl, bc add hl, bc
ld de, wOAMBuffer + $9c ld de, wOAMBuffer + $9c
ld bc, $4 ld bc, $4
call CopyData call CopyData
ld c, 100 ld c, 100
call DelayFrames call DelayFrames
ld a, [wWhichTrade] ld a, [wRodResponse]
and a and a
ld hl, NoNibbleText ld hl, NoNibbleText
jr z, .asm_70836 jr z, .done
cp $2 cp $2
ld hl, NothingHereText ld hl, NothingHereText
jr z, .asm_70836 jr z, .done
ld b, $a
.asm_707fe ; there was a bite
ld hl, wSpriteStateData1 + 4
call Func_70842 ; shake the player's sprite vertically
ld b, 10
.loop
ld hl, wSpriteStateData1 + 4 ; player's sprite Y screen position
call .ShakePlayerSprite
ld hl, wOAMBuffer + $9c ld hl, wOAMBuffer + $9c
call Func_70842 call .ShakePlayerSprite
call Delay3 call Delay3
dec b dec b
jr nz, .asm_707fe jr nz, .loop
ld a, [wSpriteStateData1 + 2]
cp $4 ; If the player is facing up, hide the fishing rod so it doesn't overlap with
jr nz, .asm_7081c ; the exclamation bubble that will be shown next.
ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction
cp SPRITE_FACING_UP
jr nz, .skipHidingFishingRod
ld a, $a0 ld a, $a0
ld [wOAMBuffer + $9c], a ld [wOAMBuffer + $9c], a
.asm_7081c
ld hl, wcd4f .skipHidingFishingRod
ld hl, wEmotionBubbleSpriteIndex
xor a xor a
ld [hli], a ld [hli], a ; player's sprite
ld [hl], a ld [hl], a ; EXCLAMATION_BUBBLE
predef EmotionBubble predef EmotionBubble
ld a, [wSpriteStateData1 + 2]
cp $4 ; If the player is facing up, unhide the fishing rod.
jr nz, .asm_70833 ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction
cp SPRITE_FACING_UP
jr nz, .skipUnhidingFishingRod
ld a, $44 ld a, $44
ld [wOAMBuffer + $9c], a ld [wOAMBuffer + $9c], a
.asm_70833
.skipUnhidingFishingRod
ld hl, ItsABiteText ld hl, ItsABiteText
.asm_70836
.done
call PrintText call PrintText
ld hl, wd736 ld hl, wd736
res 6, [hl] res 6, [hl] ; unreserve the last 4 OAM entries
call LoadFontTilePatterns call LoadFontTilePatterns
ret ret
Func_70842: ; 70842 (1c:4842) .ShakePlayerSprite
ld a, [hl] ld a, [hl]
xor $1 xor $1
ld [hl], a ld [hl], a
@ -459,7 +474,7 @@ ItsABiteText: ; 70851 (1c:4851)
TX_FAR _ItsABiteText TX_FAR _ItsABiteText
db "@" db "@"
FishingRodGfxProperties: ; 70856 (1c:4856) FishingRodOAM: ; 70856 (1c:4856)
; specifies how the fishing rod should be drawn on the screen ; specifies how the fishing rod should be drawn on the screen
; first byte = screen y coordinate ; first byte = screen y coordinate
; second byte = screen x coordinate ; second byte = screen x coordinate

View file

@ -1,6 +1,6 @@
AnimateBoulderDust: ; 79f54 (1e:5f54) AnimateBoulderDust: ; 79f54 (1e:5f54)
ld a, $1 ld a, $1
ld [wcd50], a ; select the boulder dust offsets ld [wWhichAnimationOffsets], a ; select the boulder dust offsets
ld a, [wUpdateSpritesEnabled] ld a, [wUpdateSpritesEnabled]
push af push af
ld a, $ff ld a, $ff

View file

@ -2350,9 +2350,9 @@ CheckFightingMapTrainers:: ; 3219 (0:3219)
.trainerEngaging .trainerEngaging
ld hl, W_FLAGS_D733 ld hl, W_FLAGS_D733
set 3, [hl] set 3, [hl]
ld [wcd4f], a ld [wEmotionBubbleSpriteIndex], a
xor a xor a ; EXCLAMATION_BUBBLE
ld [wcd50], a ld [wWhichEmotionBubble], a
predef EmotionBubble predef EmotionBubble
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a ld [wJoyIgnore], a

View file

@ -2973,20 +2973,20 @@ DrawBadges: ; ea03 (3:6a03)
; Instead of removing relevant code, the name graphics were erased. ; Instead of removing relevant code, the name graphics were erased.
; Tile ids for face/badge graphics. ; Tile ids for face/badge graphics.
ld de, wTrainerFacingDirection ld de, wBadgeOrFaceTiles
ld hl, .FaceBadgeTiles ld hl, .FaceBadgeTiles
ld bc, 8 ld bc, 8
call CopyData call CopyData
; Booleans for each badge. ; Booleans for each badge.
ld hl, wcd49 ld hl, wTempObtainedBadgesBooleans
ld bc, 8 ld bc, 8
xor a xor a
call FillMemory call FillMemory
; Alter these based on owned badges. ; Alter these based on owned badges.
ld de, wcd49 ld de, wTempObtainedBadgesBooleans
ld hl, wTrainerFacingDirection ld hl, wBadgeOrFaceTiles
ld a, [W_OBTAINEDBADGES] ld a, [W_OBTAINEDBADGES]
ld b, a ld b, a
ld c, 8 ld c, 8
@ -3005,17 +3005,17 @@ DrawBadges: ; ea03 (3:6a03)
jr nz, .CheckBadge jr nz, .CheckBadge
; Draw two rows of badges. ; Draw two rows of badges.
ld hl, wWhichTrade ld hl, wBadgeNumberTile
ld a, $d8 ; [1] ld a, $d8 ; [1]
ld [hli], a ld [hli], a
ld [hl], $60 ; First name ld [hl], $60 ; First name
hlCoord 2, 11 hlCoord 2, 11
ld de, wcd49 ld de, wTempObtainedBadgesBooleans
call .DrawBadgeRow call .DrawBadgeRow
hlCoord 2, 14 hlCoord 2, 14
ld de, wcd49 + 4 ld de, wTempObtainedBadgesBooleans + 4
; call .DrawBadgeRow ; call .DrawBadgeRow
; ret ; ret
@ -3028,15 +3028,15 @@ DrawBadges: ; ea03 (3:6a03)
push hl push hl
; Badge no. ; Badge no.
ld a, [wWhichTrade] ld a, [wBadgeNumberTile]
ld [hli], a ld [hli], a
inc a inc a
ld [wWhichTrade], a ld [wBadgeNumberTile], a
; Names aren't printed if the badge is owned. ; Names aren't printed if the badge is owned.
ld a, [de] ld a, [de]
and a and a
ld a, [wTrainerEngageDistance] ld a, [wBadgeNameTile]
jr nz, .SkipName jr nz, .SkipName
call .PlaceTiles call .PlaceTiles
jr .PlaceBadge jr .PlaceBadge
@ -3047,18 +3047,18 @@ DrawBadges: ; ea03 (3:6a03)
inc hl inc hl
.PlaceBadge .PlaceBadge
ld [wTrainerEngageDistance], a ld [wBadgeNameTile], a
ld de, 20 - 1 ld de, SCREEN_WIDTH - 1
add hl, de add hl, de
ld a, [wTrainerFacingDirection] ld a, [wBadgeOrFaceTiles]
call .PlaceTiles call .PlaceTiles
add hl, de add hl, de
call .PlaceTiles call .PlaceTiles
; Shift badge array back one byte. ; Shift badge array back one byte.
push bc push bc
ld hl, wTrainerFacingDirection + 1 ld hl, wBadgeOrFaceTiles + 1
ld de, wTrainerFacingDirection ld de, wBadgeOrFaceTiles
ld bc, 8 ld bc, 8
call CopyData call CopyData
pop bc pop bc

View file

@ -186,9 +186,9 @@ OakAppearsText: ; 18fb0 (6:4fb0)
ld c,10 ld c,10
call DelayFrames call DelayFrames
xor a xor a
ld [wcd4f],a ld [wEmotionBubbleSpriteIndex],a ; player's sprite
ld [wcd50],a ld [wWhichEmotionBubble],a ; EXCLAMATION_BUBBLE
predef EmotionBubble ; display ! over head predef EmotionBubble
ld a,4 ld a,4
ld [wd528],a ld [wd528],a
jp TextScriptEnd jp TextScriptEnd

View file

@ -79,9 +79,9 @@ Route22Script0: ; 50f00 (14:4f00)
.firstRivalBattle .firstRivalBattle
ld a, $1 ld a, $1
ld [wcd4f], a ld [wEmotionBubbleSpriteIndex], a
xor a xor a ; EXCLAMATION_BUBBLE
ld [wcd50], a ld [wWhichEmotionBubble], a
predef EmotionBubble predef EmotionBubble
ld a, [wWalkBikeSurfState] ld a, [wWalkBikeSurfState]
and a and a
@ -218,9 +218,9 @@ Route22Script3: ; 5102a (14:502a)
Route22Script_5104e: ; 5104e (14:504e) Route22Script_5104e: ; 5104e (14:504e)
ld a, $2 ld a, $2
ld [wcd4f], a ld [wEmotionBubbleSpriteIndex], a
xor a xor a ; EXCLAMATION_BUBBLE
ld [wcd50], a ld [wWhichEmotionBubble], a
predef EmotionBubble predef EmotionBubble
ld a, [wWalkBikeSurfState] ld a, [wWalkBikeSurfState]
and a and a

View file

@ -601,6 +601,14 @@ wOverrideSimulatedJoypadStatesMask:: ; cd3b
ds 1 ds 1
wBadgeNumberTile:: ; cd3d
; tile ID of the badge number being drawn
wRodResponse:: ; cd3d
; 0 = no bite
; 1 = bite
; 2 = no fish on map
wWhichTownMapLocation:: ; cd3d wWhichTownMapLocation:: ; cd3d
wStoppingWhichSlotMachineWheel:: ; cd3d wStoppingWhichSlotMachineWheel:: ; cd3d
@ -630,6 +638,9 @@ wWhichTrade:: ; cd3d
wTrainerSpriteOffset:: ; cd3d wTrainerSpriteOffset:: ; cd3d
ds 1 ds 1
wBadgeNameTile:: ; cd3e
; first tile ID of the name being drawn
wFlyLocationsList:: ; cd3e wFlyLocationsList:: ; cd3e
; 11 bytes plus $ff sentinel values at each end ; 11 bytes plus $ff sentinel values at each end
@ -650,6 +661,11 @@ wHiddenObjectFunctionRomBank:: ; cd3e
wTrainerEngageDistance:: ; cd3e wTrainerEngageDistance:: ; cd3e
ds 1 ds 1
wBadgeOrFaceTiles:: ; cd3f
; 8 bytes
; a list of the first tile IDs of each badge or face (depending on whether the
; badge is owned) to be drawn on the trainer screen
wSlotMachineWheel2Offset:: ; cd3f wSlotMachineWheel2Offset:: ; cd3f
wNameOfPlayerMonToBeTraded:: ; cd3f wNameOfPlayerMonToBeTraded:: ; cd3f
@ -709,17 +725,27 @@ wTempCoins1:: ; cd46
wSlotMachineWheel2TopTile:: ; cd46 wSlotMachineWheel2TopTile:: ; cd46
ds 1 ds 1
wSlotMachineWheel3BottomTile:: ; cd47 wBattleTransitionSpiralDirection:: ; cd47
; 0 = outward, 1 = inward
wcd47:: ds 1 ; used in slot machine and spinning player sprite wSlotMachineWheel3BottomTile:: ; cd47
ds 1
wSlotMachineWheel3MiddleTile:: ; cd48 wSlotMachineWheel3MiddleTile:: ; cd48
wcd48:: ds 1 ; same as above wFacingDirectionList:: ; cd48
; 4 bytes (also, the byte before the start of the list (cd47) is used a temp
; variable when the list is rotated)
; used when spinning the player's sprite
ds 1
wSlotMachineWheel3TopTile:: ; cd49 wSlotMachineWheel3TopTile:: ; cd49
wcd49:: ds 1 ; used in slot machine, displaying the gym leaders/badges on the trainer card, and displaying the town map wTempObtainedBadgesBooleans::
; 8 bytes
; temporary list created when displaying the badges on the trainer screen
; one byte for each badge; 0 = not obtained, 1 = obtained
ds 1
wTempCoins2:: ; cd4a wTempCoins2:: ; cd4a
; 2 bytes ; 2 bytes
@ -727,11 +753,7 @@ wTempCoins2:: ; cd4a
wPayoutCoins:: ; cd4a wPayoutCoins:: ; cd4a
; 2 bytes ; 2 bytes
ds 1 ds 2
wcd4b:: ; cd4b
; used in player animations
ds 1
wTradedPlayerMonOTID:: ; cd4c wTradedPlayerMonOTID:: ; cd4c
@ -750,19 +772,28 @@ wSlotMachineWheel2SlipCounter:: ; cd4e
; wheel 2 can "slip" while this is non-zero ; wheel 2 can "slip" while this is non-zero
wTradedEnemyMonOT:: ; cd4e wTradedEnemyMonOT:: ; cd4e
ds 1
wcd4e:: ds 1 ; used with in-game trades and slot machine wSavedPlayerScreenY:: ; cd4f
wSlotMachineRerollCounter:: ; cd4f wSlotMachineRerollCounter:: ; cd4f
; The remaining number of times wheel 3 will roll down a symbol until a match is ; The remaining number of times wheel 3 will roll down a symbol until a match is
; found, when winning is enabled. It's initialized to 4 each bet. ; found, when winning is enabled. It's initialized to 4 each bet.
wcd4f:: ds 1 ; used with in-game trades, emotion bubbles, and player animations wEmotionBubbleSpriteIndex:: ; cd4f
; the index of the sprite the emotion bubble is to be displayed above
ds 1
wWhichEmotionBubble:: ; cd50
wSlotMachineBet:: ; cd50 wSlotMachineBet:: ; cd50
; how many coins the player bet on the slot machine (1 to 3) ; how many coins the player bet on the slot machine (1 to 3)
wcd50:: ds 9 ; used with in-game trades, emotion bubbles, and player and miscellaneous sprite animations wSavedPlayerFacingDirection:: ; cd50
wWhichAnimationOffsets:: ; cd50
; 0 = cut animation, 1 = boulder dust animation
ds 9
wTradedEnemyMonOTID:: ; cd59 wTradedEnemyMonOTID:: ; cd59
ds 2 ds 2
@ -2219,7 +2250,7 @@ wd736:: ; d736
; bit 0: check if the player is standing on a door and make him walk down a step if so ; bit 0: check if the player is standing on a door and make him walk down a step if so
; bit 1: the player is currently stepping down from a door ; bit 1: the player is currently stepping down from a door
; bit 2: standing on a warp ; bit 2: standing on a warp
; bit 6: jumping down a ledge ; bit 6: jumping down a ledge / fishing animation
ds 1 ds 1
wCompletedInGameTradeFlags:: ; d737 wCompletedInGameTradeFlags:: ; d737