mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
hLCDCPointer and InitList
This commit is contained in:
parent
ca01a92880
commit
4e2487c056
@ -933,7 +933,7 @@ BattleBGEffect_Surf: ; c8545 (32:4545)
|
|||||||
call InitSurfWaves
|
call InitSurfWaves
|
||||||
|
|
||||||
.one
|
.one
|
||||||
ld a, [hFFC6]
|
ld a, [hLCDCPointer]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
push bc
|
push bc
|
||||||
@ -997,8 +997,8 @@ BattleBGEffect_Whirlpool: ; c8599 (32:4599)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $42
|
ld a, rSCY - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld a, $5e
|
ld a, $5e
|
||||||
@ -1017,7 +1017,7 @@ BattleBGEffect_Whirlpool: ; c8599 (32:4599)
|
|||||||
|
|
||||||
BattleBGEffect_30: ; c85c2 (32:45c2)
|
BattleBGEffect_30: ; c85c2 (32:45c2)
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $42
|
ld a, rSCY - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
ret
|
ret
|
||||||
@ -1071,8 +1071,8 @@ BattleBGEffect_Psychic: ; c8607 (32:4607)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld a, $5f
|
ld a, $5f
|
||||||
@ -1109,7 +1109,7 @@ BattleBGEffect_Teleport: ; c863f (32:463f)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
lb de, 6, 5
|
lb de, 6, 5
|
||||||
call Functionc8f2e
|
call Functionc8f2e
|
||||||
@ -1134,7 +1134,7 @@ BattleBGEffect_NightShade: ; c8662 (32:4662)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $42
|
ld a, rSCY - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld hl, BG_EFFECT_STRUCT_03
|
ld hl, BG_EFFECT_STRUCT_03
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1165,7 +1165,7 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1257,7 +1257,7 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $42
|
ld a, rSCY - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld hl, BG_EFFECT_STRUCT_03
|
ld hl, BG_EFFECT_STRUCT_03
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1320,7 +1320,7 @@ BattleBGEffect_Withdraw: ; c8761 (32:4761)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $42
|
ld a, rSCY - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1370,7 +1370,7 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $42
|
ld a, rSCY - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1437,7 +1437,7 @@ BattleBGEffect_Tackle: ; c8805 (32:4805)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1472,7 +1472,7 @@ BattleBGEffect_25: ; c8837 (32:4837)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms2
|
call BattleBGEffect_SetLCDStatCustoms2
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1604,7 +1604,7 @@ BattleBGEffect_2d: ; c88e7 (32:48e7)
|
|||||||
BGEffect2d_2f_zero:
|
BGEffect2d_2f_zero:
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1648,7 +1648,7 @@ BattleBGEffect_26: ; c892a (32:492a)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1687,7 +1687,7 @@ BattleBGEffect_2c: ; c8964 (32:4964)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1742,7 +1742,7 @@ BattleBGEffect_28: ; c89b5 (32:49b5)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1785,7 +1785,7 @@ BattleBGEffect_BounceDown: ; c89ee (32:49ee)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $42
|
ld a, rSCY - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms2
|
call BattleBGEffect_SetLCDStatCustoms2
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1944,7 +1944,7 @@ BattleBGEffect_2b: ; c8acc (32:4acc)
|
|||||||
.zero
|
.zero
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1986,8 +1986,8 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
|
|||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
ld a, $e4
|
ld a, $e4
|
||||||
call BattleBGEffects_SetLYOverrides
|
call BattleBGEffects_SetLYOverrides
|
||||||
ld a, $47
|
ld a, rBGP - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld a, $60
|
ld a, $60
|
||||||
@ -2221,7 +2221,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
|
|||||||
.zero ; c8c68 (32:4c68)
|
.zero ; c8c68 (32:4c68)
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
call BattleBGEffect_SetLCDStatCustoms1
|
call BattleBGEffect_SetLCDStatCustoms1
|
||||||
ld a, [hLYOverrideEnd]
|
ld a, [hLYOverrideEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -2267,8 +2267,8 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
|
|||||||
.zero ; c8cab (32:4cab)
|
.zero ; c8cab (32:4cab)
|
||||||
call BattleBGEffects_IncrementJumptable
|
call BattleBGEffects_IncrementJumptable
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld a, $37
|
ld a, $37
|
||||||
@ -2655,7 +2655,7 @@ BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2)
|
|||||||
BattleBGEffects_ClearLYOverrides: ; c8eca (32:4eca)
|
BattleBGEffects_ClearLYOverrides: ; c8eca (32:4eca)
|
||||||
xor a
|
xor a
|
||||||
BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb)
|
BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb)
|
||||||
ld hl, LYOverrides ; wd100
|
ld hl, LYOverrides ; wListPointer
|
||||||
ld e, $99
|
ld e, $99
|
||||||
.loop1
|
.loop1
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -2670,7 +2670,7 @@ BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede)
|
BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede)
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
call BGEffect_CheckBattleTurn
|
call BGEffect_CheckBattleTurn
|
||||||
jr nz, .player_turn
|
jr nz, .player_turn
|
||||||
lb de, $00, $36
|
lb de, $00, $36
|
||||||
@ -2686,7 +2686,7 @@ BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4)
|
BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4)
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
call BGEffect_CheckBattleTurn
|
call BGEffect_CheckBattleTurn
|
||||||
jr nz, .player_turn
|
jr nz, .player_turn
|
||||||
lb de, $00, $36
|
lb de, $00, $36
|
||||||
@ -2707,13 +2707,13 @@ BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a)
|
|||||||
ld [hLYOverrideEnd], a
|
ld [hLYOverrideEnd], a
|
||||||
call BattleBGEffects_ClearLYOverrides
|
call BattleBGEffects_ClearLYOverrides
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19)
|
BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19)
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld a, %11100100
|
ld a, %11100100
|
||||||
ld [rBGP], a
|
ld [rBGP], a
|
||||||
ld [wBGP], a
|
ld [wBGP], a
|
||||||
|
@ -5124,7 +5124,6 @@ BattleMenu: ; 3e139
|
|||||||
jr z, .skip_dude_pack_select
|
jr z, .skip_dude_pack_select
|
||||||
callba _DudeAutoInput_DownA
|
callba _DudeAutoInput_DownA
|
||||||
.skip_dude_pack_select
|
.skip_dude_pack_select
|
||||||
|
|
||||||
call LoadBattleMenu2
|
call LoadBattleMenu2
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
|
@ -1150,8 +1150,8 @@ BattleAnimFunction_0D: ; cd66a (33:566a)
|
|||||||
dw .four
|
dw .four
|
||||||
.zero
|
.zero
|
||||||
call BattleAnim_IncAnonJumptableIndex
|
call BattleAnim_IncAnonJumptableIndex
|
||||||
ld a, $42
|
ld a, rSCY - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld a, $58
|
ld a, $58
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld a, $5e
|
ld a, $5e
|
||||||
@ -1209,7 +1209,7 @@ BattleAnimFunction_0D: ; cd66a (33:566a)
|
|||||||
cp $70
|
cp $70
|
||||||
jr c, asm_cd6da
|
jr c, asm_cd6da
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld [hLYOverrideEnd], a
|
ld [hLYOverrideEnd], a
|
||||||
.four
|
.four
|
||||||
|
@ -5,10 +5,10 @@ BattleIntroSlidingPics: ; 4e980
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
call .subfunction1
|
call .subfunction1
|
||||||
ld a, rSCX - $ff00
|
ld a, rSCX - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
call .subfunction2
|
call .subfunction2
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
@ -253,3 +253,9 @@ FISHSWARM_REMORAID EQU 2
|
|||||||
const FISHGROUP_QWILFISH
|
const FISHGROUP_QWILFISH
|
||||||
const FISHGROUP_REMORAID
|
const FISHGROUP_REMORAID
|
||||||
const FISHGROUP_QWILFISH_NO_SWARM
|
const FISHGROUP_QWILFISH_NO_SWARM
|
||||||
|
|
||||||
|
INIT_ENEMYOT_LIST EQU 1
|
||||||
|
INIT_BAG_ITEM_LIST EQU 2
|
||||||
|
INIT_OTHER_ITEM_LIST EQU 3
|
||||||
|
INIT_PLAYEROT_LIST EQU 4
|
||||||
|
INIT_MON_LIST EQU 5
|
||||||
|
@ -39,7 +39,7 @@ Predef_StartBattle: ; 8c20f
|
|||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld [hLYOverrideEnd], a
|
ld [hLYOverrideEnd], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
@ -302,8 +302,8 @@ StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
|
|||||||
|
|
||||||
call StartTrainerBattle_NextScene
|
call StartTrainerBattle_NextScene
|
||||||
|
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
|
@ -183,7 +183,7 @@ Credits:: ; 109847
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
ld a, rSCX - $ff00
|
ld a, rSCX - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
|
|
||||||
call GetCreditsPalette
|
call GetCreditsPalette
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
@ -211,7 +211,7 @@ Credits:: ; 109847
|
|||||||
.exit_credits
|
.exit_credits
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
pop af
|
pop af
|
||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
|
@ -621,7 +621,7 @@ IntroScene5: ; e4a7a (39:4a7a)
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, IntroTilemap005
|
ld hl, IntroTilemap005
|
||||||
@ -815,7 +815,7 @@ IntroScene8: ; e4bd3 (39:4bd3)
|
|||||||
IntroScene9: ; e4c04 (39:4c04)
|
IntroScene9: ; e4c04 (39:4c04)
|
||||||
; Set up the next scene (same bg).
|
; Set up the next scene (same bg).
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
hlcoord 0, 0, AttrMap
|
hlcoord 0, 0, AttrMap
|
||||||
; first 12 rows have palette 1
|
; first 12 rows have palette 1
|
||||||
@ -889,7 +889,7 @@ IntroScene11: ; e4c86 (39:4c86)
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, IntroTilemap007
|
ld hl, IntroTilemap007
|
||||||
@ -2093,8 +2093,8 @@ Intro_ResetLYOverrides: ; e5516 (39:5516)
|
|||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Intro_PerspectiveScrollBG: ; e552f (39:552f)
|
Intro_PerspectiveScrollBG: ; e552f (39:552f)
|
||||||
|
@ -55,7 +55,7 @@ ReturnFromMapSetupScript:: ; b8000
|
|||||||
ld [rWY], a
|
ld [rWY], a
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ret
|
ret
|
||||||
; b8064
|
; b8064
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ PlaceMapNameSign:: ; b8098 (2e:4098)
|
|||||||
ld [rWY], a
|
ld [rWY], a
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ _ResetWRAM: ; 5bae
|
|||||||
ld [wSecretID + 1], a
|
ld [wSecretID + 1], a
|
||||||
|
|
||||||
ld hl, PartyCount
|
ld hl, PartyCount
|
||||||
call InitList
|
call .InitList
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wCurBox], a
|
ld [wCurBox], a
|
||||||
@ -151,20 +151,20 @@ _ResetWRAM: ; 5bae
|
|||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
call InitList
|
call .InitList
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
|
||||||
ld hl, NumItems
|
ld hl, NumItems
|
||||||
call InitList
|
call .InitList
|
||||||
|
|
||||||
ld hl, NumKeyItems
|
ld hl, NumKeyItems
|
||||||
call InitList
|
call .InitList
|
||||||
|
|
||||||
ld hl, NumBalls
|
ld hl, NumBalls
|
||||||
call InitList
|
call .InitList
|
||||||
|
|
||||||
ld hl, PCItems
|
ld hl, PCItems
|
||||||
call InitList
|
call .InitList
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wRoamMon1Species], a
|
ld [wRoamMon1Species], a
|
||||||
@ -232,7 +232,7 @@ ENDC
|
|||||||
ret
|
ret
|
||||||
; 5ca1
|
; 5ca1
|
||||||
|
|
||||||
InitList: ; 5ca1
|
.InitList: ; 5ca1
|
||||||
; Loads 0 in the count and -1 in the first item or mon slot.
|
; Loads 0 in the count and -1 in the first item or mon slot.
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1041,7 +1041,7 @@ StartTitleScreen: ; 6219
|
|||||||
call ClearScreen
|
call ClearScreen
|
||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
@ -1172,7 +1172,7 @@ TitleScreenEntrance: ; 62bc
|
|||||||
ld hl, wJumptableIndex
|
ld hl, wJumptableIndex
|
||||||
inc [hl]
|
inc [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
|
|
||||||
; Play the title screen music.
|
; Play the title screen music.
|
||||||
ld de, MUSIC_TITLE
|
ld de, MUSIC_TITLE
|
||||||
|
@ -163,9 +163,9 @@ TimeCapsule: ; 2805d
|
|||||||
ld hl, wTimeCapsulePartyMon1Species
|
ld hl, wTimeCapsulePartyMon1Species
|
||||||
call Function2868a
|
call Function2868a
|
||||||
ld a, OTPartyMonOT % $100
|
ld a, OTPartyMonOT % $100
|
||||||
ld [wd102], a
|
ld [wUnusedD102], a
|
||||||
ld a, OTPartyMonOT / $100
|
ld a, OTPartyMonOT / $100
|
||||||
ld [wd103], a
|
ld [wUnusedD102 + 1], a
|
||||||
ld de, MUSIC_NONE
|
ld de, MUSIC_NONE
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
ld a, [hLinkPlayerNumber]
|
ld a, [hLinkPlayerNumber]
|
||||||
@ -404,9 +404,9 @@ Gen2ToGen2LinkComms: ; 28177
|
|||||||
ld bc, OTPartyDataEnd - OTPartyMons
|
ld bc, OTPartyDataEnd - OTPartyMons
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, OTPartyMonOT % $100
|
ld a, OTPartyMonOT % $100
|
||||||
ld [wd102], a
|
ld [wUnusedD102], a
|
||||||
ld a, OTPartyMonOT / $100
|
ld a, OTPartyMonOT / $100
|
||||||
ld [wd103], a
|
ld [wUnusedD102 + 1], a
|
||||||
ld de, MUSIC_NONE
|
ld de, MUSIC_NONE
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
ld a, [hLinkPlayerNumber]
|
ld a, [hLinkPlayerNumber]
|
||||||
@ -1254,8 +1254,8 @@ LinkTradeOTPartymonMenuLoop: ; 28835
|
|||||||
bit A_BUTTON_F, a
|
bit A_BUTTON_F, a
|
||||||
jr z, .not_a_button
|
jr z, .not_a_button
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd263], a
|
ld [wInitListType], a
|
||||||
callab LoadAddrsForLinkMonStatsScreen
|
callab InitList
|
||||||
ld hl, OTPartyMon1Species
|
ld hl, OTPartyMon1Species
|
||||||
callba LinkMonStatsScreen
|
callba LinkMonStatsScreen
|
||||||
jp LinkTradePartiesMenuMasterLoop
|
jp LinkTradePartiesMenuMasterLoop
|
||||||
@ -1447,8 +1447,8 @@ Function28926: ; 28926
|
|||||||
pop af
|
pop af
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wd263], a
|
ld [wInitListType], a
|
||||||
callab LoadAddrsForLinkMonStatsScreen
|
callab InitList
|
||||||
callba LinkMonStatsScreen
|
callba LinkMonStatsScreen
|
||||||
call Call_LoadTempTileMapToTileMap
|
call Call_LoadTempTileMapToTileMap
|
||||||
hlcoord 6, 1
|
hlcoord 6, 1
|
||||||
|
@ -188,8 +188,8 @@ _TitleScreen: ; 10ed67
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
; Let LCD Stat know we're messing around with SCX
|
; Let LCD Stat know we're messing around with SCX
|
||||||
ld a, rSCX - rJOYP
|
ld a, rSCX - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
@ -61,7 +61,7 @@ Special_MagnetTrain: ; 8cc04
|
|||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld [hLYOverrideStart], a
|
ld [hLYOverrideStart], a
|
||||||
ld [hLYOverrideEnd], a
|
ld [hLYOverrideEnd], a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
@ -251,8 +251,8 @@ MagnetTrain_InitLYOverrides: ; 8cda6
|
|||||||
ld bc, LYOverridesBackupEnd - LYOverridesBackup
|
ld bc, LYOverridesBackupEnd - LYOverridesBackup
|
||||||
ld a, [wMagnetTrainInitPosition]
|
ld a, [wMagnetTrainInitPosition]
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, $43
|
ld a, rSCX - $ff00
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ret
|
ret
|
||||||
; 8cdc3
|
; 8cdc3
|
||||||
|
|
||||||
|
6
home.asm
6
home.asm
@ -825,9 +825,9 @@ GetName:: ; 33c3
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wd102], a
|
ld [wUnusedD102], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wd103], a
|
ld [wUnusedD102 + 1], a
|
||||||
|
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
@ -1905,7 +1905,7 @@ INCLUDE "home/battle.asm"
|
|||||||
|
|
||||||
PushLYOverrides:: ; 3b0c
|
PushLYOverrides:: ; 3b0c
|
||||||
|
|
||||||
ld a, [hFFC6]
|
ld a, [hLCDCPointer]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Function547:: ; 547
|
Function547:: ; 547
|
||||||
; Unreferenced
|
; Unreferenced
|
||||||
ld a, [hFFC6]
|
ld a, [hLCDCPointer]
|
||||||
cp rSCX - $ff00
|
cp rSCX - $ff00
|
||||||
ret nz
|
ret nz
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -15,7 +15,7 @@ Function547:: ; 547
|
|||||||
|
|
||||||
LCD:: ; 552
|
LCD:: ; 552
|
||||||
push af
|
push af
|
||||||
ld a, [hFFC6]
|
ld a, [hLCDCPointer]
|
||||||
and a
|
and a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ LCD:: ; 552
|
|||||||
ld b, LYOverrides >> 8
|
ld b, LYOverrides >> 8
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hFFC6]
|
ld a, [hLCDCPointer]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [$ff00+c], a
|
ld [$ff00+c], a
|
||||||
|
2
hram.asm
2
hram.asm
@ -82,7 +82,7 @@ hMoneyTemp EQU $ffc3
|
|||||||
hMGJoypadPressed EQU $ffc3
|
hMGJoypadPressed EQU $ffc3
|
||||||
hMGJoypadReleased EQU $ffc4
|
hMGJoypadReleased EQU $ffc4
|
||||||
|
|
||||||
hFFC6 EQU $ffc6
|
hLCDCPointer EQU $ffc6
|
||||||
hLYOverrideStart EQU $ffc7
|
hLYOverrideStart EQU $ffc7
|
||||||
hLYOverrideEnd EQU $ffc8
|
hLYOverrideEnd EQU $ffc8
|
||||||
hMobileReceive EQU $ffc9
|
hMobileReceive EQU $ffc9
|
||||||
|
26
main.asm
26
main.asm
@ -77,7 +77,7 @@ ReanchorBGMap_NoOAMUpdate:: ; 6454
|
|||||||
|
|
||||||
.ReanchorBGMap:
|
.ReanchorBGMap:
|
||||||
xor a
|
xor a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
@ -4258,10 +4258,10 @@ ListMoves: ; 50d6f
|
|||||||
.done
|
.done
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadAddrsForLinkMonStatsScreen: ; 50db9
|
InitList: ; 50db9
|
||||||
ld a, [wd263]
|
ld a, [wInitListType]
|
||||||
|
|
||||||
cp $1
|
cp INIT_ENEMYOT_LIST
|
||||||
jr nz, .check_party_ot_name
|
jr nz, .check_party_ot_name
|
||||||
ld hl, OTPartyCount
|
ld hl, OTPartyCount
|
||||||
ld de, OTPartyMonOT
|
ld de, OTPartyMonOT
|
||||||
@ -4269,7 +4269,7 @@ LoadAddrsForLinkMonStatsScreen: ; 50db9
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.check_party_ot_name
|
.check_party_ot_name
|
||||||
cp $4
|
cp INIT_PLAYEROT_LIST
|
||||||
jr nz, .check_mon_name
|
jr nz, .check_mon_name
|
||||||
ld hl, PartyCount
|
ld hl, PartyCount
|
||||||
ld de, PartyMonOT
|
ld de, PartyMonOT
|
||||||
@ -4277,7 +4277,7 @@ LoadAddrsForLinkMonStatsScreen: ; 50db9
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.check_mon_name
|
.check_mon_name
|
||||||
cp $5
|
cp INIT_MON_LIST
|
||||||
jr nz, .check_item_name
|
jr nz, .check_item_name
|
||||||
ld hl, CurMart
|
ld hl, CurMart
|
||||||
ld de, PokemonNames
|
ld de, PokemonNames
|
||||||
@ -4285,7 +4285,7 @@ LoadAddrsForLinkMonStatsScreen: ; 50db9
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.check_item_name
|
.check_item_name
|
||||||
cp $2
|
cp INIT_BAG_ITEM_LIST
|
||||||
jr nz, .check_ob_item_name
|
jr nz, .check_ob_item_name
|
||||||
ld hl, NumItems
|
ld hl, NumItems
|
||||||
ld de, ItemNames
|
ld de, ItemNames
|
||||||
@ -4299,18 +4299,18 @@ LoadAddrsForLinkMonStatsScreen: ; 50db9
|
|||||||
.done
|
.done
|
||||||
ld [wNamedObjectTypeBuffer], a ; d265
|
ld [wNamedObjectTypeBuffer], a ; d265
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wd100], a
|
ld [wListPointer], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wd101], a
|
ld [wListPointer + 1], a
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wd102], a
|
ld [wUnusedD102], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wd103], a
|
ld [wUnusedD102 + 1], a
|
||||||
ld bc, ItemAttributes ; ParseEnemyAction, HandleMapTimeAndJoypad, Music_LakeOfRage_Ch3, String_11a7c1 $67c1
|
ld bc, ItemAttributes ; ParseEnemyAction, HandleMapTimeAndJoypad, Music_LakeOfRage_Ch3, String_11a7c1 $67c1
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wd104], a
|
ld [wItemAttributesPtr], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wd105], a
|
ld [wItemAttributesPtr + 1], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CalcLevel: ; 50e1b
|
CalcLevel: ; 50e1b
|
||||||
|
@ -1199,7 +1199,7 @@ Function11c7bc: ; 11c7bc (47:47bc)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_11c7e9
|
.asm_11c7e9
|
||||||
ld hl, wd100
|
ld hl, wListPointer
|
||||||
ld a, [wcd26]
|
ld a, [wcd26]
|
||||||
ld e, a
|
ld e, a
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -1433,7 +1433,7 @@ Function11c8f6: ; 11c8f6 (47:48f6)
|
|||||||
add [hl]
|
add [hl]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld hl, wd100
|
ld hl, wListPointer
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
jr .asm_11c911
|
jr .asm_11c911
|
||||||
|
@ -67,7 +67,7 @@ SetRAMStateForMobile: ; 100063
|
|||||||
ld [BGMapBuffer], a
|
ld [BGMapBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hMapAnims], a
|
ld [hMapAnims], a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ret
|
ret
|
||||||
; 100082
|
; 100082
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ EnableMobile: ; 100082
|
|||||||
ld [rIE], a
|
ld [rIE], a
|
||||||
xor a
|
xor a
|
||||||
ld [hMapAnims], a
|
ld [hMapAnims], a
|
||||||
ld [hFFC6], a
|
ld [hLCDCPointer], a
|
||||||
ld a, $01
|
ld a, $01
|
||||||
ld [hMobileReceive], a
|
ld [hMobileReceive], a
|
||||||
ld [hMobile], a
|
ld [hMobile], a
|
||||||
|
11
wram.asm
11
wram.asm
@ -1795,12 +1795,9 @@ wMailboxItems:: ds MAILBOX_CAPACITY
|
|||||||
wMailboxEnd:: ds 1 ; d0fe
|
wMailboxEnd:: ds 1 ; d0fe
|
||||||
ds 2
|
ds 2
|
||||||
|
|
||||||
wd100:: ds 1
|
wListPointer:: dw ; d100
|
||||||
wd101:: ds 1
|
wUnusedD102:: dw ; d102
|
||||||
wd102:: ds 1
|
wItemAttributesPtr:: dw ; d104
|
||||||
wd103:: ds 1
|
|
||||||
wd104:: ds 1
|
|
||||||
wd105:: ds 1
|
|
||||||
|
|
||||||
CurItem:: ds 1 ; d106
|
CurItem:: ds 1 ; d106
|
||||||
CurItemQuantity:: ; d107
|
CurItemQuantity:: ; d107
|
||||||
@ -2180,7 +2177,7 @@ wNiteEncounterRate:: ds 1 ; d25c
|
|||||||
wWaterEncounterRate:: ds 1 ; d25d
|
wWaterEncounterRate:: ds 1 ; d25d
|
||||||
wListMoves_MoveIndicesBuffer:: ds NUM_MOVES
|
wListMoves_MoveIndicesBuffer:: ds NUM_MOVES
|
||||||
wPutativeTMHMMove:: ds 1
|
wPutativeTMHMMove:: ds 1
|
||||||
wd263:: ds 1
|
wInitListType:: ds 1
|
||||||
wAISwitch:: ds 1
|
wAISwitch:: ds 1
|
||||||
wFoundMatchingIDInParty::
|
wFoundMatchingIDInParty::
|
||||||
wNamedObjectIndexBuffer::
|
wNamedObjectIndexBuffer::
|
||||||
|
Loading…
Reference in New Issue
Block a user