shithub: pokecrystal

Download patch

ref: 6bba0e7fd14a4b166e8779392c6ff994a42e14f1
parent: 0e63b0433fbabe1559291590d3450fb218d3fd6a
author: yenatch <[email protected]>
date: Mon Apr 28 12:43:11 EDT 2014

Add constants for unused items, including Town Map and Poke Flute.

--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -4,6 +4,7 @@
 BRIGHTPOWDER  EQU $03
 GREAT_BALL    EQU $04
 POKE_BALL     EQU $05
+TOWN_MAP      EQU $06
 BICYCLE       EQU $07
 MOON_STONE    EQU $08
 ANTIDOTE      EQU $09
@@ -22,6 +23,7 @@
 FIRE_STONE    EQU $16
 THUNDERSTONE  EQU $17
 WATER_STONE   EQU $18
+ITEM_19       EQU $19
 HP_UP         EQU $1A
 PROTEIN       EQU $1B
 IRON          EQU $1C
@@ -41,15 +43,18 @@
 SUPER_REPEL   EQU $2A
 MAX_REPEL     EQU $2B
 DIRE_HIT      EQU $2C
+ITEM_2D       EQU $2D
 FRESH_WATER   EQU $2E
 SODA_POP      EQU $2F
 LEMONADE      EQU $30
 X_ATTACK      EQU $31
+ITEM_32       EQU $32
 X_DEFEND      EQU $33
 X_SPEED       EQU $34
 X_SPECIAL     EQU $35
 COIN_CASE     EQU $36
 ITEMFINDER    EQU $37
+POKE_FLUTE    EQU $38
 EXP_SHARE     EQU $39
 OLD_ROD       EQU $3A
 GOOD_ROD      EQU $3B
@@ -83,6 +88,7 @@
 BIG_MUSHROOM  EQU $57
 SILVERPOWDER  EQU $58
 BLU_APRICORN  EQU $59
+ITEM_5A       EQU $5A
 AMULET_COIN   EQU $5B
 YLW_APRICORN  EQU $5C
 GRN_APRICORN  EQU $5D
@@ -92,6 +98,7 @@
 WHT_APRICORN  EQU $61
 BLACKBELT     EQU $62
 BLK_APRICORN  EQU $63
+ITEM_64       EQU $64
 PNK_APRICORN  EQU $65
 BLACKGLASSES  EQU $66
 SLOWPOKETAIL  EQU $67
@@ -111,6 +118,7 @@
 MIRACLE_SEED  EQU $75
 THICK_CLUB    EQU $76
 FOCUS_BAND    EQU $77
+ITEM_78       EQU $78
 ENERGYPOWDER  EQU $79
 ENERGY_ROOT   EQU $7A
 HEAL_POWDER   EQU $7B
@@ -125,15 +133,27 @@
 STAR_PIECE    EQU $84
 BASEMENT_KEY  EQU $85
 PASS          EQU $86
+ITEM_87       EQU $87
+ITEM_88       EQU $88
+ITEM_89       EQU $89
 CHARCOAL      EQU $8A
 BERRY_JUICE   EQU $8B
 SCOPE_LENS    EQU $8C
+ITEM_8D       EQU $8D
+ITEM_8E       EQU $8E
 METAL_COAT    EQU $8F
 DRAGON_FANG   EQU $90
+ITEM_91       EQU $91
 LEFTOVERS     EQU $92
+ITEM_93       EQU $93
+ITEM_94       EQU $94
+ITEM_95       EQU $95
 MYSTERYBERRY  EQU $96
 DRAGON_SCALE  EQU $97
 BERSERK_GENE  EQU $98
+ITEM_99       EQU $99
+ITEM_9A       EQU $9A
+ITEM_9B       EQU $9B
 SACRED_ASH    EQU $9C
 HEAVY_BALL    EQU $9D
 FLOWER_MAIL   EQU $9E
@@ -140,6 +160,7 @@
 LEVEL_BALL    EQU $9F
 LURE_BALL     EQU $A0
 FAST_BALL     EQU $A1
+ITEM_A2       EQU $A2
 LIGHT_BALL    EQU $A3
 FRIEND_BALL   EQU $A4
 MOON_BALL     EQU $A5
@@ -148,12 +169,15 @@
 GORGEOUS_BOX  EQU $A8
 SUN_STONE     EQU $A9
 POLKADOT_BOW  EQU $AA
+ITEM_AB       EQU $AB
 UP_GRADE      EQU $AC
 BERRY         EQU $AD
 GOLD_BERRY    EQU $AE
 SQUIRTBOTTLE  EQU $AF
+ITEM_B0       EQU $B0
 PARK_BALL     EQU $B1
 RAINBOW_WING  EQU $B2
+ITEM_B3       EQU $B3
 BRICK_PIECE   EQU $B4
 SURF_MAIL     EQU $B5
 LITEBLUEMAIL  EQU $B6
@@ -164,10 +188,12 @@
 BLUESKY_MAIL  EQU $BB
 MUSIC_MAIL    EQU $BC
 MIRAGE_MAIL   EQU $BD
+ITEM_BE       EQU $BE
 TM_01         EQU $BF
 TM_02         EQU $C0
 TM_03         EQU $C1
 TM_04         EQU $C2
+ITEM_C3       EQU $C3
 TM_05         EQU $C4
 TM_06         EQU $C5
 TM_07         EQU $C6
@@ -192,6 +218,7 @@
 TM_26         EQU $D9
 TM_27         EQU $DA
 TM_28         EQU $DB
+ITEM_DC       EQU $DC
 TM_29         EQU $DD
 TM_30         EQU $DE
 TM_31         EQU $DF
@@ -221,6 +248,7 @@
 HM_05         EQU $F7
 HM_06         EQU $F8
 HM_07         EQU $F9
+HM_08         EQU $FA
 
 NUM_TMS EQU HM_01 - TM_01 - 2
 
@@ -231,8 +259,8 @@
 TM_HM    EQU 4
 
 ; item actions
-CANT_SELECT EQU %01000000
-CANT_TOSS   EQU %10000000
+CANT_SELECT EQU 1 << 6
+CANT_TOSS   EQU 1 << 7
 
 ; held item effects
 HELD_BERRY          EQU $01
--- a/items/item_effects.asm
+++ b/items/item_effects.asm
@@ -19,7 +19,7 @@
 	dw Brightpowder
 	dw GreatBall
 	dw PokeBall
-	dw Item06
+	dw TownMap
 	dw Bicycle
 	dw MoonStone
 	dw Antidote
@@ -69,7 +69,7 @@
 	dw XSpecial
 	dw CoinCase
 	dw Itemfinder
-	dw Item38
+	dw PokeFlute
 	dw ExpShare
 	dw OldRod
 	dw GoodRod
@@ -1152,7 +1152,7 @@
 	callba Function2715c
 	ret
 
-Item06: ; ee01
+TownMap: ; ee01
 	callba Function91ae1
 	ret
 ; ee08
@@ -2374,7 +2374,7 @@
 ; f50c
 
 
-Item38: ; f50c
+PokeFlute: ; f50c
 	ld a, [IsInBattle]
 	and a
 	jr nz, .asm_f512
--- a/main.asm
+++ b/main.asm
@@ -37376,18 +37376,18 @@
 
 Unknown_28785: ; 28785
 ; Alternate mappings for unused items.
-	db $19, LEFTOVERS
-	db $2d, BITTER_BERRY
-	db $32, GOLD_BERRY
-	db $5a, BERRY
-	db $64, BERRY
-	db $78, BERRY
-	db $87, BERRY
-	db $be, BERRY
-	db $c3, BERRY
-	db $dc, BERRY
-	db $fa, BERRY
-	db $ff, BERRY
+	db ITEM_19, LEFTOVERS
+	db ITEM_2D, BITTER_BERRY
+	db ITEM_32, GOLD_BERRY
+	db ITEM_5A, BERRY
+	db ITEM_64, BERRY
+	db ITEM_78, BERRY
+	db ITEM_87, BERRY
+	db ITEM_BE, BERRY
+	db ITEM_C3, BERRY
+	db ITEM_DC, BERRY
+	db HM_08,   BERRY
+	db $ff,     BERRY
 	db $00
 ; 2879e