summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-06-01 09:57:59 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-06-01 09:57:59 -0400
commit94bc94817c8f371c0e0566b2dd3534d3e8832d22 (patch)
tree6c7b15e73800163b952c62fddb9acdb120284e8c
parent4b91cc770e8fc83353f962a4a6f9ebef6eb952c8 (diff)
Celadon Diner
-rw-r--r--data/map_header_banks.asm2
-rw-r--r--data/map_header_pointers.asm2
-rw-r--r--engine/bank3c.asm4
-rwxr-xr-xmain.asm8
-rwxr-xr-xscripts/celadondiner.asm36
-rwxr-xr-xscripts/celadondiner2.asm38
6 files changed, 50 insertions, 40 deletions
diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm
index e32354f1..bd83e957 100644
--- a/data/map_header_banks.asm
+++ b/data/map_header_banks.asm
@@ -138,7 +138,7 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4)
db BANK(CeladonGameCorner_h)
db BANK(CeladonMart5_h)
db BANK(CeladonPrizeRoom_h)
- db $12 ; db BANK(CeladonDiner_h)
+ db BANK(CeladonDiner_h)
db $12 ; db BANK(CeladonHouse_h)
db $12 ; db BANK(CeladonHotel_h)
db $17 ; db BANK(LavenderPokecenter_h)
diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm
index 62179537..9a774a51 100644
--- a/data/map_header_pointers.asm
+++ b/data/map_header_pointers.asm
@@ -138,7 +138,7 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2)
dw CeladonGameCorner_h
dw CeladonMart5_h
dw CeladonPrizeRoom_h
- dw $5168 ; dw CeladonDiner_h
+ dw CeladonDiner_h
dw $51e8 ; dw CeladonHouse_h
dw $5243 ; dw CeladonHotel_h ;id=140
dw $479c ; dw LavenderPokecenter_h
diff --git a/engine/bank3c.asm b/engine/bank3c.asm
index 2e0a8ee2..907960be 100644
--- a/engine/bank3c.asm
+++ b/engine/bank3c.asm
@@ -384,8 +384,8 @@ PikachuMovementData_f1f2c:
db $35
db $3f
-Func_f1f31:
- dr $f1f31, $f218c
+INCLUDE "scripts/celadondiner2.asm"
+ dr $f1f77, $f218c
INCLUDE "scripts/mtmoonpokecenter2.asm"
diff --git a/main.asm b/main.asm
index cd6b79cb..595bc821 100755
--- a/main.asm
+++ b/main.asm
@@ -961,7 +961,13 @@ INCLUDE "scripts/celadonprizeroom.asm"
INCLUDE "data/mapObjects/celadonprizeroom.asm"
CeladonPrizeRoomBlocks:
INCBIN "maps/celadonprizeroom.blk"
- dr $49168,$492a9
+
+INCLUDE "data/mapHeaders/celadondiner.asm"
+INCLUDE "scripts/celadondiner.asm"
+INCLUDE "data/mapObjects/celadondiner.asm"
+CeladonDinerBlocks:
+INCBIN "maps/celadondiner.blk"
+ dr $491e8,$492a9
INCLUDE "data/mapHeaders/mtmoonpokecenter.asm"
INCLUDE "scripts/mtmoonpokecenter.asm"
diff --git a/scripts/celadondiner.asm b/scripts/celadondiner.asm
index be1ed4c8..944a0952 100755
--- a/scripts/celadondiner.asm
+++ b/scripts/celadondiner.asm
@@ -27,39 +27,5 @@ CeladonDinerText4: ; 4916e (12:516e)
CeladonDinerText5: ; 49173 (12:5173)
TX_ASM
- CheckEvent EVENT_GOT_COIN_CASE
- jr nz, .asm_eb14d
- ld hl, CeladonDinerText_491a7
- call PrintText
- lb bc, COIN_CASE, 1
- call GiveItem
- jr nc, .BagFull
- SetEvent EVENT_GOT_COIN_CASE
- ld hl, ReceivedCoinCaseText
- call PrintText
- jr .asm_68b61
-.BagFull
- ld hl, CoinCaseNoRoomText
- call PrintText
- jr .asm_68b61
-.asm_eb14d
- ld hl, CeladonDinerText_491b7
- call PrintText
-.asm_68b61
+ callab Func_f1f31
jp TextScriptEnd
-
-CeladonDinerText_491a7: ; 491a7 (12:51a7)
- TX_FAR _CeladonDinerText_491a7
- db "@"
-
-ReceivedCoinCaseText: ; 491ac (12:51ac)
- TX_FAR _ReceivedCoinCaseText
- db $11, "@"
-
-CoinCaseNoRoomText: ; 491b2 (12:51b2)
- TX_FAR _CoinCaseNoRoomText
- db "@"
-
-CeladonDinerText_491b7: ; 491b7 (12:51b7)
- TX_FAR _CeladonDinerText_491b7
- db "@"
diff --git a/scripts/celadondiner2.asm b/scripts/celadondiner2.asm
new file mode 100755
index 00000000..cfab218b
--- /dev/null
+++ b/scripts/celadondiner2.asm
@@ -0,0 +1,38 @@
+Func_f1f31:
+ CheckEvent EVENT_GOT_COIN_CASE
+ jr nz, .asm_eb14d
+ ld hl, CeladonDinerText_491a7
+ call PrintText
+ lb bc, COIN_CASE, 1
+ call GiveItem
+ jr nc, .BagFull
+ SetEvent EVENT_GOT_COIN_CASE
+ ld hl, ReceivedCoinCaseText
+ call PrintText
+ jr .asm_68b61
+.BagFull
+ ld hl, CoinCaseNoRoomText
+ call PrintText
+ jr .asm_68b61
+.asm_eb14d
+ ld hl, CeladonDinerText_491b7
+ call PrintText
+.asm_68b61
+ ret
+
+CeladonDinerText_491a7: ; 491a7 (12:51a7)
+ TX_FAR _CeladonDinerText_491a7
+ db "@"
+
+ReceivedCoinCaseText: ; 491ac (12:51ac)
+ TX_FAR _ReceivedCoinCaseText
+ TX_SFX_KEY_ITEM
+ db "@"
+
+CoinCaseNoRoomText: ; 491b2 (12:51b2)
+ TX_FAR _CoinCaseNoRoomText
+ db "@"
+
+CeladonDinerText_491b7: ; 491b7 (12:51b7)
+ TX_FAR _CeladonDinerText_491b7
+ db "@"