summaryrefslogtreecommitdiff
path: root/src/item_menu.c
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2018-11-06 20:20:56 -0600
committerDiegoisawesome <diego@domoreaweso.me>2018-11-06 20:20:56 -0600
commit18839a4872057fde33be45c5d2c4ecf4274bcc8d (patch)
tree5f48809915af5d02c2f75efc790bd598ed9f3975 /src/item_menu.c
parent054a015c950ca9869ce28245a2f13c3f72cddb37 (diff)
parent93ff71fcfdf8b71a7b4899f271a5214503bcd510 (diff)
Merge remote-tracking branch 'pret/master' into script_menu
Diffstat (limited to 'src/item_menu.c')
-rwxr-xr-xsrc/item_menu.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/item_menu.c b/src/item_menu.c
index 106babdae..0cbcc13d0 100755
--- a/src/item_menu.c
+++ b/src/item_menu.c
@@ -2,7 +2,7 @@
#include "item_menu.h"
#include "battle.h"
#include "battle_controllers.h"
-#include "battle_frontier_2.h"
+#include "frontier_util.h"
#include "berry_tag_screen.h"
#include "bg.h"
#include "constants/items.h"
@@ -48,6 +48,8 @@
#include "window.h"
#include "apprentice.h"
+extern bool8 InBattlePike(void);
+
void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)());
void CB2_Bag(void);
bool8 setup_bag_menu(void);
@@ -268,7 +270,7 @@ const u8 gUnknown_08614164[][3] = {
const struct WindowTemplate gUnknown_08614174[] =
{
{
- .priority = 0,
+ .bg = 0,
.tilemapLeft = 14,
.tilemapTop = 2,
.width = 15,
@@ -277,7 +279,7 @@ const struct WindowTemplate gUnknown_08614174[] =
.baseBlock = 0x27,
},
{
- .priority = 0,
+ .bg = 0,
.tilemapLeft = 0,
.tilemapTop = 13,
.width = 14,
@@ -286,7 +288,7 @@ const struct WindowTemplate gUnknown_08614174[] =
.baseBlock = 0x117,
},
{
- .priority = 0,
+ .bg = 0,
.tilemapLeft = 4,
.tilemapTop = 1,
.width = 8,
@@ -295,7 +297,7 @@ const struct WindowTemplate gUnknown_08614174[] =
.baseBlock = 0x1A1,
},
{
- .priority = 0,
+ .bg = 0,
.tilemapLeft = 1,
.tilemapTop = 13,
.width = 5,
@@ -304,7 +306,7 @@ const struct WindowTemplate gUnknown_08614174[] =
.baseBlock = 0x16B,
},
{
- .priority = 0,
+ .bg = 0,
.tilemapLeft = 7,
.tilemapTop = 13,
.width = 4,
@@ -313,7 +315,7 @@ const struct WindowTemplate gUnknown_08614174[] =
.baseBlock = 0x189,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 2,
.tilemapTop = 15,
.width = 27,
@@ -327,7 +329,7 @@ const struct WindowTemplate gUnknown_08614174[] =
const struct WindowTemplate gUnknown_086141AC[] =
{
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 22,
.tilemapTop = 17,
.width = 7,
@@ -336,7 +338,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x21D,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 22,
.tilemapTop = 15,
.width = 7,
@@ -345,7 +347,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x21D,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 15,
.tilemapTop = 15,
.width = 14,
@@ -354,7 +356,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x21D,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 15,
.tilemapTop = 13,
.width = 14,
@@ -363,7 +365,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x21D,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 2,
.tilemapTop = 15,
.width = 27,
@@ -372,7 +374,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x1B1,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 24,
.tilemapTop = 15,
.width = 5,
@@ -381,7 +383,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x21D,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 21,
.tilemapTop = 9,
.width = 5,
@@ -390,7 +392,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x21D,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 24,
.tilemapTop = 17,
.width = 5,
@@ -399,7 +401,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x21D,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 18,
.tilemapTop = 11,
.width = 10,
@@ -408,7 +410,7 @@ const struct WindowTemplate gUnknown_086141AC[] =
.baseBlock = 0x245,
},
{
- .priority = 1,
+ .bg = 1,
.tilemapLeft = 1,
.tilemapTop = 1,
.width = 10,
@@ -1029,7 +1031,7 @@ void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u
data[10] = AddItemMessageWindow(4);
FillWindowPixelBuffer(data[10], 17);
- DisplayMessageAndContinueTask(taskId, data[10], 10, 13, fontId, GetPlayerTextSpeed(), str, callback);
+ DisplayMessageAndContinueTask(taskId, data[10], 10, 13, fontId, GetPlayerTextSpeedDelay(), str, callback);
schedule_bg_copy_tilemap_to_vram(1);
}