use more HRAM constants

This commit is contained in:
YamaArashi 2016-10-29 10:32:03 -07:00
parent 4d61c35172
commit 77c3e22a4e
4 changed files with 11 additions and 11 deletions

View file

@ -488,8 +488,8 @@ MainInBattleLoop:
jr nc, .playerMovesFirst ; if player is faster
jr .enemyMovesFirst ; if enemy is faster
.speedEqual ; 50/50 chance for both players
ld a, [$ffaa]
cp $2
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr z, .invertOutcome
call BattleRandom
cp $80

View file

@ -119,11 +119,11 @@ GainExperience:
ld d, MAX_LEVEL
callab CalcExperience ; get max exp
; compare max exp with current exp
ld a, [$ff96]
ld a, [hExperience]
ld b, a
ld a, [$ff97]
ld a, [hExperience + 1]
ld c, a
ld a, [$ff98]
ld a, [hExperience + 2]
ld d, a
pop hl
ld a, [hld]

View file

@ -551,7 +551,7 @@ TradeCenter_SelectMon:
Coorda 1, 16
.cancelMenuItem_JoypadLoop
call JoypadLowSensitivity
ld a, [$ffb5]
ld a, [hJoy5]
and a ; pressed anything?
jr z, .cancelMenuItem_JoypadLoop
bit 0, a ; A button pressed?
@ -914,7 +914,7 @@ CableClub_Run:
ld [wGrassRate], a
inc a ; LINK_STATE_IN_CABLE_CLUB
ld [wLinkState], a
ld [$ffb5], a
ld [hJoy5], a
ld a, 10
ld [wAudioFadeOutControl], a
ld a, BANK(Music_Celadon)

View file

@ -1,7 +1,7 @@
TradeCenterScript:
call EnableAutoTextBoxDrawing
ld a, [$ffaa]
cp $2
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ld a, SPRITE_FACING_LEFT
jr z, .next
ld a, SPRITE_FACING_RIGHT
@ -21,8 +21,8 @@ TradeCenterScript:
ld [hl], a
ld a, SPRITE_FACING_LEFT
ld [wSpriteStateData1 + $19], a
ld a, [$ffaa]
cp $2
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ret z
ld a, $7
ld [wSpriteStateData2 + $15], a