mirror of
https://github.com/pret/pokered.git
synced 2024-10-22 22:55:31 +00:00
Sync more with pokeyellow
This commit is contained in:
parent
379a563c43
commit
2db54ecb9b
4 changed files with 21 additions and 16 deletions
|
@ -27,7 +27,7 @@ AddItemToInventory_::
|
|||
ld a, [hli]
|
||||
and a
|
||||
jr z, .addNewItem
|
||||
.loop
|
||||
.notAtEndOfInventory
|
||||
ld a, [hli]
|
||||
ld b, a ; b = ID of current item in table
|
||||
ld a, [wcf91] ; a = ID of item being added
|
||||
|
@ -36,7 +36,7 @@ AddItemToInventory_::
|
|||
inc hl
|
||||
ld a, [hl]
|
||||
cp $ff ; is it the end of the table?
|
||||
jr nz, .loop
|
||||
jr nz, .notAtEndOfInventory
|
||||
.addNewItem ; add an item not yet in the inventory
|
||||
pop hl
|
||||
ld a, d
|
||||
|
@ -73,7 +73,7 @@ AddItemToInventory_::
|
|||
; if so, store 99 in the current slot and store the rest in a new slot
|
||||
ld a, 99
|
||||
ld [hli], a
|
||||
jp .loop
|
||||
jp .notAtEndOfInventory
|
||||
.increaseItemQuantityFailed
|
||||
pop hl
|
||||
and a
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
PrintWaitingText::
|
||||
hlcoord 3, 10
|
||||
ld b, $1
|
||||
ld c, $b
|
||||
ld b, 1
|
||||
ld c, 11
|
||||
ld a, [wIsInBattle]
|
||||
and a
|
||||
jr z, .asm_4c17
|
||||
jr z, .trade
|
||||
; battle
|
||||
call TextBoxBorder
|
||||
jr .asm_4c1a
|
||||
.asm_4c17
|
||||
jr .border_done
|
||||
.trade
|
||||
call CableClub_TextBoxBorder
|
||||
.asm_4c1a
|
||||
.border_done
|
||||
hlcoord 4, 11
|
||||
ld de, WaitingText
|
||||
call PlaceString
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
; divide hMoney by hDivideBCDDivisor
|
||||
; return output in hDivideBCDQuotient (same as hDivideBCDDivisor)
|
||||
; used only to halve player money upon losing a fight
|
||||
DivideBCDPredef::
|
||||
DivideBCDPredef2::
|
||||
DivideBCDPredef3::
|
||||
DivideBCDPredef3:: ; only used function
|
||||
DivideBCDPredef4::
|
||||
call GetPredefRegisters
|
||||
|
||||
|
@ -40,6 +43,7 @@ DivideBCD::
|
|||
and $f0
|
||||
ldh [hDivideBCDDivisor+2], a
|
||||
jr .mulBy10Loop
|
||||
|
||||
.next
|
||||
push de
|
||||
push de
|
||||
|
|
Loading…
Reference in a new issue