Clean up items data

This commit is contained in:
DizzyEggg 2018-12-03 13:37:32 +01:00
parent 7914220acd
commit d8b952f94c
5 changed files with 1394 additions and 660 deletions

View File

@ -459,6 +459,8 @@ SECTIONS {
src/fldeff_cut.o(.rodata); src/fldeff_cut.o(.rodata);
src/map_name_popup.o(.rodata); src/map_name_popup.o(.rodata);
src/item_menu_icons.o(.rodata); src/item_menu_icons.o(.rodata);
src/battle_anim_80D51AC.o(.rodata);
src/item.o(.rodata);
data/contest.o(.rodata); data/contest.o(.rodata);
src/shop.o(.rodata); src/shop.o(.rodata);
src/fldeff_escalator.o(.rodata); src/fldeff_escalator.o(.rodata);

View File

@ -28,6 +28,61 @@ void sub_80D6308(u8 taskId);
void sub_80D646C(u8 taskId); void sub_80D646C(u8 taskId);
void sub_80A8B3C(u8 taskId); void sub_80A8B3C(u8 taskId);
const struct SpriteTemplate gHorizontalLungeSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = DoHorizontalLunge,
};
const struct SpriteTemplate gVerticalDipSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = DoVerticalDip,
};
const struct SpriteTemplate gSlideMonToOriginalPosSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SlideMonToOriginalPos,
};
const struct SpriteTemplate gSlideMonToOffsetSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SlideMonToOffset,
};
const struct SpriteTemplate gUnknown_0857FE88 =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80D5B48,
};
// Task to facilitate simple shaking of a pokemon's picture in battle. // Task to facilitate simple shaking of a pokemon's picture in battle.
// The shaking alternates between the original position and the target position. // The shaking alternates between the original position and the target position.
// arg 0: anim battler // arg 0: anim battler

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
#include "global.h" #include "global.h"
#include "item.h" #include "item.h"
#include "berry.h" #include "berry.h"
#include "constants/items.h"
#include "string_util.h" #include "string_util.h"
#include "text.h" #include "text.h"
#include "event_data.h" #include "event_data.h"
@ -10,11 +9,13 @@
#include "item_menu.h" #include "item_menu.h"
#include "strings.h" #include "strings.h"
#include "load_save.h" #include "load_save.h"
#include "item_use.h"
#include "battle_pyramid.h" #include "battle_pyramid.h"
#include "battle_pyramid_bag.h" #include "battle_pyramid_bag.h"
#include "constants/items.h"
#include "constants/hold_effects.h"
extern u16 gUnknown_0203CF30[]; extern u16 gUnknown_0203CF30[];
extern const struct Item gItems[];
// this file's functions // this file's functions
static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count); static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count);
@ -23,6 +24,10 @@ static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count);
// EWRAM variables // EWRAM variables
EWRAM_DATA struct BagPocket gBagPockets[POCKETS_COUNT] = {0}; EWRAM_DATA struct BagPocket gBagPockets[POCKETS_COUNT] = {0};
// rodata
#include "data/text/item_descriptions.h"
#include "data/items.h"
// code // code
static u16 GetBagItemQuantity(u16 *quantity) static u16 GetBagItemQuantity(u16 *quantity)
{ {

View File

@ -8,10 +8,8 @@
#include "menu_helpers.h" #include "menu_helpers.h"
#include "berry.h" #include "berry.h"
#include "graphics.h" #include "graphics.h"
#include "constants/items.h"
#include "item.h" #include "item.h"
#include "item_use.h" #include "constants/items.h"
#include "constants/hold_effects.h"
struct CompressedTilesPal struct CompressedTilesPal
{ {
@ -19,12 +17,6 @@ struct CompressedTilesPal
const u32 *pal; const u32 *pal;
}; };
extern void DoHorizontalLunge(struct Sprite *sprite);
extern void DoVerticalDip(struct Sprite *sprite);
extern void SlideMonToOriginalPos(struct Sprite *sprite);
extern void SlideMonToOffset(struct Sprite *sprite);
extern void sub_80D5B48(struct Sprite *sprite);
// this file's functions // this file's functions
static void SpriteCB_BagVisualSwitchingPockets(struct Sprite *sprite); static void SpriteCB_BagVisualSwitchingPockets(struct Sprite *sprite);
static void SpriteCB_ShakeBagVisual(struct Sprite *sprite); static void SpriteCB_ShakeBagVisual(struct Sprite *sprite);
@ -414,64 +406,6 @@ static const struct SpriteTemplate gUnknown_0857FE10 =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
const struct SpriteTemplate gHorizontalLungeSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = DoHorizontalLunge,
};
const struct SpriteTemplate gVerticalDipSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = DoVerticalDip,
};
const struct SpriteTemplate gSlideMonToOriginalPosSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SlideMonToOriginalPos,
};
const struct SpriteTemplate gSlideMonToOffsetSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SlideMonToOffset,
};
const struct SpriteTemplate gUnknown_0857FE88 =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80D5B48,
};
#include "data/text/item_descriptions.h"
#include "data/items.h"
// code // code
void RemoveBagSprite(u8 id) void RemoveBagSprite(u8 id)
{ {