mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-14 07:33:44 +01:00
decompile item
This commit is contained in:
parent
867b496f2e
commit
25c669e36b
@ -12985,7 +12985,7 @@ _081A10F4:
|
|||||||
adds r1, r0
|
adds r1, r0
|
||||||
adds r1, 0xBA
|
adds r1, 0xBA
|
||||||
ldrh r0, [r1]
|
ldrh r0, [r1]
|
||||||
bl ItemId_GetItem
|
bl ItemId_GetName
|
||||||
adds r1, r0, 0
|
adds r1, r0, 0
|
||||||
b _081A1174
|
b _081A1174
|
||||||
.pool
|
.pool
|
||||||
|
1921
asm/item.s
1921
asm/item.s
File diff suppressed because it is too large
Load Diff
@ -15368,7 +15368,7 @@ sub_81B83F0: @ 81B83F0
|
|||||||
lsls r0, r1, 24
|
lsls r0, r1, 24
|
||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_80D6E48
|
bl RemovePCItem
|
||||||
b _081B8418
|
b _081B8418
|
||||||
.pool
|
.pool
|
||||||
_081B8410:
|
_081B8410:
|
||||||
|
@ -14810,7 +14810,7 @@ _080CF020:
|
|||||||
beq _080CF0AC
|
beq _080CF0AC
|
||||||
ldr r3, =0x00000d65
|
ldr r3, =0x00000d65
|
||||||
adds r4, r3
|
adds r4, r3
|
||||||
bl ItemId_GetItem
|
bl ItemId_GetName
|
||||||
adds r1, r0, 0
|
adds r1, r0, 0
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
movs r2, 0
|
movs r2, 0
|
||||||
@ -19057,7 +19057,7 @@ sub_80D12B8: @ 80D12B8
|
|||||||
ldr r1, =0x00002234
|
ldr r1, =0x00002234
|
||||||
adds r0, r1
|
adds r0, r1
|
||||||
ldrh r0, [r0]
|
ldrh r0, [r0]
|
||||||
bl ItemId_GetItem
|
bl ItemId_GetName
|
||||||
pop {r1}
|
pop {r1}
|
||||||
bx r1
|
bx r1
|
||||||
.pool
|
.pool
|
||||||
|
@ -4686,7 +4686,7 @@ sub_81C6648: @ 81C6648
|
|||||||
.pool
|
.pool
|
||||||
_081C667C:
|
_081C667C:
|
||||||
ldrh r0, [r5]
|
ldrh r0, [r5]
|
||||||
bl itemid_is_unique
|
bl ItemId_GetImportance
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _081C66A0
|
bne _081C66A0
|
||||||
@ -4799,7 +4799,7 @@ sub_81C674C: @ 81C674C
|
|||||||
.pool
|
.pool
|
||||||
_081C677C:
|
_081C677C:
|
||||||
ldrh r0, [r5]
|
ldrh r0, [r5]
|
||||||
bl itemid_is_unique
|
bl ItemId_GetImportance
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _081C6790
|
bne _081C6790
|
||||||
|
@ -790,7 +790,7 @@ BuyMenuPrintPriceInList: @ 80E0114
|
|||||||
ldr r5, =gStringVar1
|
ldr r5, =gStringVar1
|
||||||
lsls r0, r1, 16
|
lsls r0, r1, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
bl itemid_get_market_price
|
bl ItemId_GetPrice
|
||||||
adds r4, r0, 0
|
adds r4, r0, 0
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
bl GetPriceReduction
|
bl GetPriceReduction
|
||||||
@ -2017,7 +2017,7 @@ _080E0B32:
|
|||||||
bne _080E0B80
|
bne _080E0B80
|
||||||
lsls r0, r5, 16
|
lsls r0, r5, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
bl itemid_get_market_price
|
bl ItemId_GetPrice
|
||||||
adds r4, r0, 0
|
adds r4, r0, 0
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
bl GetPriceReduction
|
bl GetPriceReduction
|
||||||
@ -2259,7 +2259,7 @@ Task_BuyHowManyDialogueHandleInput: @ 80E0D88
|
|||||||
cmp r0, 0x1
|
cmp r0, 0x1
|
||||||
bne _080E0DF0
|
bne _080E0DF0
|
||||||
ldrh r0, [r5, 0xA]
|
ldrh r0, [r5, 0xA]
|
||||||
bl itemid_get_market_price
|
bl ItemId_GetPrice
|
||||||
adds r4, r0, 0
|
adds r4, r0, 0
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
bl GetPriceReduction
|
bl GetPriceReduction
|
||||||
|
@ -58,7 +58,7 @@ MauvilleCity_BikeShop_EventScript_20EC6D:: @ 820EC6D
|
|||||||
|
|
||||||
MauvilleCity_BikeShop_EventScript_20EC87:: @ 820EC87
|
MauvilleCity_BikeShop_EventScript_20EC87:: @ 820EC87
|
||||||
msgbox MauvilleCity_BikeShop_Text_20F1BD, 4
|
msgbox MauvilleCity_BikeShop_Text_20F1BD, 4
|
||||||
special sub_80D6EDC
|
special SwapRegisteredBike
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ gSpecials:: @ 81DBA64
|
|||||||
def_special TrendyPhraseIsOld
|
def_special TrendyPhraseIsOld
|
||||||
def_special sub_811EF6C
|
def_special sub_811EF6C
|
||||||
def_special GetDewfordHallPaintingNameIndex
|
def_special GetDewfordHallPaintingNameIndex
|
||||||
def_special sub_80D6EDC
|
def_special SwapRegisteredBike
|
||||||
def_special CalculatePlayerPartyCount
|
def_special CalculatePlayerPartyCount
|
||||||
def_special CountPartyNonEggMons
|
def_special CountPartyNonEggMons
|
||||||
def_special CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
|
def_special CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
|
||||||
|
@ -108,6 +108,8 @@
|
|||||||
#define ITEM_064 100
|
#define ITEM_064 100
|
||||||
#define ITEM_065 101
|
#define ITEM_065 101
|
||||||
#define ITEM_066 102
|
#define ITEM_066 102
|
||||||
|
|
||||||
|
// Unusable
|
||||||
#define ITEM_TINY_MUSHROOM 103
|
#define ITEM_TINY_MUSHROOM 103
|
||||||
#define ITEM_BIG_MUSHROOM 104
|
#define ITEM_BIG_MUSHROOM 104
|
||||||
#define ITEM_069 105
|
#define ITEM_069 105
|
||||||
@ -126,6 +128,8 @@
|
|||||||
#define ITEM_076 118
|
#define ITEM_076 118
|
||||||
#define ITEM_077 119
|
#define ITEM_077 119
|
||||||
#define ITEM_078 120
|
#define ITEM_078 120
|
||||||
|
|
||||||
|
// Mails
|
||||||
#define ITEM_ORANGE_MAIL 121
|
#define ITEM_ORANGE_MAIL 121
|
||||||
#define ITEM_HARBOR_MAIL 122
|
#define ITEM_HARBOR_MAIL 122
|
||||||
#define ITEM_GLITTER_MAIL 123
|
#define ITEM_GLITTER_MAIL 123
|
||||||
@ -138,6 +142,8 @@
|
|||||||
#define ITEM_DREAM_MAIL 130
|
#define ITEM_DREAM_MAIL 130
|
||||||
#define ITEM_FAB_MAIL 131
|
#define ITEM_FAB_MAIL 131
|
||||||
#define ITEM_RETRO_MAIL 132
|
#define ITEM_RETRO_MAIL 132
|
||||||
|
|
||||||
|
// Berries
|
||||||
#define ITEM_CHERI_BERRY 133
|
#define ITEM_CHERI_BERRY 133
|
||||||
#define ITEM_CHESTO_BERRY 134
|
#define ITEM_CHESTO_BERRY 134
|
||||||
#define ITEM_PECHA_BERRY 135
|
#define ITEM_PECHA_BERRY 135
|
||||||
@ -185,7 +191,7 @@
|
|||||||
#define ITEM_0B1 177
|
#define ITEM_0B1 177
|
||||||
#define ITEM_0B2 178
|
#define ITEM_0B2 178
|
||||||
|
|
||||||
// hold items
|
// Battle Held items
|
||||||
#define ITEM_BRIGHT_POWDER 179
|
#define ITEM_BRIGHT_POWDER 179
|
||||||
#define ITEM_WHITE_HERB 180
|
#define ITEM_WHITE_HERB 180
|
||||||
#define ITEM_MACHO_BRACE 181
|
#define ITEM_MACHO_BRACE 181
|
||||||
@ -261,6 +267,8 @@
|
|||||||
#define ITEM_0FB 251
|
#define ITEM_0FB 251
|
||||||
#define ITEM_0FC 252
|
#define ITEM_0FC 252
|
||||||
#define ITEM_0FD 253
|
#define ITEM_0FD 253
|
||||||
|
|
||||||
|
// Contest held items
|
||||||
#define ITEM_RED_SCARF 254
|
#define ITEM_RED_SCARF 254
|
||||||
#define ITEM_BLUE_SCARF 255
|
#define ITEM_BLUE_SCARF 255
|
||||||
#define ITEM_PINK_SCARF 256
|
#define ITEM_PINK_SCARF 256
|
||||||
|
@ -43,9 +43,6 @@
|
|||||||
|
|
||||||
#define PARTY_SIZE 6
|
#define PARTY_SIZE 6
|
||||||
|
|
||||||
#define POKEMON_NAME_LENGTH 10
|
|
||||||
#define OT_NAME_LENGTH 7
|
|
||||||
|
|
||||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||||
#define max(a, b) ((a) >= (b) ? (a) : (b))
|
#define max(a, b) ((a) >= (b) ? (a) : (b))
|
||||||
|
|
||||||
@ -97,6 +94,31 @@ enum LanguageId
|
|||||||
#define GAME_VERSION (VERSION_EMERALD)
|
#define GAME_VERSION (VERSION_EMERALD)
|
||||||
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
||||||
|
|
||||||
|
// capacities of various saveblock objects
|
||||||
|
#define DAYCARE_MON_COUNT 2
|
||||||
|
#define POKEBLOCKS_COUNT 40
|
||||||
|
#define MAP_OBJECTS_COUNT 16
|
||||||
|
#define BERRY_TREES_COUNT 128
|
||||||
|
#define FLAGS_COUNT 300
|
||||||
|
#define VARS_COUNT 256
|
||||||
|
#define MAIL_COUNT 16
|
||||||
|
#define SECRET_BASES_COUNT 20
|
||||||
|
#define PC_ITEMS_COUNT 50
|
||||||
|
#define BAG_ITEMS_COUNT 30
|
||||||
|
#define BAG_KEYITEMS_COUNT 30
|
||||||
|
#define BAG_POKEBALLS_COUNT 16
|
||||||
|
#define BAG_TMHM_COUNT 64
|
||||||
|
#define BAG_BERRIES_COUNT 46
|
||||||
|
|
||||||
|
#define PYRAMID_BAG_ITEMS_COUNT 10
|
||||||
|
|
||||||
|
// string lengths
|
||||||
|
#define ITEM_NAME_LENGTH 14
|
||||||
|
#define POKEMON_NAME_LENGTH 10
|
||||||
|
#define OT_NAME_LENGTH 7
|
||||||
|
#define PLAYER_NAME_LENGTH 8
|
||||||
|
#define MAIL_WORDS_COUNT 9
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MALE,
|
MALE,
|
||||||
@ -129,15 +151,6 @@ enum
|
|||||||
OPTIONS_BATTLE_STYLE_SET
|
OPTIONS_BATTLE_STYLE_SET
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
BAG_ITEMS = 1,
|
|
||||||
BAG_POKEBALLS,
|
|
||||||
BAG_TMsHMs,
|
|
||||||
BAG_BERRIES,
|
|
||||||
BAG_KEYITEMS
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Coords16
|
struct Coords16
|
||||||
{
|
{
|
||||||
s16 x;
|
s16 x;
|
||||||
@ -209,11 +222,11 @@ struct BerryPickingResults // possibly used in the game itself? Size may be wron
|
|||||||
u8 field_F;
|
u8 field_F;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// two arrays for lvl50 and open level
|
||||||
struct PyramidBag
|
struct PyramidBag
|
||||||
{
|
{
|
||||||
u16 items_Lvl50[10];
|
u16 itemId[2][PYRAMID_BAG_ITEMS_COUNT];
|
||||||
u16 items_OpenLvl[10];
|
u8 quantity[2][PYRAMID_BAG_ITEMS_COUNT];
|
||||||
u8 quantity[10];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BerryCrush
|
struct BerryCrush
|
||||||
@ -223,8 +236,6 @@ struct BerryCrush
|
|||||||
u32 unk;
|
u32 unk;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PLAYER_NAME_LENGTH 8
|
|
||||||
|
|
||||||
struct UnknownSaveBlock2Struct
|
struct UnknownSaveBlock2Struct
|
||||||
{
|
{
|
||||||
u8 field_0;
|
u8 field_0;
|
||||||
@ -303,7 +314,7 @@ struct SaveBlock2
|
|||||||
/*0xE1A*/ u16 battlePyramidFloor; // possibly?
|
/*0xE1A*/ u16 battlePyramidFloor; // possibly?
|
||||||
/*0xE1C*/ u8 field_E1C[16];
|
/*0xE1C*/ u8 field_E1C[16];
|
||||||
/*0xE2C*/ struct PyramidBag pyramidBag;
|
/*0xE2C*/ struct PyramidBag pyramidBag;
|
||||||
/*0x???*/ u8 field_notSure[13];
|
/*0x???*/ u8 field_unkown[6];
|
||||||
/*0xE6E*/ u16 battleTentWinStreak;
|
/*0xE6E*/ u16 battleTentWinStreak;
|
||||||
/*0xE70*/ u8 field_E70[72];
|
/*0xE70*/ u8 field_E70[72];
|
||||||
/*0xEB8*/ u16 frontierBattlePoints;
|
/*0xEB8*/ u16 frontierBattlePoints;
|
||||||
@ -417,8 +428,6 @@ struct EasyChatPair
|
|||||||
u16 words[2];
|
u16 words[2];
|
||||||
}; /*size = 0x8*/
|
}; /*size = 0x8*/
|
||||||
|
|
||||||
#define MAIL_WORDS_COUNT 9
|
|
||||||
|
|
||||||
struct MailStruct
|
struct MailStruct
|
||||||
{
|
{
|
||||||
/*0x00*/ u16 words[MAIL_WORDS_COUNT];
|
/*0x00*/ u16 words[MAIL_WORDS_COUNT];
|
||||||
@ -530,8 +539,6 @@ struct DaycareMon
|
|||||||
u32 steps;
|
u32 steps;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DAYCARE_MON_COUNT 2
|
|
||||||
|
|
||||||
struct DayCare
|
struct DayCare
|
||||||
{
|
{
|
||||||
struct DaycareMon mons[DAYCARE_MON_COUNT];
|
struct DaycareMon mons[DAYCARE_MON_COUNT];
|
||||||
@ -552,13 +559,6 @@ struct RecordMixingDayCareMail
|
|||||||
bool16 holdsItem[DAYCARE_MON_COUNT];
|
bool16 holdsItem[DAYCARE_MON_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define POKEBLOCKS_COUNT 40
|
|
||||||
#define MAP_OBJECTS_COUNT 16
|
|
||||||
#define BERRY_TREES_COUNT 128
|
|
||||||
#define FLAGS_COUNT 300
|
|
||||||
#define VARS_COUNT 256
|
|
||||||
#define MAIL_COUNT 16
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
LILYCOVE_LADY_QUIZ,
|
LILYCOVE_LADY_QUIZ,
|
||||||
@ -645,16 +645,16 @@ struct SaveBlock1
|
|||||||
/*0x32*/ u16 mapDataId;
|
/*0x32*/ u16 mapDataId;
|
||||||
/*0x34*/ u16 mapView[0x100];
|
/*0x34*/ u16 mapView[0x100];
|
||||||
/*0x234*/ u8 playerPartyCount;
|
/*0x234*/ u8 playerPartyCount;
|
||||||
/*0x238*/ struct Pokemon playerParty[6];
|
/*0x238*/ struct Pokemon playerParty[PARTY_SIZE];
|
||||||
/*0x490*/ u32 money;
|
/*0x490*/ u32 money;
|
||||||
/*0x494*/ u16 coins;
|
/*0x494*/ u16 coins;
|
||||||
/*0x496*/ u16 registeredItem; // registered for use with SELECT button
|
/*0x496*/ u16 registeredItem; // registered for use with SELECT button
|
||||||
/*0x498*/ struct ItemSlot pcItems[50];
|
/*0x498*/ struct ItemSlot pcItems[PC_ITEMS_COUNT];
|
||||||
/*0x560*/ struct ItemSlot bagPocket_Items[30];
|
/*0x560*/ struct ItemSlot bagPocket_Items[BAG_ITEMS_COUNT];
|
||||||
/*0x5D8*/ struct ItemSlot bagPocket_KeyItems[30];
|
/*0x5D8*/ struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT];
|
||||||
/*0x650*/ struct ItemSlot bagPocket_PokeBalls[16];
|
/*0x650*/ struct ItemSlot bagPocket_PokeBalls[BAG_POKEBALLS_COUNT];
|
||||||
/*0x690*/ struct ItemSlot bagPocket_TMHM[64];
|
/*0x690*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT];
|
||||||
/*0x790*/ struct ItemSlot bagPocket_Berries[46];
|
/*0x790*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT];
|
||||||
/*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT];
|
/*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT];
|
||||||
/*0x988*/ u8 seen1[52];
|
/*0x988*/ u8 seen1[52];
|
||||||
/*0x9BC*/ u16 berryBlenderRecords[3];
|
/*0x9BC*/ u16 berryBlenderRecords[3];
|
||||||
@ -667,7 +667,7 @@ struct SaveBlock1
|
|||||||
/*0x139C*/ u16 vars[VARS_COUNT];
|
/*0x139C*/ u16 vars[VARS_COUNT];
|
||||||
/*0x159C*/ u32 gameStats[NUM_GAME_STATS];
|
/*0x159C*/ u32 gameStats[NUM_GAME_STATS];
|
||||||
/*0x169C*/ struct BerryTree berryTrees[BERRY_TREES_COUNT];
|
/*0x169C*/ struct BerryTree berryTrees[BERRY_TREES_COUNT];
|
||||||
/*0x1A9C*/ struct SecretBaseRecord secretBases[20];
|
/*0x1A9C*/ struct SecretBaseRecord secretBases[SECRET_BASES_COUNT];
|
||||||
/*0x271C*/ u8 playerRoomDecor[12];
|
/*0x271C*/ u8 playerRoomDecor[12];
|
||||||
/*0x2728*/ u8 playerRoomDecorPos[12];
|
/*0x2728*/ u8 playerRoomDecorPos[12];
|
||||||
/*0x2734*/ u8 decorDesk[10];
|
/*0x2734*/ u8 decorDesk[10];
|
||||||
|
@ -1,11 +1,21 @@
|
|||||||
#ifndef ITEM_H
|
#ifndef GUARD_ITEM_H
|
||||||
#define ITEM_H
|
#define GUARD_ITEM_H
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ITEMS_POCKET,
|
||||||
|
BALLS_POCKET,
|
||||||
|
TMHM_POCKET,
|
||||||
|
BERRIES_POCKET,
|
||||||
|
KEYITEMS_POCKET,
|
||||||
|
POCKETS_COUNT
|
||||||
|
};
|
||||||
|
|
||||||
typedef void (*ItemUseFunc)(u8);
|
typedef void (*ItemUseFunc)(u8);
|
||||||
|
|
||||||
struct Item
|
struct Item
|
||||||
{
|
{
|
||||||
u8 name[14];
|
u8 name[ITEM_NAME_LENGTH];
|
||||||
u16 itemId;
|
u16 itemId;
|
||||||
u16 price;
|
u16 price;
|
||||||
u8 holdEffect;
|
u8 holdEffect;
|
||||||
@ -63,10 +73,14 @@ u16 itemid_get_market_price(u16 itemId);
|
|||||||
u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 pocketPos);
|
u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 pocketPos);
|
||||||
void sub_80D6FB4(struct BagPocket*);
|
void sub_80D6FB4(struct BagPocket*);
|
||||||
void sub_80D6F64(struct BagPocket*);
|
void sub_80D6F64(struct BagPocket*);
|
||||||
void sub_80D702C(struct ItemSlot*, s16, u16);
|
void MoveItemSlotInList(struct ItemSlot* itemSlots, u32 a1, u32 a2);
|
||||||
u8 sub_80D6CE4();
|
u8 sub_80D6CE4();
|
||||||
bool8 itemid_is_unique(u16 itemId);
|
bool8 itemid_is_unique(u16 itemId);
|
||||||
void sub_80D6E48(u8, u16);
|
void sub_80D6E48(u8, u16);
|
||||||
void sub_80D6E84(void);
|
void sub_80D6E84(void);
|
||||||
|
void CompactPCItems(void);
|
||||||
|
void SortBerriesOrTMHMs(struct BagPocket *bagPocket);
|
||||||
|
void CompactItemsInBagPocket(struct BagPocket *bagPocket);
|
||||||
|
const u8 *ItemId_GetName(u16 itemId);
|
||||||
|
|
||||||
#endif // ITEM_H
|
#endif // GUARD_ITEM_H
|
||||||
|
@ -55,7 +55,7 @@ void sub_81AAC14(void);
|
|||||||
void sub_81AAC50(void);
|
void sub_81AAC50(void);
|
||||||
void sub_81AAC70(void);
|
void sub_81AAC70(void);
|
||||||
void bag_menu_mail_related(void);
|
void bag_menu_mail_related(void);
|
||||||
|
|
||||||
void CB2_BagMenuFromStartMenu(void);
|
void CB2_BagMenuFromStartMenu(void);
|
||||||
|
u8 sub_81ABB2C(u8 pocketId);
|
||||||
|
|
||||||
#endif //GUARD_item_menu_H
|
#endif //GUARD_item_menu_H
|
||||||
|
@ -10,5 +10,6 @@ void sub_80E9578(void);
|
|||||||
void sub_80E980C(void);
|
void sub_80E980C(void);
|
||||||
u8 *GetSecretBaseMapName(u8 *dest);
|
u8 *GetSecretBaseMapName(u8 *dest);
|
||||||
const u8 *GetSecretBaseTrainerLoseText(void);
|
const u8 *GetSecretBaseTrainerLoseText(void);
|
||||||
|
bool8 CurrentMapIsSecretBase(void);
|
||||||
|
|
||||||
#endif //GUARD_SECRET_BASE_H
|
#endif //GUARD_SECRET_BASE_H
|
||||||
|
@ -137,7 +137,6 @@ SECTIONS {
|
|||||||
src/item_menu_icons.o(.text);
|
src/item_menu_icons.o(.text);
|
||||||
asm/battle_anim_80D51AC.o(.text);
|
asm/battle_anim_80D51AC.o(.text);
|
||||||
src/item.o(.text);
|
src/item.o(.text);
|
||||||
asm/item.o(.text);
|
|
||||||
asm/contest.o(.text);
|
asm/contest.o(.text);
|
||||||
asm/shop.o(.text);
|
asm/shop.o(.text);
|
||||||
src/berry.o(.text);
|
src/berry.o(.text);
|
||||||
|
989
src/item.c
989
src/item.c
File diff suppressed because it is too large
Load Diff
@ -72,7 +72,7 @@ void AddBagItemIconSprite(u16, u8);
|
|||||||
void bag_menu_print_description_box_text(int);
|
void bag_menu_print_description_box_text(int);
|
||||||
void bag_menu_print_cursor(u8, u8);
|
void bag_menu_print_cursor(u8, u8);
|
||||||
void bag_menu_print(u8, u8, const u8*, u8, u8, u8, u8, u8, u8);
|
void bag_menu_print(u8, u8, const u8*, u8, u8, u8, u8, u8, u8);
|
||||||
bool8 itemid_is_unique(u16);
|
bool8 ItemId_GetImportance(u16);
|
||||||
u16 BagGetQuantityByPocketPosition(u8, u16);
|
u16 BagGetQuantityByPocketPosition(u8, u16);
|
||||||
void sub_81AB89C(void);
|
void sub_81AB89C(void);
|
||||||
void task_close_bag_menu_2(u8);
|
void task_close_bag_menu_2(u8);
|
||||||
@ -687,7 +687,7 @@ void sub_81AB520(u8 rboxId, int item_index_in_pocket, u8 a)
|
|||||||
offset = GetStringRightAlignXOffset(7, gStringVar4, 0x77);
|
offset = GetStringRightAlignXOffset(7, gStringVar4, 0x77);
|
||||||
bag_menu_print(rboxId, 7, gStringVar4, offset, a, 0, 0, -1, 0);
|
bag_menu_print(rboxId, 7, gStringVar4, offset, a, 0, 0, -1, 0);
|
||||||
}
|
}
|
||||||
else if (gUnknown_0203CE58.pocket != 4 && (unique = itemid_is_unique(itemId)) == FALSE)
|
else if (gUnknown_0203CE58.pocket != 4 && (unique = ItemId_GetImportance(itemId)) == FALSE)
|
||||||
{
|
{
|
||||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, 1, 2);
|
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, 1, 2);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||||
@ -804,10 +804,10 @@ void sub_81AB9A8(u8 pocketId)
|
|||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
sub_80D6FB4(pocket);
|
SortBerriesOrTMHMs(pocket);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sub_80D6F64(pocket);
|
CompactItemsInBagPocket(pocket);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gUnknown_0203CE54->unk829[pocketId] = 0;
|
gUnknown_0203CE54->unk829[pocketId] = 0;
|
||||||
@ -847,9 +847,9 @@ void sub_81ABAE0(void)
|
|||||||
sub_8122298(&gUnknown_0203CE58.scrollPosition[i], &gUnknown_0203CE58.cursorPosition[i], gUnknown_0203CE54->unk82E[i], gUnknown_0203CE54->unk829[i], 8);
|
sub_8122298(&gUnknown_0203CE58.scrollPosition[i], &gUnknown_0203CE58.cursorPosition[i], gUnknown_0203CE54->unk82E[i], gUnknown_0203CE54->unk829[i], 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_81ABB2C(u8 a)
|
u8 sub_81ABB2C(u8 pocketId)
|
||||||
{
|
{
|
||||||
return gUnknown_0203CE58.scrollPosition[a] + gUnknown_0203CE58.cursorPosition[a];
|
return gUnknown_0203CE58.scrollPosition[pocketId] + gUnknown_0203CE58.cursorPosition[pocketId];
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u8 taskId))
|
void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u8 taskId))
|
||||||
@ -1179,7 +1179,7 @@ void sub_81AC498(u8 taskId)
|
|||||||
sub_81AC590(taskId);
|
sub_81AC590(taskId);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sub_80D702C(gBagPockets[gUnknown_0203CE58.pocket].itemSlots, data[1], realPos);
|
MoveItemSlotInList(gBagPockets[gUnknown_0203CE58.pocket].itemSlots, data[1], realPos);
|
||||||
gUnknown_0203CE54->unk81A = -1;
|
gUnknown_0203CE54->unk81A = -1;
|
||||||
DestroyListMenuTask(data[0], scrollPos, cursorPos);
|
DestroyListMenuTask(data[0], scrollPos, cursorPos);
|
||||||
if (data[1] < realPos)
|
if (data[1] < realPos)
|
||||||
@ -1231,7 +1231,7 @@ void sub_81AC644(u8 unused)
|
|||||||
gUnknown_0203CE54->unk828 = 4;
|
gUnknown_0203CE54->unk828 = 4;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (!itemid_is_unique(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
|
if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
|
||||||
{
|
{
|
||||||
gUnknown_0203CE54->unk820 = gUnknown_0861404B;
|
gUnknown_0203CE54->unk820 = gUnknown_0861404B;
|
||||||
gUnknown_0203CE54->unk828 = 2;
|
gUnknown_0203CE54->unk828 = 2;
|
||||||
@ -1243,7 +1243,7 @@ void sub_81AC644(u8 unused)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (!itemid_is_unique(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
|
if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
|
||||||
{
|
{
|
||||||
gUnknown_0203CE54->unk820 = gUnknown_0861404D;
|
gUnknown_0203CE54->unk820 = gUnknown_0861404D;
|
||||||
gUnknown_0203CE54->unk828 = 2;
|
gUnknown_0203CE54->unk828 = 2;
|
||||||
@ -1255,7 +1255,7 @@ void sub_81AC644(u8 unused)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
if (!itemid_is_unique(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
|
if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
|
||||||
{
|
{
|
||||||
gUnknown_0203CE54->unk820 = gUnknown_0861404F;
|
gUnknown_0203CE54->unk820 = gUnknown_0861404F;
|
||||||
gUnknown_0203CE54->unk828 = 2;
|
gUnknown_0203CE54->unk828 = 2;
|
||||||
@ -1605,7 +1605,7 @@ void ItemMenu_Give(u8 taskId)
|
|||||||
{
|
{
|
||||||
DisplayItemMessage(taskId, 1, gText_CantWriteMail, sub_81AD350);
|
DisplayItemMessage(taskId, 1, gText_CantWriteMail, sub_81AD350);
|
||||||
}
|
}
|
||||||
else if (!itemid_is_unique(gSpecialVar_ItemId))
|
else if (!ItemId_GetImportance(gSpecialVar_ItemId))
|
||||||
{
|
{
|
||||||
if (CalculatePlayerPartyCount() == 0)
|
if (CalculatePlayerPartyCount() == 0)
|
||||||
bag_menu_print_there_is_no_pokemon(taskId);
|
bag_menu_print_there_is_no_pokemon(taskId);
|
||||||
@ -1686,7 +1686,7 @@ void item_menu_type_2(u8 taskId)
|
|||||||
StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeldHere);
|
StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeldHere);
|
||||||
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD350);
|
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD350);
|
||||||
}
|
}
|
||||||
else if (gUnknown_0203CE58.pocket != 4 && !itemid_is_unique(gSpecialVar_ItemId))
|
else if (gUnknown_0203CE58.pocket != 4 && !ItemId_GetImportance(gSpecialVar_ItemId))
|
||||||
{
|
{
|
||||||
unknown_ItemMenu_Confirm(taskId);
|
unknown_ItemMenu_Confirm(taskId);
|
||||||
}
|
}
|
||||||
@ -1700,7 +1700,7 @@ void item_menu_type_b(u8 taskId)
|
|||||||
{
|
{
|
||||||
if (ItemIsMail(gSpecialVar_ItemId) == TRUE)
|
if (ItemIsMail(gSpecialVar_ItemId) == TRUE)
|
||||||
DisplayItemMessage(taskId, 1, gText_CantWriteMail, sub_81AD350);
|
DisplayItemMessage(taskId, 1, gText_CantWriteMail, sub_81AD350);
|
||||||
else if (gUnknown_0203CE58.pocket != 4 && !itemid_is_unique(gSpecialVar_ItemId))
|
else if (gUnknown_0203CE58.pocket != 4 && !ItemId_GetImportance(gSpecialVar_ItemId))
|
||||||
gTasks[taskId].func = unknown_ItemMenu_Confirm;
|
gTasks[taskId].func = unknown_ItemMenu_Confirm;
|
||||||
else
|
else
|
||||||
bag_menu_print_cant_be_held_msg(taskId);
|
bag_menu_print_cant_be_held_msg(taskId);
|
||||||
@ -1738,7 +1738,7 @@ void display_sell_item_ask_str(u8 taskId)
|
|||||||
{
|
{
|
||||||
s16* data = gTasks[taskId].data;
|
s16* data = gTasks[taskId].data;
|
||||||
|
|
||||||
if (itemid_get_market_price(gSpecialVar_ItemId) == 0)
|
if (ItemId_GetPrice(gSpecialVar_ItemId) == 0)
|
||||||
{
|
{
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_CantBuyKeyItem);
|
StringExpandPlaceholders(gStringVar4, gText_CantBuyKeyItem);
|
||||||
@ -1765,7 +1765,7 @@ void sub_81AD680(u8 taskId)
|
|||||||
{
|
{
|
||||||
s16* data = gTasks[taskId].data;
|
s16* data = gTasks[taskId].data;
|
||||||
|
|
||||||
ConvertIntToDecimalStringN(gStringVar1, (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8], 0, 6);
|
ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8], 0, 6);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ICanPayVar1);
|
StringExpandPlaceholders(gStringVar4, gText_ICanPayVar1);
|
||||||
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD6E4);
|
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD6E4);
|
||||||
}
|
}
|
||||||
@ -1790,7 +1790,7 @@ void sub_81AD730(u8 taskId)
|
|||||||
s16* data = gTasks[taskId].data;
|
s16* data = gTasks[taskId].data;
|
||||||
u8 windowId = bag_menu_add_window(8);
|
u8 windowId = bag_menu_add_window(8);
|
||||||
|
|
||||||
sub_81ABCC0(windowId, 1, (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8]);
|
sub_81ABCC0(windowId, 1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]);
|
||||||
bag_menu_AddMoney_window();
|
bag_menu_AddMoney_window();
|
||||||
gTasks[taskId].func = sub_81AD794;
|
gTasks[taskId].func = sub_81AD794;
|
||||||
}
|
}
|
||||||
@ -1801,7 +1801,7 @@ void sub_81AD794(u8 taskId)
|
|||||||
|
|
||||||
if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE)
|
if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE)
|
||||||
{
|
{
|
||||||
sub_81ABCC0(gUnknown_0203CE54->unk818, data[8], (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8]);
|
sub_81ABCC0(gUnknown_0203CE54->unk818, data[8], (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]);
|
||||||
}
|
}
|
||||||
else if (gMain.newKeys & A_BUTTON)
|
else if (gMain.newKeys & A_BUTTON)
|
||||||
{
|
{
|
||||||
@ -1825,7 +1825,7 @@ void sub_81AD84C(u8 taskId)
|
|||||||
s16* data = gTasks[taskId].data;
|
s16* data = gTasks[taskId].data;
|
||||||
|
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||||
ConvertIntToDecimalStringN(gStringVar1, (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8], 0, 6);
|
ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8], 0, 6);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_TurnedOverVar1ForVar2);
|
StringExpandPlaceholders(gStringVar4, gText_TurnedOverVar1ForVar2);
|
||||||
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD8C8);
|
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD8C8);
|
||||||
}
|
}
|
||||||
@ -1838,7 +1838,7 @@ void sub_81AD8C8(u8 taskId)
|
|||||||
|
|
||||||
PlaySE(SE_REGI);
|
PlaySE(SE_REGI);
|
||||||
RemoveBagItem(gSpecialVar_ItemId, data[8]);
|
RemoveBagItem(gSpecialVar_ItemId, data[8]);
|
||||||
AddMoney(&gSaveBlock1Ptr->money, (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8]);
|
AddMoney(&gSaveBlock1Ptr->money, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]);
|
||||||
DestroyListMenuTask(data[0], scrollPos, cursorPos);
|
DestroyListMenuTask(data[0], scrollPos, cursorPos);
|
||||||
sub_81AB9A8(gUnknown_0203CE58.pocket);
|
sub_81AB9A8(gUnknown_0203CE58.pocket);
|
||||||
sub_81ABA88(gUnknown_0203CE58.pocket);
|
sub_81ABA88(gUnknown_0203CE58.pocket);
|
||||||
@ -1908,7 +1908,7 @@ void sub_81ADB14(u8 taskId)
|
|||||||
s16* data = gTasks[taskId].data;
|
s16* data = gTasks[taskId].data;
|
||||||
|
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, 0);
|
||||||
if (itemid_is_unique(gSpecialVar_ItemId))
|
if (ItemId_GetImportance(gSpecialVar_ItemId))
|
||||||
{
|
{
|
||||||
bag_menu_print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0);
|
||||||
gTasks[taskId].func = sub_81ADC0C;
|
gTasks[taskId].func = sub_81ADC0C;
|
||||||
|
@ -392,7 +392,7 @@ bool8 sub_818DC60(void)
|
|||||||
|
|
||||||
static void sub_818DCAC(u8 *dest, u16 itemId)
|
static void sub_818DCAC(u8 *dest, u16 itemId)
|
||||||
{
|
{
|
||||||
StringCopy(dest, ItemId_GetItem(itemId)->name);
|
StringCopy(dest, ItemId_GetName(itemId));
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_818DCC8(void)
|
void sub_818DCC8(void)
|
||||||
@ -671,7 +671,7 @@ static u8 sub_818E258(const u8 *str)
|
|||||||
|
|
||||||
void sub_818E274(void)
|
void sub_818E274(void)
|
||||||
{
|
{
|
||||||
StringCopy(gStringVar1, ItemId_GetItem(gUnknown_0203CD68->itemId)->name);
|
StringCopy(gStringVar1, ItemId_GetName(gUnknown_0203CD68->itemId));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_818E298(void)
|
bool8 sub_818E298(void)
|
||||||
|
@ -444,7 +444,7 @@ static void ItemStorage_Withdraw(u8 taskId)
|
|||||||
{
|
{
|
||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
|
|
||||||
NUM_ITEMS = sub_80D6CE4();
|
NUM_ITEMS = CountUsedPCItemSlots();
|
||||||
if (NUM_ITEMS != 0)
|
if (NUM_ITEMS != 0)
|
||||||
ItemStorage_WithdrawToss_Helper(taskId, FALSE);
|
ItemStorage_WithdrawToss_Helper(taskId, FALSE);
|
||||||
else
|
else
|
||||||
@ -459,7 +459,7 @@ static void ItemStorage_Toss(u8 taskId)
|
|||||||
{
|
{
|
||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
|
|
||||||
NUM_ITEMS = sub_80D6CE4();
|
NUM_ITEMS = CountUsedPCItemSlots();
|
||||||
if (NUM_ITEMS != 0)
|
if (NUM_ITEMS != 0)
|
||||||
ItemStorage_WithdrawToss_Helper(taskId, TRUE);
|
ItemStorage_WithdrawToss_Helper(taskId, TRUE);
|
||||||
else
|
else
|
||||||
@ -967,7 +967,7 @@ static void sub_816C0C8(void)
|
|||||||
|
|
||||||
static void sub_816C110(void)
|
static void sub_816C110(void)
|
||||||
{
|
{
|
||||||
sub_80D6E84();
|
CompactPCItems();
|
||||||
sub_812220C(gSaveBlock1Ptr->pcItems, 50, &(playerPCItemPageInfo.pageItems), &(playerPCItemPageInfo.count), 0x8);
|
sub_812220C(gSaveBlock1Ptr->pcItems, 50, &(playerPCItemPageInfo.pageItems), &(playerPCItemPageInfo.count), 0x8);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1180,7 +1180,7 @@ static void ItemStorage_DoItemSwap(u8 taskId, bool8 a)
|
|||||||
{
|
{
|
||||||
if(c != b - 1)
|
if(c != b - 1)
|
||||||
{
|
{
|
||||||
sub_80D702C(gSaveBlock1Ptr->pcItems, c, b);
|
MoveItemSlotInList(gSaveBlock1Ptr->pcItems, c, b);
|
||||||
ItemStorage_RefreshListMenu();
|
ItemStorage_RefreshListMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1301,7 +1301,7 @@ static void ItemStorage_DoItemToss(u8 taskId)
|
|||||||
|
|
||||||
data = gTasks[taskId].data;
|
data = gTasks[taskId].data;
|
||||||
b = (playerPCItemPageInfo.cursorPos + playerPCItemPageInfo.itemsAbove);
|
b = (playerPCItemPageInfo.cursorPos + playerPCItemPageInfo.itemsAbove);
|
||||||
if(!itemid_is_unique(gSaveBlock1Ptr->pcItems[b].itemId))
|
if(!ItemId_GetImportance(gSaveBlock1Ptr->pcItems[b].itemId))
|
||||||
{
|
{
|
||||||
CopyItemName(gSaveBlock1Ptr->pcItems[b].itemId, gStringVar1);
|
CopyItemName(gSaveBlock1Ptr->pcItems[b].itemId, gStringVar1);
|
||||||
ConvertIntToDecimalStringN(gStringVar2, data[2], STR_CONV_MODE_LEFT_ALIGN, 3);
|
ConvertIntToDecimalStringN(gStringVar2, data[2], STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||||
@ -1335,7 +1335,7 @@ static void ItemStorage_HandleRemoveItem(u8 taskId)
|
|||||||
data = gTasks[taskId].data;
|
data = gTasks[taskId].data;
|
||||||
if(gMain.newKeys & (A_BUTTON | B_BUTTON))
|
if(gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||||
{
|
{
|
||||||
sub_80D6E48((playerPCItemPageInfo.cursorPos + playerPCItemPageInfo.itemsAbove), data[2]);
|
RemovePCItem((playerPCItemPageInfo.cursorPos + playerPCItemPageInfo.itemsAbove), data[2]);
|
||||||
DestroyListMenuTask(data[5], &(playerPCItemPageInfo.itemsAbove), &(playerPCItemPageInfo.cursorPos));
|
DestroyListMenuTask(data[5], &(playerPCItemPageInfo.itemsAbove), &(playerPCItemPageInfo.cursorPos));
|
||||||
sub_816C110();
|
sub_816C110();
|
||||||
sub_816C140();
|
sub_816C140();
|
||||||
|
@ -589,7 +589,7 @@ static void PutPokeblockInfoText(void)
|
|||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
const u8 *itemName = ItemId_GetItem(ITEM_POKEBLOCK_CASE)->name;
|
const u8 *itemName = ItemId_GetName(ITEM_POKEBLOCK_CASE);
|
||||||
PrintOnPokeblockWindow(0, itemName, GetStringCenterAlignXOffset(1, itemName, 0x48));
|
PrintOnPokeblockWindow(0, itemName, GetStringCenterAlignXOffset(1, itemName, 0x48));
|
||||||
|
|
||||||
PrintOnPokeblockWindow(2, gText_Spicy, 0);
|
PrintOnPokeblockWindow(2, gText_Spicy, 0);
|
||||||
|
@ -3173,11 +3173,11 @@ void sub_81C3554(u8 taskId)
|
|||||||
|
|
||||||
void sub_81C35E4()
|
void sub_81C35E4()
|
||||||
{
|
{
|
||||||
u8 *text;
|
const u8 *text;
|
||||||
int offset;
|
int offset;
|
||||||
if (gUnknown_0203CF1C->summary.item == ITEM_ENIGMA_BERRY && sub_81B1250() == 1 && (gUnknown_0203CF1C->unk40BE == 1 || gUnknown_0203CF1C->unk40BE == 4 || gUnknown_0203CF1C->unk40BE == 5))
|
if (gUnknown_0203CF1C->summary.item == ITEM_ENIGMA_BERRY && sub_81B1250() == 1 && (gUnknown_0203CF1C->unk40BE == 1 || gUnknown_0203CF1C->unk40BE == 4 || gUnknown_0203CF1C->unk40BE == 5))
|
||||||
{
|
{
|
||||||
text = (u8*)ItemId_GetItem(ITEM_ENIGMA_BERRY);
|
text = ItemId_GetName(ITEM_ENIGMA_BERRY);
|
||||||
}
|
}
|
||||||
else if (gUnknown_0203CF1C->summary.item == ITEM_NONE)
|
else if (gUnknown_0203CF1C->summary.item == ITEM_NONE)
|
||||||
text = gText_None;
|
text = gText_None;
|
||||||
|
24
src/tv.c
24
src/tv.c
@ -2945,7 +2945,7 @@ static void sub_80EF40C(u8 varIdx, TVShow *show)
|
|||||||
{
|
{
|
||||||
if (show->smartshopperShow.itemIds[i] != ITEM_NONE)
|
if (show->smartshopperShow.itemIds[i] != ITEM_NONE)
|
||||||
{
|
{
|
||||||
price += itemid_get_market_price(show->smartshopperShow.itemIds[i]) * show->smartshopperShow.itemAmounts[i];
|
price += ItemId_GetPrice(show->smartshopperShow.itemIds[i]) * show->smartshopperShow.itemAmounts[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (show->smartshopperShow.priceReduced == TRUE)
|
if (show->smartshopperShow.priceReduced == TRUE)
|
||||||
@ -5120,7 +5120,7 @@ static void DoTVShowTodaysSmartShopper(void)
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
TVShowConvertInternationalString(gStringVar1, show->smartshopperShow.playerName, show->smartshopperShow.language);
|
TVShowConvertInternationalString(gStringVar1, show->smartshopperShow.playerName, show->smartshopperShow.language);
|
||||||
StringCopy(gStringVar2, ItemId_GetItem(show->smartshopperShow.itemIds[0])->name);
|
StringCopy(gStringVar2, ItemId_GetName(show->smartshopperShow.itemIds[0]));
|
||||||
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[0]);
|
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[0]);
|
||||||
sTVShowState += 1 + (Random() % 4);
|
sTVShowState += 1 + (Random() % 4);
|
||||||
break;
|
break;
|
||||||
@ -5148,7 +5148,7 @@ static void DoTVShowTodaysSmartShopper(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
StringCopy(gStringVar2, ItemId_GetItem(show->smartshopperShow.itemIds[1])->name);
|
StringCopy(gStringVar2, ItemId_GetName(show->smartshopperShow.itemIds[1]));
|
||||||
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[1]);
|
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[1]);
|
||||||
if (show->smartshopperShow.itemIds[2] != ITEM_NONE)
|
if (show->smartshopperShow.itemIds[2] != ITEM_NONE)
|
||||||
{
|
{
|
||||||
@ -5164,7 +5164,7 @@ static void DoTVShowTodaysSmartShopper(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
StringCopy(gStringVar2, ItemId_GetItem(show->smartshopperShow.itemIds[2])->name);
|
StringCopy(gStringVar2, ItemId_GetName(show->smartshopperShow.itemIds[2]));
|
||||||
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[2]);
|
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[2]);
|
||||||
if (show->smartshopperShow.priceReduced == TRUE)
|
if (show->smartshopperShow.priceReduced == TRUE)
|
||||||
{
|
{
|
||||||
@ -5201,7 +5201,7 @@ static void DoTVShowTodaysSmartShopper(void)
|
|||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
TVShowConvertInternationalString(gStringVar1, show->smartshopperShow.playerName, show->smartshopperShow.language);
|
TVShowConvertInternationalString(gStringVar1, show->smartshopperShow.playerName, show->smartshopperShow.language);
|
||||||
StringCopy(gStringVar2, ItemId_GetItem(show->smartshopperShow.itemIds[0])->name);
|
StringCopy(gStringVar2, ItemId_GetName(show->smartshopperShow.itemIds[0]));
|
||||||
if (show->smartshopperShow.priceReduced == TRUE)
|
if (show->smartshopperShow.priceReduced == TRUE)
|
||||||
{
|
{
|
||||||
sTVShowState = 8;
|
sTVShowState = 8;
|
||||||
@ -5344,7 +5344,7 @@ static void DoTVShowPokemonTodaySuccessfulCapture(void)
|
|||||||
sTVShowState = 2;
|
sTVShowState = 2;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
StringCopy(gStringVar2, ItemId_GetItem(show->pokemonToday.ball)->name);
|
StringCopy(gStringVar2, ItemId_GetName(show->pokemonToday.ball));
|
||||||
TV_PrintIntToStringVar(2, show->pokemonToday.nBallsUsed);
|
TV_PrintIntToStringVar(2, show->pokemonToday.nBallsUsed);
|
||||||
if (show->pokemonToday.nBallsUsed < 4)
|
if (show->pokemonToday.nBallsUsed < 4)
|
||||||
{
|
{
|
||||||
@ -6457,7 +6457,7 @@ static void DoTVShowHoennTreasureInvestigators(void)
|
|||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
StringCopy(gStringVar1, ItemId_GetItem(show->treasureInvestigators.item)->name);
|
StringCopy(gStringVar1, ItemId_GetName(show->treasureInvestigators.item));
|
||||||
if (show->treasureInvestigators.location == MAPSEC_DYNAMIC)
|
if (show->treasureInvestigators.location == MAPSEC_DYNAMIC)
|
||||||
{
|
{
|
||||||
switch (show->treasureInvestigators.mapDataId)
|
switch (show->treasureInvestigators.mapDataId)
|
||||||
@ -6476,13 +6476,13 @@ static void DoTVShowHoennTreasureInvestigators(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
StringCopy(gStringVar1, ItemId_GetItem(show->treasureInvestigators.item)->name);
|
StringCopy(gStringVar1, ItemId_GetName(show->treasureInvestigators.item));
|
||||||
TVShowConvertInternationalString(gStringVar2, show->treasureInvestigators.playerName, show->treasureInvestigators.language);
|
TVShowConvertInternationalString(gStringVar2, show->treasureInvestigators.playerName, show->treasureInvestigators.language);
|
||||||
GetMapName(gStringVar3, show->treasureInvestigators.location, 0);
|
GetMapName(gStringVar3, show->treasureInvestigators.location, 0);
|
||||||
TVShowDone();
|
TVShowDone();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
StringCopy(gStringVar1, ItemId_GetItem(show->treasureInvestigators.item)->name);
|
StringCopy(gStringVar1, ItemId_GetName(show->treasureInvestigators.item));
|
||||||
TVShowConvertInternationalString(gStringVar2, show->treasureInvestigators.playerName, show->treasureInvestigators.language);
|
TVShowConvertInternationalString(gStringVar2, show->treasureInvestigators.playerName, show->treasureInvestigators.language);
|
||||||
TVShowDone();
|
TVShowDone();
|
||||||
break;
|
break;
|
||||||
@ -6598,7 +6598,7 @@ static void DoTVShowBreakingNewsTV(void)
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
TV_PrintIntToStringVar(0, show->breakingNews.balls);
|
TV_PrintIntToStringVar(0, show->breakingNews.balls);
|
||||||
StringCopy(gStringVar2, ItemId_GetItem(show->breakingNews.caughtMonBall)->name);
|
StringCopy(gStringVar2, ItemId_GetName(show->breakingNews.caughtMonBall));
|
||||||
sTVShowState = 4;
|
sTVShowState = 4;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@ -6788,7 +6788,7 @@ static void DoTVShowPokemonLotteryWinnerFlashReport(void)
|
|||||||
{
|
{
|
||||||
StringCopy(gStringVar2, gText_Third);
|
StringCopy(gStringVar2, gText_Third);
|
||||||
}
|
}
|
||||||
StringCopy(gStringVar3, ItemId_GetItem(show->lottoWinner.item)->name);
|
StringCopy(gStringVar3, ItemId_GetName(show->lottoWinner.item));
|
||||||
TVShowDone();
|
TVShowDone();
|
||||||
ShowFieldMessage(sTVPokemonLotteryWinnerFlashReportTextGroup[state]);
|
ShowFieldMessage(sTVPokemonLotteryWinnerFlashReportTextGroup[state]);
|
||||||
}
|
}
|
||||||
@ -7530,7 +7530,7 @@ static void DoTVShowSecretBaseSecrets(void)
|
|||||||
sTVShowState = show->secretBaseSecrets.savedState;
|
sTVShowState = show->secretBaseSecrets.savedState;
|
||||||
break;
|
break;
|
||||||
case 19:
|
case 19:
|
||||||
StringCopy(gStringVar2, ItemId_GetItem(show->secretBaseSecrets.item)->name);
|
StringCopy(gStringVar2, ItemId_GetName(show->secretBaseSecrets.item));
|
||||||
sTVShowState = show->secretBaseSecrets.savedState;
|
sTVShowState = show->secretBaseSecrets.savedState;
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user