split item interfaces into common/item.asm

This commit is contained in:
yenatch 2013-09-08 01:45:54 -04:00
parent f0cf86777b
commit 3b70005fb0
2 changed files with 77 additions and 74 deletions

76
common/item.asm Normal file
View File

@ -0,0 +1,76 @@
DoItemEffect: ; 2f3f
callba _DoItemEffect
ret
; 2f46
CheckTossableItem: ; 2f46
push hl
push de
push bc
callba _CheckTossableItem
pop bc
pop de
pop hl
ret
; 2f53
TossItem: ; 2f53
push hl
push de
push bc
ld a, [hROMBank]
push af
ld a, BANK(_TossItem)
rst Bankswitch
call _TossItem
pop bc
ld a, b
rst Bankswitch
pop bc
pop de
pop hl
ret
; 2f66
ReceiveItem: ; 2f66
push bc
ld a, [hROMBank]
push af
ld a, BANK(_ReceiveItem)
rst Bankswitch
push hl
push de
call _ReceiveItem
pop de
pop hl
pop bc
ld a, b
rst Bankswitch
pop bc
ret
; 2f79
CheckItem: ; 2f79
push hl
push de
push bc
ld a, [hROMBank]
push af
ld a, BANK(_CheckItem)
rst Bankswitch
call _CheckItem
pop bc
ld a, b
rst Bankswitch
pop bc
pop de
pop hl
ret
; 2f8c

View File

@ -807,81 +807,8 @@ Function2f3e: ; 2f3e
ret
; 2f3f
DoItemEffect: ; 2f3f
callba _DoItemEffect
ret
; 2f46
CheckTossableItem: ; 2f46
push hl
push de
push bc
callba _CheckTossableItem
pop bc
pop de
pop hl
ret
; 2f53
TossItem: ; 2f53
push hl
push de
push bc
ld a, [hROMBank]
push af
ld a, BANK(_TossItem)
rst Bankswitch
call _TossItem
pop bc
ld a, b
rst Bankswitch
pop bc
pop de
pop hl
ret
; 2f66
ReceiveItem: ; 2f66
push bc
ld a, [hROMBank]
push af
ld a, BANK(_ReceiveItem)
rst Bankswitch
push hl
push de
call _ReceiveItem
pop de
pop hl
pop bc
ld a, b
rst Bankswitch
pop bc
ret
; 2f79
CheckItem: ; 2f79
push hl
push de
push bc
ld a, [hROMBank]
push af
ld a, BANK(_CheckItem)
rst Bankswitch
call _CheckItem
pop bc
ld a, b
rst Bankswitch
pop bc
pop de
pop hl
ret
; 2f8c
INCLUDE "common/item.asm"
Random: ; 2f8c