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 nc, .playerMovesFirst ; if player is faster
jr .enemyMovesFirst ; if enemy is faster jr .enemyMovesFirst ; if enemy is faster
.speedEqual ; 50/50 chance for both players .speedEqual ; 50/50 chance for both players
ld a, [$ffaa] ld a, [hSerialConnectionStatus]
cp $2 cp USING_INTERNAL_CLOCK
jr z, .invertOutcome jr z, .invertOutcome
call BattleRandom call BattleRandom
cp $80 cp $80

View file

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

View file

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

View file

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