Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts: # audio/engine.asm # constants/gfx_constants.asm # constants/map_data_constants.asm # constants/pokemon_data_constants.asm # constants/sprite_constants.asm # constants/wram_constants.asm # data/maps/data.asm # engine/battle/ai/scoring.asm # engine/battle/core.asm # engine/battle/effect_commands.asm # engine/battle/misc.asm # engine/battle_anims/getpokeballwobble.asm # engine/breeding.asm # engine/buy_sell_toss.asm # engine/decorations.asm # engine/events/battle_tower/battle_tower.asm # engine/events/battle_tower/rules.asm # engine/events/buena.asm # engine/events/bug_contest/contest_2.asm # engine/events/daycare.asm # engine/events/dratini.asm # engine/events/halloffame.asm # engine/events/happiness_egg.asm # engine/events/kurt.asm # engine/events/lucky_number.asm # engine/events/magnet_train.asm # engine/events/overworld.asm # engine/events/pokerus/pokerus.asm # engine/events/print_unown.asm # engine/events/print_unown_2.asm # engine/events/unown_walls.asm # engine/item_effects.asm # engine/link.asm # engine/mon_menu.asm # engine/player_object.asm # engine/routines/playslowcry.asm # engine/scripting.asm # engine/search.asm # engine/search2.asm # engine/specials.asm # engine/start_menu.asm # engine/timeset.asm # home/battle_vars.asm # home/map.asm # maps/GoldenrodUndergroundSwitchRoomEntrances.asm # maps/IlexForest.asm # maps/KrissHouse2F.asm # maps/Route39Barn.asm # mobile/mobile_12_2.asm # mobile/mobile_40.asm # mobile/mobile_5f.asm # wram.asm
This commit is contained in:
@@ -33,13 +33,13 @@ SelectApricornForKurt: ; 88018
|
||||
call Kurt_PrintTextWhichApricorn
|
||||
pop bc
|
||||
ld a, c
|
||||
ld [MenuSelection], a
|
||||
ld [wMenuSelection], a
|
||||
call Kurt_SelectApricorn
|
||||
ld a, c
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
and a
|
||||
jr z, .done
|
||||
ld [CurItem], a
|
||||
ld [wCurItem], a
|
||||
ld a, [wMenuCursorY]
|
||||
ld c, a
|
||||
push bc
|
||||
@@ -61,7 +61,7 @@ Kurt_SelectApricorn: ; 88055
|
||||
jr c, .nope
|
||||
ld hl, .MenuHeader
|
||||
call CopyMenuHeader
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
ld [wMenuCursorBuffer], a
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
@@ -71,7 +71,7 @@ Kurt_SelectApricorn: ; 88055
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
jr z, .nope
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
cp -1
|
||||
jr nz, .done
|
||||
|
||||
@@ -96,13 +96,13 @@ Kurt_SelectApricorn: ; 88055
|
||||
db SCROLLINGMENU_DISPLAY_ARROWS ; flags
|
||||
db 4, 7
|
||||
db 1
|
||||
dbw 0, Buffer1
|
||||
dbw 0, wBuffer1
|
||||
dba .Name
|
||||
dba .Quantity
|
||||
dba NULL
|
||||
|
||||
.Name: ; 8809f
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
and a
|
||||
ret z
|
||||
farcall PlaceMenuItemName
|
||||
@@ -110,19 +110,19 @@ Kurt_SelectApricorn: ; 88055
|
||||
; 880ab
|
||||
|
||||
.Quantity: ; 880ab
|
||||
ld a, [MenuSelection]
|
||||
ld [CurItem], a
|
||||
ld a, [wMenuSelection]
|
||||
ld [wCurItem], a
|
||||
call Kurt_GetQuantityOfApricorn
|
||||
ret z
|
||||
ld a, [wItemQuantityChangeBuffer]
|
||||
ld [MenuSelectionQuantity], a
|
||||
ld [wMenuSelectionQuantity], a
|
||||
farcall PlaceMenuItemQuantity
|
||||
ret
|
||||
; 880c2
|
||||
|
||||
Kurt_SelectQuantity: ; 880c2
|
||||
ld a, [CurItem]
|
||||
ld [MenuSelection], a
|
||||
ld a, [wCurItem]
|
||||
ld [wMenuSelection], a
|
||||
call Kurt_GetQuantityOfApricorn
|
||||
jr z, .done
|
||||
ld a, [wItemQuantityChangeBuffer]
|
||||
@@ -187,8 +187,8 @@ PlaceApricornQuantity: ; 88126
|
||||
|
||||
Kurt_GetQuantityOfApricorn: ; 88139
|
||||
push bc
|
||||
ld hl, NumItems
|
||||
ld a, [CurItem]
|
||||
ld hl, wNumItems
|
||||
ld a, [wCurItem]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
.loop
|
||||
@@ -219,27 +219,27 @@ Kurt_GetQuantityOfApricorn: ; 88139
|
||||
; 88161
|
||||
|
||||
Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; 88161
|
||||
; Get the quantity of Apricorns of type [CurItem]
|
||||
; Get the quantity of Apricorns of type [wCurItem]
|
||||
; in the bag. Compatible with multiple stacks.
|
||||
|
||||
; Initialize the search.
|
||||
push de
|
||||
push bc
|
||||
ld hl, NumItems
|
||||
ld a, [CurItem]
|
||||
ld hl, wNumItems
|
||||
ld a, [wCurItem]
|
||||
ld c, a
|
||||
ld e, $0
|
||||
xor a
|
||||
ld [CurItemQuantity], a
|
||||
ld [wCurItemQuantity], a
|
||||
ld a, -1
|
||||
ld [wApricorns], a
|
||||
|
||||
; Search for [CurItem] in the bag.
|
||||
; Search for [wCurItem] in the bag.
|
||||
.loop1
|
||||
; Increase the total count.
|
||||
ld a, [CurItemQuantity]
|
||||
ld a, [wCurItemQuantity]
|
||||
inc a
|
||||
ld [CurItemQuantity], a
|
||||
ld [wCurItemQuantity], a
|
||||
; Get the index of the next item.
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
@@ -255,7 +255,7 @@ Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; 88161
|
||||
ld hl, wApricorns
|
||||
add hl, de
|
||||
inc e
|
||||
ld a, [CurItemQuantity]
|
||||
ld a, [wCurItemQuantity]
|
||||
dec a
|
||||
ld [hli], a
|
||||
ld a, -1
|
||||
@@ -321,7 +321,7 @@ Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; 88161
|
||||
cp -1
|
||||
jr z, .done
|
||||
push hl
|
||||
ld [CurItemQuantity], a
|
||||
ld [wCurItemQuantity], a
|
||||
call Kurt_GetRidOfItem
|
||||
pop hl
|
||||
ld a, [wItemQuantityChangeBuffer]
|
||||
@@ -357,7 +357,7 @@ Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; 88161
|
||||
Kurt_GetAddressOfApricornQuantity: ; 88201
|
||||
push hl
|
||||
push bc
|
||||
ld hl, NumItems
|
||||
ld hl, wNumItems
|
||||
inc hl
|
||||
ld c, a
|
||||
ld b, $0
|
||||
@@ -372,14 +372,14 @@ Kurt_GetAddressOfApricornQuantity: ; 88201
|
||||
|
||||
Kurt_GetRidOfItem: ; 88211
|
||||
push bc
|
||||
ld hl, NumItems
|
||||
ld a, [CurItemQuantity]
|
||||
ld hl, wNumItems
|
||||
ld a, [wCurItemQuantity]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
inc hl
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ld a, [CurItem]
|
||||
ld a, [wCurItem]
|
||||
ld c, a
|
||||
ld a, [hli]
|
||||
cp -1
|
||||
@@ -397,7 +397,7 @@ Kurt_GetRidOfItem: ; 88211
|
||||
|
||||
.okay
|
||||
push bc
|
||||
ld hl, NumItems
|
||||
ld hl, wNumItems
|
||||
ld a, b
|
||||
ld [wItemQuantityChangeBuffer], a
|
||||
call TossItem
|
||||
|
Reference in New Issue
Block a user