Start documenting berry blender

This commit is contained in:
GriffinR 2020-08-22 18:20:22 -04:00
parent d2c7a862c7
commit 0ff767a9b5
11 changed files with 1129 additions and 1030 deletions

View File

@ -6,6 +6,8 @@
.set LOCALID_EXPERT_M, 16 .set LOCALID_EXPERT_M, 16
.set LOCALID_GIRL, 17 .set LOCALID_GIRL, 17
.set NUM_OPPONENTS, VAR_0x8009
BerryBlender_Text_WantToMakePokeblocks: @ 8292DEE BerryBlender_Text_WantToMakePokeblocks: @ 8292DEE
.string "Oh? Did you want to make some {POKEBLOCK}S\n" .string "Oh? Did you want to make some {POKEBLOCK}S\n"
.string "with this old-timer?$" .string "with this old-timer?$"
@ -243,7 +245,7 @@ BerryBlender_Text_DontHaveAnyBerriesNoneToSpare: @ 8293BB4
BerryBlender_EventScript_BerryBlender1:: @ 8293C3E BerryBlender_EventScript_BerryBlender1:: @ 8293C3E
lockall lockall
goto_if_unset FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER, BerryBlender_EventScript_BlendMasterPresent goto_if_unset FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER, BerryBlender_EventScript_BlendMasterPresent
setvar VAR_0x8009, 1 setvar NUM_OPPONENTS, 1
applymovement LOCALID_EXPERT_M, BerryBlender_Movement_BlendLeaderWalkInPlace applymovement LOCALID_EXPERT_M, BerryBlender_Movement_BlendLeaderWalkInPlace
waitmovement 0 waitmovement 0
msgbox BerryBlender_Text_WantToMakePokeblocks, MSGBOX_YESNO msgbox BerryBlender_Text_WantToMakePokeblocks, MSGBOX_YESNO
@ -307,9 +309,8 @@ BerryBlender_EventScript_TryUseBerryBlender1: @ 8293CEE
goto BerryBlender_EventScript_UseBerryBlender1 goto BerryBlender_EventScript_UseBerryBlender1
end end
@ VAR_0x8009 here is the Blender number. 1 is top right, 2 is bottom right, 3 is bottom left
BerryBlender_EventScript_DoBerryBlending: @ 8293D2C BerryBlender_EventScript_DoBerryBlending: @ 8293D2C
copyvar VAR_0x8004, VAR_0x8009 copyvar VAR_0x8004, NUM_OPPONENTS
fadescreen FADE_TO_BLACK fadescreen FADE_TO_BLACK
special DoBerryBlending special DoBerryBlending
waitstate waitstate
@ -328,7 +329,7 @@ BerryBlender_EventScript_Blender1NoCase: @ 8293D43
BerryBlender_EventScript_BerryBlender2:: @ 8293D4D BerryBlender_EventScript_BerryBlender2:: @ 8293D4D
lockall lockall
setvar VAR_0x8009, 2 setvar NUM_OPPONENTS, 2
applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection
applymovement LOCALID_MAN, BerryBlender_Movement_BlendLeaderWalkInPlace applymovement LOCALID_MAN, BerryBlender_Movement_BlendLeaderWalkInPlace
waitmovement 0 waitmovement 0
@ -393,7 +394,7 @@ BerryBlender_EventScript_Blender2NoCase: @ 8293E14
BerryBlender_EventScript_BerryBlender3:: @ 8293E1E BerryBlender_EventScript_BerryBlender3:: @ 8293E1E
lockall lockall
setvar VAR_0x8008, LOCALID_POKEFAN_F setvar VAR_0x8008, LOCALID_POKEFAN_F
setvar VAR_0x8009, 3 setvar NUM_OPPONENTS, 3
applymovement LOCALID_BOY, Common_Movement_FaceOriginalDirection applymovement LOCALID_BOY, Common_Movement_FaceOriginalDirection
applymovement LOCALID_GIRL, Common_Movement_FaceOriginalDirection applymovement LOCALID_GIRL, Common_Movement_FaceOriginalDirection
applymovement VAR_0x8008, BerryBlender_Movement_BlendLeaderWalkInPlace applymovement VAR_0x8008, BerryBlender_Movement_BlendLeaderWalkInPlace
@ -458,7 +459,7 @@ BerryBlender_EventScript_Blender3NoCase: @ 8293EF1
BerryBlender_EventScript_BlendMasterPresent: @ 8293EFB BerryBlender_EventScript_BlendMasterPresent: @ 8293EFB
lockall lockall
setvar VAR_0x8009, 1 setvar NUM_OPPONENTS, 1
msgbox BerryBlender_Text_SeeMyMasteryInAction, MSGBOX_YESNO msgbox BerryBlender_Text_SeeMyMasteryInAction, MSGBOX_YESNO
compare VAR_RESULT, YES compare VAR_RESULT, YES
goto_if_eq BerryBlender_EventScript_TryBlendWithBlendMaster goto_if_eq BerryBlender_EventScript_TryBlendWithBlendMaster
@ -636,7 +637,7 @@ BerryBlender_EventScript_FourPlayerLink: @ 8294139
end end
BerryBlender_EventScript_DoLinkBerryBlending: @ 8294147 BerryBlender_EventScript_DoLinkBerryBlending: @ 8294147
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0 @ number of opponents, 0 indicates Link
fadescreen FADE_TO_BLACK fadescreen FADE_TO_BLACK
removeobject 240 @ Unclear where these local IDs come from, removeobject 240 @ Unclear where these local IDs come from,
removeobject 239 @ but presumably they'd be the 4 link players removeobject 239 @ but presumably they'd be the 4 link players

View File

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 293 B

View File

@ -4812,16 +4812,16 @@ extern const u16 gUsePokeblockGraph_Pal[];
extern const u16 gUsePokeblockNatureWin_Pal[]; extern const u16 gUsePokeblockNatureWin_Pal[];
// Berry blender // Berry blender
extern const u32 gBerryBlenderArrowTiles[]; extern const u32 gBerryBlenderPlayerArrow_Gfx[];
extern const u32 gBerryBlenderStartTiles[]; extern const u32 gBerryBlenderStart_Gfx[];
extern const u32 gBerryBlenderMarubatsuTiles[]; extern const u32 gBerryBlenderScoreSymbols_Gfx[];
extern const u32 gBerryBlenderParticlesTiles[]; extern const u32 gBerryBlenderParticles_Gfx[];
extern const u32 gBerryBlenderCountdownNumbersTiles[]; extern const u32 gBerryBlenderCountdownNumbers_Gfx[];
extern const u16 gBerryBlenderMiscPalette[]; extern const u16 gBerryBlenderMiscPalette[];
extern const u16 gBerryBlenderArrowPalette[]; extern const u16 gBerryBlenderArrowPalette[];
extern const u32 sBlenderCenterGfx[]; extern const u32 gBerryBlenderCenter_Gfx[];
extern const u32 gUnknown_08D91DB8[]; extern const u32 gBerryBlenderOuter_Gfx[];
extern const u32 gUnknown_08D927EC[]; extern const u32 gBerryBlenderOuter_Tilemap[];
// Slot Machine // Slot Machine
extern const u32 gSlotMachineDigitalDisplay_Gfx[]; extern const u32 gSlotMachineDigitalDisplay_Gfx[];

View File

@ -93,7 +93,7 @@ void CB2_GoToSellMenu(void);
void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)()); void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)());
void DoWallyTutorialBagMenu(void); void DoWallyTutorialBagMenu(void);
void ResetBagScrollPositions(void); void ResetBagScrollPositions(void);
void ChooseBerrySetCallback(void (*callback)(void)); void ChooseBerryForMachine(void (*exitCallback)(void));
void CB2_ChooseBerry(void); void CB2_ChooseBerry(void);
void Task_FadeAndCloseBagMenu(u8 taskId); void Task_FadeAndCloseBagMenu(u8 taskId);
void BagMenu_YesNo(u8, u8, const struct YesNoFuncTable*); void BagMenu_YesNo(u8, u8, const struct YesNoFuncTable*);

View File

@ -19,7 +19,7 @@ void sub_80D4FC8(u8 arg0);
void sub_80D4FEC(u8 arg0); void sub_80D4FEC(u8 arg0);
u8 CreateBerryTagSprite(u8 id, s16 x, s16 y); u8 CreateBerryTagSprite(u8 id, s16 x, s16 y);
void FreeBerryTagSpritePalette(void); void FreeBerryTagSpritePalette(void);
u8 LoadSpinningBerryPicGfx(u8 berryId, u8 x, u8 y, bool8 startAffine); u8 CreateSpinningBerrySprite(u8 berryId, u8 x, u8 y, bool8 startAffine);
u8 CreateBerryFlavorCircleSprite(s16 x); u8 CreateBerryFlavorCircleSprite(s16 x);
#define TAG_BAG_GFX 100 #define TAG_BAG_GFX 100

View File

@ -48,15 +48,24 @@
#define EXTRACT_LINK_ERRORS(status) \ #define EXTRACT_LINK_ERRORS(status) \
(((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT) (((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT)
#define LINKCMD_0x1111 0x1111
#define LINKCMD_SEND_LINK_TYPE 0x2222 #define LINKCMD_SEND_LINK_TYPE 0x2222
#define LINKCMD_BLENDER_SCORE_MISS 0x2345
#define LINKCMD_0x2F00 0x2F00
#define LINKCMD_READY_EXIT_STANDBY 0x2FFE #define LINKCMD_READY_EXIT_STANDBY 0x2FFE
#define LINKCMD_0x2FFF 0x2FFF
#define LINKCMD_0x4400 0x4400
#define LINKCMD_SEND_HELD_KEYS 0x4444 #define LINKCMD_SEND_HELD_KEYS 0x4444
#define LINKCMD_BLENDER_SCORE_BEST 0x4523
#define LINKCMD_BLENDER_SCORE_GOOD 0x5432
#define LINKCMD_0x5555 0x5555 #define LINKCMD_0x5555 0x5555
#define LINKCMD_0x5566 0x5566 #define LINKCMD_0x5566 0x5566
#define LINKCMD_READY_CLOSE_LINK 0x5FFF #define LINKCMD_READY_CLOSE_LINK 0x5FFF
#define LINKCMD_0x6666 0x6666 #define LINKCMD_0x6666 0x6666
#define LINKCMD_0x7777 0x7777 #define LINKCMD_0x7777 0x7777
#define LINKCMD_0x7779 0x7779
#define LINKCMD_CONT_BLOCK 0x8888 #define LINKCMD_CONT_BLOCK 0x8888
#define LINKCMD_0x9999 0x9999
#define LINKCMD_0xAAAA 0xAAAA #define LINKCMD_0xAAAA 0xAAAA
#define LINKCMD_0xAAAB 0xAAAB #define LINKCMD_0xAAAB 0xAAAB
#define LINKCMD_READY_TO_TRADE 0xAABB #define LINKCMD_READY_TO_TRADE 0xAABB

File diff suppressed because it is too large Load Diff

View File

@ -900,7 +900,7 @@ static void sub_8020D8C(void)
void sub_8020E1C(void) void sub_8020E1C(void)
{ {
DestroyTask(gUnknown_02022C90->unkA); DestroyTask(gUnknown_02022C90->unkA);
ChooseBerrySetCallback(sub_8020D8C); ChooseBerryForMachine(sub_8020D8C);
} }
static void sub_8020E3C(void) static void sub_8020E3C(void)

View File

@ -1067,10 +1067,9 @@ const u32 gBattleAnimBgPalette_Solarbeam[] = INCBIN_U32("graphics/battle_anims/b
const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz"); const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz");
const u32 sBlenderCenterGfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz"); const u32 gBerryBlenderCenter_Gfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz");
const u32 gBerryBlenderOuter_Gfx[] = INCBIN_U32("graphics/berry_blender/outer.4bpp.lz");
const u32 gUnknown_08D91DB8[] = INCBIN_U32("graphics/berry_blender/outer.4bpp.lz"); const u32 gBerryBlenderOuter_Tilemap[] = INCBIN_U32("graphics/berry_blender/outer_map.bin.lz");
const u32 gUnknown_08D927EC[] = INCBIN_U32("graphics/berry_blender/outer_map.bin.lz");
const u32 gBattleAnimBgPalette_Cosmic[] = INCBIN_U32("graphics/battle_anims/backgrounds/cosmic.gbapal.lz"); const u32 gBattleAnimBgPalette_Cosmic[] = INCBIN_U32("graphics/battle_anims/backgrounds/cosmic.gbapal.lz");
const u32 gBattleAnimBgImage_Cosmic[] = INCBIN_U32("graphics/battle_anims/backgrounds/cosmic.4bpp.lz"); const u32 gBattleAnimBgImage_Cosmic[] = INCBIN_U32("graphics/battle_anims/backgrounds/cosmic.4bpp.lz");
@ -1352,25 +1351,15 @@ const u16 gPokenavConditionMarker_Pal[] = INCBIN_U16("graphics/pokenav/condition
const u8 gPokenavConditionMarker_Gfx[] = INCBIN_U8("graphics/pokenav/condition/marker.4bpp"); const u8 gPokenavConditionMarker_Gfx[] = INCBIN_U8("graphics/pokenav/condition/marker.4bpp");
const u16 gBerryBlenderMiscPalette[] = INCBIN_U16("graphics/berry_blender/misc.gbapal"); const u16 gBerryBlenderMiscPalette[] = INCBIN_U16("graphics/berry_blender/misc.gbapal");
const u16 gBerryBlenderArrowPalette[] = INCBIN_U16("graphics/berry_blender/arrow.gbapal"); const u16 gBerryBlenderArrowPalette[] = INCBIN_U16("graphics/berry_blender/arrow.gbapal");
const u8 gBerryBlenderBetaArrow_Gfx[] = INCBIN_U8("graphics/berry_blender/arrow_old.4bpp"); //unused const u8 gBerryBlenderBetaArrow_Gfx[] = INCBIN_U8("graphics/berry_blender/arrow_old.4bpp"); //unused
const u8 gBerryBlenderScoreSymbols_Gfx[] = INCBIN_U8("graphics/berry_blender/score_symbols.4bpp");
const u8 gBerryBlenderMarubatsuTiles[] = INCBIN_U8("graphics/berry_blender/marubatsu.4bpp"); const u8 gBerryBlenderParticles_Gfx[] = INCBIN_U8("graphics/berry_blender/particles.4bpp");
const u8 gBerryBlenderParticlesTiles[] = INCBIN_U8("graphics/berry_blender/particles.4bpp");
static const u8 sEmpty0[0x120] = {0}; static const u8 sEmpty0[0x120] = {0};
const u8 gBerryBlenderCountdownNumbers_Gfx[] = INCBIN_U8("graphics/berry_blender/countdown_numbers.4bpp");
const u8 gBerryBlenderCountdownNumbersTiles[] = INCBIN_U8("graphics/berry_blender/countdown_numbers.4bpp"); const u8 gBerryBlenderStart_Gfx[] = INCBIN_U8("graphics/berry_blender/start.4bpp");
const u8 gBerryBlenderStartTiles[] = INCBIN_U8("graphics/berry_blender/start.4bpp");
static const u8 sEmpty1[0x200] = {0}; static const u8 sEmpty1[0x200] = {0};
const u8 gBerryBlenderPlayerArrow_Gfx[] = INCBIN_U8("graphics/berry_blender/arrow.4bpp");
const u8 gBerryBlenderArrowTiles[] = INCBIN_U8("graphics/berry_blender/arrow.4bpp");
static const u8 sEmpty2[0x2C0] = {0}; static const u8 sEmpty2[0x2C0] = {0};
const u16 gEasyChatCursor_Pal[] = INCBIN_U16("graphics/easy_chat/cursor.gbapal"); const u16 gEasyChatCursor_Pal[] = INCBIN_U16("graphics/easy_chat/cursor.gbapal");

View File

@ -528,14 +528,16 @@ void CB2_BagMenuFromBattle(void)
GoToBattlePyramidBagMenu(1, CB2_SetUpReshowBattleScreenAfterMenu2); GoToBattlePyramidBagMenu(1, CB2_SetUpReshowBattleScreenAfterMenu2);
} }
// Choosing berry to plant
void CB2_ChooseBerry(void) void CB2_ChooseBerry(void)
{ {
GoToBagMenu(ITEMMENULOCATION_BERRY_TREE, BERRIES_POCKET, CB2_ReturnToFieldContinueScript); GoToBagMenu(ITEMMENULOCATION_BERRY_TREE, BERRIES_POCKET, CB2_ReturnToFieldContinueScript);
} }
void ChooseBerrySetCallback(void (*callback)(void)) // Choosing berry for Berry Blender or Berry Crush
void ChooseBerryForMachine(void (*exitCallback)(void))
{ {
GoToBagMenu(ITEMMENULOCATION_BERRY_BLENDER_CRUSH, BERRIES_POCKET, callback); GoToBagMenu(ITEMMENULOCATION_BERRY_BLENDER_CRUSH, BERRIES_POCKET, exitCallback);
} }
void CB2_GoToSellMenu(void) void CB2_GoToSellMenu(void)

View File

@ -310,51 +310,51 @@ static const struct SpriteTemplate gBerryPicRotatingSpriteTemplate =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const struct CompressedTilesPal gBerryPicTable[] = static const struct CompressedTilesPal sBerryPicTable[] =
{ {
{gBerryPic_Cheri, gBerryPalette_Cheri}, [ITEM_TO_BERRY(ITEM_CHERI_BERRY) - 1] = {gBerryPic_Cheri, gBerryPalette_Cheri},
{gBerryPic_Chesto, gBerryPalette_Chesto}, [ITEM_TO_BERRY(ITEM_CHESTO_BERRY) - 1] = {gBerryPic_Chesto, gBerryPalette_Chesto},
{gBerryPic_Pecha, gBerryPalette_Pecha}, [ITEM_TO_BERRY(ITEM_PECHA_BERRY) - 1] = {gBerryPic_Pecha, gBerryPalette_Pecha},
{gBerryPic_Rawst, gBerryPalette_Rawst}, [ITEM_TO_BERRY(ITEM_RAWST_BERRY) - 1] = {gBerryPic_Rawst, gBerryPalette_Rawst},
{gBerryPic_Aspear, gBerryPalette_Aspear}, [ITEM_TO_BERRY(ITEM_ASPEAR_BERRY) - 1] = {gBerryPic_Aspear, gBerryPalette_Aspear},
{gBerryPic_Leppa, gBerryPalette_Leppa}, [ITEM_TO_BERRY(ITEM_LEPPA_BERRY) - 1] = {gBerryPic_Leppa, gBerryPalette_Leppa},
{gBerryPic_Oran, gBerryPalette_Oran}, [ITEM_TO_BERRY(ITEM_ORAN_BERRY) - 1] = {gBerryPic_Oran, gBerryPalette_Oran},
{gBerryPic_Persim, gBerryPalette_Persim}, [ITEM_TO_BERRY(ITEM_PERSIM_BERRY) - 1] = {gBerryPic_Persim, gBerryPalette_Persim},
{gBerryPic_Lum, gBerryPalette_Lum}, [ITEM_TO_BERRY(ITEM_LUM_BERRY) - 1] = {gBerryPic_Lum, gBerryPalette_Lum},
{gBerryPic_Sitrus, gBerryPalette_Sitrus}, [ITEM_TO_BERRY(ITEM_SITRUS_BERRY) - 1] = {gBerryPic_Sitrus, gBerryPalette_Sitrus},
{gBerryPic_Figy, gBerryPalette_Figy}, [ITEM_TO_BERRY(ITEM_FIGY_BERRY) - 1] = {gBerryPic_Figy, gBerryPalette_Figy},
{gBerryPic_Wiki, gBerryPalette_Wiki}, [ITEM_TO_BERRY(ITEM_WIKI_BERRY) - 1] = {gBerryPic_Wiki, gBerryPalette_Wiki},
{gBerryPic_Mago, gBerryPalette_Mago}, [ITEM_TO_BERRY(ITEM_MAGO_BERRY) - 1] = {gBerryPic_Mago, gBerryPalette_Mago},
{gBerryPic_Aguav, gBerryPalette_Aguav}, [ITEM_TO_BERRY(ITEM_AGUAV_BERRY) - 1] = {gBerryPic_Aguav, gBerryPalette_Aguav},
{gBerryPic_Iapapa, gBerryPalette_Iapapa}, [ITEM_TO_BERRY(ITEM_IAPAPA_BERRY) - 1] = {gBerryPic_Iapapa, gBerryPalette_Iapapa},
{gBerryPic_Razz, gBerryPalette_Razz}, [ITEM_TO_BERRY(ITEM_RAZZ_BERRY) - 1] = {gBerryPic_Razz, gBerryPalette_Razz},
{gBerryPic_Bluk, gBerryPalette_Bluk}, [ITEM_TO_BERRY(ITEM_BLUK_BERRY) - 1] = {gBerryPic_Bluk, gBerryPalette_Bluk},
{gBerryPic_Nanab, gBerryPalette_Nanab}, [ITEM_TO_BERRY(ITEM_NANAB_BERRY) - 1] = {gBerryPic_Nanab, gBerryPalette_Nanab},
{gBerryPic_Wepear, gBerryPalette_Wepear}, [ITEM_TO_BERRY(ITEM_WEPEAR_BERRY) - 1] = {gBerryPic_Wepear, gBerryPalette_Wepear},
{gBerryPic_Pinap, gBerryPalette_Pinap}, [ITEM_TO_BERRY(ITEM_PINAP_BERRY) - 1] = {gBerryPic_Pinap, gBerryPalette_Pinap},
{gBerryPic_Pomeg, gBerryPalette_Pomeg}, [ITEM_TO_BERRY(ITEM_POMEG_BERRY) - 1] = {gBerryPic_Pomeg, gBerryPalette_Pomeg},
{gBerryPic_Kelpsy, gBerryPalette_Kelpsy}, [ITEM_TO_BERRY(ITEM_KELPSY_BERRY) - 1] = {gBerryPic_Kelpsy, gBerryPalette_Kelpsy},
{gBerryPic_Qualot, gBerryPalette_Qualot}, [ITEM_TO_BERRY(ITEM_QUALOT_BERRY) - 1] = {gBerryPic_Qualot, gBerryPalette_Qualot},
{gBerryPic_Hondew, gBerryPalette_Hondew}, [ITEM_TO_BERRY(ITEM_HONDEW_BERRY) - 1] = {gBerryPic_Hondew, gBerryPalette_Hondew},
{gBerryPic_Grepa, gBerryPalette_Grepa}, [ITEM_TO_BERRY(ITEM_GREPA_BERRY) - 1] = {gBerryPic_Grepa, gBerryPalette_Grepa},
{gBerryPic_Tamato, gBerryPalette_Tamato}, [ITEM_TO_BERRY(ITEM_TAMATO_BERRY) - 1] = {gBerryPic_Tamato, gBerryPalette_Tamato},
{gBerryPic_Cornn, gBerryPalette_Cornn}, [ITEM_TO_BERRY(ITEM_CORNN_BERRY) - 1] = {gBerryPic_Cornn, gBerryPalette_Cornn},
{gBerryPic_Magost, gBerryPalette_Magost}, [ITEM_TO_BERRY(ITEM_MAGOST_BERRY) - 1] = {gBerryPic_Magost, gBerryPalette_Magost},
{gBerryPic_Rabuta, gBerryPalette_Rabuta}, [ITEM_TO_BERRY(ITEM_RABUTA_BERRY) - 1] = {gBerryPic_Rabuta, gBerryPalette_Rabuta},
{gBerryPic_Nomel, gBerryPalette_Nomel}, [ITEM_TO_BERRY(ITEM_NOMEL_BERRY) - 1] = {gBerryPic_Nomel, gBerryPalette_Nomel},
{gBerryPic_Spelon, gBerryPalette_Spelon}, [ITEM_TO_BERRY(ITEM_SPELON_BERRY) - 1] = {gBerryPic_Spelon, gBerryPalette_Spelon},
{gBerryPic_Pamtre, gBerryPalette_Pamtre}, [ITEM_TO_BERRY(ITEM_PAMTRE_BERRY) - 1] = {gBerryPic_Pamtre, gBerryPalette_Pamtre},
{gBerryPic_Watmel, gBerryPalette_Watmel}, [ITEM_TO_BERRY(ITEM_WATMEL_BERRY) - 1] = {gBerryPic_Watmel, gBerryPalette_Watmel},
{gBerryPic_Durin, gBerryPalette_Durin}, [ITEM_TO_BERRY(ITEM_DURIN_BERRY) - 1] = {gBerryPic_Durin, gBerryPalette_Durin},
{gBerryPic_Belue, gBerryPalette_Belue}, [ITEM_TO_BERRY(ITEM_BELUE_BERRY) - 1] = {gBerryPic_Belue, gBerryPalette_Belue},
{gBerryPic_Liechi, gBerryPalette_Liechi}, [ITEM_TO_BERRY(ITEM_LIECHI_BERRY) - 1] = {gBerryPic_Liechi, gBerryPalette_Liechi},
{gBerryPic_Ganlon, gBerryPalette_Ganlon}, [ITEM_TO_BERRY(ITEM_GANLON_BERRY) - 1] = {gBerryPic_Ganlon, gBerryPalette_Ganlon},
{gBerryPic_Salac, gBerryPalette_Salac}, [ITEM_TO_BERRY(ITEM_SALAC_BERRY) - 1] = {gBerryPic_Salac, gBerryPalette_Salac},
{gBerryPic_Petaya, gBerryPalette_Petaya}, [ITEM_TO_BERRY(ITEM_PETAYA_BERRY) - 1] = {gBerryPic_Petaya, gBerryPalette_Petaya},
{gBerryPic_Apicot, gBerryPalette_Apicot}, [ITEM_TO_BERRY(ITEM_APICOT_BERRY) - 1] = {gBerryPic_Apicot, gBerryPalette_Apicot},
{gBerryPic_Lansat, gBerryPalette_Lansat}, [ITEM_TO_BERRY(ITEM_LANSAT_BERRY) - 1] = {gBerryPic_Lansat, gBerryPalette_Lansat},
{gBerryPic_Starf, gBerryPalette_Starf}, [ITEM_TO_BERRY(ITEM_STARF_BERRY) - 1] = {gBerryPic_Starf, gBerryPalette_Starf},
{gBerryPic_Enigma, gBerryPalette_Enigma}, [ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) - 1] = {gBerryPic_Enigma, gBerryPalette_Enigma},
}; };
const struct CompressedSpriteSheet gBerryCheckCircleSpriteSheet = const struct CompressedSpriteSheet gBerryCheckCircleSpriteSheet =
@ -581,10 +581,10 @@ static void LoadBerryGfx(u8 berryId)
// unknown empty if statement // unknown empty if statement
} }
pal.data = gBerryPicTable[berryId].pal; pal.data = sBerryPicTable[berryId].pal;
pal.tag = TAG_BERRY_PIC_PAL; pal.tag = TAG_BERRY_PIC_PAL;
LoadCompressedSpritePalette(&pal); LoadCompressedSpritePalette(&pal);
LZDecompressWram(gBerryPicTable[berryId].tiles, &gDecompressionBuffer[0x1000]); LZDecompressWram(sBerryPicTable[berryId].tiles, &gDecompressionBuffer[0x1000]);
sub_80D5018(&gDecompressionBuffer[0x1000], &gDecompressionBuffer[0]); sub_80D5018(&gDecompressionBuffer[0x1000], &gDecompressionBuffer[0]);
} }
@ -599,7 +599,8 @@ void FreeBerryTagSpritePalette(void)
FreeSpritePaletteByTag(TAG_BERRY_PIC_PAL); FreeSpritePaletteByTag(TAG_BERRY_PIC_PAL);
} }
u8 LoadSpinningBerryPicGfx(u8 berryId, u8 x, u8 y, bool8 startAffine) // For throwing berries into the Berry Blender
u8 CreateSpinningBerrySprite(u8 berryId, u8 x, u8 y, bool8 startAffine)
{ {
u8 spriteId; u8 spriteId;