clean up wram aliases

This commit is contained in:
YamaArashi 2015-07-23 06:07:12 -07:00
parent c34156c5fb
commit 04a6c306dc
11 changed files with 124 additions and 93 deletions

View file

@ -1,5 +1,5 @@
BattleTransition: ; 7096d (1c:496d) BattleTransition: ; 7096d (1c:496d)
ld a, $1 ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
call Delay3 call Delay3
xor a xor a
@ -7,10 +7,13 @@ BattleTransition: ; 7096d (1c:496d)
dec a dec a
ld [wUpdateSpritesEnabled], a ld [wUpdateSpritesEnabled], a
call DelayFrame call DelayFrame
; Determine which OAM block is being used by the enemy trainer sprite (if there
; is one).
ld hl, wSpriteStateData1 + 2 ld hl, wSpriteStateData1 + 2
ld a, [H_DOWNARROWBLINKCNT2] ld a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle)
ld c, a ld c, a
ld b, $0 ld b, 0
ld de, $10 ld de, $10
.loop1 .loop1
ld a, [hl] ld a, [hl]
@ -21,13 +24,15 @@ BattleTransition: ; 7096d (1c:496d)
add hl, de add hl, de
dec c dec c
jr nz, .loop1 jr nz, .loop1
; Clear OAM except for the blocks used by the player and enemy trainer sprites.
ld hl, wOAMBuffer + $10 ld hl, wOAMBuffer + $10
ld c, $9 ld c, 9
.loop2 .loop2
ld a, b ld a, b
swap a swap a
cp l cp l
jr z, .skip2 jr z, .skip2 ; skip clearing the block if the enemy trainer is using it
push hl push hl
push bc push bc
ld bc, $10 ld bc, $10
@ -40,9 +45,10 @@ BattleTransition: ; 7096d (1c:496d)
add hl, de add hl, de
dec c dec c
jr nz, .loop2 jr nz, .loop2
call Delay3 call Delay3
call LoadBattleTransitionTile call LoadBattleTransitionTile
ld bc, $0 ld bc, 0
ld a, [wLinkState] ld a, [wLinkState]
cp LINK_STATE_BATTLING cp LINK_STATE_BATTLING
jr z, .linkBattle jr z, .linkBattle
@ -103,7 +109,7 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
sub e sub e
jr nc, .highLevelEnemy jr nc, .highLevelEnemy
res 1, c res 1, c
ld a, $1 ld a, 1
ld [wBattleTransitionSpiralDirection], a ld [wBattleTransitionSpiralDirection], a
ret ret
.highLevelEnemy .highLevelEnemy
@ -229,10 +235,10 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72)
ret ret
BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa) BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
ld a, $7 ld a, 7
ld [wWhichTrade], a ld [wInwardSpiralUpdateScreenCounter], a
coord hl, 0, 0 coord hl, 0, 0
ld c, $11 ld c, SCREEN_HEIGHT - 1
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
call BattleTransition_InwardSpiral_ call BattleTransition_InwardSpiral_
inc c inc c
@ -242,7 +248,7 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
call BattleTransition_InwardSpiral_ call BattleTransition_InwardSpiral_
.skip .skip
inc c inc c
ld de, $1 ld de, 1
call BattleTransition_InwardSpiral_ call BattleTransition_InwardSpiral_
dec c dec c
dec c dec c
@ -264,13 +270,13 @@ BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
ld [hl], $ff ld [hl], $ff
add hl, de add hl, de
push bc push bc
ld a, [wWhichTrade] ld a, [wInwardSpiralUpdateScreenCounter]
dec a dec a
jr nz, .skip jr nz, .skip
call BattleTransition_TransferDelay3 call BattleTransition_TransferDelay3
ld a, $7 ld a, 7
.skip .skip
ld [wWhichTrade], a ld [wInwardSpiralUpdateScreenCounter], a
pop bc pop bc
dec c dec c
jr nz, .loop jr nz, .loop
@ -385,7 +391,7 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f)
call BattleTransition_CopyTiles2 call BattleTransition_CopyTiles2
coord hl, 11, 0 coord hl, 11, 0
coord de, 10, 0 coord de, 10, 0
ld bc, $2 ld bc, 2
call BattleTransition_CopyTiles2 call BattleTransition_CopyTiles2
ld a, $1 ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
@ -419,7 +425,7 @@ BattleTransition_Split: ; 70bca (1c:4bca)
call BattleTransition_CopyTiles2 call BattleTransition_CopyTiles2
coord hl, 1, 0 coord hl, 1, 0
coord de, 0, 0 coord de, 0, 0
ld bc, $2 ld bc, 2
call BattleTransition_CopyTiles2 call BattleTransition_CopyTiles2
call BattleTransition_TransferDelay3 call BattleTransition_TransferDelay3
call Delay3 call Delay3
@ -432,10 +438,10 @@ BattleTransition_Split: ; 70bca (1c:4bca)
BattleTransition_CopyTiles1: ; 70c12 (1c:4c12) BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
ld a, c ld a, c
ld [wWhichTrade], a ld [wBattleTransitionCopyTilesOffset], a
ld a, b ld a, b
ld [wTrainerEngageDistance], a ld [wBattleTransitionCopyTilesOffset + 1], a
ld c, $8 ld c, 8
.loop1 .loop1
push bc push bc
push hl push hl
@ -444,9 +450,9 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
call CopyData call CopyData
pop hl pop hl
pop de pop de
ld a, [wWhichTrade] ld a, [wBattleTransitionCopyTilesOffset]
ld c, a ld c, a
ld a, [wTrainerEngageDistance] ld a, [wBattleTransitionCopyTilesOffset + 1]
ld b, a ld b, a
add hl, bc add hl, bc
pop bc pop bc
@ -464,9 +470,9 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f) BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
ld a, c ld a, c
ld [wWhichTrade], a ld [wBattleTransitionCopyTilesOffset], a
ld a, b ld a, b
ld [wTrainerEngageDistance], a ld [wBattleTransitionCopyTilesOffset + 1], a
ld c, SCREEN_HEIGHT / 2 ld c, SCREEN_HEIGHT / 2
.loop1 .loop1
push bc push bc
@ -492,9 +498,9 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
jr nz, .loop2 jr nz, .loop2
pop hl pop hl
pop de pop de
ld a, [wWhichTrade] ld a, [wBattleTransitionCopyTilesOffset]
ld c, a ld c, a
ld a, [wTrainerEngageDistance] ld a, [wBattleTransitionCopyTilesOffset + 1]
ld b, a ld b, a
add hl, bc add hl, bc
pop bc pop bc
@ -590,11 +596,11 @@ BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
; by animating each half circle one at a time ; by animating each half circle one at a time
BattleTransition_Circle: ; 70ce4 (1c:4ce4) BattleTransition_Circle: ; 70ce4 (1c:4ce4)
call BattleTransition_FlashScreen call BattleTransition_FlashScreen
ld bc, SCREEN_WIDTH / 2 lb bc, 0, SCREEN_WIDTH / 2
ld hl, BattleTransition_HalfCircle1 ld hl, BattleTransition_HalfCircle1
call BattleTransition_Circle_Sub1 call BattleTransition_Circle_Sub1
ld c, SCREEN_WIDTH / 2 ld c, SCREEN_WIDTH / 2
ld b, $1 ld b, 1
ld hl, BattleTransition_HalfCircle2 ld hl, BattleTransition_HalfCircle2
call BattleTransition_Circle_Sub1 call BattleTransition_Circle_Sub1
jp BattleTransition_BlackScreen jp BattleTransition_BlackScreen
@ -612,7 +618,7 @@ BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
ld a, b ld a, b
call BattleTransition_Circle_Sub2 call BattleTransition_Circle_Sub2
pop hl pop hl
ld bc, $0005 ld bc, 5
add hl, bc add hl, bc
call BattleTransition_TransferDelay3 call BattleTransition_TransferDelay3
pop bc pop bc
@ -621,7 +627,7 @@ BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
ret ret
BattleTransition_TransferDelay3: ; 70d19 (1c:4d19) BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
ld a, $1 ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
call Delay3 call Delay3
xor a xor a
@ -647,7 +653,7 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
ld a, $1 ld a, $1
call BattleTransition_Circle_Sub2 call BattleTransition_Circle_Sub2
pop hl pop hl
ld bc, $5 ld bc, 5
add hl, bc add hl, bc
ld e, l ld e, l
ld d, h ld d, h
@ -660,9 +666,9 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
jp BattleTransition_BlackScreen jp BattleTransition_BlackScreen
BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50) BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
ld [wWhichTrade], a ld [wBattleTransitionCircleScreenQuadrantY], a
ld a, [hli] ld a, [hli]
ld [wTrainerEngageDistance], a ld [wBattleTransitionCircleScreenQuadrantX], a
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hli] ld a, [hli]
@ -761,7 +767,7 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
inc de inc de
.loop1 .loop1
ld [hl], $ff ld [hl], $ff
ld a, [wTrainerEngageDistance] ld a, [wBattleTransitionCircleScreenQuadrantX]
and a and a
jr z, .skip1 jr z, .skip1
inc hl inc hl
@ -772,7 +778,7 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
dec c dec c
jr nz, .loop1 jr nz, .loop1
pop hl pop hl
ld a, [wWhichTrade] ld a, [wBattleTransitionCircleScreenQuadrantY]
and a and a
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
jr z, .skip3 jr z, .skip3
@ -787,7 +793,7 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
jr z, BattleTransition_Circle_Sub3 jr z, BattleTransition_Circle_Sub3
ld c, a ld c, a
.loop2 .loop2
ld a, [wTrainerEngageDistance] ld a, [wBattleTransitionCircleScreenQuadrantX]
and a and a
jr z, .skip4 jr z, .skip4
dec hl dec hl

View file

@ -6,7 +6,7 @@ DrawAllPokeballs: ; 3a849 (e:6849)
ret z ; return if wild pokémon ret z ; return if wild pokémon
jp SetupEnemyPartyPokeballs jp SetupEnemyPartyPokeballs
DrawEnemyPokeballs: ; 0x3a857 DrawEnemyPokeballs: ; 3a857 (e:6857)
call LoadPartyPokeballGfx call LoadPartyPokeballGfx
jp SetupEnemyPartyPokeballs jp SetupEnemyPartyPokeballs
@ -25,8 +25,8 @@ SetupOwnPartyPokeballs: ; 3a869 (e:6869)
ld hl, W_BASECOORDX ld hl, W_BASECOORDX
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
ld a, $8 ld a, 8
ld [wTrainerEngageDistance], a ld [wHUDPokeballGfxOffsetX], a
ld hl, wOAMBuffer ld hl, wOAMBuffer
jp WritePokeballOAMData jp WritePokeballOAMData
@ -39,8 +39,8 @@ SetupEnemyPartyPokeballs: ; 3a887 (e:6887)
ld a, $48 ld a, $48
ld [hli], a ld [hli], a
ld [hl], $20 ld [hl], $20
ld a, $f8 ld a, -8
ld [wTrainerEngageDistance], a ld [wHUDPokeballGfxOffsetX], a
ld hl, wOAMBuffer + PARTY_LENGTH * 4 ld hl, wOAMBuffer + PARTY_LENGTH * 4
jp WritePokeballOAMData jp WritePokeballOAMData
@ -90,8 +90,8 @@ PickPokeball: ; 3a8c2 (e:68c2)
.done .done
ld a, b ld a, b
ld [de], a ld [de], a
ld bc, $0028 ; rest of mon struct ld bc, wPartyMon2 - wPartyMon1Status
add hl, bc add hl, bc ; next mon struct
ret ret
WritePokeballOAMData: ; 3a8e1 (e:68e1) WritePokeballOAMData: ; 3a8e1 (e:68e1)
@ -108,7 +108,7 @@ WritePokeballOAMData: ; 3a8e1 (e:68e1)
ld [hli], a ld [hli], a
ld a, [W_BASECOORDX] ld a, [W_BASECOORDX]
ld b, a ld b, a
ld a, [wTrainerEngageDistance] ld a, [wHUDPokeballGfxOffsetX]
add b add b
ld [W_BASECOORDX], a ld [W_BASECOORDX], a
inc de inc de
@ -118,11 +118,11 @@ WritePokeballOAMData: ; 3a8e1 (e:68e1)
PlacePlayerHUDTiles: ; 3a902 (e:6902) PlacePlayerHUDTiles: ; 3a902 (e:6902)
ld hl, PlayerBattleHUDGraphicsTiles ld hl, PlayerBattleHUDGraphicsTiles
ld de, wTrainerFacingDirection ld de, wHUDGraphicsTiles
ld bc, $3 ld bc, $3
call CopyData call CopyData
coord hl, 18, 10 coord hl, 18, 10
ld de, rIE ld de, -1
jr PlaceHUDTiles jr PlaceHUDTiles
PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916) PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916)
@ -133,7 +133,7 @@ PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916)
PlaceEnemyHUDTiles: ; 3a919 (e:6919) PlaceEnemyHUDTiles: ; 3a919 (e:6919)
ld hl, EnemyBattleHUDGraphicsTiles ld hl, EnemyBattleHUDGraphicsTiles
ld de, wTrainerFacingDirection ld de, wHUDGraphicsTiles
ld bc, $3 ld bc, $3
call CopyData call CopyData
coord hl, 1, 2 coord hl, 1, 2
@ -150,16 +150,16 @@ PlaceHUDTiles: ; 3a930 (e:6930)
ld [hl], $73 ld [hl], $73
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
add hl, bc add hl, bc
ld a, [wTrainerScreenY] ld a, [wHUDGraphicsTiles + 1] ; leftmost tile
ld [hl], a ld [hl], a
ld a, $8 ld a, 8
.asm_3a93c .loop
add hl, de add hl, de
ld [hl], $76 ld [hl], $76
dec a dec a
jr nz, .asm_3a93c jr nz, .loop
add hl, de add hl, de
ld a, [wTrainerScreenX] ld a, [wHUDGraphicsTiles + 2] ; rightmost tile
ld [hl], a ld [hl], a
ret ret
@ -172,8 +172,8 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
ld a, $50 ld a, $50
ld [hli], a ld [hli], a
ld [hl], $40 ld [hl], $40
ld a, $8 ld a, 8
ld [wTrainerEngageDistance], a ld [wHUDPokeballGfxOffsetX], a
ld hl, wOAMBuffer ld hl, wOAMBuffer
call WritePokeballOAMData call WritePokeballOAMData
ld hl, wEnemyMons ld hl, wEnemyMons

View file

@ -455,7 +455,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a)
ld [wLastMenuItem],a ld [wLastMenuItem],a
inc a inc a
ld [wLetterPrintingDelayFlags],a ld [wLetterPrintingDelayFlags],a
ld [wTrainerScreenY],a ld [wUnusedCD40],a
ld a,3 ; text speed cursor Y coordinate ld a,3 ; text speed cursor Y coordinate
ld [wTopMenuItemY],a ld [wTopMenuItemY],a
call SetCursorPositionsFromOptions call SetCursorPositionsFromOptions

View file

@ -29,7 +29,7 @@ FoundHiddenItemText: ; 7675b (1d:675b)
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, wObtainedHiddenItemsFlags ld hl, wObtainedHiddenItemsFlags
ld a, [wTrainerScreenX] ld a, [wHiddenItemOrCoinsIndex]
ld c, a ld c, a
ld b, FLAG_SET ld b, FLAG_SET
predef FlagActionPredef predef FlagActionPredef
@ -100,7 +100,7 @@ HiddenCoins: ; 76799 (1d:6799)
ld c, $2 ld c, $2
predef AddBCDPredef predef AddBCDPredef
ld hl, wObtainedHiddenCoinsFlags ld hl, wObtainedHiddenCoinsFlags
ld a, [wTrainerScreenX] ld a, [wHiddenItemOrCoinsIndex]
ld c, a ld c, a
ld b, FLAG_SET ld b, FLAG_SET
predef FlagActionPredef predef FlagActionPredef

View file

@ -256,7 +256,7 @@ ReadTrainerScreenPosition: ; 5698e (15:698e)
; a: distance player to sprite ; a: distance player to sprite
CheckSpriteCanSeePlayer: ; 569af (15:69af) CheckSpriteCanSeePlayer: ; 569af (15:69af)
ld b, a ld b, a
ld a, [wTrainerEngageDistance] ; sprite line of sight (engage distance) ld a, [wTrainerEngageDistance] ; how far the trainer can see
cp b cp b
jr nc, .checkIfLinedUp jr nc, .checkIfLinedUp
jr .notInLine ; player too far away jr .notInLine ; player too far away

View file

@ -2052,7 +2052,7 @@ INCLUDE "data/map_songs.asm"
INCLUDE "data/map_header_banks.asm" INCLUDE "data/map_header_banks.asm"
ClearVariablesAfterLoadingMapData: ; c335 (3:4335) ClearVariablesAfterLoadingMapData: ; c335 (3:4335)
ld a, $90 ld a, SCREEN_HEIGHT_PIXELS
ld [hWY], a ld [hWY], a
ld [rWY], a ld [rWY], a
xor a xor a

View file

@ -103,21 +103,21 @@ DayCareMText1: ; 56254 (15:6254)
ld a, [wPartyCount] ld a, [wPartyCount]
cp PARTY_LENGTH cp PARTY_LENGTH
ld hl, DayCareNoRoomForMonText ld hl, DayCareNoRoomForMonText
jp z, .asm_56403 jp z, .leaveMonInDayCare
ld de, wTrainerFacingDirection ld de, wDayCareTotalCost
xor a xor a
ld [de], a ld [de], a
inc de inc de
ld [de], a ld [de], a
ld hl, wTrainerScreenX ld hl, wDayCarePerLevelCost
ld a, $1 ld a, $1
ld [hli], a ld [hli], a
ld [hl], $0 ld [hl], $0
ld a, [wDayCareNumLevelsGrown] ld a, [wDayCareNumLevelsGrown]
inc a inc a
ld b, a ld b, a
ld c, $2 ld c, 2
.asm_56357 .calcPriceLoop
push hl push hl
push de push de
push bc push bc
@ -126,29 +126,29 @@ DayCareMText1: ; 56254 (15:6254)
pop de pop de
pop hl pop hl
dec b dec b
jr nz, .asm_56357 jr nz, .calcPriceLoop
ld hl, DayCareOweMoneyText ld hl, DayCareOweMoneyText
call PrintText call PrintText
ld a, $13 ld a, MONEY_BOX
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
call YesNoChoice call YesNoChoice
ld hl, DayCareAllRightThenText ld hl, DayCareAllRightThenText
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jp nz, .asm_56403 jp nz, .leaveMonInDayCare
ld hl, wTrainerFacingDirection ld hl, wDayCareTotalCost
ld [hMoney], a ld [hMoney], a
ld a, [hli] ld a, [hli]
ld [hMoney + 1], a ld [hMoney + 1], a
ld a, [hl] ld a, [hl]
ld [hMoney + 2], a ld [hMoney + 2], a
call HasEnoughMoney call HasEnoughMoney
jr nc, .asm_56396 jr nc, .enoughMoney
ld hl, DayCareNotEnoughMoneyText ld hl, DayCareNotEnoughMoneyText
jp .asm_56403 jp .leaveMonInDayCare
.asm_56396 .enoughMoney
xor a xor a
ld [W_DAYCARE_IN_USE], a ld [W_DAYCARE_IN_USE], a
ld hl, wDayCareNumLevelsGrown ld hl, wDayCareNumLevelsGrown
@ -202,7 +202,7 @@ DayCareMText1: ; 56254 (15:6254)
ld hl, DayCareGotMonBackText ld hl, DayCareGotMonBackText
jr .done jr .done
.asm_56403 .leaveMonInDayCare
ld a, [wDayCareStartLevel] ld a, [wDayCareStartLevel]
ld [wDayCareMonBoxLevel], a ld [wDayCareMonBoxLevel], a

View file

@ -1,7 +1,7 @@
.xf1f77 .xf1f77
ld hl,.ForJust500Text ld hl,.ForJust500Text
call PrintText call PrintText
ld a,$13 ld a,MONEY_BOX
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID call DisplayTextBoxID
call YesNoChoice call YesNoChoice
@ -21,11 +21,11 @@
.xf1f9f .xf1f9f
xor a xor a
ld [$ff9f],a ld [hMoney],a
ld a,$05 ld a,$05
ld [$ffa0],a ld [hMoney + 1],a
ld a,$00 ld a,$00
ld [$ffa1],a ld [hMoney + 2],a
call HasEnoughMoney call HasEnoughMoney
jr nc,.success jr nc,.success
ld hl,.NotEnoughMoneyText ld hl,.NotEnoughMoneyText
@ -36,19 +36,19 @@
.success .success
xor a xor a
ld [wSubtrahend],a ld [wPriceTemp],a
ld a,$05 ld a,$05
ld [wSubtrahend+1],a ld [wPriceTemp + 1],a
ld a,$00 ld a,$00
ld [wSubtrahend+2],a ld [wPriceTemp + 2],a
ld hl,wTrainerFacingDirection ld hl,wPriceTemp + 2
ld de,wPlayerMoney + 2 ld de,wPlayerMoney + 2
ld c,3 ld c,3
predef SubBCDPredef predef SubBCDPredef
ld a,$b2 ld a,$b2
call $3736 call $3736
call $373e call $373e
ld a,$13 ld a,MONEY_BOX
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID call DisplayTextBoxID
ld hl,.MakePaymentText ld hl,.MakePaymentText

View file

@ -145,7 +145,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
.SafariZoneEntranceText4 .SafariZoneEntranceText4
TX_FAR SafariZoneEntranceText_9e6e4 TX_FAR SafariZoneEntranceText_9e6e4
TX_ASM TX_ASM
ld a, $13 ld a, MONEY_BOX
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID call DisplayTextBoxID
call YesNoChoice call YesNoChoice
@ -166,16 +166,16 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
.success .success
xor a xor a
ld [wSubtrahend],a ld [wPriceTemp],a
ld a,$05 ld a,$05
ld [wSubtrahend+1],a ld [wPriceTemp + 1],a
ld a,$00 ld a,$00
ld [wSubtrahend+2],a ld [wPriceTemp + 2],a
ld hl,wTrainerFacingDirection ld hl,wPriceTemp + 2
ld de,wPlayerMoney + 2 ld de,wPlayerMoney + 2
ld c,3 ld c,3
predef SubBCDPredef predef SubBCDPredef
ld a,$13 ld a,MONEY_BOX
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID call DisplayTextBoxID
ld hl,.MakePaymentText ld hl,.MakePaymentText

View file

@ -39,7 +39,7 @@ _DayCareMonHasGrownText:: ; 8ac32 (22:6c32)
_DayCareOweMoneyText:: ; 8ac7d (22:6c7d) _DayCareOweMoneyText:: ; 8ac7d (22:6c7d)
text "You owe me ¥@" text "You owe me ¥@"
TX_BCD wcd3f, $c2 TX_BCD wDayCareTotalCost, $c2
db $0 db $0
line "for the return" line "for the return"
cont "of this #MON." cont "of this #MON."

View file

@ -644,6 +644,18 @@ wOverrideSimulatedJoypadStatesMask:: ; cd3b
ds 1 ds 1
wBattleTransitionCircleScreenQuadrantY:: ; cd3d
; 0 = upper half (Y < 9)
; 1 = lower half (Y >= 9)
wBattleTransitionCopyTilesOffset:: ; cd3d
; 2 bytes
; after 1 row/column has been copied, the offset to the next one to copy from
wInwardSpiralUpdateScreenCounter:: ; cd3d
; counts down from 7 so that every time 7 more tiles of the spiral have been
; placed, the tile map buffer is copied to VRAM so that progress is visible
wHoFTeamIndex:: ; cd3d wHoFTeamIndex:: ; cd3d
wSSAnneSmokeDriftAmount:: ; cd3d wSSAnneSmokeDriftAmount:: ; cd3d
@ -726,9 +738,6 @@ wPlayerSpinWhileMovingUpOrDownAnimDeltaY:: ; cd3d
wHiddenObjectFunctionArgument:: ; cd3d wHiddenObjectFunctionArgument:: ; cd3d
wSubtrahend:: ; cd3d
; subtract (BCD) wSubtrahend, wSubtrahend+1, wSubtrahend+2
wWhichTrade:: ; cd3d wWhichTrade:: ; cd3d
; which entry from TradeMons to select ; which entry from TradeMons to select
@ -737,6 +746,13 @@ wTrainerSpriteOffset:: ; cd3d
wUnusedCD3D:: ; cd3d wUnusedCD3D:: ; cd3d
ds 1 ds 1
wHUDPokeballGfxOffsetX:: ; cd3e
; difference in X between the next ball and the current one
wBattleTransitionCircleScreenQuadrantX:: ; cd3e
; 0 = left half (X < 10)
; 1 = right half (X >= 10)
wSSAnneSmokeX:: ; cd3e wSSAnneSmokeX:: ; cd3e
wRivalStarterBallSpriteIndex:: ; cd3e wRivalStarterBallSpriteIndex:: ; cd3e
@ -775,6 +791,12 @@ wHiddenObjectFunctionRomBank:: ; cd3e
wTrainerEngageDistance:: ; cd3e wTrainerEngageDistance:: ; cd3e
ds 1 ds 1
wHUDGraphicsTiles:: ; cd3f
; 3 bytes
wDayCareTotalCost:: ; cd3f
; 2-byte BCD number
wJigglypuffFacingDirections:: ; cd3f wJigglypuffFacingDirections:: ; cd3f
wOptionsBattleStyleCursorX:: ; cd3f wOptionsBattleStyleCursorX:: ; cd3f
@ -801,7 +823,6 @@ wPlayerSpinWhileMovingUpOrDownAnimFrameDelay:: ; cd3f
wHiddenObjectIndex:: ; cd3f wHiddenObjectIndex:: ; cd3f
wTrainerFacingDirection:: ; cd3f wTrainerFacingDirection:: ; cd3f
wcd3f:: ; used with daycare text for money amount
ds 1 ds 1
wHoFMonOrPlayer:: ; cd40 wHoFMonOrPlayer:: ; cd40
@ -816,8 +837,13 @@ wPlayerSpinInPlaceAnimSoundID:: ; cd40
wHiddenObjectY:: ; cd40 wHiddenObjectY:: ; cd40
wTrainerScreenY:: ; cd40 wTrainerScreenY:: ; cd40
wUnusedCD40:: ; cd40
ds 1 ds 1
wDayCarePerLevelCost:: ; cd41
; 2-byte BCD number (always set to $0100)
wHoFTeamIndex2:: ; cd41 wHoFTeamIndex2:: ; cd41
wHiddenItemOrCoinsIndex:: ; cd41 wHiddenItemOrCoinsIndex:: ; cd41
@ -842,8 +868,7 @@ wHoFTeamNo:: ; cd42
wSlotMachineWheel1MiddleTile:: ; cd42 wSlotMachineWheel1MiddleTile:: ; cd42
wFieldMovesLeftmostXCoord:: ; cd42 wFieldMovesLeftmostXCoord:: ; cd42
ds 1
wcd42:: ds 1 ; used in pewter center script, printing field mon moves, slot machines and HoF PC
wLastFieldMoveID:: ; cd43 wLastFieldMoveID:: ; cd43
; unused ; unused