Finish decompiling pyramid bag.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@
|
||||
#include "item_menu.h"
|
||||
#include "strings.h"
|
||||
#include "load_save.h"
|
||||
#include "battle_pyramid_bag.h"
|
||||
|
||||
extern bool8 InBattlePyramid(void);
|
||||
extern u16 gUnknown_0203CF30[];
|
||||
@@ -965,7 +966,7 @@ bool8 RemovePyramidBagItem(u16 itemId, u16 count)
|
||||
u16 *items = gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode];
|
||||
u8 *quantities = gSaveBlock2Ptr->frontier.pyramidBag.quantity[gSaveBlock2Ptr->frontier.lvlMode];
|
||||
|
||||
i = gUnknown_0203CF30[3] + gUnknown_0203CF30[4];
|
||||
i = gPyramidBagCursorData.cursorPosition + gPyramidBagCursorData.scrollPosition;
|
||||
if (items[i] == itemId && quantities[i] >= count)
|
||||
{
|
||||
quantities[i] -= count;
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#include "pokeblock.h"
|
||||
#include "menu.h"
|
||||
#include "item_menu.h"
|
||||
#include "battle_pyramid_bag.h"
|
||||
|
||||
extern void(**gUnknown_0203CF2C)(void);
|
||||
extern void(*gUnknown_0203A0F4)(u8 taskId);
|
||||
extern void(*gUnknown_085920D8[])(void);
|
||||
extern void (*gUnknown_03006328)(u8, u16, TaskFunc);
|
||||
@@ -122,7 +122,7 @@ void SetUpItemUseCallback(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
*gUnknown_0203CF2C = gUnknown_085920D8[type];
|
||||
gPyramidBagResources->callback2 = gUnknown_085920D8[type];
|
||||
sub_81C5B14(taskId);
|
||||
}
|
||||
}
|
||||
@@ -987,7 +987,7 @@ void sub_80FE54C(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
*gUnknown_0203CF2C = sub_81B89F0;
|
||||
gPyramidBagResources->callback2 = sub_81B89F0;
|
||||
sub_81C5B14(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "international_string_util.h"
|
||||
#include "constants/songs.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "battle_pyramid_bag.h"
|
||||
|
||||
// Menu actions
|
||||
enum
|
||||
@@ -73,12 +74,11 @@ EWRAM_DATA static u8 sSaveDialogTimer = 0;
|
||||
EWRAM_DATA static bool8 sSavingComplete = FALSE;
|
||||
EWRAM_DATA static u8 sSaveInfoWindowId = 0;
|
||||
|
||||
// Extern variables
|
||||
// Extern variables.
|
||||
extern u8 gDifferentSaveFile;
|
||||
extern u16 gSaveFileStatus;
|
||||
extern u8 gUnknown_03005DB4;
|
||||
|
||||
// Extern functions in uncompiled files
|
||||
// Extern functions in not decompiled files.
|
||||
extern void sub_80AF688(void);
|
||||
extern void var_800D_set_xB(void);
|
||||
extern void sub_808B864(void);
|
||||
@@ -89,7 +89,6 @@ extern void CB2_PokeNav(void);
|
||||
extern void sub_80C4DDC(void (*)(void));
|
||||
extern void sub_80C51C4(void (*)(void));
|
||||
extern void sub_80C4E74(u8, void (*)(void));
|
||||
extern void sub_81C4EFC(void);
|
||||
extern void ScriptUnfreezeEventObjects(void);
|
||||
extern void sub_81A9EC8(void);
|
||||
extern void save_serialize_map(void);
|
||||
@@ -781,7 +780,7 @@ static bool8 StartMenuBattlePyramidBagCallback(void)
|
||||
play_some_sound();
|
||||
RemoveExtraStartMenuWindows();
|
||||
overworld_free_bg_tilemaps();
|
||||
SetMainCallback2(sub_81C4EFC); // Display battle pyramid bag
|
||||
SetMainCallback2(CB2_PyramidBagMenuFromStartMenu);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user