Merge remote-tracking branch 'upstream/master' into shop
# Conflicts: # asm/shop.s
This commit is contained in:
+147
-15
@@ -42,6 +42,7 @@ extern const u8 gUnknown_08D9ADD0[];
|
||||
extern const u8 gUnknown_08D9AE04[];
|
||||
extern const u8 gUnknown_08D9AF44[];
|
||||
extern const u16 gUnknown_0860F074[];
|
||||
extern const u8 gBattleFrontierGfx_PyramidBag[];
|
||||
|
||||
// This file's functions.
|
||||
static void Task_HandlePyramidBagInput(u8 taskId);
|
||||
@@ -193,24 +194,155 @@ static const u8 sColorTable[][3] =
|
||||
|
||||
static const struct WindowTemplate gUnknown_0861F328[] =
|
||||
{
|
||||
{0x00, 0x0e, 0x02, 0x0f, 0x10, 0x0f, 0x001e},
|
||||
{0x00, 0x00, 0x0d, 0x0e, 0x06, 0x0f, 0x010e},
|
||||
{0x01, 0x02, 0x0f, 0x1b, 0x04, 0x0f, 0x0162},
|
||||
{0x01, 0x18, 0x11, 0x05, 0x02, 0x0f, 0x01ce},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 14,
|
||||
.tilemapTop = 2,
|
||||
.width = 15,
|
||||
.height = 16,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 30
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 13,
|
||||
.width = 14,
|
||||
.height = 6,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 270
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
.width = 27,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 354
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 24,
|
||||
.tilemapTop = 17,
|
||||
.width = 5,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 462
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE,
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_0861F350[] =
|
||||
{
|
||||
{0x01, 0x16, 0x11, 0x07, 0x02, 0x0f, 0x01d8},
|
||||
{0x01, 0x16, 0x0f, 0x07, 0x04, 0x0f, 0x01d8},
|
||||
{0x01, 0x0f, 0x0f, 0x0e, 0x04, 0x0f, 0x01d8},
|
||||
{0x01, 0x0f, 0x0d, 0x0e, 0x06, 0x0f, 0x01d8},
|
||||
{0x01, 0x18, 0x0f, 0x05, 0x04, 0x0f, 0x01d8},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 22,
|
||||
.tilemapTop = 17,
|
||||
.width = 7,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 472
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 22,
|
||||
.tilemapTop = 15,
|
||||
.width = 7,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 472
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 15,
|
||||
.tilemapTop = 15,
|
||||
.width = 14,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 472
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 15,
|
||||
.tilemapTop = 13,
|
||||
.width = 14,
|
||||
.height = 6,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 472
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 24,
|
||||
.tilemapTop = 15,
|
||||
.width = 5,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 472
|
||||
},
|
||||
};
|
||||
|
||||
extern const struct CompressedSpriteSheet gUnknown_0861F3CC;
|
||||
extern const struct SpriteTemplate gUnknown_0861F3D4;
|
||||
static const struct OamData gOamData_861F378 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 1,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.shape = 0,
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = 3,
|
||||
.tileNum = 0,
|
||||
.priority = 1,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const union AnimCmd gSpriteAnim_861F380[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 4),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd * const gSpriteAnimTable_861F388[] =
|
||||
{
|
||||
gSpriteAnim_861F380,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gSpriteAffineAnim_861F38C[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gSpriteAffineAnim_861F39C[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0, 0, 254, 2),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 2, 4),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 254, 4),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 2, 2),
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd * const gSpriteAffineAnimTable_861F3C4[] =
|
||||
{
|
||||
gSpriteAffineAnim_861F38C,
|
||||
gSpriteAffineAnim_861F39C,
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet gUnknown_0861F3CC = {gBattleFrontierGfx_PyramidBag, 0x0800, 0x1024};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0861F3D4 =
|
||||
{
|
||||
.tileTag = 0x1024,
|
||||
.paletteTag = 0x1024,
|
||||
.oam = &gOamData_861F378,
|
||||
.anims = gSpriteAnimTable_861F388,
|
||||
.images = NULL,
|
||||
.affineAnims = gSpriteAffineAnimTable_861F3C4,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
// code
|
||||
void sub_81C4EEC(void)
|
||||
@@ -997,7 +1129,7 @@ static void sub_81C6404(void)
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
sub_81C6CEC(3);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 0x28);
|
||||
PrintTextOnWindow(3, 1, gStringVar4, x, 2, 0, NULL);
|
||||
AddTextPrinterParameterized(3, 1, gStringVar4, x, 2, 0, NULL);
|
||||
}
|
||||
|
||||
static void sub_81C645C(s16 value)
|
||||
@@ -1007,7 +1139,7 @@ static void sub_81C645C(s16 value)
|
||||
ConvertIntToDecimalStringN(gStringVar1, value, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 0x28);
|
||||
PrintTextOnWindow(3, 1, gStringVar4, x, 2, 0, NULL);
|
||||
AddTextPrinterParameterized(3, 1, gStringVar4, x, 2, 0, NULL);
|
||||
}
|
||||
|
||||
static void sub_81C64B4(u8 taskId)
|
||||
@@ -1280,12 +1412,12 @@ static void sub_81C6BD8(void)
|
||||
|
||||
static void PrintOnWindow_Font1(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, lineSpacing, sColorTable[colorTableId], speed, src);
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, sColorTable[colorTableId], speed, src);
|
||||
}
|
||||
|
||||
static void PrintOnWindow_Font7(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 7, x, y, letterSpacing, lineSpacing, sColorTable[colorTableId], speed, src);
|
||||
AddTextPrinterParameterized4(windowId, 7, x, y, letterSpacing, lineSpacing, sColorTable[colorTableId], speed, src);
|
||||
}
|
||||
|
||||
static void sub_81C6CEC(u8 windowId)
|
||||
|
||||
Reference in New Issue
Block a user