diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-10-13 10:22:58 -0500 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2018-10-13 10:22:58 -0500 |
commit | b24559d69b6fa0abf042a1b7cdbcab3d1ec91fd6 (patch) | |
tree | 7b51d7b9cb9a370fe1dd9db8eeadc23089ba1328 /src/wallclock.c | |
parent | fa9d1759bd7fa17ced37225bd31d46466da857c6 (diff) | |
parent | a2a6700966cc802185577e44ba88a9154429c93b (diff) |
Merge remote-tracking branch 'upstream/master' into shop
# Conflicts:
# asm/shop.s
Diffstat (limited to 'src/wallclock.c')
-rw-r--r-- | src/wallclock.c | 109 |
1 files changed, 69 insertions, 40 deletions
diff --git a/src/wallclock.c b/src/wallclock.c index 5be20d5c9..6bcfa1717 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -59,13 +59,38 @@ static void SpriteCB_PMIndicator(struct Sprite *sprite); static const u8 sUnknown_085B1F58[] = INCBIN_U8("graphics/wallclock/graphics_85b1f58.4bpp.lz"); static const u16 sUnknown_085B21D4[] = INCBIN_U16("graphics/wallclock/palette_85b21d4.gbapal"); -static const struct WindowTemplate gUnknown_085B21DC[] = { - { 0x00, 0x03, 0x11, 0x18, 0x02, 0x0e, 0x200 }, - { 0x02, 0x18, 0x10, 0x06, 0x02, 0x0c, 0x230 }, + +static const struct WindowTemplate gUnknown_085B21DC[] = +{ + { + .priority = 0, + .tilemapLeft = 3, + .tilemapTop = 17, + .width = 24, + .height = 2, + .paletteNum = 14, + .baseBlock = 512 + }, + { + .priority = 2, + .tilemapLeft = 24, + .tilemapTop = 16, + .width = 6, + .height = 2, + .paletteNum = 12, + .baseBlock = 560 + }, DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate gUnknown_085B21F4 = { - 0x00, 0x18, 0x09, 0x05, 0x04, 0x0e, 0x23c +static const struct WindowTemplate gUnknown_085B21F4 = +{ + .priority = 0, + .tilemapLeft = 24, + .tilemapTop = 9, + .width = 5, + .height = 4, + .paletteNum = 14, + .baseBlock = 572 }; static const struct BgTemplate gUnknown_085B21FC[] = { { @@ -115,23 +140,25 @@ static const union AnimCmd *const gUnknown_085B2248[] = { static const union AnimCmd *const gUnknown_085B224C[] = { Unknown_085B2240 }; -static const struct SpriteTemplate gUnknown_085B2250 = { - TAG_GFX_WALL_CLOCK_HAND, - TAG_PAL_WALL_CLOCK_HAND, - &Unknown_085B2230, - gUnknown_085B2248, - NULL, - gDummySpriteAffineAnimTable, - SpriteCB_MinuteHand +static const struct SpriteTemplate gUnknown_085B2250 = +{ + .tileTag = TAG_GFX_WALL_CLOCK_HAND, + .paletteTag = TAG_PAL_WALL_CLOCK_HAND, + .oam = &Unknown_085B2230, + .anims = gUnknown_085B2248, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_MinuteHand }; -static const struct SpriteTemplate gUnknown_085B2268 = { - TAG_GFX_WALL_CLOCK_HAND, - TAG_PAL_WALL_CLOCK_HAND, - &Unknown_085B2230, - gUnknown_085B224C, - NULL, - gDummySpriteAffineAnimTable, - SpriteCB_HourHand +static const struct SpriteTemplate gUnknown_085B2268 = +{ + .tileTag = TAG_GFX_WALL_CLOCK_HAND, + .paletteTag = TAG_PAL_WALL_CLOCK_HAND, + .oam = &Unknown_085B2230, + .anims = gUnknown_085B224C, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_HourHand }; static const struct OamData Unknown_085B2280 = { .y = 0xa0, @@ -152,23 +179,25 @@ static const union AnimCmd *const gUnknown_085B2298[] = { static const union AnimCmd *const gUnknown_085B229C[] = { Unknown_085B2290 }; -static const struct SpriteTemplate gUnknown_085B22A0 = { - TAG_GFX_WALL_CLOCK_HAND, - TAG_PAL_WALL_CLOCK_HAND, - &Unknown_085B2280, - gUnknown_085B2298, - NULL, - gDummySpriteAffineAnimTable, - SpriteCB_AMIndicator +static const struct SpriteTemplate gUnknown_085B22A0 = +{ + .tileTag = TAG_GFX_WALL_CLOCK_HAND, + .paletteTag = TAG_PAL_WALL_CLOCK_HAND, + .oam = &Unknown_085B2280, + .anims = gUnknown_085B2298, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_AMIndicator }; -static const struct SpriteTemplate gUnknown_085B22B8 = { - TAG_GFX_WALL_CLOCK_HAND, - TAG_PAL_WALL_CLOCK_HAND, - &Unknown_085B2280, - gUnknown_085B229C, - NULL, - gDummySpriteAffineAnimTable, - SpriteCB_PMIndicator +static const struct SpriteTemplate gUnknown_085B22B8 = +{ + .tileTag = TAG_GFX_WALL_CLOCK_HAND, + .paletteTag = TAG_PAL_WALL_CLOCK_HAND, + .oam = &Unknown_085B2280, + .anims = gUnknown_085B229C, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_PMIndicator }; static const s8 sClockHandCoords[][2] = { { 0x00, -0x18}, @@ -639,7 +668,7 @@ void CB2_StartWallClock(void) WallClockInit(); - PrintTextOnWindow(1, 1, gText_Confirm3, 0, 1, 0, NULL); + AddTextPrinterParameterized(1, 1, gText_Confirm3, 0, 1, 0, NULL); PutWindowTilemap(1); schedule_bg_copy_tilemap_to_vram(2); } @@ -687,7 +716,7 @@ void CB2_ViewWallClock(void) WallClockInit(); - PrintTextOnWindow(1, 1, gText_Cancel4, 0, 1, 0, NULL); + AddTextPrinterParameterized(1, 1, gText_Cancel4, 0, 1, 0, NULL); PutWindowTilemap(1); schedule_bg_copy_tilemap_to_vram(2); } @@ -754,7 +783,7 @@ static void Task_SetClock2(u8 taskId) static void Task_SetClock3(u8 taskId) { SetWindowBorderStyle(0, FALSE, 0x250, 0x0d); - PrintTextOnWindow(0, 1, gText_IsThisTheCorrectTime, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, 1, gText_IsThisTheCorrectTime, 0, 1, 0, NULL); PutWindowTilemap(0); schedule_bg_copy_tilemap_to_vram(0); CreateYesNoMenu(&gUnknown_085B21F4, 0x250, 0x0d, 1); |