mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-25 15:46:18 -05:00
More blue-based fixes/doc
This commit is contained in:
parent
56ca07d890
commit
9d058dde71
|
|
@ -1011,7 +1011,7 @@ gUnknown_80B7DF8:
|
|||
.fill 8, 1, 0
|
||||
|
||||
.global gVectorDirections
|
||||
gVectorDirections: @ GBA=080B7E3C | NDS=0208772C
|
||||
gVectorDirections: @ R=080B7E3C | B=0208772C
|
||||
.4byte 0, 1 @N
|
||||
.4byte 1, 1 @NE
|
||||
.4byte 1, 0 @E
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ gIsTypePhysicalTable: @ 810AC7C
|
|||
.byte 0x00
|
||||
|
||||
.global gUnknown_810AC90
|
||||
gUnknown_810AC90: @ 810AC90
|
||||
gUnknown_810AC90: @ R=810AC90 | B=020C3498
|
||||
.byte 0x02, 0x00, 0x00, 0x00
|
||||
.byte 0x04, 0x00, 0x00, 0x00
|
||||
.byte 0x06, 0x00, 0x00, 0x00
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@
|
|||
// size: 0x94
|
||||
typedef struct unkStruct_203B230
|
||||
{
|
||||
s32 state;
|
||||
/* 0x0 */ s32 state;
|
||||
/* 0x4 */ Item item;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
STATUSTEXTS(unk10);
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
WindowTemplates unk28;
|
||||
MenuInputStructSub unk88;
|
||||
/* 0x8 */ s32 unk8;
|
||||
/* 0xC */ s32 unkC;
|
||||
/* 0x10 */ STATUSTEXTS(unk10);
|
||||
/* 0x20 */ u32 unk20;
|
||||
/* 0x24 */ u32 unk24;
|
||||
/* 0x28 */ WindowTemplates unk28;
|
||||
/* 0x88 */ MenuInputStructSub unk88;
|
||||
} unkStruct_203B230;
|
||||
|
||||
bool8 InitItemDescriptionWindow(Item *item);
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
// size: 0x10
|
||||
typedef struct DataSerializer
|
||||
{
|
||||
u8 *stream;
|
||||
u8 *end; // Exclusive end of the stream
|
||||
u32 count; // Used to count bits between ReadBits functions, or count bytes between ReadBytes functions
|
||||
u32 unkC; // Seems to be a temporary 32 bit storage
|
||||
/* 0x0 */ u8 *stream;
|
||||
/* 0x4 */ u8 *end; // Exclusive end of the stream
|
||||
/* 0x8 */ u32 count; // Used to count bits between ReadBits functions, or count bytes between ReadBytes functions
|
||||
/* 0xC */ u32 unkC; // Seems to be a temporary 32 bit storage
|
||||
} DataSerializer;
|
||||
|
||||
#endif // GUARD_DATA_SERIALIZER_H
|
||||
#endif // GUARD_DATA_SERIALIZER_H
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ s32 SaveTeamInventory(u8 *, u32 size);
|
|||
|
||||
s32 GetItemPossessionCount(u8 id);
|
||||
s32 WriteHighDecimal(s32, u8 *strbuf, u8);
|
||||
u32 sub_80913E0(Item* slot, u32 a2, STATUSTEXTS(statuses));
|
||||
u32 sub_80913E0(Item* slot, u32 windowId, STATUSTEXTS(statuses));
|
||||
u8 sub_8091E94(s32 a0, s32 a1, s32 a2);
|
||||
|
||||
static inline void ZeroOutItem(Item *item)
|
||||
|
|
|
|||
|
|
@ -1,73 +1,6 @@
|
|||
#ifndef GUARD_KECLEON_BROS1_H
|
||||
#define GUARD_KECLEON_BROS1_H
|
||||
|
||||
#include "items.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/str_mon_portrait.h"
|
||||
#include "structs/str_text.h"
|
||||
|
||||
enum KecleonStoreStates
|
||||
{
|
||||
KECLEON_STORE_INIT = 0,
|
||||
KECLEON_STORE_MAIN_MENU,
|
||||
KECLEON_STORE_INFO,
|
||||
KECLEON_STORE_UNK3,
|
||||
KECLEON_STORE_EXIT,
|
||||
KECLEON_STORE_NO_STORE_ITEMS,
|
||||
KECLEON_STORE_NO_MONEY,
|
||||
KECLEON_STORE_TOO_MUCH_MONEY,
|
||||
KECLEON_STORE_NO_ITEMS_TO_SELL,
|
||||
KECLEON_STORE_NO_ITEMS,
|
||||
KECLEON_STORE_TOO_MANY_ITEMS,
|
||||
KECLEON_STORE_UNK11,
|
||||
KECLEON_STORE_NOT_ENOUGH_MONEY,
|
||||
KECLEON_STORE_CANT_SELL_ITEM,
|
||||
KECLEON_STORE_SELL_ITEM_TOO_MUCH_MONEY,
|
||||
KECLEON_STORE_UNK15,
|
||||
KECLEON_STORE_BUY_ITEM_MENU,
|
||||
KECLEON_STORE_BUY_ITEM_RECEIPT,
|
||||
KECLEON_STORE_UNK18,
|
||||
KECLEON_STORE_UNK19,
|
||||
KECLEON_STORE_UNK20,
|
||||
KECLEON_STORE_BUY_ITEM_INFO,
|
||||
KECLEON_STORE_BUY_ITEM,
|
||||
KECLEON_STORE_UNK23,
|
||||
KECLEON_STORE_SELL_ITEM_MENU,
|
||||
KECLEON_STORE_SELL_ITEM_RECEIPT,
|
||||
KECLEON_STORE_UNK26,
|
||||
KECLEON_STORE_UNK27,
|
||||
KECLEON_STORE_UNK28,
|
||||
KECLEON_STORE_SELL_ITEM_INFO,
|
||||
KECLEON_STORE_SELL_ITEM,
|
||||
KECLEON_STORE_SELL_ALL_ITEMS,
|
||||
KECLEON_STORE_SELL_ALL_ITEMS_RECEIPT,
|
||||
};
|
||||
|
||||
// size: 0x148
|
||||
typedef struct KecleonBrosWork1
|
||||
{
|
||||
/* 0x0 */ u32 mode; // Corresponds to the enum: KecleonBrosMode
|
||||
/* 0x4 */ bool8 isKecleonItemShop; // FALSE indicates it is Kecleon TM Shop
|
||||
/* 0x8 */ u32 currState;
|
||||
/* 0xC */ u32 fallbackState;
|
||||
/* 0x10 */ s32 itemSellPrice;
|
||||
/* 0x14 */ u32 numInventoryItemToSell;
|
||||
/* 0x18 */ s32 inventoryItemSellPrice;
|
||||
/* 0x1C */ Item soldItem;
|
||||
/* 0x20 */ u8 itemShopItemIndex;
|
||||
/* 0x21 */ u8 wareShopItemIndex;
|
||||
/* 0x24 */ u32 soldItemInventoryIndex;
|
||||
/* 0x28 */ u32 menuAction1;
|
||||
/* 0x2C */ u32 menuAction2;
|
||||
/* 0x30 */ u32 menuAction3;
|
||||
/* 0x34 */ MenuItem menuItems[8];
|
||||
u16 unk74[8];
|
||||
/* 0x84 */ MenuStruct menu;
|
||||
/* 0xD4 */ MonPortraitMsg monPortrait;
|
||||
MonPortraitMsg *monPortraitPtr;
|
||||
WindowTemplates unkE8;
|
||||
} KecleonBrosWork1;
|
||||
|
||||
// mode corresponds to the enum: KecleonBrosMode
|
||||
bool8 CreateKecleonBros(u32 mode);
|
||||
void DeleteKecleonBros(void);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "structs/menu.h"
|
||||
#include "structs/str_text.h"
|
||||
|
||||
u8 sub_801A20C(u32);
|
||||
bool8 sub_801A20C(u32);
|
||||
u32 sub_801A2A8(bool8);
|
||||
u8 sub_801A37C(void);
|
||||
void sub_801A398(bool8);
|
||||
|
|
|
|||
|
|
@ -1,17 +1,7 @@
|
|||
#ifndef GUARD_KECLEON_BROS4_H
|
||||
#define GUARD_KECLEON_BROS4_H
|
||||
|
||||
#include "constants/item.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/struct_sub80095e4.h"
|
||||
|
||||
// size: 0xF4
|
||||
typedef struct unkStruct_203B224
|
||||
{
|
||||
u32 unk0;
|
||||
u32 unk4[INVENTORY_SIZE];
|
||||
/* 0x54 */ struct_Sub80095E4_2 unk54;
|
||||
} unkStruct_203B224;
|
||||
#include "structs/str_position.h"
|
||||
|
||||
bool8 sub_801A5D8(u32, s32, DungeonPos *, u32);
|
||||
u32 sub_801A6E8(bool8);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
u32 sub_8012A64(MenuInputStructSub *r0, s32 r1);
|
||||
s32 GetKeyPress(MenuInputStruct *r0);
|
||||
s32 sub_8012AE8(void);
|
||||
void sub_8012BC4(u32 x, u32 y, s32 n, s32 len, u32 color, u32 param_6);
|
||||
void sub_8012BC4(u32 x, u32 y, s32 n, s32 len, u32 color, u32 windowId);
|
||||
void sub_8012C60(u32 x, u32 y, u32 param_3, u32 color, u32 param_5);
|
||||
void sub_8012CAC(WindowTemplate *param_1, const MenuItem *param_2);
|
||||
void sub_8012D08(WindowTemplate *param_1, s32 param_2);
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ typedef struct unkStruct_808E218
|
|||
HiddenPower unk0[3];
|
||||
} unkStruct_808E218;
|
||||
|
||||
extern unkStruct_203B45C *gRecruitedPokemonRef;
|
||||
extern RecruitedMon *gRecruitedPokemonRef;
|
||||
|
||||
void LoadMonsterParameters(void);
|
||||
unkStruct_203B45C *GetRecruitedPokemon(void);
|
||||
RecruitedMon *GetRecruitedPokemon(void);
|
||||
void InitializeRecruitedPokemon(void);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ struct UnkStruct_sub_8011DAC
|
|||
struct UnkStruct_203B184
|
||||
{
|
||||
/* 0x0 */ TeamInventory *MoneyItems;
|
||||
/* 0x4 */ unkStruct_203B45C *recruitedPokemon;
|
||||
/* 0x4 */ RecruitedMon *recruitedPokemon;
|
||||
/* 0x8 */ unkStruct_203B480 *unk8;
|
||||
/* 0xC */ unkStruct_203B484 *unkC;
|
||||
/* 0x10 */ u32 *unk10;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ void BlinkSavingIcon(void);
|
|||
void CopySpritesToOam(void);
|
||||
void DoAxFrame_800558C(axdata *, s32 spriteX, s32 spriteY, u32, u32 paletteNum, unkStruct_2039DB0 *spriteMasks);
|
||||
void InitSprites(void);
|
||||
void nullsub_7(s16 *);
|
||||
void nullsub_7(DungeonPos *);
|
||||
void nullsub_8(u32);
|
||||
void nullsub_9(void);
|
||||
void nullsub_10(bool8);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ typedef struct ActionContainer
|
|||
/* 0x14 */ DungeonPos itemTargetPosition;
|
||||
} ActionContainer;
|
||||
|
||||
// size: 0x4
|
||||
// size: R=0x4 | B=0x3
|
||||
typedef struct HiddenPower
|
||||
{
|
||||
/* 0x0 */ s16 hiddenPowerBasePower;
|
||||
|
|
@ -183,11 +183,11 @@ typedef struct Unk_Entity_x184
|
|||
/* 0x19e - 0x1a */ u8 unk1A;
|
||||
} Unk_Entity_x184;
|
||||
|
||||
// size: 0x24
|
||||
// size: R=0x24 | B=0x19?
|
||||
typedef struct Moves
|
||||
{
|
||||
/* 0x0 */ Move moves[MAX_MON_MOVES];
|
||||
/* 0x20 */ u8 struggleMoveFlags;
|
||||
/* R=0x0 | B=0x0 */ Move moves[MAX_MON_MOVES];
|
||||
/* R=0x20 | B=0x18 */ u8 struggleMoveFlags;
|
||||
} Moves;
|
||||
|
||||
// size: 0x208
|
||||
|
|
|
|||
|
|
@ -5,40 +5,38 @@
|
|||
#include "structs/str_text.h"
|
||||
#include "structs/str_position.h"
|
||||
|
||||
// size: 0xC
|
||||
// size: R=0xC | NDS=0xA?
|
||||
typedef struct MenuInputStructSub
|
||||
{
|
||||
u8 unk0;
|
||||
/* 0x1 */ u8 a_button;
|
||||
/* 0x2 */ u8 b_button;
|
||||
/* 0x3 */ u8 dpad_right;
|
||||
/* 0x4 */ u8 dpad_left;
|
||||
/* 0x5 */ u8 unk5;
|
||||
u8 fill6[2];
|
||||
u16 unk8;
|
||||
s16 unkA;
|
||||
/* R=0x0 | B=0x0 */ u8 unk0;
|
||||
/* R=0x1 | B=0x1 */ u8 a_button;
|
||||
/* R=0x2 | B=0x2 */ u8 b_button;
|
||||
/* R=0x3 | B=0x3 */ u8 dpad_right;
|
||||
/* R=0x4 | B=0x4 */ u8 dpad_left;
|
||||
/* R=0x5 | B=0x5 */ u8 unk5;
|
||||
/* R=0x8 | B=0x6 */ DungeonPos unk8;
|
||||
} MenuInputStructSub;
|
||||
|
||||
// size: 0x34
|
||||
// size: R=0x34 | NDS=0x32?
|
||||
typedef struct MenuInputStruct
|
||||
{
|
||||
s32 unk0;
|
||||
u16 unk4;
|
||||
s16 firstEntryY;
|
||||
DungeonPos unk8;
|
||||
s16 unkC; // Maybe DungeonPos
|
||||
s16 unkE;
|
||||
u32 unk10;
|
||||
DungeonPos unk14;
|
||||
/* 0x0 */ s32 unk0;
|
||||
/* 0x4 */ u16 unk4;
|
||||
/* 0x6 */ s16 firstEntryY;
|
||||
/* 0x8 */ DungeonPos unk8;
|
||||
/* 0xC */ s16 unkC; // Maybe DungeonPos
|
||||
/* 0xE */ s16 unkE;
|
||||
/* 0x10 */ u32 unk10;
|
||||
/* 0x14 */ DungeonPos unk14;
|
||||
/* 0x18 */ s16 menuIndex;
|
||||
s16 unk1A;
|
||||
s16 unk1C;
|
||||
s16 unk1E;
|
||||
s16 unk20;
|
||||
s16 unk22;
|
||||
u16 unk24;
|
||||
u16 unk26;
|
||||
MenuInputStructSub unk28;
|
||||
/* 0x1A */ s16 unk1A;
|
||||
/* 0x1C */ s16 unk1C;
|
||||
/* 0x1E */ s16 unk1E;
|
||||
/* 0x20 */ s16 unk20;
|
||||
/* 0x22 */ s16 unk22;
|
||||
/* 0x24 */ u16 unk24;
|
||||
/* 0x26 */ u16 unk26;
|
||||
/* 0x28 */ MenuInputStructSub unk28;
|
||||
} MenuInputStruct;
|
||||
|
||||
// size: 0x8
|
||||
|
|
@ -48,19 +46,19 @@ typedef struct MenuItem
|
|||
s32 menuAction;
|
||||
} MenuItem;
|
||||
|
||||
// size: 0x50
|
||||
// size: R=0x50 | B=0x4C?
|
||||
typedef struct MenuStruct
|
||||
{
|
||||
const u8 *unk0; // header text?
|
||||
/* 0x0 */ const u8 *unk0; // header text?
|
||||
/* 0x4 */ const MenuItem *menuItems;
|
||||
const u32 *menuTextColorArray;
|
||||
u16 *unkC;
|
||||
/* 0x8 */ const u32 *menuTextColorArray;
|
||||
/* 0xC */ u16 *unkC;
|
||||
/* 0x10 */ s32 index;
|
||||
/* 0x14 */ MenuInputStruct input;
|
||||
/* 0x48 */ s32 menuAction;
|
||||
bool8 unk4C;
|
||||
bool8 unk4D;
|
||||
bool8 unk4E;
|
||||
/* 0x4C */ bool8 unk4C;
|
||||
/* 0x4D */ bool8 unk4D;
|
||||
/* 0x4E */ bool8 unk4E;
|
||||
} MenuStruct;
|
||||
|
||||
// size: 0x30. Seems to be info for a NumericUpDown
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ typedef struct ItemSpawns
|
|||
s16 itemValues[NUMBER_OF_ITEM_IDS];
|
||||
} ItemSpawns;
|
||||
|
||||
// size: R=0x8 | B=0x6
|
||||
typedef struct UnkDungeonGlobal_unk1CD98
|
||||
{
|
||||
u16 unk0; // species and level
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef GUARD_STR_DUNGEON_LOCATION_H
|
||||
#define GUARD_STR_DUNGEON_LOCATION_H
|
||||
|
||||
// size: 0x4
|
||||
// size: R=0x4 | B=0x2
|
||||
typedef struct DungeonLocation
|
||||
{
|
||||
/* 0x0 */ u8 id;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
|
||||
#define NUM_PICKED_IQ_SKILLS 3
|
||||
|
||||
// size: R=0x4 | B=0x3
|
||||
typedef struct IqSkillFlags
|
||||
{
|
||||
u8 flags[NUM_PICKED_IQ_SKILLS];
|
||||
/* 0x0 */ u8 flags[NUM_PICKED_IQ_SKILLS];
|
||||
} IqSkillFlags;
|
||||
|
||||
#endif
|
||||
#endif // GUARD_STR_IQ_SKILL_FLAGS_H
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "constants/item.h"
|
||||
|
||||
// size: 0x20
|
||||
// size: R=0x20 | B=?
|
||||
typedef struct ItemDataEntry
|
||||
{
|
||||
/* 0x0 */ u8 *name;
|
||||
|
|
@ -25,6 +25,23 @@ typedef struct ItemDataEntry
|
|||
} ItemDataEntry;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Gummi
|
||||
{
|
||||
/* 0x0 */ s16 boostAmount;
|
||||
/* 0x2 */ u16 flags;
|
||||
} Gummi;
|
||||
|
||||
// size: R=0xC | B=0x9?
|
||||
typedef struct unkStruct_8090F58
|
||||
{
|
||||
/* 0x0 */ u32 unk0;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 unk5;
|
||||
/* 0x6 */ s16 unk6;
|
||||
/* 0x8 */ u8 unk8;
|
||||
} unkStruct_8090F58;
|
||||
|
||||
// size: R=0x4 | B=0x3
|
||||
typedef struct Item
|
||||
{
|
||||
/* 0x0 */ u8 flags;
|
||||
|
|
@ -32,39 +49,22 @@ typedef struct Item
|
|||
/* 0x2 */ u8 id;
|
||||
} Item;
|
||||
|
||||
// size: 0x4
|
||||
// size: R=0x4 | B=0x2
|
||||
typedef struct BulkItem
|
||||
{
|
||||
/* 0x0 */ u8 id;
|
||||
/* 0x1 */ u8 quantity;
|
||||
} BulkItem;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Gummi
|
||||
{
|
||||
/* 0x0 */ s16 boostAmount;
|
||||
/* 0x2 */ u16 flags;
|
||||
} Gummi;
|
||||
|
||||
// size: 0xC
|
||||
typedef struct unkStruct_8090F58
|
||||
{
|
||||
u32 unk0;
|
||||
u8 unk4;
|
||||
u8 unk5;
|
||||
s16 unk6;
|
||||
u8 unk8;
|
||||
} unkStruct_8090F58;
|
||||
|
||||
// size: 0x268
|
||||
// size: R=0x268 | B=0x23C
|
||||
typedef struct TeamInventory
|
||||
{
|
||||
/* 0x0 */ Item teamItems[INVENTORY_SIZE];
|
||||
/* 0x50 */ u16 teamStorage[STORAGE_SIZE];
|
||||
/* 0x230 */ BulkItem kecleonShopItems[MAX_KECLEON_ITEM_SHOP_ITEMS];
|
||||
/* 0x250 */ BulkItem kecleonWareItems[MAX_KECLEON_WARE_SHOP_ITEMS];
|
||||
/* 0x260 */ s32 teamMoney;
|
||||
/* 0x264 */ s32 teamSavings;
|
||||
/* R=0x0 | B=0x0 */ Item teamItems[INVENTORY_SIZE];
|
||||
/* R=0x50 | B=0x3C */ u16 teamStorage[STORAGE_SIZE];
|
||||
/* R=0x230 | B=0x21C */ BulkItem kecleonShopItems[MAX_KECLEON_ITEM_SHOP_ITEMS];
|
||||
/* R=0x250 | B=0x22C */ BulkItem kecleonWareItems[MAX_KECLEON_WARE_SHOP_ITEMS];
|
||||
/* R=0x260 | B=0x234 */ s32 teamMoney;
|
||||
/* R=0x264 | B=0x238 */ s32 teamSavings;
|
||||
} TeamInventory;
|
||||
|
||||
// TODO: These should be in constants/
|
||||
|
|
|
|||
|
|
@ -8,26 +8,26 @@
|
|||
// size: 0x8
|
||||
typedef struct PortraitGfxSub
|
||||
{
|
||||
const RGB *pal;
|
||||
const u8 *gfx;
|
||||
/* 0x0 */ const RGB *pal;
|
||||
/* 0x4 */ const u8 *gfx;
|
||||
} PortraitGfxSub;
|
||||
|
||||
// size: variable
|
||||
typedef struct PortraitGfx
|
||||
{
|
||||
// NOTE: The actual number of sprites is different depending on pokemon. For example, starters have 12 sprites, while most legendaries only 1. [0] means that any number of sprites is valid.
|
||||
PortraitGfxSub sprites[0];
|
||||
/* 0x0 */ PortraitGfxSub sprites[0];
|
||||
} PortraitGfx;
|
||||
|
||||
// size: 0xC
|
||||
// size: 0x10
|
||||
typedef struct MonPortraitMsg
|
||||
{
|
||||
OpenedFile *faceFile;
|
||||
PortraitGfx *faceData;
|
||||
DungeonPos pos;
|
||||
u8 spriteId; // Which mon's sprite to use. For example Kecleon has multiple sprites depending on whether it's green or purple.
|
||||
bool8 flip; // Whether the mon's sprite is flipped.
|
||||
u8 unkE;
|
||||
/* 0x0 */ OpenedFile *faceFile;
|
||||
/* 0x4 */ PortraitGfx *faceData;
|
||||
/* 0x8 */ DungeonPos pos;
|
||||
/* 0xC */ u8 spriteId; // Which mon's sprite to use. For example Kecleon has multiple sprites depending on whether it's green or purple.
|
||||
/* 0xD */ bool8 flip; // Whether the mon's sprite is flipped.
|
||||
/* 0xE */ u8 unkE;
|
||||
} MonPortraitMsg;
|
||||
|
||||
#endif // GUARD_STR_MON_PORTRAIT_H
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "constants/move.h"
|
||||
|
||||
// size: 0x24
|
||||
// size: R=0x24 | B=?
|
||||
typedef struct MoveDataEntry
|
||||
{
|
||||
/* 0x0 */ u8 *name;
|
||||
|
|
@ -29,14 +29,14 @@ typedef struct MoveDataEntry
|
|||
/* 0x20 */ u8 *useText; // The text displayed when this move is used.
|
||||
} MoveDataEntry;
|
||||
|
||||
// size: 0x8
|
||||
// size: R=0x8 | B=0x6
|
||||
typedef struct Move
|
||||
{
|
||||
u8 moveFlags;
|
||||
u8 moveFlags2;
|
||||
u16 id;
|
||||
u8 PP;
|
||||
u8 ginseng; // How much the move is boosted by Ginsengs.
|
||||
/* 0x0 */ u8 moveFlags;
|
||||
/* 0x1 */ u8 moveFlags2;
|
||||
/* 0x2 */ u16 id;
|
||||
/* 0x4 */ u8 PP;
|
||||
/* 0x5 */ u8 ginseng; // How much the move is boosted by Ginsengs.
|
||||
} Move;
|
||||
|
||||
#endif // GUARD_STR_MOVES_H
|
||||
|
|
@ -14,30 +14,30 @@ typedef struct Offense
|
|||
/* 0x2 */ u8 def[2]; // Def, SpDef
|
||||
} Offense;
|
||||
|
||||
// size: 0x4
|
||||
// size: R=0x4 | B=0x1
|
||||
typedef struct unkPokeSubStruct_C
|
||||
{
|
||||
u8 level;
|
||||
/* 0x0 */ u8 level;
|
||||
} unkPokeSubStruct_C;
|
||||
|
||||
// size: 0x58
|
||||
// size: R=0x58 | B=0x40
|
||||
typedef struct PokemonStruct1
|
||||
{
|
||||
u16 unk0; // Probably a union: Sometimes ldrh and sometimes ldrb. Recruited?? "sub_80954CC" only loads 2 bits of info
|
||||
/* 0x2 */ bool8 isTeamLeader;
|
||||
/* 0x3 */ u8 level;
|
||||
/* 0x4 */ DungeonLocation dungeonLocation;
|
||||
/* 0x8 */ s16 speciesNum;
|
||||
unkPokeSubStruct_C unkC[2];
|
||||
/* 0x14 */ s16 IQ;
|
||||
/* 0x16 */ s16 pokeHP;
|
||||
/* 0x18 */ Offense offense;
|
||||
/* 0x1C */ u32 currExp;
|
||||
/* 0x20 */ IqSkillFlags IQSkills;
|
||||
/* 0x24 */ u8 tacticIndex;
|
||||
/* 0x28 */ BulkItem heldItem;
|
||||
/* 0x2C */ Move moves[MAX_MON_MOVES];
|
||||
/* 0x4C */ u8 name[POKEMON_NAME_LENGTH];
|
||||
/* R=0x0 | B=0x0 */ u16 unk0; // Probably a union: Sometimes ldrh and sometimes ldrb. Recruited?? Only 2 bits are serialized
|
||||
/* R=0x2 | B=0x2 */ bool8 isTeamLeader;
|
||||
/* R=0x3 | B=0x3 */ u8 level;
|
||||
/* R=0x4 | B=0x4 */ DungeonLocation dungeonLocation;
|
||||
/* R=0x8 | B=0x6 */ s16 speciesNum;
|
||||
/* R=0xC | B=0x8 */ unkPokeSubStruct_C unkC[2];
|
||||
/* R=0x14 | B=0xA */ s16 IQ;
|
||||
/* R=0x16 | B=0xC */ s16 pokeHP;
|
||||
/* R=0x18 | B=0xE */ Offense offense;
|
||||
/* R=0x1C | B=0x14 */ u32 currExp;
|
||||
/* R=0x20 | B=0x18 */ IqSkillFlags IQSkills;
|
||||
/* R=0x24 | B=0x1B */ u8 tacticIndex;
|
||||
/* R=0x28 | B=0x1C */ BulkItem heldItem;
|
||||
/* R=0x2C | B=0x1E */ Move moves[MAX_MON_MOVES];
|
||||
/* R=0x4C | B=0x36 */ u8 name[POKEMON_NAME_LENGTH];
|
||||
} PokemonStruct1;
|
||||
|
||||
// size: 0x4
|
||||
|
|
@ -47,45 +47,38 @@ typedef struct EvolveStage
|
|||
/* 0x2 */ u8 level;
|
||||
} EvolveStage;
|
||||
|
||||
// size: 0x24
|
||||
typedef struct unkStruct_8094184
|
||||
{
|
||||
/* 0x0 */ Move moves[MAX_MON_MOVES];
|
||||
u8 unk20;
|
||||
} unkStruct_8094184;
|
||||
|
||||
// size: 0x64
|
||||
// size: R=0x64 | B=0x54
|
||||
typedef struct PokemonStruct2
|
||||
{
|
||||
u16 unk0; // corresponds to unk0 in PokemonStruct
|
||||
/* 0x2 */ bool8 isTeamLeader;
|
||||
/* 0x3 */ u8 level;
|
||||
/* 0x4 */ DungeonLocation dungeonLocation;
|
||||
/* 0x8 */ s16 IQ;
|
||||
s16 unkA;
|
||||
u16 unkC;
|
||||
/* 0xE */ s16 speciesNum;
|
||||
u16 unk10; // pokeHP
|
||||
u16 unk12; // pokeHP
|
||||
/* 0x14 */ Offense offense; // offense (other offset)
|
||||
/* 0x18 */ u32 currExp;
|
||||
/* 0x1C */ Moves moves;
|
||||
/* 0x40 */ Item itemSlot; // heldItem
|
||||
/* 0x44 */ FixedPoint belly;
|
||||
/* 0x48 */ FixedPoint maxBelly;
|
||||
/* 0x4C */ IqSkillFlags IQSkills;
|
||||
/* 0x50 */ u8 tacticIndex;
|
||||
/* 0x54 */ HiddenPower hiddenPower;
|
||||
/* 0x58 */ u8 name[POKEMON_NAME_LENGTH]; // name (other offset)
|
||||
/* R=0x0 | B=0x0 */ u16 unk0; // corresponds to unk0 in PokemonStruct. Only 2 bits are serialized
|
||||
/* R=0x2 | B=0x2 */ bool8 isTeamLeader;
|
||||
/* R=0x3 | B=0x3 */ u8 level;
|
||||
/* R=0x4 | B=0x4 */ DungeonLocation dungeonLocation;
|
||||
/* R=0x8 | B=0x6 */ s16 IQ;
|
||||
/* R=0xA | B=0x8 */ s16 unkA;
|
||||
/* R=0xC | B=0xA */ u16 unkC;
|
||||
/* R=0xE | B=0xC */ s16 speciesNum;
|
||||
/* R=0x10 | B=0xE */ u16 unk10; // pokeHP
|
||||
/* R=0x12 | B=0x10 */ u16 unk12; // pokeHP
|
||||
/* R=0x14 | B=0x12 */ Offense offense; // offense (other offset)
|
||||
/* R=0x18 | B=0x18 */ u32 currExp;
|
||||
/* R=0x1C | B=0x1C */ Moves moves;
|
||||
/* R=0x40 | B=0x36 */ Item itemSlot; // heldItem
|
||||
/* R=0x44 | B=0x3A */ FixedPoint belly;
|
||||
/* R=0x48 | B=0x3E */ FixedPoint maxBelly;
|
||||
/* R=0x4C | B=0x42 */ IqSkillFlags IQSkills;
|
||||
/* R=0x50 | B=0x45 */ u8 tacticIndex;
|
||||
/* R=0x54 | B=0x46 */ HiddenPower hiddenPower;
|
||||
/* R=0x58 | B=0x4A */ u8 name[POKEMON_NAME_LENGTH]; // name (other offset)
|
||||
} PokemonStruct2;
|
||||
|
||||
// size: 0x90E8
|
||||
typedef struct unkStruct_203B45C
|
||||
// size: R=0x90E8 | B=0x6990
|
||||
typedef struct RecruitedMon
|
||||
{
|
||||
/* 0x0 */ PokemonStruct1 pokemon[NUM_MONSTERS];
|
||||
/* 0x8DF8 */ PokemonStruct2 pokemon2[4];
|
||||
/* 0x8F88 */ PokemonStruct1 team[MAX_TEAM_MEMBERS];
|
||||
} unkStruct_203B45C;
|
||||
/* R=0x0 | B=0x0 */ PokemonStruct1 pokemon[NUM_MONSTERS];
|
||||
/* R=0x8DF8 | B=0x6740 */ PokemonStruct2 pokemon2[4];
|
||||
/* R=0x8F88 | B=0x6890 */ PokemonStruct1 team[MAX_TEAM_MEMBERS];
|
||||
} RecruitedMon;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct PreEvolution
|
||||
|
|
|
|||
|
|
@ -8,21 +8,21 @@
|
|||
#include "text_3.h"
|
||||
|
||||
// Struct related with sub_80095E4
|
||||
// size: R=0x9C | B=?
|
||||
typedef struct struct_Sub80095E4
|
||||
{
|
||||
/* 0x0 */ MenuInputStruct input;
|
||||
u32 unk34;
|
||||
WindowTemplate *unk38;
|
||||
WindowTemplates windows;
|
||||
// size: 0x9C
|
||||
/* 0x34 */ u32 unk34;
|
||||
/* 0x38 */ WindowTemplate *unk38;
|
||||
/* 0x3C */ WindowTemplates windows;
|
||||
} struct_Sub80095E4;
|
||||
|
||||
// Has 1 additional array.
|
||||
// size: 0xA0
|
||||
// Has 1 additional array
|
||||
// size: R=0xA0 | B=0x9C?
|
||||
typedef struct struct_Sub80095E4_2
|
||||
{
|
||||
/* 0x0 */ struct_Sub80095E4 s0; // s as in 'struct' ; decided to go against unk as to not have `->unk0->unk3C`
|
||||
WindowHeader unk9C;
|
||||
/* 0x9C */ WindowHeader unk9C;
|
||||
} struct_Sub80095E4_2;
|
||||
|
||||
// Note: In order to get matching ASM, this macro had to be created.
|
||||
|
|
@ -33,16 +33,16 @@ typedef struct struct_Sub80095E4_2
|
|||
s16 newE; \
|
||||
s16 a0 = (_a0); \
|
||||
UNUSED s32 a0_ = a0; \
|
||||
UNUSED s16 oldE = (ptr).windows.id[(ptr).unk34].height; \
|
||||
UNUSED s16 oldE = (ptr).windows.id[(ptr).unk34].height; \
|
||||
a0_ = 0; \
|
||||
new10 = a0 + 2; \
|
||||
newE = a0; \
|
||||
\
|
||||
(ptr).windows.id[(ptr).unk34].height = newE; \
|
||||
(ptr).windows.id[(ptr).unk34].unk10 = a0 + 2; \
|
||||
(ptr).windows.id[(ptr).unk34].height = newE; \
|
||||
(ptr).windows.id[(ptr).unk34].unk10 = a0 + 2; \
|
||||
\
|
||||
ResetUnusedInputStruct(); \
|
||||
ShowWindows(&(ptr).windows, TRUE, TRUE); \
|
||||
ShowWindows(&(ptr).windows, TRUE, TRUE); \
|
||||
}
|
||||
|
||||
#define SUB_80095E4_CALL(ptr) \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
void AddDoubleUnderScoreHighlight(u32 windowId, s32 x, s32 y, s32 width, u32 color);
|
||||
void AddUnderScoreHighlight(u32 windowId, s32 x, s32 y, s32 width, u32 color);
|
||||
void CallPrepareTextbox_8008C54(u32 strId);
|
||||
void CallPrepareTextbox_8008C54(u32 windowId);
|
||||
void DisplayMonPortraitSprite(s32 a0, const u8 *compressedData, s32 a2);
|
||||
void DisplayMonPortraitSpriteFlipped(s32 a0, const u8 *compressedData, s32 a1);
|
||||
const unkChar *GetCharacter(s32 chr);
|
||||
|
|
@ -16,9 +16,9 @@ void sub_8007B7C(u32 a0, s32 x, s32 y, s32 a3, u32 color);
|
|||
void sub_8007E20(u32 a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 *a5, u32 a6);
|
||||
void sub_80087EC(s32 a0, s32 a1, s32 a2, s32 a3, s32 a4);
|
||||
void sub_80089AC(const WindowTemplate *r4, DungeonPos *r5_Str);
|
||||
u32 xxx_call_draw_char(s32 x, s32 y, u32 a2, u32 color, u32 a4);
|
||||
u32 xxx_call_draw_char(s32 x, s32 y, u32 chr, u32 color, u32 windowId);
|
||||
bool8 xxx_call_update_bg_vram(void);
|
||||
u32 xxx_draw_char(Window *windows, s32 x, s32 y, u32 a3, u32 color, u32 windowId);
|
||||
const u8 *xxx_get_next_char_from_string(const u8 *a1, u32 *a0);
|
||||
u32 xxx_draw_char(Window *windows, s32 x, s32 y, u32 chr, u32 color, u32 windowId);
|
||||
const u8 *xxx_get_next_char_from_string(const u8 *a1, u32 *dstChr);
|
||||
|
||||
#endif // GUARD_TEXT_2_H
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@
|
|||
|
||||
extern const u16 gUnknown_80D4144[8];
|
||||
|
||||
EWRAM_DATA u32 gUnknown_202DE1C = {0}; // GBA=202DE1C | NDS=02134218
|
||||
EWRAM_DATA s16 gUnknown_202DE20 = {0}; // GBA=202DE20 | NDS=0213420C
|
||||
EWRAM_DATA s16 gUnknown_202DE22 = {0}; // GBA=202DE22 | NDS=02134210
|
||||
EWRAM_DATA s16 gUnknown_202DE24 = {0}; // GBA=202DE24 | NDS=02134214
|
||||
EWRAM_DATA u32 gUnknown_202DE1C = {0}; // R=202DE1C | B=2134218
|
||||
EWRAM_DATA s16 gUnknown_202DE20 = {0}; // R=202DE20 | B=213420C
|
||||
EWRAM_DATA s16 gUnknown_202DE22 = {0}; // R=202DE22 | B=2134210
|
||||
EWRAM_DATA s16 gUnknown_202DE24 = {0}; // R=202DE24 | B=2134214
|
||||
|
||||
void sub_8011760(void)
|
||||
{
|
||||
|
|
@ -148,6 +148,7 @@ void xxx_call_play_fanfare_se(u16 songIndex, u16 volume)
|
|||
PlayFanfareSE(songIndex, volume);
|
||||
}
|
||||
|
||||
// arm9.bin::020186c8
|
||||
void PlaySound(u16 songIndex)
|
||||
{
|
||||
PlayFanfareSE(songIndex, MAX_VOLUME);
|
||||
|
|
|
|||
|
|
@ -20,10 +20,11 @@ static void sub_801B480(void);
|
|||
static void sub_801B51C(void);
|
||||
static void sub_801B590(void);
|
||||
|
||||
// arm9.bin::02027658
|
||||
bool8 InitItemDescriptionWindow(Item *item)
|
||||
{
|
||||
ResetSprites(TRUE);
|
||||
sUnknown_203B230 = MemoryAlloc(sizeof(unkStruct_203B230),8);
|
||||
sUnknown_203B230 = MemoryAlloc(sizeof(unkStruct_203B230), 8);
|
||||
sUnknown_203B230->item = *item;
|
||||
sub_801317C(&sUnknown_203B230->unk88);
|
||||
sUnknown_203B230->unk24 = 0;
|
||||
|
|
@ -34,6 +35,7 @@ bool8 InitItemDescriptionWindow(Item *item)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// arm9.bin::020275F8
|
||||
u32 sub_801B410(void)
|
||||
{
|
||||
switch (sUnknown_203B230->state) {
|
||||
|
|
@ -53,6 +55,7 @@ u32 sub_801B410(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// arm9.bin::020275C4
|
||||
void FreeItemDescriptionWindow(void)
|
||||
{
|
||||
if (sUnknown_203B230 != NULL) {
|
||||
|
|
@ -61,12 +64,14 @@ void FreeItemDescriptionWindow(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::020275A8
|
||||
static void sub_801B46C(u32 newState)
|
||||
{
|
||||
sUnknown_203B230->state = newState;
|
||||
sub_801B480();
|
||||
}
|
||||
|
||||
// arm9.bin::02027490
|
||||
static void sub_801B480(void)
|
||||
{
|
||||
switch (sUnknown_203B230->state) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ static EWRAM_INIT u8 sUnknown_203B408 = {1};
|
|||
|
||||
#include "data/code_803D0D8.h"
|
||||
|
||||
// arm9.bin::02059A08
|
||||
u8 sub_803D0D8()
|
||||
{
|
||||
return sUnknown_203B408;
|
||||
|
|
@ -21,16 +22,19 @@ UNUSED static void sub_803D0E4(u8 a0)
|
|||
sUnknown_203B408 = a0;
|
||||
}
|
||||
|
||||
// arm9.bin::020599F8
|
||||
u8 sub_803D0F0(u8 r0)
|
||||
{
|
||||
return sUnknown_80F42F0[r0];
|
||||
}
|
||||
|
||||
// arm9.bin::020599E8
|
||||
u8 sub_803D100(u8 r0)
|
||||
{
|
||||
return sUnknown_80F42D0[r0];
|
||||
}
|
||||
|
||||
// arm9.bin::02059908
|
||||
u8 sub_803D110(u8 *param_1, u8 *param_2, s32 size)
|
||||
{
|
||||
s32 index1;
|
||||
|
|
@ -73,6 +77,7 @@ u8 sub_803D110(u8 *param_1, u8 *param_2, s32 size)
|
|||
return 1;
|
||||
}
|
||||
|
||||
// arm9.bin::0205986C
|
||||
void sub_803D1A8(u8 *param_1, u8 *param_2, s32 size)
|
||||
{
|
||||
s32 index;
|
||||
|
|
@ -98,6 +103,7 @@ void sub_803D1A8(u8 *param_1, u8 *param_2, s32 size)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02059778
|
||||
bool8 sub_803D204(u8 *buffer,unkStruct_203B480 *param_2)
|
||||
{
|
||||
s32 innerIndex;
|
||||
|
|
@ -136,10 +142,11 @@ bool8 sub_803D204(u8 *buffer,unkStruct_203B480 *param_2)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// arm9.bin::020596B0
|
||||
void sub_803D2C0(u8 *buffer, unkStruct_203B480 *mail)
|
||||
{
|
||||
u8 checksum;
|
||||
int index;
|
||||
s32 index;
|
||||
u8 local_c0 [34];
|
||||
u8 buffer1 [PASSWORD_BUFFER_SIZE];
|
||||
u8 buffer2 [PASSWORD_BUFFER_SIZE];
|
||||
|
|
@ -168,10 +175,11 @@ void sub_803D2C0(u8 *buffer, unkStruct_203B480 *mail)
|
|||
MemoryCopy8(buffer,buffer2,sizeof(buffer2));
|
||||
}
|
||||
|
||||
// arm9.bin::020595BC
|
||||
bool8 DecodeWonderMailPassword(u8* buffer, WonderMail *mail)
|
||||
{
|
||||
s32 innerIndex;
|
||||
int index;
|
||||
s32 index;
|
||||
u8 checksum;
|
||||
u8 local_70 [16];
|
||||
u8 local_60 [24];
|
||||
|
|
@ -190,8 +198,6 @@ bool8 DecodeWonderMailPassword(u8* buffer, WonderMail *mail)
|
|||
local_60[index] = password[innerIndex];
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (sub_803D110(local_60,local_70,24) != 0) {
|
||||
|
||||
for(index = 1; index < 0xF; index++)
|
||||
|
|
@ -208,6 +214,7 @@ bool8 DecodeWonderMailPassword(u8* buffer, WonderMail *mail)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// arm9.bin::020594F4
|
||||
void sub_803D414(u8 *buffer,WonderMail *mail)
|
||||
{
|
||||
u8 checksum;
|
||||
|
|
@ -240,6 +247,11 @@ void sub_803D414(u8 *buffer,WonderMail *mail)
|
|||
MemoryCopy8(buffer,auStack_44,sizeof(auStack_44));
|
||||
}
|
||||
|
||||
|
||||
// File boundary?
|
||||
|
||||
|
||||
|
||||
void sub_803D4AC(void)
|
||||
{
|
||||
gDungeon->unk1C570.id = 0x63;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ s16 sub_8094828(u16 moveID, u8 id)
|
|||
// New file here
|
||||
|
||||
|
||||
// arm9.bin::02064998
|
||||
void InitBitReader(DataSerializer *r0, u8 *buffer, s32 bufLen)
|
||||
{
|
||||
r0->stream = buffer;
|
||||
|
|
@ -32,6 +33,7 @@ void InitBitReader(DataSerializer *r0, u8 *buffer, s32 bufLen)
|
|||
r0->end = buffer + bufLen;
|
||||
}
|
||||
|
||||
// arm9.bin::0206496C
|
||||
void InitBitWriter(DataSerializer *r0, u8 *buffer, s32 bufLen)
|
||||
{
|
||||
r0->stream = buffer;
|
||||
|
|
@ -41,10 +43,12 @@ void InitBitWriter(DataSerializer *r0, u8 *buffer, s32 bufLen)
|
|||
MemoryClear8(buffer, bufLen);
|
||||
}
|
||||
|
||||
// arm9.bin::02064968
|
||||
void FinishBitSerializer(DataSerializer *seri)
|
||||
{
|
||||
}
|
||||
|
||||
// arm9.bin::020648D0
|
||||
void WriteBits(DataSerializer *r0, void *src, s32 numBits)
|
||||
{
|
||||
s32 curBit;
|
||||
|
|
@ -92,6 +96,7 @@ UNUSED void sub_80948E4(DataSerializer *seri, void *src, s32 numBytes)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::0206482C
|
||||
void ReadBits(DataSerializer *r0, void *dst, s32 numBits)
|
||||
{
|
||||
s32 curBit;
|
||||
|
|
|
|||
|
|
@ -36,12 +36,14 @@ extern const u8 *gUnknown_8113870[];
|
|||
|
||||
extern struct unkStruct_8113080 gSpecialDeathText[];
|
||||
|
||||
// arm9.bin::02064154
|
||||
void ReadBellyBits(DataSerializer *r0, FixedPoint *dst)
|
||||
{
|
||||
ReadBits(r0, &dst->unk0, 16);
|
||||
ReadBits(r0, &dst->unk2, 16);
|
||||
}
|
||||
|
||||
// arm9.bin::02064124
|
||||
void WriteBellyBits(DataSerializer *r0, FixedPoint *src)
|
||||
{
|
||||
WriteBits(r0, &src->unk0, 16);
|
||||
|
|
|
|||
|
|
@ -1428,6 +1428,7 @@ u32 SaveMailInfo(u8 *r0, u32 size)
|
|||
return backup.count;
|
||||
}
|
||||
|
||||
// arm9.bin::020662A0
|
||||
void ReadWonderMailBits(DataSerializer *a, WonderMail *b)
|
||||
{
|
||||
ReadBits(a, &b->mailType, 4);
|
||||
|
|
@ -1443,6 +1444,7 @@ void ReadWonderMailBits(DataSerializer *a, WonderMail *b)
|
|||
ReadDungeonLocationBits(a, &b->unk4.dungeon);
|
||||
}
|
||||
|
||||
// arm9.bin::020661E4
|
||||
void WriteWonderMailBits(DataSerializer *a, WonderMail *b)
|
||||
{
|
||||
WriteBits(a, &b->mailType, 4);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ static bool8 AreStatusesTheSame(const StatusText *status1, const StatusText *sta
|
|||
|
||||
extern const StatusText gStatusDescriptions[];
|
||||
|
||||
// arm9.bin::02069774
|
||||
s32 PrepareStatusStringArrays(const char *str, STATUSTEXTS(statuses))
|
||||
{
|
||||
s32 i, j;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "kangaskhan_storage1.h"
|
||||
#include "kangaskhan_storage2.h"
|
||||
#include "kecleon_bros1.h"
|
||||
#include "kecleon_bros4.h"
|
||||
#include "main_loops.h"
|
||||
#include "memory.h"
|
||||
#include "personality_test1.h"
|
||||
|
|
@ -713,8 +714,6 @@ u8 sub_801FB50();
|
|||
void sub_80155F0();
|
||||
s32 sub_80160D8();
|
||||
void ResetTextbox_809B294();
|
||||
u8 sub_801A5D8();
|
||||
s32 sub_801A6E8(s32);
|
||||
s32 sub_801A8AC();
|
||||
void sub_801A928();
|
||||
s32 sub_8016080();
|
||||
|
|
@ -1864,7 +1863,7 @@ bool8 sub_809B648(void)
|
|||
if (gUnknown_3001B64->unk420 == 1) {
|
||||
ResetTextbox_809B294();
|
||||
ShowWindows(NULL, 1, 1);
|
||||
if (sub_801A5D8(0,0,0,10)) {
|
||||
if (sub_801A5D8(0,0,NULL,10)) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1873,7 +1872,7 @@ bool8 sub_809B648(void)
|
|||
}
|
||||
}
|
||||
else {
|
||||
switch(sub_801A6E8(1)) {
|
||||
switch(sub_801A6E8(TRUE)) {
|
||||
case 3: {
|
||||
s32 itemArrayId = sub_801A8AC();
|
||||
s32 itemId = gTeamInventoryRef->teamItems[itemArrayId].id;
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ ALIGNED(4) const u8* const gCommonKangStorage[KANG_MODE_COUNT][KANG_DLG_MAX] =
|
|||
}
|
||||
};
|
||||
|
||||
// NDS=020A7614
|
||||
ALIGNED(4) const u8* const gCommonKecleonBros[KECLEON_BROS_MODE_COUNT][KECLEON_DLG_MAX] =
|
||||
{
|
||||
[KECLEON_BROS_MODE_ITEMS_AWAKE] = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// LUT for money item stack size -> money amount
|
||||
// NDS=020C359C
|
||||
const s32 gUnknown_810A3F0[100] = {
|
||||
4, 6, 10, 14, 22, 26, 34, 38, 46, 58,
|
||||
62, 74, 82, 86, 94, 106, 118, 122, 134, 142,
|
||||
|
|
|
|||
|
|
@ -13,23 +13,24 @@ const u8 gInvalidDungeonIDs[11] =
|
|||
DUNGEON_OUT_ON_RESCUE
|
||||
};
|
||||
|
||||
const u8 gInvalidItemIDs[0x10] =
|
||||
// NDS=020C3448
|
||||
const u8 gInvalidItemIDs[0x10] =
|
||||
{
|
||||
ITEM_G_MACHINE_6,
|
||||
ITEM_G_MACHINE_7,
|
||||
ITEM_G_MACHINE_8,
|
||||
ITEM_TM_SPIN_SLASH,
|
||||
ITEM_SWITCH_BOX,
|
||||
ITEM_ALERT_SPECS,
|
||||
ITEM_POSSESS_ORB,
|
||||
ITEM_REVIVER_ORB,
|
||||
ITEM_TM_EXCAVATE,
|
||||
ITEM_TOSS_ORB,
|
||||
ITEM_RING_D,
|
||||
ITEM_RING_E,
|
||||
ITEM_RING_F,
|
||||
ITEM_OBSERVER_ORB,
|
||||
ITEM_BEATUP_ORB,
|
||||
ITEM_G_MACHINE_6,
|
||||
ITEM_G_MACHINE_7,
|
||||
ITEM_G_MACHINE_8,
|
||||
ITEM_TM_SPIN_SLASH,
|
||||
ITEM_SWITCH_BOX,
|
||||
ITEM_ALERT_SPECS,
|
||||
ITEM_POSSESS_ORB,
|
||||
ITEM_REVIVER_ORB,
|
||||
ITEM_TM_EXCAVATE,
|
||||
ITEM_TOSS_ORB,
|
||||
ITEM_RING_D,
|
||||
ITEM_RING_E,
|
||||
ITEM_RING_F,
|
||||
ITEM_OBSERVER_ORB,
|
||||
ITEM_BEATUP_ORB,
|
||||
NUMBER_OF_ITEM_IDS
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -177,12 +177,14 @@ u8 sub_80902C8(u8 dungeon)
|
|||
return gUnknown_81077E8[dungeon];
|
||||
}
|
||||
|
||||
// arm9.bin::0205ECA0
|
||||
void WriteDungeonLocationBits(DataSerializer* r0, DungeonLocation* src)
|
||||
{
|
||||
WriteBits(r0, &src->id, 7);
|
||||
WriteBits(r0, &src->floor, 7);
|
||||
}
|
||||
|
||||
// arm9.bin::0205EC64
|
||||
void ReadDungeonLocationBits(DataSerializer* r0, DungeonLocation* dst)
|
||||
{
|
||||
dst->id = 0;
|
||||
|
|
|
|||
|
|
@ -409,22 +409,24 @@ static void sub_8016B48(u8 action)
|
|||
sub_80073E0(sFelicityBankWork->unk64.unk14);
|
||||
}
|
||||
|
||||
static void CreateFelicityMoneySavingsHeader(u32 param_1)
|
||||
// arm9.bin::0201FB54
|
||||
static void CreateFelicityMoneySavingsHeader(u32 windowId)
|
||||
{
|
||||
CallPrepareTextbox_8008C54(param_1);
|
||||
sub_80073B8(param_1);
|
||||
PrintStringOnWindow(16, 4, sDisplayMoney, param_1, 0);
|
||||
sub_8012BC4(96, 4, gTeamInventoryRef->teamMoney, 5, 5, param_1);
|
||||
PrintStringOnWindow(112, 4, sDisplaySavings, param_1, 0);
|
||||
sub_8012BC4(200, 4, gTeamInventoryRef->teamSavings, 7, 5, param_1);
|
||||
sub_80073E0(param_1);
|
||||
CallPrepareTextbox_8008C54(windowId);
|
||||
sub_80073B8(windowId);
|
||||
PrintStringOnWindow(16, 4, sDisplayMoney, windowId, 0);
|
||||
sub_8012BC4(96, 4, gTeamInventoryRef->teamMoney, 5, 5, windowId);
|
||||
PrintStringOnWindow(112, 4, sDisplaySavings, windowId, 0);
|
||||
sub_8012BC4(200, 4, gTeamInventoryRef->teamSavings, 7, 5, windowId);
|
||||
sub_80073E0(windowId);
|
||||
}
|
||||
|
||||
void DrawTeamMoneyBox(u32 param_1)
|
||||
// arm9.bin::0201FAE8
|
||||
void DrawTeamMoneyBox(u32 windowId)
|
||||
{
|
||||
CallPrepareTextbox_8008C54(param_1);
|
||||
sub_80073B8(param_1);
|
||||
PrintStringOnWindow(6, 0, sMoney, param_1, 0);
|
||||
sub_8012BC4(42, 12, gTeamInventoryRef->teamMoney, 5, 5, param_1);
|
||||
sub_80073E0(param_1);
|
||||
CallPrepareTextbox_8008C54(windowId);
|
||||
sub_80073B8(windowId);
|
||||
PrintStringOnWindow(6, 0, sMoney, windowId, 0);
|
||||
sub_8012BC4(42, 12, gTeamInventoryRef->teamMoney, 5, 5, windowId);
|
||||
sub_80073E0(windowId);
|
||||
}
|
||||
|
|
|
|||
14
src/input.c
14
src/input.c
|
|
@ -5,13 +5,13 @@
|
|||
#define JUNK_INIT 0x4A14C1
|
||||
#define JUNK_UPDATE 0x54A1C41
|
||||
|
||||
EWRAM_DATA Inputs gRealInputs = {0}; // GBA=20255F0 | NDS=20F5CC0
|
||||
static EWRAM_DATA UnusedInputStruct sUnusedInputsRelated = {0}; // GBA=2025600 | NDS=020F5CD0
|
||||
static EWRAM_DATA u32 sUnusedScrambledInputJunk[3] = {0}; // GBA=202562C | NDS=020F5C88
|
||||
static EWRAM_DATA Inputs sBufferedInputs = {0}; // GBA=2025638 | NDS=020F5C90
|
||||
static EWRAM_DATA Inputs sCurrentInputs = {0}; // GBA=2025648 | NDS=020F5CB0
|
||||
static EWRAM_DATA Inputs sPrevInputs = {0}; // GBA=2025658 | NDS=020F5CA0
|
||||
static EWRAM_DATA InputTimers sInputTimers = {0}; // GBA=2025668 | NDS=020F5C8C
|
||||
EWRAM_DATA Inputs gRealInputs = {0}; // R=20255F0 | B=20F5CC0
|
||||
static EWRAM_DATA UnusedInputStruct sUnusedInputsRelated = {0}; // R=2025600 | B=020F5CD0
|
||||
static EWRAM_DATA u32 sUnusedScrambledInputJunk[3] = {0}; // R=202562C | B=020F5C88
|
||||
static EWRAM_DATA Inputs sBufferedInputs = {0}; // R=2025638 | B=020F5C90
|
||||
static EWRAM_DATA Inputs sCurrentInputs = {0}; // R=2025648 | B=020F5CB0
|
||||
static EWRAM_DATA Inputs sPrevInputs = {0}; // R=2025658 | B=020F5CA0
|
||||
static EWRAM_DATA InputTimers sInputTimers = {0}; // R=2025668 | B=020F5C8C
|
||||
|
||||
// arm9.bin::0200754C
|
||||
void InitInput(void)
|
||||
|
|
|
|||
1013
src/items.c
1013
src/items.c
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,8 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/str_mon_portrait.h"
|
||||
#include "structs/str_text.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_8099360.h"
|
||||
|
|
@ -17,7 +20,80 @@
|
|||
#include "string_format.h"
|
||||
#include "text_1.h"
|
||||
|
||||
static EWRAM_INIT KecleonBrosWork1 *sKecleonBrosWork1 = {NULL};
|
||||
enum KecleonStoreStates
|
||||
{
|
||||
KECLEON_STORE_INIT = 0,
|
||||
KECLEON_STORE_MAIN_MENU,
|
||||
KECLEON_STORE_INFO,
|
||||
KECLEON_STORE_UNK3,
|
||||
KECLEON_STORE_EXIT,
|
||||
KECLEON_STORE_NO_STORE_ITEMS,
|
||||
KECLEON_STORE_NO_MONEY,
|
||||
KECLEON_STORE_TOO_MUCH_MONEY,
|
||||
KECLEON_STORE_NO_ITEMS_TO_SELL,
|
||||
KECLEON_STORE_NO_ITEMS,
|
||||
KECLEON_STORE_TOO_MANY_ITEMS,
|
||||
KECLEON_STORE_UNK11,
|
||||
KECLEON_STORE_NOT_ENOUGH_MONEY,
|
||||
KECLEON_STORE_CANT_SELL_ITEM,
|
||||
KECLEON_STORE_SELL_ITEM_TOO_MUCH_MONEY,
|
||||
KECLEON_STORE_UNK15,
|
||||
KECLEON_STORE_BUY_ITEM_MENU,
|
||||
KECLEON_STORE_BUY_ITEM_RECEIPT,
|
||||
KECLEON_STORE_UNK18,
|
||||
KECLEON_STORE_UNK19,
|
||||
KECLEON_STORE_UNK20,
|
||||
KECLEON_STORE_BUY_ITEM_INFO,
|
||||
KECLEON_STORE_BUY_ITEM,
|
||||
KECLEON_STORE_UNK23,
|
||||
KECLEON_STORE_SELL_ITEM_MENU,
|
||||
KECLEON_STORE_SELL_ITEM_RECEIPT,
|
||||
KECLEON_STORE_UNK26,
|
||||
KECLEON_STORE_UNK27,
|
||||
KECLEON_STORE_UNK28,
|
||||
KECLEON_STORE_SELL_ITEM_INFO,
|
||||
KECLEON_STORE_SELL_ITEM,
|
||||
KECLEON_STORE_SELL_ALL_ITEMS,
|
||||
KECLEON_STORE_SELL_ALL_ITEMS_RECEIPT,
|
||||
};
|
||||
|
||||
enum MenuActions
|
||||
{
|
||||
CANCEL_ACTION = 1,
|
||||
BUY_ACTION,
|
||||
SELL_ACTION,
|
||||
SELL_ALL_ACTION,
|
||||
YES_ACTION,
|
||||
NO_ACTION,
|
||||
INFO_ACTION
|
||||
};
|
||||
|
||||
// size: R=0x148 | B=0x144
|
||||
typedef struct KecleonBrosWork1
|
||||
{
|
||||
/* 0x0 */ u32 mode; // Corresponds to the enum: KecleonBrosMode
|
||||
/* 0x4 */ bool8 isKecleonItemShop; // FALSE indicates it is Kecleon TM Shop
|
||||
/* 0x8 */ u32 currState;
|
||||
/* 0xC */ u32 fallbackState;
|
||||
/* 0x10 */ s32 itemSellPrice;
|
||||
/* 0x14 */ u32 numInventoryItemToSell;
|
||||
/* 0x18 */ s32 inventoryItemSellPrice;
|
||||
/* 0x1C */ Item soldItem;
|
||||
/* 0x20 */ u8 itemShopItemIndex; // TODO: 0x1F
|
||||
/* 0x21 */ u8 wareShopItemIndex;
|
||||
/* 0x24 */ u32 soldItemInventoryIndex;
|
||||
/* 0x28 */ u32 menuAction1;
|
||||
/* 0x2C */ u32 menuAction2;
|
||||
/* 0x30 */ u32 menuAction3;
|
||||
/* 0x34 */ MenuItem menuItems[8];
|
||||
/* 0x74 */ u16 unk74[8];
|
||||
/* 0x84 */ MenuStruct menu;
|
||||
/* 0xD4 */ MonPortraitMsg monPortrait; // This seems to start 4 bytes earlier on NDS. I think MenuStruct is shorter
|
||||
/* 0xE4 */ MonPortraitMsg *monPortraitPtr;
|
||||
/* 0xE8 */ WindowTemplates unkE8;
|
||||
} KecleonBrosWork1;
|
||||
|
||||
static EWRAM_INIT KecleonBrosWork1 *sKecleonBrosWork1 = {NULL}; // NDS=020EAD7C
|
||||
|
||||
#include "data/kecleon_bros1.h"
|
||||
|
||||
|
|
@ -44,16 +120,7 @@ static void ProceedToKecleonBros1FallbackState(void);
|
|||
static void KecleonCalcSellPriceForAllItems(void);
|
||||
static void SetKecleonPortraitSpriteId(bool32 angrySprite);
|
||||
|
||||
enum MenuActions {
|
||||
CANCEL_ACTION = 1,
|
||||
BUY_ACTION,
|
||||
SELL_ACTION,
|
||||
SELL_ALL_ACTION,
|
||||
YES_ACTION,
|
||||
NO_ACTION,
|
||||
INFO_ACTION
|
||||
};
|
||||
|
||||
// arm9.bin::020252B0
|
||||
bool8 CreateKecleonBros(u32 mode)
|
||||
{
|
||||
u8 *monName;
|
||||
|
|
@ -114,6 +181,7 @@ bool8 CreateKecleonBros(u32 mode)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// arm9.bin::020251A4
|
||||
u32 KecleonBrosCallback(void)
|
||||
{
|
||||
switch (sKecleonBrosWork1->currState) {
|
||||
|
|
@ -159,6 +227,7 @@ u32 KecleonBrosCallback(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// arm9.bin::02025160
|
||||
void DeleteKecleonBros(void)
|
||||
{
|
||||
if (sKecleonBrosWork1 != NULL) {
|
||||
|
|
@ -168,6 +237,7 @@ void DeleteKecleonBros(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02025138
|
||||
static void SetKecleonBrosState(u32 newState)
|
||||
{
|
||||
sKecleonBrosWork1->currState = newState;
|
||||
|
|
@ -175,6 +245,7 @@ static void SetKecleonBrosState(u32 newState)
|
|||
UpdateKecleonStoreDialogue();
|
||||
}
|
||||
|
||||
// arm9.bin::02024F44
|
||||
static void sub_8018D30(void)
|
||||
{
|
||||
s32 i;
|
||||
|
|
@ -215,6 +286,7 @@ static void sub_8018D30(void)
|
|||
ShowWindows(&sKecleonBrosWork1->unkE8, TRUE, TRUE);
|
||||
}
|
||||
|
||||
// arm9.bin::02024500
|
||||
static void UpdateKecleonStoreDialogue(void)
|
||||
{
|
||||
switch (sKecleonBrosWork1->currState) {
|
||||
|
|
@ -337,7 +409,7 @@ static void UpdateKecleonStoreDialogue(void)
|
|||
sub_8090E14(gFormatBuffer_Items[0], &sKecleonBrosWork1->soldItem, 0);
|
||||
gFormatArgs[0] = sKecleonBrosWork1->itemSellPrice;
|
||||
SetKecleonPortraitSpriteId(FALSE);
|
||||
CreateMenuDialogueBoxAndPortrait(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_05], 0, 5,sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12);
|
||||
CreateMenuDialogueBoxAndPortrait(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_05], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12);
|
||||
break;
|
||||
case KECLEON_STORE_BUY_ITEM_RECEIPT:
|
||||
if (CountKecleonItems() == 0) {
|
||||
|
|
@ -421,6 +493,7 @@ static void UpdateKecleonStoreDialogue(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::020243AC
|
||||
static void BuildKecleonBrosMainMenu(void)
|
||||
{
|
||||
s32 i;
|
||||
|
|
@ -467,6 +540,7 @@ static void BuildKecleonBrosMainMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::020242B0
|
||||
static void BuildKecleonBrosBuyItemMenu(void)
|
||||
{
|
||||
s32 i;
|
||||
|
|
@ -501,6 +575,7 @@ static void BuildKecleonBrosBuyItemMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::020241B4
|
||||
static void BuildKecleonBrosSellItemMenu(void)
|
||||
{
|
||||
s32 i;
|
||||
|
|
@ -535,6 +610,7 @@ static void BuildKecleonBrosSellItemMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02024150
|
||||
static void BuildKecleonBrosYesNoMenu(void)
|
||||
{
|
||||
s32 loopMax = 0;
|
||||
|
|
@ -550,6 +626,7 @@ static void BuildKecleonBrosYesNoMenu(void)
|
|||
sKecleonBrosWork1->menuItems[loopMax].menuAction = CANCEL_ACTION;
|
||||
}
|
||||
|
||||
// arm9.bin::02023FB8
|
||||
static void HandleKecleonBrosMainMenu(void)
|
||||
{
|
||||
s32 menuAction;
|
||||
|
|
@ -598,6 +675,7 @@ static void HandleKecleonBrosMainMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023EEC
|
||||
static void HandleKecleonBrosBuyItemYesNoMenu(void)
|
||||
{
|
||||
s32 menuAction;
|
||||
|
|
@ -629,6 +707,7 @@ static void HandleKecleonBrosBuyItemYesNoMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023E6C
|
||||
static void HandleKecleonBrosSellItemYesNoMenu(void)
|
||||
{
|
||||
s32 menuAction;
|
||||
|
|
@ -649,6 +728,7 @@ static void HandleKecleonBrosSellItemYesNoMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023D98
|
||||
static void HandleKecleonBrosSellAllItemsMenu(void)
|
||||
{
|
||||
s32 slotIndex;
|
||||
|
|
@ -678,6 +758,7 @@ static void HandleKecleonBrosSellAllItemsMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023BC0
|
||||
static void sub_80199CC(void)
|
||||
{
|
||||
u32 menuAction;
|
||||
|
|
@ -734,6 +815,7 @@ static void sub_80199CC(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023A90
|
||||
static void sub_8019B08(void)
|
||||
{
|
||||
switch (sub_801A6E8(TRUE)) {
|
||||
|
|
@ -763,6 +845,7 @@ static void sub_8019B08(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023990
|
||||
static void HandleKecleonBrosBuyItemMenu(void)
|
||||
{
|
||||
s32 menuAction;
|
||||
|
|
@ -795,6 +878,7 @@ static void HandleKecleonBrosBuyItemMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023880
|
||||
static void HandleKecleonBrosSellItemMenu(void)
|
||||
{
|
||||
s32 menuAction;
|
||||
|
|
@ -826,6 +910,7 @@ static void HandleKecleonBrosSellItemMenu(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023844
|
||||
static void sub_8019D30(void)
|
||||
{
|
||||
switch (sub_801B410()) {
|
||||
|
|
@ -840,6 +925,7 @@ static void sub_8019D30(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02023808
|
||||
static void sub_8019D4C(void)
|
||||
{
|
||||
switch (sub_801B410()) {
|
||||
|
|
@ -854,6 +940,7 @@ static void sub_8019D4C(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::020237D4
|
||||
static void ProceedToKecleonBros1FallbackState(void)
|
||||
{
|
||||
s32 temp;
|
||||
|
|
@ -862,6 +949,7 @@ static void ProceedToKecleonBros1FallbackState(void)
|
|||
SetKecleonBrosState(sKecleonBrosWork1->fallbackState);
|
||||
}
|
||||
|
||||
// arm9.bin::020237A0
|
||||
static u32 CountKecleonItems(void)
|
||||
{
|
||||
if (sKecleonBrosWork1->isKecleonItemShop)
|
||||
|
|
@ -870,6 +958,7 @@ static u32 CountKecleonItems(void)
|
|||
return CountKecleonWareItems();
|
||||
}
|
||||
|
||||
// arm9.bin::02023700
|
||||
static void KecleonCalcSellPriceForAllItems(void)
|
||||
{
|
||||
s32 sellPrice;
|
||||
|
|
@ -889,6 +978,7 @@ static void KecleonCalcSellPriceForAllItems(void)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::020236B8
|
||||
static void SetKecleonPortraitSpriteId(bool32 angrySprite)
|
||||
{
|
||||
if (sKecleonBrosWork1->isKecleonItemShop) {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ static EWRAM_INIT u16 gUnknown_203B218 = {0};
|
|||
|
||||
static void sub_801A064(void);
|
||||
|
||||
// arm9.bin::020258B0
|
||||
bool8 sub_8019E40(u32 r0)
|
||||
{
|
||||
if (CountKecleonShopItems() == 0)
|
||||
|
|
@ -40,6 +41,7 @@ bool8 sub_8019E40(u32 r0)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// arm9.bin::020257BC
|
||||
u32 sub_8019EDC(bool8 r0)
|
||||
{
|
||||
Item slot;
|
||||
|
|
@ -77,11 +79,13 @@ u32 sub_8019EDC(bool8 r0)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02025798
|
||||
u8 sub_8019FB0(void)
|
||||
{
|
||||
return (gUnknown_203B214->s0.input.unk1E * gUnknown_203B214->s0.input.unk1C) + (u8)gUnknown_203B214->s0.input.menuIndex;
|
||||
}
|
||||
|
||||
// arm9.bin::02025738
|
||||
void sub_8019FCC(bool8 r0)
|
||||
{
|
||||
ResetUnusedInputStruct();
|
||||
|
|
@ -94,6 +98,7 @@ void sub_8019FCC(bool8 r0)
|
|||
AddMenuCursorSprite(&gUnknown_203B214->s0.input);
|
||||
}
|
||||
|
||||
// arm9.bin::020256A8
|
||||
void sub_801A010(void)
|
||||
{
|
||||
if (gUnknown_203B214 != NULL) {
|
||||
|
|
@ -116,6 +121,7 @@ static void sub_801A064(void)
|
|||
SUB_80095E4_CALL(gUnknown_203B214->s0);
|
||||
}
|
||||
|
||||
// arm9.bin::02025480
|
||||
void sub_801A0D8(void)
|
||||
{
|
||||
BulkItem *heldItem;
|
||||
|
|
|
|||
|
|
@ -19,10 +19,11 @@ static EWRAM_INIT u16 gUnknown_203B220 = {0};
|
|||
|
||||
static void sub_801A430(void);
|
||||
|
||||
u8 sub_801A20C(u32 r0)
|
||||
// arm9.bin::02025DDC
|
||||
bool8 sub_801A20C(u32 r0)
|
||||
{
|
||||
if (CountKecleonWareItems() == 0)
|
||||
return 0;
|
||||
return FALSE;
|
||||
|
||||
gUnknown_203B21C = MemoryAlloc(sizeof(*gUnknown_203B21C), 8);
|
||||
gUnknown_203B21C->s0.unk34 = r0;
|
||||
|
|
@ -78,11 +79,13 @@ u32 sub_801A2A8(bool8 r0)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02025CC4
|
||||
u8 sub_801A37C(void)
|
||||
{
|
||||
return (gUnknown_203B21C->s0.input.unk1E * gUnknown_203B21C->s0.input.unk1C) + gUnknown_203B21C->s0.input.menuIndex;
|
||||
}
|
||||
|
||||
// arm9.bin::02025C64
|
||||
void sub_801A398(bool8 r0)
|
||||
{
|
||||
ResetUnusedInputStruct();
|
||||
|
|
@ -95,6 +98,7 @@ void sub_801A398(bool8 r0)
|
|||
AddMenuCursorSprite(&gUnknown_203B21C->s0.input);
|
||||
}
|
||||
|
||||
// arm9.bin::02025BD4
|
||||
void sub_801A3DC(void)
|
||||
{
|
||||
if (gUnknown_203B21C != NULL) {
|
||||
|
|
@ -117,6 +121,7 @@ static void sub_801A430(void)
|
|||
SUB_80095E4_CALL(gUnknown_203B21C->s0);
|
||||
}
|
||||
|
||||
// arm9.bin::020259AC
|
||||
void sub_801A4A4(void)
|
||||
{
|
||||
BulkItem *heldItem;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "constants/input.h"
|
||||
#include "constants/item.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/struct_sub80095e4.h"
|
||||
#include "code_800D090.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_8099360.h"
|
||||
|
|
@ -13,6 +16,14 @@
|
|||
#include "text_1.h"
|
||||
#include "text_2.h"
|
||||
|
||||
// size: R=0xF4 | B=0xF0
|
||||
typedef struct unkStruct_203B224
|
||||
{
|
||||
/* 0x0 */ u32 unk0;
|
||||
/* 0x4 */ u32 unk4[INVENTORY_SIZE];
|
||||
/* 0x54 */ struct_Sub80095E4_2 unk54;
|
||||
} unkStruct_203B224;
|
||||
|
||||
static EWRAM_INIT unkStruct_203B224 *gUnknown_203B224 = {NULL};
|
||||
static EWRAM_INIT u16 gUnknown_203B228 = {0};
|
||||
static EWRAM_INIT u16 gUnknown_203B22A = {0};
|
||||
|
|
@ -24,6 +35,7 @@ static void SortInventoryItems(void);
|
|||
static void sub_801A998(void);
|
||||
static s32 sub_801AE24(u32);
|
||||
|
||||
// arm9.bin::02026BE4
|
||||
bool8 sub_801A5D8(u32 param_1, s32 param_2, DungeonPos *param_3, u32 param_4)
|
||||
{
|
||||
if (GetNumberOfFilledInventorySlots() == 0)
|
||||
|
|
@ -57,6 +69,7 @@ bool8 sub_801A5D8(u32 param_1, s32 param_2, DungeonPos *param_3, u32 param_4)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// arm9.bin::02026954
|
||||
u32 sub_801A6E8(bool8 param_1)
|
||||
{
|
||||
s32 index;
|
||||
|
|
@ -139,11 +152,13 @@ u32 sub_801A6E8(bool8 param_1)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02026934
|
||||
s32 sub_801A8AC(void)
|
||||
{
|
||||
return (gUnknown_203B224->unk54.s0.input.unk1E * gUnknown_203B224->unk54.s0.input.unk1C) + gUnknown_203B224->unk54.s0.input.menuIndex;
|
||||
}
|
||||
|
||||
// arm9.bin::020268C0
|
||||
void sub_801A8D0(bool8 r0)
|
||||
{
|
||||
sub_8099690(1);
|
||||
|
|
@ -158,6 +173,7 @@ void sub_801A8D0(bool8 r0)
|
|||
AddMenuCursorSprite(&gUnknown_203B224->unk54.s0.input);
|
||||
}
|
||||
|
||||
// arm9.bin::02026818
|
||||
void sub_801A928(void)
|
||||
{
|
||||
if (gUnknown_203B224 != NULL) {
|
||||
|
|
@ -182,6 +198,7 @@ static void sub_801A998(void)
|
|||
ShowWindows(&gUnknown_203B224->unk54.s0.windows, TRUE, TRUE);
|
||||
}
|
||||
|
||||
// arm9.bin::020262DC
|
||||
void sub_801A9E0(void)
|
||||
{
|
||||
s32 teamItemIndex;
|
||||
|
|
@ -292,6 +309,7 @@ void sub_801A9E0(void)
|
|||
sub_80073E0(gUnknown_203B224->unk54.s0.unk34);
|
||||
}
|
||||
|
||||
// arm9.bin::02026234
|
||||
void sub_801AD34(u32 param_1)
|
||||
{
|
||||
CallPrepareTextbox_8008C54(param_1);
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ UNUSED static void MemoryClear32(u32 *dest, s32 size)
|
|||
CpuClear(dest, size);
|
||||
}
|
||||
|
||||
// arm9.bin::02010BD8
|
||||
void MemoryFill8(void *dest, u8 value, s32 size)
|
||||
{
|
||||
u8 *cur = dest;
|
||||
|
|
@ -111,6 +112,7 @@ void MemoryFill8(void *dest, u8 value, s32 size)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02010BC0
|
||||
void MemoryFill16(u16 *dest, u16 value, s32 size)
|
||||
{
|
||||
while (size > 0) {
|
||||
|
|
@ -119,6 +121,7 @@ void MemoryFill16(u16 *dest, u16 value, s32 size)
|
|||
}
|
||||
}
|
||||
|
||||
#if (GAME_VERSION == VERSION_RED)
|
||||
UNUSED static void MemoryFill32(u32 *dest, u32 value, s32 size)
|
||||
{
|
||||
while (size > 0) {
|
||||
|
|
@ -126,6 +129,7 @@ UNUSED static void MemoryFill32(u32 *dest, u32 value, s32 size)
|
|||
*dest++ = value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// arm9.bin::02010BB4
|
||||
void MemoryCopy8(void *dest, void *src, s32 size)
|
||||
|
|
@ -455,6 +459,7 @@ error:
|
|||
heap, size, atb, group);
|
||||
}
|
||||
|
||||
// arm9.bin::02010DE0
|
||||
void *MemoryAlloc(s32 size, s32 group)
|
||||
{
|
||||
return DoAlloc(&sMainHeapDescriptor, size, group);
|
||||
|
|
|
|||
|
|
@ -160,10 +160,11 @@ s32 sub_8012AE8(void)
|
|||
return INPUT_NONE;
|
||||
}
|
||||
|
||||
void sub_8012BC4(u32 x, u32 y, s32 n, s32 len, u32 color, u32 a5)
|
||||
// arm9.bin::0201C4A0
|
||||
void sub_8012BC4(u32 x, u32 y, s32 n, s32 len, u32 color, u32 windowId)
|
||||
{
|
||||
s32 iVar1;
|
||||
u32 uVar2;
|
||||
u32 chr;
|
||||
const unkChar *iVar3;
|
||||
s32 counter;
|
||||
s32 *piVar3;
|
||||
|
|
@ -195,10 +196,10 @@ void sub_8012BC4(u32 x, u32 y, s32 n, s32 len, u32 color, u32 a5)
|
|||
do {
|
||||
iVar1 = *piVar4;
|
||||
piVar4++;
|
||||
uVar2 = ReturnIntFromChar2(iVar1 + 0x30);
|
||||
iVar3 = GetCharacter(uVar2);
|
||||
chr = ReturnIntFromChar2(iVar1 + 0x30);
|
||||
iVar3 = GetCharacter(chr);
|
||||
total_x += iVar3->unk6;
|
||||
xxx_call_draw_char(x - total_x, y, uVar2, color, a5);
|
||||
xxx_call_draw_char(x - total_x, y, chr, color, windowId);
|
||||
counter++;
|
||||
if (counter >= len)
|
||||
break;
|
||||
|
|
@ -273,6 +274,7 @@ void sub_8012D34(WindowTemplate *param_1, s32 param_2)
|
|||
|
||||
}
|
||||
|
||||
// arm9.bin::0201C26C
|
||||
void sub_8012D60(MenuStruct *param_1, const MenuItem *menuItems, const u32 *colorArray, u16 *param_4, s32 menuAction, s32 index)
|
||||
{
|
||||
const u8 *textPtr;
|
||||
|
|
@ -560,6 +562,7 @@ static void sub_8013134(MenuInputStruct *param_1, u32 menuItemCounter, u32 windo
|
|||
sub_801317C(¶m_1->unk28);
|
||||
}
|
||||
|
||||
// arm9.bin::0201BD28
|
||||
void sub_801317C(MenuInputStructSub *param_1)
|
||||
{
|
||||
param_1->unk0 = 0;
|
||||
|
|
@ -567,17 +570,19 @@ void sub_801317C(MenuInputStructSub *param_1)
|
|||
param_1->b_button = 0;
|
||||
param_1->dpad_left = 0;
|
||||
param_1->dpad_right = 0;
|
||||
param_1->unk8 = -1;
|
||||
param_1->unkA = -1;
|
||||
param_1->unk8.x = -1;
|
||||
param_1->unk8.y = -1;
|
||||
nullsub_7(¶m_1->unk8);
|
||||
ResetUnusedInputStruct();
|
||||
}
|
||||
|
||||
// arm9.bin::0201BD18
|
||||
void AddMenuCursorSprite(MenuInputStruct *param_1)
|
||||
{
|
||||
AddMenuCursorSprite_(param_1, 0);
|
||||
}
|
||||
|
||||
// arm9.bin::0201B978
|
||||
void AddMenuCursorSprite_(MenuInputStruct *a0, u8 *a1)
|
||||
{
|
||||
struct SpriteOAM sp = {0};
|
||||
|
|
@ -611,12 +616,15 @@ void AddMenuCursorSprite_(MenuInputStruct *a0, u8 *a1)
|
|||
sub_801332C(&a0->unk14);
|
||||
|
||||
a0->unk24++;
|
||||
|
||||
// More here in NDS
|
||||
}
|
||||
|
||||
void nullsub_34(MenuInputStructSub *a0, s32 a1)
|
||||
{
|
||||
}
|
||||
|
||||
// arm9.bin::0201B490
|
||||
static void sub_801332C(DungeonPos *a0)
|
||||
{
|
||||
struct SpriteOAM sp = {0};
|
||||
|
|
@ -640,6 +648,7 @@ static void sub_801332C(DungeonPos *a0)
|
|||
AddSprite(&sp, 0xFF, NULL, NULL);
|
||||
}
|
||||
|
||||
// arm9.bin::0201B1C0
|
||||
static void sub_8013470(MenuInputStruct *a0)
|
||||
{
|
||||
struct SpriteOAM sp = {0};
|
||||
|
|
@ -694,6 +703,7 @@ void sub_8013660(MenuInputStruct *param_1)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::0201B14C
|
||||
void UpdateMenuCursorSpriteCoords(MenuInputStruct *param_1)
|
||||
{
|
||||
s32 index;
|
||||
|
|
@ -811,6 +821,7 @@ void sub_80137F8(MenuInputStruct *param_1, u32 param_2)
|
|||
param_1->unk10 = param_2 << 8;
|
||||
}
|
||||
|
||||
// arm9.bin::0201AF70
|
||||
s32 GetMenuEntryYCoord(MenuInputStruct *menu, s32 entryId)
|
||||
{
|
||||
s32 firstY = menu->firstEntryY;
|
||||
|
|
@ -1191,13 +1202,11 @@ void sub_8013F84(void)
|
|||
AddSprite(&SStack_18,0x100,0,0x0);
|
||||
}
|
||||
|
||||
// arm9.bin::0201A100
|
||||
void sub_80140B4(WindowTemplates *a0)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for(i = 0; i < 4; i++)
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
a0->id[i] = gUnknown_80D47C8[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
15
src/moves.c
15
src/moves.c
|
|
@ -1476,6 +1476,7 @@ void unk_CopyMoves4To8AndClearFlag2Unk4(Move *destMoves, Move *srcMoves)
|
|||
destMoves[movesCopied++].moveFlags = 0;
|
||||
}
|
||||
|
||||
// arm9.bin::02061E58
|
||||
void unk_CopyMoves4To8(Move *destMoves, Move *srcMoves)
|
||||
{
|
||||
s32 movesCopied;
|
||||
|
|
@ -1492,6 +1493,7 @@ void unk_CopyMoves4To8(Move *destMoves, Move *srcMoves)
|
|||
destMoves[movesCopied++].moveFlags = 0;
|
||||
}
|
||||
|
||||
// arm9.bin::02061DC0
|
||||
void sub_8094060(Move *srcMoves, Move *destMoves)
|
||||
{
|
||||
s32 i, j;
|
||||
|
|
@ -1516,6 +1518,7 @@ void sub_8094060(Move *srcMoves, Move *destMoves)
|
|||
destMoves[j++].moveFlags = 0;
|
||||
}
|
||||
|
||||
// arm9.bin::02061D80
|
||||
static void WritePoke1MoveBits(DataSerializer *r0, Move *move)
|
||||
{
|
||||
WriteBits(r0, &move->moveFlags, 4);
|
||||
|
|
@ -1523,6 +1526,7 @@ static void WritePoke1MoveBits(DataSerializer *r0, Move *move)
|
|||
WriteBits(r0, &move->PP, 7);
|
||||
}
|
||||
|
||||
// arm9.bin::02061D40
|
||||
static void ReadPoke1MoveBits(DataSerializer *r0, Move *move)
|
||||
{
|
||||
ReadBits(r0, &move->moveFlags, 4);
|
||||
|
|
@ -1530,6 +1534,7 @@ static void ReadPoke1MoveBits(DataSerializer *r0, Move *move)
|
|||
ReadBits(r0, &move->PP, 7);
|
||||
}
|
||||
|
||||
// arm9.bin::02061D08
|
||||
void WritePoke1MovesBits(DataSerializer *r0, Move *moveSet)
|
||||
{
|
||||
s32 i;
|
||||
|
|
@ -1538,6 +1543,7 @@ void WritePoke1MovesBits(DataSerializer *r0, Move *moveSet)
|
|||
WritePoke1MoveBits(r0, &moveSet[i]);
|
||||
}
|
||||
|
||||
// arm9.bin::02061CD0
|
||||
void ReadPoke1MovesBits(DataSerializer *r0, Move *moveSet)
|
||||
{
|
||||
s32 i;
|
||||
|
|
@ -1546,6 +1552,7 @@ void ReadPoke1MovesBits(DataSerializer *r0, Move *moveSet)
|
|||
ReadPoke1MoveBits(r0, &moveSet[i]);
|
||||
}
|
||||
|
||||
// arm9.bin::02061C70
|
||||
static void WritePoke2MoveBits(DataSerializer *r0, Move *move)
|
||||
{
|
||||
WriteBits(r0, &move->moveFlags, 4);
|
||||
|
|
@ -1555,7 +1562,8 @@ static void WritePoke2MoveBits(DataSerializer *r0, Move *move)
|
|||
WriteBits(r0, &move->ginseng, 7);
|
||||
}
|
||||
|
||||
void WritePoke2MovesBits(DataSerializer *r0, struct Moves *r1)
|
||||
// arm9.bin::02061C28
|
||||
void WritePoke2MovesBits(DataSerializer *r0, Moves *r1)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -1565,6 +1573,7 @@ void WritePoke2MovesBits(DataSerializer *r0, struct Moves *r1)
|
|||
WriteBits(r0, &r1->struggleMoveFlags, 8);
|
||||
}
|
||||
|
||||
// arm9.bin::02061BB0
|
||||
static void ReadPoke2MoveBits(DataSerializer *r0, Move *move)
|
||||
{
|
||||
memset(move, 0, sizeof(Move));
|
||||
|
|
@ -1575,7 +1584,8 @@ static void ReadPoke2MoveBits(DataSerializer *r0, Move *move)
|
|||
ReadBits(r0, &move->ginseng, 7);
|
||||
}
|
||||
|
||||
void ReadPoke2MovesBits(DataSerializer *r0, struct Moves*r1)
|
||||
// arm9.bin::02061B60
|
||||
void ReadPoke2MovesBits(DataSerializer *r0, Moves* r1)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
|
@ -1586,6 +1596,7 @@ void ReadPoke2MovesBits(DataSerializer *r0, struct Moves*r1)
|
|||
ReadBits(r0, &r1->struggleMoveFlags, 8);
|
||||
}
|
||||
|
||||
// arm9.bin::02061AEC
|
||||
bool8 DoesMoveCharge(u16 move)
|
||||
{
|
||||
if (move == MOVE_SOLARBEAM) return TRUE;
|
||||
|
|
|
|||
|
|
@ -196,6 +196,7 @@ u16 GetCurrentBGSong(void)
|
|||
return sCurrentBGSong;
|
||||
}
|
||||
|
||||
// arm9.bin::0200ADB8
|
||||
void PlayFanfareSE(u16 songIndex, u16 volume)
|
||||
{
|
||||
u16 playerIndex;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include "string_format.h"
|
||||
#include "text_1.h"
|
||||
#include "text_2.h"
|
||||
#include "text_3.h"
|
||||
#include "text_util.h"
|
||||
|
||||
static EWRAM_INIT unkStruct_203B2B8 *sUnknown_203B2B8 = {NULL};
|
||||
|
|
|
|||
|
|
@ -17,15 +17,15 @@
|
|||
#include "sprite.h"
|
||||
#include "text_util.h"
|
||||
|
||||
static EWRAM_DATA MonsterDataEntry *gMonsterParameters = {0};
|
||||
static EWRAM_DATA OpenedFile *gMonsterParametersFile = {0};
|
||||
static EWRAM_DATA MonsterDataEntry *gMonsterParameters = {NULL}; // B=02135090
|
||||
static EWRAM_DATA OpenedFile *gMonsterParametersFile = {NULL};
|
||||
static EWRAM_DATA SpriteOAM gShadowSprites[3] = {0};
|
||||
static EWRAM_DATA unkStruct_203B45C gRecruitedPokemon = {0};
|
||||
static EWRAM_DATA RecruitedMon gRecruitedPokemon = {0}; // B=02135560
|
||||
static EWRAM_DATA u16 gLevelCurrentPokeId = {0};
|
||||
UNUSED static EWRAM_DATA u16 unused_data[3] = {0};
|
||||
static EWRAM_DATA LevelData gLevelCurrentData[0x64] = {0};
|
||||
|
||||
EWRAM_INIT unkStruct_203B45C *gRecruitedPokemonRef = {NULL};
|
||||
EWRAM_INIT RecruitedMon *gRecruitedPokemonRef = {NULL}; // B=020EAF94
|
||||
|
||||
struct unkStruct_8107654
|
||||
{
|
||||
|
|
@ -51,38 +51,37 @@ extern char* gFormattedStatusNames[];
|
|||
extern u32 ReturnIntFromChar(u8 r0);
|
||||
extern void xxx_pokemon2_to_pokemonstruct_808DF44(PokemonStruct1*, PokemonStruct2*);
|
||||
|
||||
// arm9.bin::0205C34C
|
||||
void LoadMonsterParameters(void)
|
||||
{
|
||||
gRecruitedPokemonRef = &gRecruitedPokemon;
|
||||
gMonsterParametersFile = OpenFileAndGetFileDataPtr(sMonsterParameterFileName, &gSystemFileArchive);
|
||||
gMonsterParameters = (MonsterDataEntry *)gMonsterParametersFile->data;
|
||||
gLevelCurrentPokeId = 0;
|
||||
// More in blue
|
||||
}
|
||||
|
||||
unkStruct_203B45C *GetRecruitedPokemon(void)
|
||||
// arm9.bin::0205C340
|
||||
RecruitedMon *GetRecruitedPokemon(void)
|
||||
{
|
||||
return &gRecruitedPokemon;
|
||||
}
|
||||
|
||||
// arm9.bin::0205C2A4
|
||||
void InitializeRecruitedPokemon(void)
|
||||
{
|
||||
s32 index;
|
||||
s32 index;
|
||||
|
||||
for(index = 0; index < NUM_MONSTERS; index++)
|
||||
{
|
||||
gRecruitedPokemonRef->pokemon[index].unk0 = 0;
|
||||
}
|
||||
for (index = 0; index < NUM_MONSTERS; index++)
|
||||
gRecruitedPokemonRef->pokemon[index].unk0 = 0;
|
||||
|
||||
for(index = 0; index < 4; index++)
|
||||
{
|
||||
gRecruitedPokemonRef->pokemon2[index].unk0 = 0;
|
||||
}
|
||||
for (index = 0; index < 4; index++)
|
||||
gRecruitedPokemonRef->pokemon2[index].unk0 = 0;
|
||||
|
||||
for(index = 0; index < MAX_TEAM_MEMBERS; index++)
|
||||
{
|
||||
gRecruitedPokemonRef->team[index].speciesNum = 0;
|
||||
gRecruitedPokemonRef->team[index].unk0 = 0;
|
||||
}
|
||||
for (index = 0; index < MAX_TEAM_MEMBERS; index++) {
|
||||
gRecruitedPokemonRef->team[index].speciesNum = 0;
|
||||
gRecruitedPokemonRef->team[index].unk0 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_808CE74(s16 _species, bool32 _isLeader, u8* name)
|
||||
|
|
@ -648,6 +647,7 @@ void CopyMonsterNameToBuffer(u8 * buffer, s32 index)
|
|||
strncpy(buffer, gMonsterParameters[index_s16].species, 0x14);
|
||||
}
|
||||
|
||||
// arm9.bin::0205B274
|
||||
void CopyYellowMonsterNametoBuffer(u8 *buffer, s16 index)
|
||||
{
|
||||
s32 new_index = index;
|
||||
|
|
@ -838,6 +838,7 @@ s32 GetBaseDefensiveStat(s32 index, u32 r1)
|
|||
return gMonsterParameters[index_s16].baseDefSpDef[r1];
|
||||
}
|
||||
|
||||
// arm9.bin::0205AE2C
|
||||
u8 GetPokemonType(s32 index, u32 typeIndex)
|
||||
{
|
||||
s16 newIndex = index;
|
||||
|
|
@ -915,6 +916,7 @@ OpenedFile *OpenPokemonDialogueSpriteFile(s16 index)
|
|||
return OpenFile(buffer, &gMonsterFileArchive);
|
||||
}
|
||||
|
||||
// arm9.bin::0205AC60
|
||||
OpenedFile *GetDialogueSpriteDataPtr(s32 index)
|
||||
{
|
||||
// Looks like this loads the dialogue sprite for the pokemon
|
||||
|
|
|
|||
433
src/pokemon_3.c
433
src/pokemon_3.c
|
|
@ -21,6 +21,16 @@
|
|||
#include "text_1.h"
|
||||
#include "text_util.h"
|
||||
|
||||
struct UnusedOffenseStruct
|
||||
{
|
||||
s32 att[2];
|
||||
s32 def[2];
|
||||
u8 atkBoost;
|
||||
u8 spAtkBoost;
|
||||
u8 defBoost;
|
||||
u8 spDefBoost;
|
||||
};
|
||||
|
||||
extern u8 *gIQSkillNames[];
|
||||
extern u8 *gIQSkillDescriptions[];
|
||||
extern u8 *gTacticsDescriptions[];
|
||||
|
|
@ -76,7 +86,7 @@ extern u8 *gUnknown_810DFC8[];
|
|||
extern u8 *gUnknown_810E02C[];
|
||||
extern u8 *gUnknown_8115718[];
|
||||
|
||||
// 2, 4, 6, 7, 8, 9, 0xA, 0xD, 0xF, 0x11
|
||||
// 2, 4, 6, 7, 8, 9, 8, 0xA, 0xD, 0xF, 0x11
|
||||
extern s32 gUnknown_810AC90[10];
|
||||
|
||||
#include "data/pokemon_3.h"
|
||||
|
|
@ -92,28 +102,33 @@ extern void ReadBellyBits(DataSerializer*, FixedPoint *dst);
|
|||
extern void ReadHiddenPowerBits(DataSerializer*, HiddenPower*);
|
||||
s16 GetPokemonEvolveConditions(s16 index, unkEvolve *r1);
|
||||
|
||||
// arm9.bin::02059FDC
|
||||
void GenerateHiddenPower(HiddenPower* a1)
|
||||
{
|
||||
s32 i;
|
||||
s32 i;
|
||||
|
||||
a1->hiddenPowerBasePower = gUnknown_810AC90[RandInt(10)];
|
||||
for (i = 0; i < 100; i++) {
|
||||
a1->hiddenPowerType = RandInt(NUM_TYPES);
|
||||
if ( a1->hiddenPowerType )
|
||||
break;
|
||||
}
|
||||
if ( i == 100 )
|
||||
a1->hiddenPowerType = TYPE_FIRE;
|
||||
a1->hiddenPowerBasePower = gUnknown_810AC90[RandInt(10)];
|
||||
|
||||
for (i = 0; i < 100; i++) {
|
||||
a1->hiddenPowerType = RandInt(NUM_TYPES);
|
||||
if (a1->hiddenPowerType)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == 100)
|
||||
a1->hiddenPowerType = TYPE_FIRE;
|
||||
}
|
||||
|
||||
bool8 HasRecruitedMon(s16 species) {
|
||||
// arm9.bin::02059F70
|
||||
bool8 HasRecruitedMon(s16 species)
|
||||
{
|
||||
s32 species_s32 = species;
|
||||
s32 i = 0;
|
||||
PokemonStruct1 *pokemon = gRecruitedPokemonRef->pokemon;
|
||||
|
||||
for (i = 0; i < NUM_MONSTERS; i++) {
|
||||
if (((u8)pokemon->unk0 & 1)) {
|
||||
if(pokemon->speciesNum == species_s32)
|
||||
if (pokemon->speciesNum == species_s32)
|
||||
return TRUE;
|
||||
}
|
||||
pokemon++;
|
||||
|
|
@ -121,66 +136,68 @@ bool8 HasRecruitedMon(s16 species) {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
s16 GetBaseSpecies(s16 index) {
|
||||
// arm9.bin::02059D94
|
||||
s16 GetBaseSpecies(s16 index)
|
||||
{
|
||||
if (index == MONSTER_CASTFORM_SNOWY)
|
||||
return MONSTER_CASTFORM;
|
||||
if (index == MONSTER_CASTFORM_SUNNY)
|
||||
return MONSTER_CASTFORM;
|
||||
if (index == MONSTER_CASTFORM_RAINY)
|
||||
return MONSTER_CASTFORM;
|
||||
if(index == MONSTER_UNOWN_B)
|
||||
if (index == MONSTER_UNOWN_B)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_C)
|
||||
if (index == MONSTER_UNOWN_C)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_D)
|
||||
if (index == MONSTER_UNOWN_D)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_E)
|
||||
if (index == MONSTER_UNOWN_E)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_F)
|
||||
if (index == MONSTER_UNOWN_F)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_G)
|
||||
if (index == MONSTER_UNOWN_G)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_H)
|
||||
if (index == MONSTER_UNOWN_H)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_I)
|
||||
if (index == MONSTER_UNOWN_I)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_J)
|
||||
if (index == MONSTER_UNOWN_J)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_K)
|
||||
if (index == MONSTER_UNOWN_K)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_L)
|
||||
if (index == MONSTER_UNOWN_L)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_M)
|
||||
if (index == MONSTER_UNOWN_M)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_N)
|
||||
if (index == MONSTER_UNOWN_N)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_O)
|
||||
if (index == MONSTER_UNOWN_O)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_P)
|
||||
if (index == MONSTER_UNOWN_P)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_Q)
|
||||
if (index == MONSTER_UNOWN_Q)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_R)
|
||||
if (index == MONSTER_UNOWN_R)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_S)
|
||||
if (index == MONSTER_UNOWN_S)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_T)
|
||||
if (index == MONSTER_UNOWN_T)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_U)
|
||||
if (index == MONSTER_UNOWN_U)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_V)
|
||||
if (index == MONSTER_UNOWN_V)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_W)
|
||||
if (index == MONSTER_UNOWN_W)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_X)
|
||||
if (index == MONSTER_UNOWN_X)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_Y)
|
||||
if (index == MONSTER_UNOWN_Y)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_Z)
|
||||
if (index == MONSTER_UNOWN_Z)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_EMARK)
|
||||
if (index == MONSTER_UNOWN_EMARK)
|
||||
return MONSTER_UNOWN;
|
||||
if(index == MONSTER_UNOWN_QMARK)
|
||||
if (index == MONSTER_UNOWN_QMARK)
|
||||
return MONSTER_UNOWN;
|
||||
if (index == MONSTER_DEOXYS_ATTACK)
|
||||
return MONSTER_DEOXYS_NORMAL;
|
||||
|
|
@ -194,7 +211,9 @@ s16 GetBaseSpecies(s16 index) {
|
|||
return index;
|
||||
}
|
||||
|
||||
s16 GetBaseSpeciesNoUnown(s16 index) {
|
||||
// arm9.bin::02059D04
|
||||
s16 GetBaseSpeciesNoUnown(s16 index)
|
||||
{
|
||||
s32 a1_ = SpeciesId(index);
|
||||
if (index == MONSTER_CASTFORM_SNOWY) {
|
||||
return MONSTER_CASTFORM;
|
||||
|
|
@ -221,97 +240,93 @@ s16 GetBaseSpeciesNoUnown(s16 index) {
|
|||
return a1_;
|
||||
}
|
||||
|
||||
// arm9.bin::02059BB4
|
||||
s32 GetUnownIndex(s16 index)
|
||||
{
|
||||
if(index == MONSTER_UNOWN_B)
|
||||
if (index == MONSTER_UNOWN_B)
|
||||
return 1;
|
||||
if(index == MONSTER_UNOWN_C)
|
||||
if (index == MONSTER_UNOWN_C)
|
||||
return 2;
|
||||
if(index == MONSTER_UNOWN_D)
|
||||
if (index == MONSTER_UNOWN_D)
|
||||
return 3;
|
||||
if(index == MONSTER_UNOWN_E)
|
||||
if (index == MONSTER_UNOWN_E)
|
||||
return 4;
|
||||
if(index == MONSTER_UNOWN_F)
|
||||
if (index == MONSTER_UNOWN_F)
|
||||
return 5;
|
||||
if(index == MONSTER_UNOWN_G)
|
||||
if (index == MONSTER_UNOWN_G)
|
||||
return 6;
|
||||
if(index == MONSTER_UNOWN_H)
|
||||
if (index == MONSTER_UNOWN_H)
|
||||
return 7;
|
||||
if(index == MONSTER_UNOWN_I)
|
||||
if (index == MONSTER_UNOWN_I)
|
||||
return 8;
|
||||
if(index == MONSTER_UNOWN_J)
|
||||
if (index == MONSTER_UNOWN_J)
|
||||
return 9;
|
||||
if(index == MONSTER_UNOWN_K)
|
||||
if (index == MONSTER_UNOWN_K)
|
||||
return 10;
|
||||
if(index == MONSTER_UNOWN_L)
|
||||
if (index == MONSTER_UNOWN_L)
|
||||
return 11;
|
||||
if(index == MONSTER_UNOWN_M)
|
||||
if (index == MONSTER_UNOWN_M)
|
||||
return 12;
|
||||
if(index == MONSTER_UNOWN_N)
|
||||
if (index == MONSTER_UNOWN_N)
|
||||
return 13;
|
||||
if(index == MONSTER_UNOWN_O)
|
||||
if (index == MONSTER_UNOWN_O)
|
||||
return 14;
|
||||
if(index == MONSTER_UNOWN_P)
|
||||
if (index == MONSTER_UNOWN_P)
|
||||
return 15;
|
||||
if(index == MONSTER_UNOWN_Q)
|
||||
if (index == MONSTER_UNOWN_Q)
|
||||
return 16;
|
||||
if(index == MONSTER_UNOWN_R)
|
||||
if (index == MONSTER_UNOWN_R)
|
||||
return 17;
|
||||
if(index == MONSTER_UNOWN_S)
|
||||
if (index == MONSTER_UNOWN_S)
|
||||
return 18;
|
||||
if(index == MONSTER_UNOWN_T)
|
||||
if (index == MONSTER_UNOWN_T)
|
||||
return 19;
|
||||
if(index == MONSTER_UNOWN_U)
|
||||
if (index == MONSTER_UNOWN_U)
|
||||
return 20;
|
||||
if(index == MONSTER_UNOWN_V)
|
||||
if (index == MONSTER_UNOWN_V)
|
||||
return 21;
|
||||
if(index == MONSTER_UNOWN_W)
|
||||
if (index == MONSTER_UNOWN_W)
|
||||
return 22;
|
||||
if(index == MONSTER_UNOWN_X)
|
||||
if (index == MONSTER_UNOWN_X)
|
||||
return 23;
|
||||
if(index == MONSTER_UNOWN_Y)
|
||||
if (index == MONSTER_UNOWN_Y)
|
||||
return 24;
|
||||
if(index == MONSTER_UNOWN_Z)
|
||||
if (index == MONSTER_UNOWN_Z)
|
||||
return 25;
|
||||
if(index == MONSTER_UNOWN_EMARK)
|
||||
if (index == MONSTER_UNOWN_EMARK)
|
||||
return 26;
|
||||
if(index == MONSTER_UNOWN_QMARK)
|
||||
if (index == MONSTER_UNOWN_QMARK)
|
||||
return 27;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// arm9.bin::02059B98
|
||||
s16 ExtractSpeciesIndex(UnkDungeonGlobal_unk1CD98 *r0)
|
||||
{
|
||||
return r0->unk0 & 0x000001ff;
|
||||
}
|
||||
|
||||
// arm9.bin::02059B7C
|
||||
void sub_808E9C4(PokemonStruct1 *r0, s16 r1)
|
||||
{
|
||||
s32 r1_s32 = r1; // cast needed to match
|
||||
r0->unk0 = ((0xFE << 8) & r0->unk0) | r1_s32 ;
|
||||
}
|
||||
|
||||
#if (GAME_VERSION == VERSION_RED)
|
||||
void SetSpeciesLevelToExtract(UnkDungeonGlobal_unk1CD98 *r0, s32 level, s32 species)
|
||||
{
|
||||
species = SpeciesId(species);
|
||||
r0->unk0 = species | (level << 9) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
// arm9.bin::02059B6C
|
||||
s32 ExtractLevel(UnkDungeonGlobal_unk1CD98 *r0)
|
||||
{
|
||||
return (r0->unk0 >> 9);
|
||||
}
|
||||
|
||||
struct UnusedOffenseStruct
|
||||
{
|
||||
s32 att[2];
|
||||
s32 def[2];
|
||||
u8 atkBoost;
|
||||
u8 spAtkBoost;
|
||||
u8 defBoost;
|
||||
u8 spDefBoost;
|
||||
};
|
||||
|
||||
UNUSED static void GetMonOffenseStats(PokemonStruct1 *mon, struct UnusedOffenseStruct *dst)
|
||||
{
|
||||
dst->att[0] = mon->offense.att[0];
|
||||
|
|
@ -349,6 +364,12 @@ UNUSED static void GetMonOffenseStats(PokemonStruct1 *mon, struct UnusedOffenseS
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: File boundary?
|
||||
|
||||
|
||||
|
||||
u8 *GetIQSkillName(u8 skill)
|
||||
{
|
||||
return gIQSkillNames[skill];
|
||||
|
|
@ -382,13 +403,13 @@ void GetAvailTacticsforLvl(u8 *tacticsBuffer, s32 pokeLevel)
|
|||
availTactics = 0;
|
||||
for(tactic = TACTIC_LETS_GO_TOGETHER; tactic < NUM_TACTICS; tactic++)
|
||||
{
|
||||
if(gReqTacticLvls[tactic] <= pokeLevel)
|
||||
if (gReqTacticLvls[tactic] <= pokeLevel)
|
||||
{
|
||||
tacticsBuffer[availTactics] = tactic;
|
||||
availTactics++;
|
||||
}
|
||||
}
|
||||
if(availTactics > TACTIC_UNUSED)
|
||||
if (availTactics > TACTIC_UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -406,7 +427,7 @@ void GetAvailTacticsforLvl_Bool(u8 *tacticsBuffer, s32 pokeLevel)
|
|||
|
||||
for(tactic = TACTIC_LETS_GO_TOGETHER; tactic < NUM_TACTICS; tactic++)
|
||||
{
|
||||
if(gReqTacticLvls[tactic] <= pokeLevel)
|
||||
if (gReqTacticLvls[tactic] <= pokeLevel)
|
||||
{
|
||||
tacticsBuffer[tactic] = TRUE;
|
||||
}
|
||||
|
|
@ -419,7 +440,7 @@ void GetAvailTacticsforLvl_Bool(u8 *tacticsBuffer, s32 pokeLevel)
|
|||
|
||||
bool8 HasIQForSkill(s32 pokeIQ, u8 IQSkillIndex)
|
||||
{
|
||||
if(IQSkillIndex == IQ_NONE)
|
||||
if (IQSkillIndex == IQ_NONE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -535,6 +556,13 @@ void sub_808ED00()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// File boundary here
|
||||
|
||||
|
||||
|
||||
// arm9.bin::0205CC54
|
||||
s32 SaveRecruitedPokemon(u8 *a1, s32 a2)
|
||||
{
|
||||
u16 sixMons[6];
|
||||
|
|
@ -597,6 +625,7 @@ s32 SaveRecruitedPokemon(u8 *a1, s32 a2)
|
|||
return backup.count;
|
||||
}
|
||||
|
||||
// arm9.bin::0205CAE4
|
||||
s32 RestoreRecruitedPokemon(u8 *a1, s32 a2)
|
||||
{
|
||||
DataSerializer backup;
|
||||
|
|
@ -636,6 +665,7 @@ s32 RestoreRecruitedPokemon(u8 *a1, s32 a2)
|
|||
return backup.count;
|
||||
}
|
||||
|
||||
// arm9.bin::0205C9D4
|
||||
void WritePoke1Bits(DataSerializer* a1, PokemonStruct1* pokemon)
|
||||
{
|
||||
WriteBits(a1, &pokemon->level, 7);
|
||||
|
|
@ -654,9 +684,10 @@ void WritePoke1Bits(DataSerializer* a1, PokemonStruct1* pokemon)
|
|||
WriteBits(a1, &pokemon->tacticIndex, 4);
|
||||
WriteHeldItemBits(a1, &pokemon->heldItem);
|
||||
WritePoke1MovesBits(a1, pokemon->moves);
|
||||
WriteBits(a1, pokemon->name, 10 * 8);
|
||||
WriteBits(a1, pokemon->name, POKEMON_NAME_LENGTH * 8);
|
||||
}
|
||||
|
||||
// arm9.bin::0205C890
|
||||
void ReadPoke1Bits(DataSerializer* a1, PokemonStruct1* pokemon)
|
||||
{
|
||||
memset(pokemon, 0, sizeof(PokemonStruct1));
|
||||
|
|
@ -683,124 +714,138 @@ void ReadPoke1Bits(DataSerializer* a1, PokemonStruct1* pokemon)
|
|||
ReadBits(a1, &pokemon->tacticIndex, 4);
|
||||
ReadHeldItemBits(a1, &pokemon->heldItem);
|
||||
ReadPoke1MovesBits(a1, pokemon->moves);
|
||||
ReadBits(a1, pokemon->name, 10 * 8);
|
||||
ReadBits(a1, pokemon->name, POKEMON_NAME_LENGTH * 8);
|
||||
}
|
||||
|
||||
// arm9.bin::0205C688
|
||||
s32 SavePoke2s(u8* buffer, s32 size)
|
||||
{
|
||||
DataSerializer backup;
|
||||
s32 i;
|
||||
u8 data_u8_neg1;
|
||||
u8 data_u8_zero;
|
||||
DataSerializer backup;
|
||||
s32 i;
|
||||
u8 data_u8_neg1;
|
||||
u8 data_u8_zero;
|
||||
|
||||
InitBitWriter(&backup, buffer, size);
|
||||
data_u8_neg1 = -1;
|
||||
data_u8_zero = 0;
|
||||
InitBitWriter(&backup, buffer, size);
|
||||
data_u8_neg1 = -1;
|
||||
data_u8_zero = 0;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
PokemonStruct2* pokemon2 = &gRecruitedPokemonRef->pokemon2[i];
|
||||
WriteBits(&backup, &pokemon2->unk0, 2);
|
||||
for (i = 0; i < 4; i++) {
|
||||
PokemonStruct2* pokemon2 = &gRecruitedPokemonRef->pokemon2[i];
|
||||
WriteBits(&backup, &pokemon2->unk0, 2);
|
||||
|
||||
WriteBits(&backup, pokemon2->isTeamLeader ? &data_u8_neg1 : &data_u8_zero, 1);
|
||||
WriteBits(&backup, &pokemon2->level, 7);
|
||||
WriteBits(&backup, pokemon2->isTeamLeader ? &data_u8_neg1 : &data_u8_zero, 1);
|
||||
WriteBits(&backup, &pokemon2->level, 7);
|
||||
|
||||
WriteDungeonLocationBits(&backup, &pokemon2->dungeonLocation);
|
||||
WriteBits(&backup, &pokemon2->IQ, 10);
|
||||
WriteBits(&backup, &pokemon2->unkA, 16);
|
||||
WriteBits(&backup, &pokemon2->unkC, 16);
|
||||
WriteBits(&backup, &pokemon2->speciesNum, 9);
|
||||
WriteBits(&backup, &pokemon2->unk10, 10);
|
||||
WriteBits(&backup, &pokemon2->unk12, 10);
|
||||
WriteBits(&backup, &pokemon2->offense.att[0], 8);
|
||||
WriteBits(&backup, &pokemon2->offense.att[1], 8);
|
||||
WriteBits(&backup, &pokemon2->offense.def[0], 8);
|
||||
WriteBits(&backup, &pokemon2->offense.def[1], 8);
|
||||
WriteBits(&backup, &pokemon2->currExp, 24);
|
||||
WritePoke2MovesBits(&backup, &pokemon2->moves);
|
||||
WriteItemSlotBits(&backup, &pokemon2->itemSlot);
|
||||
WriteBellyBits(&backup, &pokemon2->belly);
|
||||
WriteBellyBits(&backup, &pokemon2->maxBelly);
|
||||
WriteBits(&backup, &pokemon2->IQSkills, 24);
|
||||
WriteBits(&backup, &pokemon2->tacticIndex, 4);
|
||||
WriteHiddenPowerBits(&backup, &pokemon2->hiddenPower);
|
||||
WriteBits(&backup, &pokemon2->name, 10 * 8);
|
||||
}
|
||||
WriteDungeonLocationBits(&backup, &pokemon2->dungeonLocation);
|
||||
WriteBits(&backup, &pokemon2->IQ, 10);
|
||||
WriteBits(&backup, &pokemon2->unkA, 16);
|
||||
WriteBits(&backup, &pokemon2->unkC, 16);
|
||||
WriteBits(&backup, &pokemon2->speciesNum, 9);
|
||||
WriteBits(&backup, &pokemon2->unk10, 10);
|
||||
WriteBits(&backup, &pokemon2->unk12, 10);
|
||||
WriteBits(&backup, &pokemon2->offense.att[0], 8);
|
||||
WriteBits(&backup, &pokemon2->offense.att[1], 8);
|
||||
WriteBits(&backup, &pokemon2->offense.def[0], 8);
|
||||
WriteBits(&backup, &pokemon2->offense.def[1], 8);
|
||||
WriteBits(&backup, &pokemon2->currExp, 24);
|
||||
WritePoke2MovesBits(&backup, &pokemon2->moves);
|
||||
WriteItemSlotBits(&backup, &pokemon2->itemSlot);
|
||||
WriteBellyBits(&backup, &pokemon2->belly);
|
||||
WriteBellyBits(&backup, &pokemon2->maxBelly);
|
||||
WriteBits(&backup, &pokemon2->IQSkills, 24);
|
||||
WriteBits(&backup, &pokemon2->tacticIndex, 4);
|
||||
WriteHiddenPowerBits(&backup, &pokemon2->hiddenPower);
|
||||
WriteBits(&backup, &pokemon2->name, POKEMON_NAME_LENGTH * 8);
|
||||
}
|
||||
|
||||
FinishBitSerializer(&backup);
|
||||
return backup.count;
|
||||
FinishBitSerializer(&backup);
|
||||
return backup.count;
|
||||
}
|
||||
|
||||
// arm9.bin::0205C464
|
||||
s32 RestorePoke2s(u8* a1, s32 size)
|
||||
{
|
||||
DataSerializer backup;
|
||||
s32 i;
|
||||
DataSerializer backup;
|
||||
s32 i;
|
||||
|
||||
InitBitReader(&backup, a1, size);
|
||||
for (i = 0; i < 4; i++) {
|
||||
PokemonStruct2* pokemon2 = &gRecruitedPokemonRef->pokemon2[i];
|
||||
u8 unk2;
|
||||
InitBitReader(&backup, a1, size);
|
||||
|
||||
memset(pokemon2, 0, sizeof(PokemonStruct2));
|
||||
for (i = 0; i < 4; i++) {
|
||||
PokemonStruct2* pokemon2 = &gRecruitedPokemonRef->pokemon2[i];
|
||||
u8 unk2;
|
||||
|
||||
ReadBits(&backup, &pokemon2->unk0, 2);
|
||||
memset(pokemon2, 0, sizeof(PokemonStruct2));
|
||||
|
||||
ReadBits(&backup, &unk2, 1);
|
||||
if (unk2 & 1) {
|
||||
pokemon2->isTeamLeader = TRUE;
|
||||
ReadBits(&backup, &pokemon2->unk0, 2);
|
||||
|
||||
ReadBits(&backup, &unk2, 1);
|
||||
if (unk2 & 1) {
|
||||
pokemon2->isTeamLeader = TRUE;
|
||||
}
|
||||
else {
|
||||
pokemon2->isTeamLeader = FALSE;
|
||||
}
|
||||
ReadBits(&backup, &pokemon2->level, 7);
|
||||
|
||||
ReadDungeonLocationBits(&backup, &pokemon2->dungeonLocation);
|
||||
ReadBits(&backup, &pokemon2->IQ, 10);
|
||||
ReadBits(&backup, &pokemon2->unkA, 16);
|
||||
ReadBits(&backup, &pokemon2->unkC, 16);
|
||||
ReadBits(&backup, &pokemon2->speciesNum, 9);
|
||||
ReadBits(&backup, &pokemon2->unk10, 10);
|
||||
ReadBits(&backup, &pokemon2->unk12, 10);
|
||||
ReadBits(&backup, &pokemon2->offense.att[0], 8);
|
||||
ReadBits(&backup, &pokemon2->offense.att[1], 8);
|
||||
ReadBits(&backup, &pokemon2->offense.def[0], 8);
|
||||
ReadBits(&backup, &pokemon2->offense.def[1], 8);
|
||||
ReadBits(&backup, &pokemon2->currExp, 24);
|
||||
ReadPoke2MovesBits(&backup, &pokemon2->moves);
|
||||
ReadItemSlotBits(&backup, &pokemon2->itemSlot);
|
||||
ReadBellyBits(&backup, &pokemon2->belly);
|
||||
ReadBellyBits(&backup, &pokemon2->maxBelly);
|
||||
ReadBits(&backup, &pokemon2->IQSkills, 24);
|
||||
ReadBits(&backup, &pokemon2->tacticIndex, 4);
|
||||
ReadHiddenPowerBits(&backup, &pokemon2->hiddenPower);
|
||||
ReadBits(&backup, &pokemon2->name, POKEMON_NAME_LENGTH * 8);
|
||||
}
|
||||
else {
|
||||
pokemon2->isTeamLeader = FALSE;
|
||||
}
|
||||
ReadBits(&backup, &pokemon2->level, 7);
|
||||
|
||||
ReadDungeonLocationBits(&backup, &pokemon2->dungeonLocation);
|
||||
ReadBits(&backup, &pokemon2->IQ, 10);
|
||||
ReadBits(&backup, &pokemon2->unkA, 16);
|
||||
ReadBits(&backup, &pokemon2->unkC, 16);
|
||||
ReadBits(&backup, &pokemon2->speciesNum, 9);
|
||||
ReadBits(&backup, &pokemon2->unk10, 10);
|
||||
ReadBits(&backup, &pokemon2->unk12, 10);
|
||||
ReadBits(&backup, &pokemon2->offense.att[0], 8);
|
||||
ReadBits(&backup, &pokemon2->offense.att[1], 8);
|
||||
ReadBits(&backup, &pokemon2->offense.def[0], 8);
|
||||
ReadBits(&backup, &pokemon2->offense.def[1], 8);
|
||||
ReadBits(&backup, &pokemon2->currExp, 24);
|
||||
ReadPoke2MovesBits(&backup, &pokemon2->moves);
|
||||
ReadItemSlotBits(&backup, &pokemon2->itemSlot);
|
||||
ReadBellyBits(&backup, &pokemon2->belly);
|
||||
ReadBellyBits(&backup, &pokemon2->maxBelly);
|
||||
ReadBits(&backup, &pokemon2->IQSkills, 24);
|
||||
ReadBits(&backup, &pokemon2->tacticIndex, 4);
|
||||
ReadHiddenPowerBits(&backup, &pokemon2->hiddenPower);
|
||||
ReadBits(&backup, &pokemon2->name, 80);
|
||||
}
|
||||
|
||||
FinishBitSerializer(&backup);
|
||||
return backup.count;
|
||||
FinishBitSerializer(&backup);
|
||||
return backup.count;
|
||||
}
|
||||
|
||||
// arm9.bin::0205C454
|
||||
void ReadPoke1LevelBits(DataSerializer* a1, struct unkPokeSubStruct_C* unkC)
|
||||
{
|
||||
ReadBits(a1, &unkC->level, 7);
|
||||
ReadBits(a1, &unkC->level, 7);
|
||||
}
|
||||
|
||||
// arm9.bin::0205C444
|
||||
void WritePoke1LevelBits(DataSerializer* a1, struct unkPokeSubStruct_C* unkC)
|
||||
{
|
||||
WriteBits(a1, &unkC->level, 7);
|
||||
WriteBits(a1, &unkC->level, 7);
|
||||
}
|
||||
|
||||
// arm9.bin::0205C414
|
||||
void ReadHiddenPowerBits(DataSerializer* a1, HiddenPower* a2)
|
||||
{
|
||||
ReadBits(a1, &a2->hiddenPowerBasePower, 10);
|
||||
ReadBits(a1, &a2->hiddenPowerType, 5);
|
||||
ReadBits(a1, &a2->hiddenPowerBasePower, 10);
|
||||
ReadBits(a1, &a2->hiddenPowerType, 5);
|
||||
}
|
||||
|
||||
// arm9.bin::0205C3E4
|
||||
void WriteHiddenPowerBits(DataSerializer* a1, HiddenPower* a2)
|
||||
{
|
||||
WriteBits(a1, &a2->hiddenPowerBasePower, 10);
|
||||
WriteBits(a1, &a2->hiddenPowerType, 5);
|
||||
WriteBits(a1, &a2->hiddenPowerBasePower, 10);
|
||||
WriteBits(a1, &a2->hiddenPowerType, 5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// File Boundary here
|
||||
|
||||
|
||||
|
||||
void sub_808F468(struct PokemonStruct1 *pokemon,struct EvolveStatus *evolveStatus,bool8 param_3)
|
||||
{
|
||||
struct FriendAreaCapacity friendAreaCapacity;
|
||||
|
|
@ -1002,44 +1047,44 @@ PokemonStruct1 *sub_808F734(PokemonStruct1 *pokemon, s16 _species)
|
|||
|
||||
PokemonStruct1 *sub_808F798(PokemonStruct1 *pokemon, short _species)
|
||||
{
|
||||
s32 r6;
|
||||
s32 index;
|
||||
PokemonStruct1 pokeStruct;
|
||||
LevelData levelData;
|
||||
u8 buffer [64];
|
||||
s32 species = _species;
|
||||
bool32 flag = TRUE;
|
||||
s32 r6;
|
||||
s32 index;
|
||||
PokemonStruct1 pokeStruct;
|
||||
LevelData levelData;
|
||||
u8 buffer [64];
|
||||
s32 species = _species;
|
||||
bool32 flag = TRUE;
|
||||
|
||||
pokeStruct = *pokemon;
|
||||
r6 = pokeStruct.speciesNum;
|
||||
GetPokemonLevelData(&levelData,species,pokeStruct.level);
|
||||
pokeStruct.currExp = levelData.expRequired;
|
||||
pokemon->unk0 = 0;
|
||||
pokeStruct.speciesNum = species;
|
||||
if (pokeStruct.unkC[0].level == 0) {
|
||||
pokeStruct = *pokemon;
|
||||
r6 = pokeStruct.speciesNum;
|
||||
GetPokemonLevelData(&levelData,species,pokeStruct.level);
|
||||
pokeStruct.currExp = levelData.expRequired;
|
||||
pokemon->unk0 = 0;
|
||||
pokeStruct.speciesNum = species;
|
||||
if (pokeStruct.unkC[0].level == 0) {
|
||||
pokeStruct.unkC[0].level = pokeStruct.level;
|
||||
}
|
||||
else if (pokeStruct.unkC[1].level == 0) {
|
||||
}
|
||||
else if (pokeStruct.unkC[1].level == 0) {
|
||||
pokeStruct.unkC[1].level = pokeStruct.level;
|
||||
}
|
||||
}
|
||||
|
||||
CopyStringtoBuffer(buffer, GetMonSpecies(r6));
|
||||
CopyStringtoBuffer(buffer, GetMonSpecies(r6));
|
||||
|
||||
index = 0;
|
||||
goto _start;
|
||||
do
|
||||
{
|
||||
index++;
|
||||
index = 0;
|
||||
goto _start;
|
||||
do
|
||||
{
|
||||
index++;
|
||||
_start:
|
||||
if(index >= POKEMON_NAME_LENGTH) break;
|
||||
if(buffer[index] != pokeStruct.name[index]) goto _end;
|
||||
if(buffer[index] == 0) break;
|
||||
if (index >= POKEMON_NAME_LENGTH) break;
|
||||
if (buffer[index] != pokeStruct.name[index]) goto _end;
|
||||
if (buffer[index] == 0) break;
|
||||
|
||||
} while(TRUE);
|
||||
if(flag)
|
||||
BoundedCopyStringtoBuffer(pokeStruct.name, GetMonSpecies(species), POKEMON_NAME_LENGTH);
|
||||
} while(TRUE);
|
||||
if (flag)
|
||||
BoundedCopyStringtoBuffer(pokeStruct.name, GetMonSpecies(species), POKEMON_NAME_LENGTH);
|
||||
_end:
|
||||
return sub_808D1DC(&pokeStruct);
|
||||
return sub_808D1DC(&pokeStruct);
|
||||
}
|
||||
|
||||
UNUSED void sub_808F83C(PokemonStruct1 *pokemon, s16 species, u8 *r2)
|
||||
|
|
|
|||
16
src/sprite.c
16
src/sprite.c
|
|
@ -5,23 +5,23 @@
|
|||
#include "random.h"
|
||||
#include "sprite.h"
|
||||
|
||||
EWRAM_DATA static u16 sOAMSpriteCount = {0}; // GBA=2025670 | NDS=20EC504 | Written to but never read
|
||||
EWRAM_DATA static u16 sOAMSpriteCount = {0}; // R=2025670 | B=20EC504 | Written to but never read
|
||||
EWRAM_DATA static s16 sUnknown_2025672[8] = {0};
|
||||
EWRAM_DATA static s16 sUnknown_2025682[9] = {0};
|
||||
EWRAM_DATA static DungeonPos sUnknown_2025694 = {0};
|
||||
EWRAM_DATA static u32 sUnknown_2025698 = {0};
|
||||
UNUSED EWRAM_DATA static u32 sUnused1 = {0}; // GBA=202569C
|
||||
EWRAM_DATA static SpriteList sSpriteList = {0}; // NDS=20ED4C0
|
||||
UNUSED EWRAM_DATA static u32 sUnused1 = {0}; // R=202569C
|
||||
EWRAM_DATA static SpriteList sSpriteList = {0}; // B=20ED4C0
|
||||
EWRAM_DATA static UnkSpriteLink sUnknown_2025EA8[128] = {0};
|
||||
EWRAM_DATA static SpriteOAM sUnknown_20262A8[128] = {0};
|
||||
EWRAM_DATA static s32 sSpriteCount = {0}; // GBA=20266A8
|
||||
UNUSED EWRAM_DATA static u32 sUnused2 = {0}; // GBA=20266AC
|
||||
EWRAM_DATA static s32 sSpriteCount = {0}; // R=20266A8
|
||||
UNUSED EWRAM_DATA static u32 sUnused2 = {0}; // R=20266AC
|
||||
|
||||
#define UNK_20266B0_ARR_COUNT 160
|
||||
EWRAM_DATA static unkStruct_20266B0 sUnknown_20266B0[UNK_20266B0_ARR_COUNT] = {0};
|
||||
|
||||
EWRAM_DATA static void *sCharMemCursor = {0}; // GBA=2026E30
|
||||
UNUSED EWRAM_DATA static u32 sUnused3 = {0}; // GBA=2026E34
|
||||
EWRAM_DATA static void *sCharMemCursor = { NULL }; // R=2026E30
|
||||
UNUSED EWRAM_DATA static u32 sUnused3 = {0}; // R=2026E34
|
||||
|
||||
EWRAM_INIT static unkStruct_20266B0 *sUnknown_203B074 = {0};
|
||||
|
||||
|
|
@ -728,7 +728,7 @@ void sub_8005770(s32 param_1, const RGB *color, s32 brightness, const RGB *ramp)
|
|||
|
||||
// Maybe DungeonPos
|
||||
// arm9.bin::02001790
|
||||
void nullsub_7(s16 *a0)
|
||||
void nullsub_7(DungeonPos *a0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,15 +106,15 @@ static void nullsub_35(void);
|
|||
static bool8 AppendString(const u8 *, u8 **, u8 *, u16 r3);
|
||||
|
||||
// 'd', 'v' and 'V'
|
||||
EWRAM_DATA s32 gFormatArgs[10] = {0};
|
||||
EWRAM_DATA s32 gFormatArgs[10] = {0}; // NDS=02134278
|
||||
// 'i', apparently only i0 and i1 are actually used though it's yet to be verified
|
||||
EWRAM_DATA u8 gFormatBuffer_Items[4][FORMAT_BUFFER_LEN] = {0};
|
||||
EWRAM_DATA u8 gFormatBuffer_Items[4][FORMAT_BUFFER_LEN] = {0}; // NDS=02134450
|
||||
// 'm' which probably stands for 'monster', available through m0 to m9
|
||||
EWRAM_DATA u8 gFormatBuffer_Monsters[10][FORMAT_BUFFER_LEN] = {0};
|
||||
// 'n' which probably stands for 'name', available through n0 to n9
|
||||
EWRAM_DATA u8 gFormatBuffer_Names[10][FORMAT_BUFFER_LEN] = {0};
|
||||
// Current textbox's speaker's name
|
||||
EWRAM_DATA u8 gSpeakerNameBuffer[FORMAT_BUFFER_LEN] = {0};
|
||||
EWRAM_DATA u8 gSpeakerNameBuffer[FORMAT_BUFFER_LEN] = {0}; // NDS=02134400
|
||||
// 'h' - Friend Area buffer. This buffer seems larger than others. It's possible it actually has the same length, but there were some unused buffers right after it.
|
||||
EWRAM_DATA u8 gFormatBuffer_FriendArea[FRIEND_AREA_BUFFER_LEN] = {0};
|
||||
|
||||
|
|
@ -220,6 +220,7 @@ void CreateYesNoDialogueBoxAndPortrait_DefaultNo(const u8 *text, MonPortraitMsg
|
|||
CreateMenuDialogueBoxAndPortrait(text, NULL, -1, gUnknown_80D4880, NULL, 3, 0, monPortraitPtr, flags | 0x300);
|
||||
}
|
||||
|
||||
// arm9.bin::0201D700
|
||||
void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const MenuItem *menuItems, void *arg_0, u32 a5, u32 unknownUnused, MonPortraitMsg *monPortraitPtr, u16 flags)
|
||||
{
|
||||
bool8 portraitOn = FALSE;
|
||||
|
|
@ -372,10 +373,10 @@ void DrawDialogueBoxString(void)
|
|||
str++;
|
||||
}
|
||||
else {
|
||||
u32 sp;
|
||||
u32 chr;
|
||||
|
||||
str = xxx_get_next_char_from_string(str, &sp);
|
||||
gUnknown_202E748.unk0 += xxx_call_draw_char(gUnknown_202E748.unk0, gUnknown_202E748.unk2, sp, gUnknown_202E748.unk10, 0);
|
||||
str = xxx_get_next_char_from_string(str, &chr);
|
||||
gUnknown_202E748.unk0 += xxx_call_draw_char(gUnknown_202E748.unk0, gUnknown_202E748.unk2, chr, gUnknown_202E748.unk10, 0);
|
||||
gUnknown_202E748.unk2C = gUnknown_202E78C;
|
||||
}
|
||||
|
||||
|
|
@ -666,6 +667,7 @@ static void UNUSED nullsub_35(void)
|
|||
{
|
||||
}
|
||||
|
||||
// arm9.bin::0201C854
|
||||
const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags)
|
||||
{
|
||||
u8 txtArray[60];
|
||||
|
|
@ -853,6 +855,7 @@ static bool8 AppendString(const u8 *str, u8 **dstPtr, u8 *dstMax, u16 flags)
|
|||
|
||||
#define FORMAT_STR_MAX_LEN 500
|
||||
|
||||
// arm9.bin::0201C7AC
|
||||
void PrintFormattedStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr)
|
||||
{
|
||||
u8 formattedString[FORMAT_STR_MAX_LEN];
|
||||
|
|
@ -862,6 +865,7 @@ void PrintFormattedStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32
|
|||
PrintStringOnWindow(x, y, formattedString, windowId, terminatingChr);
|
||||
}
|
||||
|
||||
// arm9.bin::0201C750
|
||||
void PrintFormattedStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 lineSpacing)
|
||||
{
|
||||
u8 formattedString[FORMAT_STR_MAX_LEN];
|
||||
|
|
|
|||
26
src/text_2.c
26
src/text_2.c
|
|
@ -24,9 +24,9 @@ static bool8 xxx_update_bg_vram(Window *windows);
|
|||
// TODO: Find these funcs in blue. DTCM funcs
|
||||
|
||||
// In NDS, this func is copied to 01FF9F34
|
||||
u32 xxx_call_draw_char(s32 x, s32 y, u32 a2, u32 color, u32 a4)
|
||||
u32 xxx_call_draw_char(s32 x, s32 y, u32 chr, u32 color, u32 windowId)
|
||||
{
|
||||
return xxx_draw_char(gWindows, x, y, a2, color, a4);
|
||||
return xxx_draw_char(gWindows, x, y, chr, color, windowId);
|
||||
}
|
||||
|
||||
UNUSED static bool8 sub_8007464(void)
|
||||
|
|
@ -35,7 +35,7 @@ UNUSED static bool8 sub_8007464(void)
|
|||
}
|
||||
|
||||
// In NDS, this func is copied to 01FF994C
|
||||
u32 xxx_draw_char(Window *windows, s32 x, s32 y, u32 a3, u32 color, u32 windowId)
|
||||
u32 xxx_draw_char(Window *windows, s32 x, s32 y, u32 chr, u32 color, u32 windowId)
|
||||
{
|
||||
u32 *r3;
|
||||
const unkShiftData *shiftData;
|
||||
|
|
@ -52,13 +52,13 @@ u32 xxx_draw_char(Window *windows, s32 x, s32 y, u32 a3, u32 color, u32 windowId
|
|||
u32 r2;
|
||||
|
||||
if (gCurrentCharmap == 1) {
|
||||
if (a3 == 0x70 || a3 == 0x6A || a3 == 0x71 || a3 == 0x79 || a3 == 0x67)
|
||||
if (chr == 0x70 || chr == 0x6A || chr == 0x71 || chr == 0x79 || chr == 0x67)
|
||||
y += 2;
|
||||
else if (a3 == 0x8199)
|
||||
else if (chr == 0x8199)
|
||||
y -= 2;
|
||||
}
|
||||
|
||||
sp0 = GetCharacter(a3);
|
||||
sp0 = GetCharacter(chr);
|
||||
local_44 = sp0->unk0;
|
||||
ASM_MATCH_TRICK(local_3c); // stack doesn't match without it
|
||||
local_3c = sp0->unk0;
|
||||
|
|
@ -226,6 +226,7 @@ u32 xxx_draw_char(Window *windows, s32 x, s32 y, u32 a3, u32 color, u32 windowId
|
|||
return sp0->unk6 + gCharacterSpacing;
|
||||
}
|
||||
|
||||
// Copied to 01ff98f8 in NDS
|
||||
void AddDoubleUnderScoreHighlight(u32 windowId, s32 x, s32 y, s32 width, u32 color)
|
||||
{
|
||||
AddUnderScoreHighlight(windowId, x, y, width, color);
|
||||
|
|
@ -854,7 +855,7 @@ static s32 HexDigitValue(u8 chr)
|
|||
}
|
||||
|
||||
// In NDS, this func is copied to 01FF8D80
|
||||
const u8 *xxx_get_next_char_from_string(const u8 *a1, u32 *a0)
|
||||
const u8 *xxx_get_next_char_from_string(const u8 *a1, u32 *dstChr)
|
||||
{
|
||||
s32 currChr = *a1;
|
||||
if (currChr == 0x7E) {
|
||||
|
|
@ -868,15 +869,15 @@ const u8 *xxx_get_next_char_from_string(const u8 *a1, u32 *a0)
|
|||
a1++;
|
||||
}
|
||||
}
|
||||
*a0 = hexDigit;
|
||||
*dstChr = hexDigit;
|
||||
return a1;
|
||||
}
|
||||
else if ((currChr >= 0x81 && currChr <= 0x84) || currChr == 0x87) {
|
||||
*a0 = a1[1] | (a1[0] << 8);
|
||||
*dstChr = a1[1] | (a1[0] << 8);
|
||||
return a1 + 2;
|
||||
}
|
||||
else {
|
||||
*a0 = currChr;
|
||||
*dstChr = currChr;
|
||||
return a1 + 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1237,9 +1238,10 @@ void sub_80089AC(const WindowTemplate *r4, DungeonPos *r5_Str)
|
|||
}
|
||||
}
|
||||
|
||||
void CallPrepareTextbox_8008C54(u32 strId)
|
||||
// Copied to 01FF818C in NDS
|
||||
void CallPrepareTextbox_8008C54(u32 windowId)
|
||||
{
|
||||
PrepareTextbox_8008C6C(gWindows, strId);
|
||||
PrepareTextbox_8008C6C(gWindows, windowId);
|
||||
}
|
||||
|
||||
UNUSED static void nullsub_169(void)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ extern const char gFormattedDragonText[];
|
|||
extern const char gFormattedDarkText[];
|
||||
extern const char gFormattedSteelText[];
|
||||
|
||||
|
||||
// NDS=020C81F0
|
||||
const char * const gUnformattedTypeStrings[NUM_POKEMON_TYPES] =
|
||||
{
|
||||
gNoneText,
|
||||
|
|
@ -103,6 +103,7 @@ u32 ReturnIntFromChar(u8 r0)
|
|||
return r0;
|
||||
}
|
||||
|
||||
// arm9.bin::020614D0
|
||||
u32 ReturnIntFromChar2(u8 r0)
|
||||
{
|
||||
return r0;
|
||||
|
|
@ -159,6 +160,7 @@ void BoundedCopyStringtoBuffer(u8 *buffer, u8 *string, s32 size)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02061508
|
||||
const char *GetUnformattedTypeString(u8 type)
|
||||
{
|
||||
return gUnformattedTypeStrings[type];
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ void ReverseString(u8 *s, s32 len)
|
|||
}
|
||||
}
|
||||
|
||||
// arm9.bin::0201275C
|
||||
s32 ConvertToDecimal(s32 *decimal, s32 n, s32 len)
|
||||
{
|
||||
s32 sign;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user