Define constants for wBillsPCPokemonList
entries (#1183)
This commit is contained in:
@@ -136,10 +136,17 @@ DEF PARTY_LENGTH EQU 6
|
|||||||
|
|
||||||
; boxes
|
; boxes
|
||||||
DEF MONS_PER_BOX EQU 20
|
DEF MONS_PER_BOX EQU 20
|
||||||
|
DEF MONS_PER_BOX_JP EQU 30
|
||||||
; box: count, species, mons, OTs, nicknames, padding
|
; box: count, species, mons, OTs, nicknames, padding
|
||||||
DEF BOX_LENGTH EQU 1 + MONS_PER_BOX + 1 + (BOXMON_STRUCT_LENGTH + NAME_LENGTH + MON_NAME_LENGTH) * MONS_PER_BOX + 2 ; $450
|
DEF BOX_LENGTH EQU 1 + MONS_PER_BOX + 1 + (BOXMON_STRUCT_LENGTH + NAME_LENGTH + MON_NAME_LENGTH) * MONS_PER_BOX + 2 ; $450
|
||||||
DEF NUM_BOXES EQU 14
|
DEF NUM_BOXES EQU 14
|
||||||
|
|
||||||
|
rsreset
|
||||||
|
DEF BOXLIST_SPECIES rb
|
||||||
|
DEF BOXLIST_BOXNUM rb
|
||||||
|
DEF BOXLIST_INDEX rb
|
||||||
|
DEF BOXLIST_SIZE EQU _RS
|
||||||
|
|
||||||
; hall of fame
|
; hall of fame
|
||||||
; hof_mon: species, id, dvs, level, nicknames
|
; hof_mon: species, id, dvs, level, nicknames
|
||||||
DEF HOF_MON_LENGTH EQU 1 + 2 + 2 + 1 + (MON_NAME_LENGTH - 1) ; $10
|
DEF HOF_MON_LENGTH EQU 1 + 2 + 2 + 1 + (MON_NAME_LENGTH - 1) ; $10
|
||||||
|
@@ -1115,10 +1115,10 @@ BillsPC_LoadMonStats:
|
|||||||
add [hl]
|
add [hl]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, wBillsPCPokemonList + 1 ; box number
|
ld hl, wBillsPCPokemonList + BOXLIST_BOXNUM
|
||||||
add hl, de
|
rept BOXLIST_SIZE
|
||||||
add hl, de
|
|
||||||
add hl, de
|
add hl, de
|
||||||
|
endr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .party
|
jr z, .party
|
||||||
@@ -1229,10 +1229,10 @@ BillsPC_RefreshTextboxes:
|
|||||||
ld a, [wBillsPC_ScrollPosition]
|
ld a, [wBillsPC_ScrollPosition]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, wBillsPCPokemonList
|
ld hl, wBillsPCPokemonList + BOXLIST_SPECIES
|
||||||
add hl, de
|
rept BOXLIST_SIZE
|
||||||
add hl, de
|
|
||||||
add hl, de
|
add hl, de
|
||||||
|
endr
|
||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
hlcoord 9, 4
|
hlcoord 9, 4
|
||||||
@@ -1246,9 +1246,9 @@ BillsPC_RefreshTextboxes:
|
|||||||
ld de, 2 * SCREEN_WIDTH
|
ld de, 2 * SCREEN_WIDTH
|
||||||
add hl, de
|
add hl, de
|
||||||
pop de
|
pop de
|
||||||
|
rept BOXLIST_SIZE
|
||||||
inc de
|
inc de
|
||||||
inc de
|
endr
|
||||||
inc de
|
|
||||||
pop af
|
pop af
|
||||||
dec a
|
dec a
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
@@ -1377,13 +1377,13 @@ MACRO copy_box_data
|
|||||||
jr z, .done\@
|
jr z, .done\@
|
||||||
and a
|
and a
|
||||||
jr z, .done\@
|
jr z, .done\@
|
||||||
ld [de], a ; species
|
ld [de], a ; BOXLIST_SPECIES
|
||||||
inc de
|
inc de
|
||||||
ld a, [wBillsPC_LoadedBox]
|
ld a, [wBillsPC_LoadedBox]
|
||||||
ld [de], a ; box number
|
ld [de], a ; BOXLIST_BOXNUM
|
||||||
inc de
|
inc de
|
||||||
ld a, [wBillsPCTempListIndex]
|
ld a, [wBillsPCTempListIndex]
|
||||||
ld [de], a ; list index
|
ld [de], a ; BOXLIST_INDEX
|
||||||
inc a
|
inc a
|
||||||
ld [wBillsPCTempListIndex], a
|
ld [wBillsPCTempListIndex], a
|
||||||
inc de
|
inc de
|
||||||
@@ -1407,7 +1407,7 @@ ENDM
|
|||||||
CopyBoxmonSpecies:
|
CopyBoxmonSpecies:
|
||||||
xor a
|
xor a
|
||||||
ld hl, wBillsPCPokemonList
|
ld hl, wBillsPCPokemonList
|
||||||
ld bc, 3 * 30
|
ld bc, BOXLIST_SIZE * MONS_PER_BOX_JP
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld de, wBillsPCPokemonList
|
ld de, wBillsPCPokemonList
|
||||||
xor a
|
xor a
|
||||||
@@ -1444,10 +1444,10 @@ BillsPC_GetSelectedPokemonSpecies:
|
|||||||
add [hl]
|
add [hl]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, wBillsPCPokemonList
|
ld hl, wBillsPCPokemonList + BOXLIST_SPECIES
|
||||||
add hl, de
|
rept BOXLIST_SIZE
|
||||||
add hl, de
|
|
||||||
add hl, de
|
add hl, de
|
||||||
|
endr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@@ -921,9 +921,7 @@ SECTION UNION "Overworld Map", WRAM0
|
|||||||
|
|
||||||
; bill's pc data
|
; bill's pc data
|
||||||
wBillsPCData::
|
wBillsPCData::
|
||||||
wBillsPCPokemonList::
|
wBillsPCPokemonList:: ds BOXLIST_SIZE * MONS_PER_BOX_JP
|
||||||
; (species, box number, list index) x30
|
|
||||||
ds 3 * 30
|
|
||||||
ds 720
|
ds 720
|
||||||
wBillsPC_ScrollPosition:: db
|
wBillsPC_ScrollPosition:: db
|
||||||
wBillsPC_CursorPosition:: db
|
wBillsPC_CursorPosition:: db
|
||||||
|
Reference in New Issue
Block a user