decompile item

This commit is contained in:
DizzyEggg
2018-04-29 13:36:26 +02:00
parent 867b496f2e
commit 25c669e36b
21 changed files with 1083 additions and 2091 deletions
+37 -37
View File
@@ -43,9 +43,6 @@
#define PARTY_SIZE 6
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
#define min(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_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
{
MALE,
@@ -129,15 +151,6 @@ enum
OPTIONS_BATTLE_STYLE_SET
};
enum
{
BAG_ITEMS = 1,
BAG_POKEBALLS,
BAG_TMsHMs,
BAG_BERRIES,
BAG_KEYITEMS
};
struct Coords16
{
s16 x;
@@ -209,11 +222,11 @@ struct BerryPickingResults // possibly used in the game itself? Size may be wron
u8 field_F;
};
// two arrays for lvl50 and open level
struct PyramidBag
{
u16 items_Lvl50[10];
u16 items_OpenLvl[10];
u8 quantity[10];
u16 itemId[2][PYRAMID_BAG_ITEMS_COUNT];
u8 quantity[2][PYRAMID_BAG_ITEMS_COUNT];
};
struct BerryCrush
@@ -223,8 +236,6 @@ struct BerryCrush
u32 unk;
};
#define PLAYER_NAME_LENGTH 8
struct UnknownSaveBlock2Struct
{
u8 field_0;
@@ -303,7 +314,7 @@ struct SaveBlock2
/*0xE1A*/ u16 battlePyramidFloor; // possibly?
/*0xE1C*/ u8 field_E1C[16];
/*0xE2C*/ struct PyramidBag pyramidBag;
/*0x???*/ u8 field_notSure[13];
/*0x???*/ u8 field_unkown[6];
/*0xE6E*/ u16 battleTentWinStreak;
/*0xE70*/ u8 field_E70[72];
/*0xEB8*/ u16 frontierBattlePoints;
@@ -417,8 +428,6 @@ struct EasyChatPair
u16 words[2];
}; /*size = 0x8*/
#define MAIL_WORDS_COUNT 9
struct MailStruct
{
/*0x00*/ u16 words[MAIL_WORDS_COUNT];
@@ -530,8 +539,6 @@ struct DaycareMon
u32 steps;
};
#define DAYCARE_MON_COUNT 2
struct DayCare
{
struct DaycareMon mons[DAYCARE_MON_COUNT];
@@ -552,13 +559,6 @@ struct RecordMixingDayCareMail
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
{
LILYCOVE_LADY_QUIZ,
@@ -645,16 +645,16 @@ struct SaveBlock1
/*0x32*/ u16 mapDataId;
/*0x34*/ u16 mapView[0x100];
/*0x234*/ u8 playerPartyCount;
/*0x238*/ struct Pokemon playerParty[6];
/*0x238*/ struct Pokemon playerParty[PARTY_SIZE];
/*0x490*/ u32 money;
/*0x494*/ u16 coins;
/*0x496*/ u16 registeredItem; // registered for use with SELECT button
/*0x498*/ struct ItemSlot pcItems[50];
/*0x560*/ struct ItemSlot bagPocket_Items[30];
/*0x5D8*/ struct ItemSlot bagPocket_KeyItems[30];
/*0x650*/ struct ItemSlot bagPocket_PokeBalls[16];
/*0x690*/ struct ItemSlot bagPocket_TMHM[64];
/*0x790*/ struct ItemSlot bagPocket_Berries[46];
/*0x498*/ struct ItemSlot pcItems[PC_ITEMS_COUNT];
/*0x560*/ struct ItemSlot bagPocket_Items[BAG_ITEMS_COUNT];
/*0x5D8*/ struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT];
/*0x650*/ struct ItemSlot bagPocket_PokeBalls[BAG_POKEBALLS_COUNT];
/*0x690*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT];
/*0x790*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT];
/*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT];
/*0x988*/ u8 seen1[52];
/*0x9BC*/ u16 berryBlenderRecords[3];
@@ -667,7 +667,7 @@ struct SaveBlock1
/*0x139C*/ u16 vars[VARS_COUNT];
/*0x159C*/ u32 gameStats[NUM_GAME_STATS];
/*0x169C*/ struct BerryTree berryTrees[BERRY_TREES_COUNT];
/*0x1A9C*/ struct SecretBaseRecord secretBases[20];
/*0x1A9C*/ struct SecretBaseRecord secretBases[SECRET_BASES_COUNT];
/*0x271C*/ u8 playerRoomDecor[12];
/*0x2728*/ u8 playerRoomDecorPos[12];
/*0x2734*/ u8 decorDesk[10];