mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Move MON_* parentheses to the EQUS declaration
This commit is contained in:
parent
2cbb1acc6e
commit
eb39f6a339
@ -4068,16 +4068,16 @@ InitBattleMon: ; 3da0d
|
|||||||
ld de, BattleMonSpecies
|
ld de, BattleMonSpecies
|
||||||
ld bc, MON_ID
|
ld bc, MON_ID
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld bc, (MON_DVS) - (MON_ID)
|
ld bc, MON_DVS - MON_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, BattleMonDVs
|
ld de, BattleMonDVs
|
||||||
ld bc, (MON_PKRUS) - (MON_DVS)
|
ld bc, MON_PKRUS - MON_DVS
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
rept 3
|
rept 3
|
||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
ld de, BattleMonLevel
|
ld de, BattleMonLevel
|
||||||
ld bc, (PARTYMON_STRUCT_LENGTH) - (MON_LEVEL)
|
ld bc, PARTYMON_STRUCT_LENGTH - MON_LEVEL
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [BattleMonSpecies]
|
ld a, [BattleMonSpecies]
|
||||||
ld [TempBattleMonSpecies], a
|
ld [TempBattleMonSpecies], a
|
||||||
@ -4096,7 +4096,7 @@ endr
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, BattleMonAttack
|
ld hl, BattleMonAttack
|
||||||
ld de, PlayerStats
|
ld de, PlayerStats
|
||||||
ld bc, (PARTYMON_STRUCT_LENGTH) - (MON_ATK)
|
ld bc, PARTYMON_STRUCT_LENGTH - MON_ATK
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call Function3ec2c
|
call Function3ec2c
|
||||||
call BadgeStatBoosts
|
call BadgeStatBoosts
|
||||||
@ -4160,16 +4160,16 @@ Function3dabd: ; 3dabd
|
|||||||
ld de, EnemyMonSpecies
|
ld de, EnemyMonSpecies
|
||||||
ld bc, MON_ID
|
ld bc, MON_ID
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld bc, (MON_DVS) - (MON_ID)
|
ld bc, MON_DVS - MON_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, EnemyMonDVs
|
ld de, EnemyMonDVs
|
||||||
ld bc, (MON_PKRUS) - (MON_DVS)
|
ld bc, MON_PKRUS - MON_DVS
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
rept 3
|
rept 3
|
||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
ld de, EnemyMonLevel
|
ld de, EnemyMonLevel
|
||||||
ld bc, (PARTYMON_STRUCT_LENGTH) - (MON_LEVEL)
|
ld bc, PARTYMON_STRUCT_LENGTH - MON_LEVEL
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [EnemyMonSpecies]
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
@ -4182,7 +4182,7 @@ endr
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, EnemyMonAttack
|
ld hl, EnemyMonAttack
|
||||||
ld de, EnemyStats
|
ld de, EnemyStats
|
||||||
ld bc, (PARTYMON_STRUCT_LENGTH) - (MON_ATK)
|
ld bc, PARTYMON_STRUCT_LENGTH - MON_ATK
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call Function3ec30
|
call Function3ec30
|
||||||
ld hl, BaseType1
|
ld hl, BaseType1
|
||||||
@ -5868,7 +5868,7 @@ endr
|
|||||||
push hl
|
push hl
|
||||||
call .asm_3e6a5
|
call .asm_3e6a5
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, (MON_PP) - (MON_MOVES)
|
ld bc, MON_PP - MON_MOVES
|
||||||
add hl, bc
|
add hl, bc
|
||||||
call .asm_3e6a5
|
call .asm_3e6a5
|
||||||
|
|
||||||
|
@ -260,38 +260,38 @@ NUM_POKEMON EQU const_value
|
|||||||
EGG EQU 253
|
EGG EQU 253
|
||||||
|
|
||||||
; pokemon structure in RAM
|
; pokemon structure in RAM
|
||||||
MON_SPECIES EQUS "PartyMon1Species - PartyMon1"
|
MON_SPECIES EQUS "(PartyMon1Species - PartyMon1)"
|
||||||
MON_ITEM EQUS "PartyMon1Item - PartyMon1"
|
MON_ITEM EQUS "(PartyMon1Item - PartyMon1)"
|
||||||
MON_MOVES EQUS "PartyMon1Moves - PartyMon1"
|
MON_MOVES EQUS "(PartyMon1Moves - PartyMon1)"
|
||||||
MON_ID EQUS "PartyMon1ID - PartyMon1"
|
MON_ID EQUS "(PartyMon1ID - PartyMon1)"
|
||||||
MON_EXP EQUS "PartyMon1Exp - PartyMon1"
|
MON_EXP EQUS "(PartyMon1Exp - PartyMon1)"
|
||||||
MON_STAT_EXP EQUS "PartyMon1StatExp - PartyMon1"
|
MON_STAT_EXP EQUS "(PartyMon1StatExp - PartyMon1)"
|
||||||
MON_HP_EXP EQUS "PartyMon1HPExp - PartyMon1"
|
MON_HP_EXP EQUS "(PartyMon1HPExp - PartyMon1)"
|
||||||
MON_ATK_EXP EQUS "PartyMon1AtkExp - PartyMon1"
|
MON_ATK_EXP EQUS "(PartyMon1AtkExp - PartyMon1)"
|
||||||
MON_DEF_EXP EQUS "PartyMon1DefExp - PartyMon1"
|
MON_DEF_EXP EQUS "(PartyMon1DefExp - PartyMon1)"
|
||||||
MON_SPD_EXP EQUS "PartyMon1SpdExp - PartyMon1"
|
MON_SPD_EXP EQUS "(PartyMon1SpdExp - PartyMon1)"
|
||||||
MON_SPC_EXP EQUS "PartyMon1SpcExp - PartyMon1"
|
MON_SPC_EXP EQUS "(PartyMon1SpcExp - PartyMon1)"
|
||||||
MON_DVS EQUS "PartyMon1DVs - PartyMon1"
|
MON_DVS EQUS "(PartyMon1DVs - PartyMon1)"
|
||||||
MON_PP EQUS "PartyMon1PP - PartyMon1"
|
MON_PP EQUS "(PartyMon1PP - PartyMon1)"
|
||||||
MON_HAPPINESS EQUS "PartyMon1Happiness - PartyMon1"
|
MON_HAPPINESS EQUS "(PartyMon1Happiness - PartyMon1)"
|
||||||
MON_PKRUS EQUS "PartyMon1PokerusStatus - PartyMon1"
|
MON_PKRUS EQUS "(PartyMon1PokerusStatus - PartyMon1)"
|
||||||
MON_CAUGHTDATA EQUS "PartyMon1CaughtData - PartyMon1"
|
MON_CAUGHTDATA EQUS "(PartyMon1CaughtData - PartyMon1)"
|
||||||
MON_CAUGHTLEVEL EQUS "PartyMon1CaughtLevel - PartyMon1"
|
MON_CAUGHTLEVEL EQUS "(PartyMon1CaughtLevel - PartyMon1)"
|
||||||
MON_CAUGHTTIME EQUS "PartyMon1CaughtTime - PartyMon1"
|
MON_CAUGHTTIME EQUS "(PartyMon1CaughtTime - PartyMon1)"
|
||||||
MON_CAUGHTGENDER EQUS "PartyMon1CaughtGender - PartyMon1"
|
MON_CAUGHTGENDER EQUS "(PartyMon1CaughtGender - PartyMon1)"
|
||||||
MON_CAUGHTLOCATION EQUS "PartyMon1CaughtLocation - PartyMon1"
|
MON_CAUGHTLOCATION EQUS "(PartyMon1CaughtLocation - PartyMon1)"
|
||||||
MON_LEVEL EQUS "PartyMon1Level - PartyMon1"
|
MON_LEVEL EQUS "(PartyMon1Level - PartyMon1)"
|
||||||
MON_STATUS EQUS "PartyMon1Status - PartyMon1"
|
MON_STATUS EQUS "(PartyMon1Status - PartyMon1)"
|
||||||
MON_HP EQUS "PartyMon1HP - PartyMon1"
|
MON_HP EQUS "(PartyMon1HP - PartyMon1)"
|
||||||
MON_MAXHP EQUS "PartyMon1MaxHP - PartyMon1"
|
MON_MAXHP EQUS "(PartyMon1MaxHP - PartyMon1)"
|
||||||
MON_ATK EQUS "PartyMon1Attack - PartyMon1"
|
MON_ATK EQUS "(PartyMon1Attack - PartyMon1)"
|
||||||
MON_DEF EQUS "PartyMon1Defense - PartyMon1"
|
MON_DEF EQUS "(PartyMon1Defense - PartyMon1)"
|
||||||
MON_SPD EQUS "PartyMon1Speed - PartyMon1"
|
MON_SPD EQUS "(PartyMon1Speed - PartyMon1)"
|
||||||
MON_SAT EQUS "PartyMon1SpclAtk - PartyMon1"
|
MON_SAT EQUS "(PartyMon1SpclAtk - PartyMon1)"
|
||||||
MON_SDF EQUS "PartyMon1SpclDef - PartyMon1"
|
MON_SDF EQUS "(PartyMon1SpclDef - PartyMon1)"
|
||||||
BOXMON_STRUCT_LENGTH EQUS "PartyMon1End - PartyMon1"
|
BOXMON_STRUCT_LENGTH EQUS "(PartyMon1End - PartyMon1)"
|
||||||
PARTYMON_STRUCT_LENGTH EQUS "PartyMon1StatsEnd - PartyMon1"
|
PARTYMON_STRUCT_LENGTH EQUS "(PartyMon1StatsEnd - PartyMon1)"
|
||||||
SCRATCHMON_STRUCT_LENGTH EQUS "PartyMon1StatsEnd - PartyMon1Item"
|
SCRATCHMON_STRUCT_LENGTH EQUS "(PartyMon1StatsEnd - PartyMon1Item)"
|
||||||
|
|
||||||
const_value SET 1
|
const_value SET 1
|
||||||
const MONMENU_CUT ; 1
|
const MONMENU_CUT ; 1
|
||||||
|
@ -59,7 +59,7 @@ endr
|
|||||||
call GetFarByte
|
call GetFarByte
|
||||||
|
|
||||||
; get the address of the move's PP and update the PP
|
; get the address of the move's PP and update the PP
|
||||||
ld hl, (MON_PP) - (MON_MOVES)
|
ld hl, MON_PP - MON_MOVES
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
|
@ -1338,11 +1338,11 @@ Functioneed9: ; eed9
|
|||||||
; eeeb
|
; eeeb
|
||||||
|
|
||||||
Table_eeeb: ; eeeb
|
Table_eeeb: ; eeeb
|
||||||
db HP_UP, (MON_HP_EXP) - (MON_STAT_EXP)
|
db HP_UP, MON_HP_EXP - MON_STAT_EXP
|
||||||
db PROTEIN, (MON_ATK_EXP) - (MON_STAT_EXP)
|
db PROTEIN, MON_ATK_EXP - MON_STAT_EXP
|
||||||
db IRON, (MON_DEF_EXP) - (MON_STAT_EXP)
|
db IRON, MON_DEF_EXP - MON_STAT_EXP
|
||||||
db CARBOS, (MON_SPD_EXP) - (MON_STAT_EXP)
|
db CARBOS, MON_SPD_EXP - MON_STAT_EXP
|
||||||
db CALCIUM, (MON_SPC_EXP) - (MON_STAT_EXP)
|
db CALCIUM, MON_SPC_EXP - MON_STAT_EXP
|
||||||
; eef5
|
; eef5
|
||||||
|
|
||||||
|
|
||||||
@ -2641,7 +2641,7 @@ Functionf652: ; f652
|
|||||||
rept NUM_MOVES + 2 ; BattleMonPP - BattleMonMoves
|
rept NUM_MOVES + 2 ; BattleMonPP - BattleMonMoves
|
||||||
inc de
|
inc de
|
||||||
endr
|
endr
|
||||||
ld bc, (MON_PP) - (MON_MOVES)
|
ld bc, MON_PP - MON_MOVES
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
@ -3111,7 +3111,7 @@ Functionf84c: ; f84c
|
|||||||
ld de, Buffer1
|
ld de, Buffer1
|
||||||
predef FillPP
|
predef FillPP
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, (MON_PP) - (MON_MOVES)
|
ld bc, MON_PP - MON_MOVES
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, Buffer1
|
ld de, Buffer1
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -3279,7 +3279,7 @@ Functionf8ec: ; f8ec
|
|||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
ld bc, (MON_PP) - (MON_MOVES)
|
ld bc, MON_PP - MON_MOVES
|
||||||
ld a, [MonType]
|
ld a, [MonType]
|
||||||
cp WILDMON
|
cp WILDMON
|
||||||
jr nz, .notwild
|
jr nz, .notwild
|
||||||
|
74
main.asm
74
main.asm
@ -1642,7 +1642,7 @@ LearnMove: ; 6508
|
|||||||
.learn
|
.learn
|
||||||
ld a, [wd262]
|
ld a, [wd262]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld bc, (MON_PP) - (MON_MOVES)
|
ld bc, MON_PP - MON_MOVES
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
@ -9232,7 +9232,7 @@ Functione039: ; e039
|
|||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .asm_e131
|
jr z, .asm_e131
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -9242,11 +9242,11 @@ Functione039: ; e039
|
|||||||
.asm_e11a
|
.asm_e11a
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop hl
|
pop hl
|
||||||
push hl
|
push hl
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
@ -9357,7 +9357,7 @@ endr
|
|||||||
srl c
|
srl c
|
||||||
pop hl
|
pop hl
|
||||||
push bc
|
push bc
|
||||||
ld bc, (MON_DVS) - (MON_HP_EXP) + 1
|
ld bc, MON_DVS - MON_HP_EXP + 1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
ld a, c
|
ld a, c
|
||||||
@ -13536,12 +13536,12 @@ Function12cfe: ; 12cfe (4:6cfe)
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, DefaultFlypoint
|
ld hl, DefaultFlypoint
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
ld a, BANK(sPartyScratch1)
|
ld a, BANK(sPartyScratch1)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -26053,7 +26053,7 @@ Function28595: ; 28595
|
|||||||
|
|
||||||
.next
|
.next
|
||||||
pop de
|
pop de
|
||||||
ld hl, (SCRATCHMON_STRUCT_LENGTH)
|
ld hl, SCRATCHMON_STRUCT_LENGTH
|
||||||
add hl, de
|
add hl, de
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
@ -26916,13 +26916,13 @@ Function28b87: ; 28b87
|
|||||||
.asm_28c7b
|
.asm_28c7b
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
ld a, [DefaultFlypoint]
|
ld a, [DefaultFlypoint]
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, BANK(sPartyScratch1)
|
ld a, BANK(sPartyScratch1)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [DefaultFlypoint]
|
ld a, [DefaultFlypoint]
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -26932,7 +26932,7 @@ Function28b87: ; 28b87
|
|||||||
cp $6
|
cp $6
|
||||||
jr z, .asm_28ca6
|
jr z, .asm_28ca6
|
||||||
push bc
|
push bc
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop bc
|
pop bc
|
||||||
jr .asm_28c96
|
jr .asm_28c96
|
||||||
@ -26941,15 +26941,15 @@ Function28b87: ; 28b87
|
|||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
ld hl, wc9f4
|
ld hl, wc9f4
|
||||||
ld a, [wd003]
|
ld a, [wd003]
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
pop de
|
pop de
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld hl, PlayerName
|
ld hl, PlayerName
|
||||||
@ -32105,7 +32105,7 @@ FindFirstAliveMon: ; 2ee2f
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
.okay
|
.okay
|
||||||
ld de, (MON_LEVEL) - (MON_HP)
|
ld de, MON_LEVEL - MON_HP
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [BattleMonLevel], a
|
ld [BattleMonLevel], a
|
||||||
@ -33505,7 +33505,7 @@ FillMoves: ; 424e1
|
|||||||
jr z, .NextMove
|
jr z, .NextMove
|
||||||
push hl
|
push hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld hl, (MON_PP) - (MON_MOVES)
|
ld hl, MON_PP - MON_MOVES
|
||||||
add hl, de
|
add hl, de
|
||||||
push hl
|
push hl
|
||||||
dec a
|
dec a
|
||||||
@ -34126,23 +34126,23 @@ Function4456e: ; 4456e
|
|||||||
call Function44648
|
call Function44648
|
||||||
cp $a
|
cp $a
|
||||||
jr nc, .asm_445be
|
jr nc, .asm_445be
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
ld hl, s0_a835
|
ld hl, s0_a835
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
ld a, BANK(s0_a834)
|
ld a, BANK(s0_a834)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop hl
|
pop hl
|
||||||
xor a
|
xor a
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, MON_ITEM
|
ld a, MON_ITEM
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
@ -34164,7 +34164,7 @@ Function445c0: ; 445c0 (11:45c0)
|
|||||||
ld a, b
|
ld a, b
|
||||||
push bc
|
push bc
|
||||||
ld hl, s0_a835
|
ld hl, s0_a835
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -34175,7 +34175,7 @@ Function445c0: ; 445c0 (11:45c0)
|
|||||||
cp $9
|
cp $9
|
||||||
jr z, .done
|
jr z, .done
|
||||||
push bc
|
push bc
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop bc
|
pop bc
|
||||||
inc b
|
inc b
|
||||||
@ -34184,7 +34184,7 @@ Function445c0: ; 445c0 (11:45c0)
|
|||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
xor a
|
xor a
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld hl, s0_a834
|
ld hl, s0_a834
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -34194,7 +34194,7 @@ Function445c0: ; 445c0 (11:45c0)
|
|||||||
ReadMailMessage: ; 445f4
|
ReadMailMessage: ; 445f4
|
||||||
ld a, b
|
ld a, b
|
||||||
ld hl, s0_a835
|
ld hl, s0_a835
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
@ -34206,22 +34206,22 @@ Function44607: ; 44607
|
|||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
push bc
|
push bc
|
||||||
ld a, b
|
ld a, b
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
ld hl, s0_a835
|
ld hl, s0_a835
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
pop hl
|
pop hl
|
||||||
push hl
|
push hl
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop hl
|
pop hl
|
||||||
ld de, (PARTYMON_STRUCT_LENGTH) - (MON_MOVES)
|
ld de, PARTYMON_STRUCT_LENGTH - MON_MOVES
|
||||||
add hl, de
|
add hl, de
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
@ -34260,7 +34260,7 @@ Function44654:: ; 44654
|
|||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
@ -34363,11 +34363,11 @@ BackupScratchmons: ; 44725
|
|||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
ld de, sPartyScratch2
|
ld de, sPartyScratch2
|
||||||
ld bc, 6 * (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, 6 * SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, s0_a834
|
ld hl, s0_a834
|
||||||
ld de, s0_aa0b
|
ld de, s0_aa0b
|
||||||
ld bc, 1 + 10 * (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, 1 + 10 * SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
; 44745
|
; 44745
|
||||||
@ -34377,11 +34377,11 @@ RestoreScratchmons: ; 44745 (11:4745)
|
|||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sPartyScratch2
|
ld hl, sPartyScratch2
|
||||||
ld de, sPartyScratch1
|
ld de, sPartyScratch1
|
||||||
ld bc, 6 * (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, 6 * SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, s0_aa0b
|
ld hl, s0_aa0b
|
||||||
ld de, s0_a834
|
ld de, s0_a834
|
||||||
ld bc, 1 + 10 * (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, 1 + 10 * SCRATCHMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
|
|
||||||
@ -34390,11 +34390,11 @@ DeleteScratchmons: ; 44765 (11:4765)
|
|||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
xor a
|
xor a
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
ld bc, 6 * (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, 6 * SCRATCHMON_STRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
xor a
|
xor a
|
||||||
ld hl, s0_a834
|
ld hl, s0_a834
|
||||||
ld bc, 1 + 10 * (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, 1 + 10 * SCRATCHMON_STRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
; 44781 (11:4781)
|
; 44781 (11:4781)
|
||||||
@ -34471,7 +34471,7 @@ InitMail: ; 0x447b9
|
|||||||
|
|
||||||
Function447da: ; 0x447da
|
Function447da: ; 0x447da
|
||||||
dec a
|
dec a
|
||||||
ld hl, s0_a835 + (MON_HP) - 1
|
ld hl, s0_a835 + MON_HP - 1
|
||||||
ld bc, SCRATCHMON_STRUCT_LENGTH
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, BANK(s0_a834)
|
ld a, BANK(s0_a834)
|
||||||
@ -63031,7 +63031,7 @@ INCLUDE "engine/radio.asm"
|
|||||||
ReadPartyMonMail: ; b9229
|
ReadPartyMonMail: ; b9229
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, sPartyScratch1
|
ld hl, sPartyScratch1
|
||||||
ld bc, (SCRATCHMON_STRUCT_LENGTH)
|
ld bc, SCRATCHMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
|
8
sram.asm
8
sram.asm
@ -9,12 +9,12 @@ sScratch::
|
|||||||
|
|
||||||
SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]
|
SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]
|
||||||
|
|
||||||
sPartyScratch1:: ds 6 * (SCRATCHMON_STRUCT_LENGTH)
|
sPartyScratch1:: ds 6 * SCRATCHMON_STRUCT_LENGTH
|
||||||
sPartyScratch2:: ds 6 * (SCRATCHMON_STRUCT_LENGTH)
|
sPartyScratch2:: ds 6 * SCRATCHMON_STRUCT_LENGTH
|
||||||
s0_a834:: ds 1
|
s0_a834:: ds 1
|
||||||
s0_a835:: ds 10 * (SCRATCHMON_STRUCT_LENGTH)
|
s0_a835:: ds 10 * SCRATCHMON_STRUCT_LENGTH
|
||||||
s0_aa0b:: ds 1
|
s0_aa0b:: ds 1
|
||||||
s0_aa0c:: ds 10 * (SCRATCHMON_STRUCT_LENGTH)
|
s0_aa0c:: ds 10 * SCRATCHMON_STRUCT_LENGTH
|
||||||
|
|
||||||
sMysteryGiftItem:: ds 1
|
sMysteryGiftItem:: ds 1
|
||||||
s0_abe3:: ds 1
|
s0_abe3:: ds 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user