Vending Machine routine and texts.

This commit is contained in:
Marcus Huderle 2013-12-05 11:17:33 -06:00
parent 87ccef0e43
commit 1e5ba689bc

View file

@ -6831,9 +6831,9 @@ DisplayTextID: ; 2920 (0:2920)
jp z,FuncTX_PokemonCenterPC jp z,FuncTX_PokemonCenterPC
cp a,$f5 ; Vending Machine cp a,$f5 ; Vending Machine
jr nz,.notVendingMachine jr nz,.notVendingMachine
ld b,BANK(Unknown_74ee0) ld b,BANK(VendingMachineMenu)
ld hl,Unknown_74ee0 ld hl,VendingMachineMenu
call Bankswitch call Bankswitch ; jump banks to vending machine routine
jr AfterDisplayingTextID jr AfterDisplayingTextID
.notVendingMachine .notVendingMachine
cp a,$f7 ; slot machine cp a,$f7 ; slot machine
@ -105009,8 +105009,8 @@ CeruleanHouse2Object: ; 0x74ebe (size=34)
EVENT_DISP $4, $7, $2 EVENT_DISP $4, $7, $2
EVENT_DISP $4, $7, $3 EVENT_DISP $4, $7, $3
Unknown_74ee0: ; 74ee0 (1d:4ee0) VendingMachineMenu: ; 74ee0 (1d:4ee0)
ld hl, UnnamedText_74f99 ld hl, VendingMachineText1
call PrintText call PrintText
ld a, $13 ld a, $13
ld [$d125], a ld [$d125], a
@ -105036,11 +105036,11 @@ Unknown_74ee0: ; 74ee0 (1d:4ee0)
call UpdateSprites call UpdateSprites
FuncCoord 2, 5 ; $c406 FuncCoord 2, 5 ; $c406
ld hl, Coord ld hl, Coord
ld de, Unnamed_74f9e ld de, VendingMachineText2
call PlaceString call PlaceString
FuncCoord 9, 6 ; $c421 FuncCoord 9, 6 ; $c421
ld hl, Coord ld hl, Coord
ld de, Unnamed_74fc3 ld de, VendingMachineText3
call PlaceString call PlaceString
ld hl, $d730 ld hl, $d730
res 6, [hl] res 6, [hl]
@ -105056,18 +105056,18 @@ Unknown_74ee0: ; 74ee0 (1d:4ee0)
ld a, $2 ld a, $2
ld [$FF00+$a0], a ld [$FF00+$a0], a
call HasEnoughMoney call HasEnoughMoney
jr nc, .asm_74f54 jr nc, .enoughMoney
ld hl, UnnamedText_74fd3 ld hl, VendingMachineText4
jp PrintText jp PrintText ; exits here if not enough money
.asm_74f54 .enoughMoney
call Unknown_74fe7 call Unknown_74fe7
ld a, [$FF00+$db] ld a, [$FF00+$db] ; selected refreshment item id
ld b, a ld b, a
ld c, 1 ld c, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld b, $3c ld b, $3c ; number of times to play the "brrrrr" sound
.asm_74f63 .playDeliverySound ; 0x74f63
ld c, $2 ld c, $2
call DelayFrames call DelayFrames
push bc push bc
@ -105075,8 +105075,9 @@ Unknown_74ee0: ; 74ee0 (1d:4ee0)
call PlaySound call PlaySound
pop bc pop bc
dec b dec b
jr nz, .asm_74f63 jr nz, .playDeliverySound
ld hl, UnnamedText_74fd8 .asm_74f72
ld hl, VendingMachineText5
call PrintText call PrintText
ld hl, $ffde ld hl, $ffde
ld de, W_PLAYERMONEY1 ; $d349 ld de, W_PLAYERMONEY1 ; $d349
@ -105087,40 +105088,40 @@ Unknown_74ee0: ; 74ee0 (1d:4ee0)
ld [$d125], a ld [$d125], a
jp DisplayTextBoxID jp DisplayTextBoxID
.BagFull .BagFull
ld hl, UnnamedText_74fdd ld hl, VendingMachineText6
jp PrintText jp PrintText
.asm_74f93 .asm_74f93
ld hl, UnnamedText_74fe2 ld hl, VendingMachineText7
jp PrintText jp PrintText
UnnamedText_74f99: ; 74f99 (1d:4f99) VendingMachineText1: ; 74f99 (1d:4f99)
TX_FAR _UnnamedText_74f99 TX_FAR _VendingMachineText1
db "@" db "@"
Unnamed_74f9e: ; 74f9e (1d:4f9e) VendingMachineText2: ; 74f9e (1d:4f9e)
db "FRESH WATER",$4E db "FRESH WATER",$4E
db "SODA POP",$4E db "SODA POP",$4E
db "LEMONADE",$4E db "LEMONADE",$4E
db "CANCEL@" db "CANCEL@"
Unnamed_74fc3: ; 74fc3 (1d:4fc3) VendingMachineText3: ; 74fc3 (1d:4fc3)
db "¥200",$4E db "¥200",$4E
db "¥300",$4E db "¥300",$4E
db "¥350",$4E,"@" db "¥350",$4E,"@"
UnnamedText_74fd3: ; 74fd3 (1d:4fd3) VendingMachineText4: ; 74fd3 (1d:4fd3)
TX_FAR _UnnamedText_74fd3 TX_FAR _VendingMachineText4
db "@" db "@"
UnnamedText_74fd8: ; 74fd8 (1d:4fd8) VendingMachineText5: ; 74fd8 (1d:4fd8)
TX_FAR _UnnamedText_74fd8 TX_FAR _VendingMachineText5
db "@" db "@"
UnnamedText_74fdd: ; 74fdd (1d:4fdd) VendingMachineText6: ; 74fdd (1d:4fdd)
TX_FAR _UnnamedText_74fdd TX_FAR _VendingMachineText6
db "@" db "@"
UnnamedText_74fe2: ; 74fe2 (1d:4fe2) VendingMachineText7: ; 74fe2 (1d:4fe2)
TX_FAR _UnnamedText_74fe2 TX_FAR _VendingMachineText7
db "@" db "@"
Unknown_74fe7: ; 74fe7 (1d:4fe7) Unknown_74fe7: ; 74fe7 (1d:4fe7)
@ -122872,24 +122873,24 @@ _CeladonMartRoofText6: ; 9ce50 (27:4e50)
db $0, "ROOFTOP SQUARE:", $4f db $0, "ROOFTOP SQUARE:", $4f
db "VENDING MACHINES", $57 db "VENDING MACHINES", $57
_UnnamedText_74f99: ; 9ce72 (27:4e72) _VendingMachineText1: ; 9ce72 (27:4e72)
db $0, "A vending machine!", $4f db $0, "A vending machine!", $4f
db "Here's the menu!", $58 db "Here's the menu!", $58
_UnnamedText_74fd3: ; 9ce96 (27:4e96) _VendingMachineText4: ; 9ce96 (27:4e96)
db $0, "Oops, not enough", $4f db $0, "Oops, not enough", $4f
db "money!", $57 db "money!", $57
_UnnamedText_74fd8: ; 9ceaf (27:4eaf) _VendingMachineText5: ; 9ceaf (27:4eaf)
TX_RAM $cf4b TX_RAM $cf4b
db $0, $4f db $0, $4f
db "popped out!", $57 db "popped out!", $57
_UnnamedText_74fdd: ; 9cec0 (27:4ec0) _VendingMachineText6: ; 9cec0 (27:4ec0)
db $0, "There's no more", $4f db $0, "There's no more", $4f
db "room for stuff!", $57 db "room for stuff!", $57
_UnnamedText_74fe2: ; 9cee0 (27:4ee0) _VendingMachineText7: ; 9cee0 (27:4ee0)
db $0, "Not thirsty!", $57 db $0, "Not thirsty!", $57
_CeladonMansion1Text1: ; 9ceee (27:4eee) _CeladonMansion1Text1: ; 9ceee (27:4eee)