From 9848f84b9ec2d5950cb5dc4600b7651486ff986a Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 11 Mar 2019 03:12:15 -0400 Subject: [PATCH] Use constants for Oam .shape and .size fields Also some general formatting fixes for constants. --- include/gba/types.h | 23 ++ src/battle_anim.c | 288 ++++++++++++------------ src/battle_arena.c | 4 +- src/battle_bg.c | 8 +- src/battle_dome.c | 16 +- src/battle_factory_screen.c | 16 +- src/battle_interface.c | 16 +- src/battle_main.c | 8 +- src/battle_pyramid_bag.c | 4 +- src/battle_script_commands.c | 4 +- src/battle_transition.c | 4 +- src/berry_blender.c | 20 +- src/cable_car.c | 9 +- src/contest_painting.c | 4 +- src/credits.c | 4 +- src/data/field_event_obj/base_oam.h | 32 +-- src/decoration.c | 4 +- src/easy_chat.c | 24 +- src/egg_hatch.c | 8 +- src/evolution_graphics.c | 4 +- src/field_effect.c | 144 ++++++++---- src/field_weather_effect.c | 28 +-- src/fldeff_cut.c | 4 +- src/fldeff_misc.c | 8 +- src/hall_of_fame.c | 4 +- src/intro.c | 48 ++-- src/intro_credits_graphics.c | 159 ++++++++----- src/item_icon.c | 4 +- src/item_menu_icons.c | 20 +- src/link_rfu.c | 3 +- src/list_menu.c | 40 ++-- src/menu_helpers.c | 4 +- src/mirage_tower.c | 12 +- src/mon_markings.c | 12 +- src/money.c | 4 +- src/naming_screen.c | 12 +- src/party_menu.c | 16 +- src/pokeball.c | 4 +- src/pokeblock.c | 4 +- src/pokeblock_feed.c | 4 +- src/pokedex.c | 24 +- src/pokedex_area_screen.c | 46 ++-- src/pokedex_cry_screen.c | 27 ++- src/pokemon.c | 4 +- src/pokemon_icon.c | 4 +- src/pokemon_storage_system.c | 35 +-- src/pokemon_summary_screen.c | 12 +- src/rayquaza_scene.c | 32 +-- src/region_map.c | 213 +++++++++++++----- src/reset_rtc_screen.c | 4 +- src/rotating_gate.c | 8 +- src/roulette.c | 290 +++++++++++++++--------- src/save_failed_screen.c | 26 +-- src/sprite.c | 30 +-- src/starter_choose.c | 40 ++-- src/title_screen.c | 49 ++-- src/trade.c | 336 +++++++++++++++++----------- src/trainer_pokemon_sprites.c | 9 +- src/trainer_see.c | 19 +- src/unk_transition.c | 13 +- src/wallclock.c | 80 +++++-- 61 files changed, 1422 insertions(+), 913 deletions(-) diff --git a/include/gba/types.h b/include/gba/types.h index 3d78b5b5e..cb370c785 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -87,6 +87,29 @@ struct OamData #define ST_OAM_H_RECTANGLE 1 #define ST_OAM_V_RECTANGLE 2 +#define ST_OAM_SIZE_0 0 +#define ST_OAM_SIZE_1 1 +#define ST_OAM_SIZE_2 2 +#define ST_OAM_SIZE_3 3 + +#define SPRITE_SIZE_8x8 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_16x16 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_32x32 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_64x64 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_SQUARE)) + +#define SPRITE_SIZE_16x8 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_32x8 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_32x16 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_64x32 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_H_RECTANGLE)) + +#define SPRITE_SIZE_8x16 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_8x32 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_16x32 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_32x64 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_V_RECTANGLE)) + +#define SPRITE_SIZE(dim) (SPRITE_SIZE_##dim >> 2) +#define SPRITE_SHAPE(dim) (SPRITE_SIZE_##dim & 0xFF) + struct BgAffineSrcData { s32 texX; diff --git a/src/battle_anim.c b/src/battle_anim.c index f1cff1de2..31ff11ee8 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -119,8 +119,8 @@ const struct OamData gUnknown_08524904 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .priority = 2, }; @@ -129,8 +129,8 @@ const struct OamData gUnknown_0852490C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -138,8 +138,8 @@ const struct OamData gUnknown_08524914 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2, }; @@ -147,8 +147,8 @@ const struct OamData gUnknown_0852491C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2, }; @@ -156,8 +156,8 @@ const struct OamData gUnknown_08524924 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 2, }; @@ -165,8 +165,8 @@ const struct OamData gUnknown_0852492C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), .priority = 2, }; @@ -174,8 +174,8 @@ const struct OamData gUnknown_08524934 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2, }; @@ -183,8 +183,8 @@ const struct OamData gUnknown_0852493C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 2, }; @@ -192,8 +192,8 @@ const struct OamData gUnknown_08524944 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 2, }; @@ -201,8 +201,8 @@ const struct OamData gUnknown_0852494C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(8x32), + .size = SPRITE_SIZE(8x32), .priority = 2, }; @@ -210,8 +210,8 @@ const struct OamData gUnknown_08524954 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2, }; @@ -219,8 +219,8 @@ const struct OamData gUnknown_0852495C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(32x64), + .size = SPRITE_SIZE(32x64), .priority = 2, }; @@ -228,8 +228,8 @@ const struct OamData gUnknown_08524964 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .priority = 2, }; @@ -237,8 +237,8 @@ const struct OamData gUnknown_0852496C = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -246,8 +246,8 @@ const struct OamData gUnknown_08524974 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2, }; @@ -255,8 +255,8 @@ const struct OamData gUnknown_0852497C = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2, }; @@ -264,8 +264,8 @@ const struct OamData gUnknown_08524984 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 2, }; @@ -273,8 +273,8 @@ const struct OamData gUnknown_0852498C = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), .priority = 2, }; @@ -282,8 +282,8 @@ const struct OamData gUnknown_08524994 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2, }; @@ -291,8 +291,8 @@ const struct OamData gUnknown_0852499C = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 2, }; @@ -300,8 +300,8 @@ const struct OamData gUnknown_085249A4 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 2, }; @@ -309,8 +309,8 @@ const struct OamData gUnknown_085249AC = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(8x32), + .size = SPRITE_SIZE(8x32), .priority = 2, }; @@ -318,8 +318,8 @@ const struct OamData gUnknown_085249B4 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2, }; @@ -327,8 +327,8 @@ const struct OamData gUnknown_085249BC = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(32x64), + .size = SPRITE_SIZE(32x64), .priority = 2, }; @@ -336,8 +336,8 @@ const struct OamData gUnknown_085249C4 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .priority = 2, }; @@ -345,8 +345,8 @@ const struct OamData gUnknown_085249CC = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -354,8 +354,8 @@ const struct OamData gUnknown_085249D4 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2, }; @@ -363,8 +363,8 @@ const struct OamData gUnknown_085249DC = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2, }; @@ -372,8 +372,8 @@ const struct OamData gUnknown_085249E4 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 2, }; @@ -381,8 +381,8 @@ const struct OamData gUnknown_085249EC = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), .priority = 2, }; @@ -390,8 +390,8 @@ const struct OamData gUnknown_085249F4 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2, }; @@ -399,8 +399,8 @@ const struct OamData gUnknown_085249FC = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 2, }; @@ -408,8 +408,8 @@ const struct OamData gUnknown_08524A04 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 2, }; @@ -417,8 +417,8 @@ const struct OamData gUnknown_08524A0C = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(8x32), + .size = SPRITE_SIZE(8x32), .priority = 2, }; @@ -426,8 +426,8 @@ const struct OamData gUnknown_08524A14 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2, }; @@ -435,8 +435,8 @@ const struct OamData gUnknown_08524A1C = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(32x64), + .size = SPRITE_SIZE(32x64), .priority = 2, }; @@ -444,8 +444,8 @@ const struct OamData gUnknown_08524A24 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .priority = 2, }; @@ -453,8 +453,8 @@ const struct OamData gUnknown_08524A2C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -462,8 +462,8 @@ const struct OamData gUnknown_08524A34 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2, }; @@ -471,8 +471,8 @@ const struct OamData gUnknown_08524A3C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2, }; @@ -480,8 +480,8 @@ const struct OamData gUnknown_08524A44 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 2, }; @@ -489,8 +489,8 @@ const struct OamData gUnknown_08524A4C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), .priority = 2, }; @@ -498,8 +498,8 @@ const struct OamData gUnknown_08524A54 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2, }; @@ -507,8 +507,8 @@ const struct OamData gUnknown_08524A5C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 2, }; @@ -516,8 +516,8 @@ const struct OamData gUnknown_08524A64 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 2, }; @@ -525,8 +525,8 @@ const struct OamData gUnknown_08524A6C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(8x32), + .size = SPRITE_SIZE(8x32), .priority = 2, }; @@ -534,8 +534,8 @@ const struct OamData gUnknown_08524A74 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2, }; @@ -543,8 +543,8 @@ const struct OamData gUnknown_08524A7C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(32x64), + .size = SPRITE_SIZE(32x64), .priority = 2, }; @@ -552,8 +552,8 @@ const struct OamData gUnknown_08524A84 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .priority = 2, }; @@ -561,8 +561,8 @@ const struct OamData gUnknown_08524A8C = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -570,8 +570,8 @@ const struct OamData gUnknown_08524A94 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2, }; @@ -579,8 +579,8 @@ const struct OamData gUnknown_08524A9C = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2, }; @@ -588,8 +588,8 @@ const struct OamData gUnknown_08524AA4 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 2, }; @@ -597,8 +597,8 @@ const struct OamData gUnknown_08524AAC = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), .priority = 2, }; @@ -606,8 +606,8 @@ const struct OamData gUnknown_08524AB4 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2, }; @@ -615,8 +615,8 @@ const struct OamData gUnknown_08524ABC = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 2, }; @@ -624,8 +624,8 @@ const struct OamData gUnknown_08524AC4 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 2, }; @@ -633,8 +633,8 @@ const struct OamData gUnknown_08524ACC = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(8x32), + .size = SPRITE_SIZE(8x32), .priority = 2, }; @@ -642,8 +642,8 @@ const struct OamData gUnknown_08524AD4 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2, }; @@ -651,8 +651,8 @@ const struct OamData gUnknown_08524ADC = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(32x64), + .size = SPRITE_SIZE(32x64), .priority = 2, }; @@ -660,8 +660,8 @@ const struct OamData gUnknown_08524AE4 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .priority = 2, }; @@ -669,8 +669,8 @@ const struct OamData gUnknown_08524AEC = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -678,8 +678,8 @@ const struct OamData gUnknown_08524AF4 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2, }; @@ -687,8 +687,8 @@ const struct OamData gUnknown_08524AFC = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_SQUARE, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2, }; @@ -696,8 +696,8 @@ const struct OamData gUnknown_08524B04 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 2, }; @@ -705,8 +705,8 @@ const struct OamData gUnknown_08524B0C = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), .priority = 2, }; @@ -714,8 +714,8 @@ const struct OamData gUnknown_08524B14 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2, }; @@ -723,8 +723,8 @@ const struct OamData gUnknown_08524B1C = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_H_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 2, }; @@ -732,8 +732,8 @@ const struct OamData gUnknown_08524B24 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 2, }; @@ -741,8 +741,8 @@ const struct OamData gUnknown_08524B2C = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 1, + .shape = SPRITE_SHAPE(8x32), + .size = SPRITE_SIZE(8x32), .priority = 2, }; @@ -750,8 +750,8 @@ const struct OamData gUnknown_08524B34 = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2, }; @@ -759,8 +759,8 @@ const struct OamData gUnknown_08524B3C = { .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_BLEND, - .shape = ST_OAM_V_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(32x64), + .size = SPRITE_SIZE(32x64), .priority = 2, }; diff --git a/src/battle_arena.c b/src/battle_arena.c index 8146f5b38..f785fa7c3 100644 --- a/src/battle_arena.c +++ b/src/battle_arena.c @@ -406,10 +406,10 @@ static const struct OamData sJudgementIconOamData = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 15, diff --git a/src/battle_bg.c b/src/battle_bg.c index 9ca0f8b84..524f73abf 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -42,10 +42,10 @@ static const struct OamData gUnknown_0831A988 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -59,10 +59,10 @@ static const struct OamData gUnknown_0831A990 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 64, .priority = 0, .paletteNum = 0, diff --git a/src/battle_dome.c b/src/battle_dome.c index f86faeffb..1b7953180 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -872,10 +872,10 @@ static const struct OamData gUnknown_0860CF70 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -889,10 +889,10 @@ static const struct OamData gUnknown_0860CF78 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x16), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x16), .tileNum = 0, .priority = 0, .paletteNum = 1, @@ -906,10 +906,10 @@ static const struct OamData gUnknown_0860CF80 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(16x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(16x8), .tileNum = 0, .priority = 0, .paletteNum = 2, @@ -923,10 +923,10 @@ static const struct OamData gUnknown_0860CF88 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 2, + .shape = SPRITE_SHAPE(8x16), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x16), .tileNum = 0, .priority = 0, .paletteNum = 2, diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 85c0b2808..367c1401f 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -385,10 +385,10 @@ static const struct OamData gUnknown_0861047C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 3, .paletteNum = 0, @@ -402,10 +402,10 @@ static const struct OamData gUnknown_08610484 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 3, .paletteNum = 0, @@ -419,10 +419,10 @@ static const struct OamData gUnknown_0861048C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x16), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x16), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -436,10 +436,10 @@ static const struct OamData gUnknown_08610494 = .objMode = 1, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/battle_interface.c b/src/battle_interface.c index f2916012e..a8651f6cf 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -207,10 +207,10 @@ static const struct OamData sUnknown_0832C138 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -279,10 +279,10 @@ static const struct OamData sOamData_Healthbar = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x8), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(32x8), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -446,10 +446,10 @@ static const struct OamData sUnknown_0832C354 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -463,10 +463,10 @@ static const struct OamData sOamData_StatusSummaryBalls = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/battle_main.c b/src/battle_main.c index 2b0c5980e..0f593fef6 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -296,10 +296,10 @@ const struct OamData gOamData_831ACA8 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -313,10 +313,10 @@ const struct OamData gOamData_831ACB0 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 2, .paletteNum = 2, diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 2e13ea08b..3b8cac14f 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -282,10 +282,10 @@ static const struct OamData gOamData_861F378 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ac9fb3073..025d694e4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -733,10 +733,10 @@ static const struct OamData sOamData_MonIconOnLvlUpBox = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/battle_transition.c b/src/battle_transition.c index 786d5e869..df6180d19 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -763,10 +763,10 @@ static const struct OamData gOamData_85C8E80 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/berry_blender.c b/src/berry_blender.c index 450bcae42..c792b9b40 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -404,10 +404,10 @@ static const struct OamData sOamData_8216314 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -547,10 +547,10 @@ static const struct OamData sOamData_821640C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -616,10 +616,10 @@ static const struct OamData sOamData_8216474 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -703,10 +703,10 @@ static const struct OamData sOamData_8216514 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -761,10 +761,10 @@ static const struct OamData sOamData_8216560 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/cable_car.c b/src/cable_car.c index 420bdd30f..ab7b5726a 100755 --- a/src/cable_car.c +++ b/src/cable_car.c @@ -153,19 +153,22 @@ const struct SpritePalette gUnknown_085CDB74[] = { const struct OamData gOamData_85CDB84 = { .affineMode = ST_OAM_AFFINE_DOUBLE, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2 }; const struct OamData gOamData_85CDB8C = { .affineMode = ST_OAM_AFFINE_DOUBLE, - .shape = ST_OAM_H_RECTANGLE, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 2 }; const struct OamData gOamData_85CDB94 = { .affineMode = ST_OAM_AFFINE_DOUBLE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2 }; diff --git a/src/contest_painting.c b/src/contest_painting.c index 931deb01b..29f3c871d 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -154,10 +154,10 @@ const struct OamData gUnknown_085B0830 = .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 1, .bpp = ST_OAM_8BPP, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/credits.c b/src/credits.c index 4483e3160..1e96514b1 100644 --- a/src/credits.c +++ b/src/credits.c @@ -1056,10 +1056,10 @@ static const struct OamData gUnknown_085E703C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/data/field_event_obj/base_oam.h b/src/data/field_event_obj/base_oam.h index 543382d43..af961f492 100755 --- a/src/data/field_event_obj/base_oam.h +++ b/src/data/field_event_obj/base_oam.h @@ -1,47 +1,47 @@ const struct OamData gEventObjectBaseOam_8x8 = { - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .priority = 2 }; const struct OamData gEventObjectBaseOam_16x8 = { - .shape = 1, - .size = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 2 }; const struct OamData gEventObjectBaseOam_16x16 = { - .shape = 0, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2 }; const struct OamData gEventObjectBaseOam_32x8 = { - .shape = 1, - .size = 1, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), .priority = 2 }; const struct OamData gEventObjectBaseOam_64x32 = { - .shape = 1, - .size = 3, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 2 }; const struct OamData gEventObjectBaseOam_16x32 = { - .shape = 2, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2 }; const struct OamData gEventObjectBaseOam_32x32 = { - .shape = 0, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2 }; const struct OamData gEventObjectBaseOam_64x64 = { - .shape = 0, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2 }; diff --git a/src/decoration.c b/src/decoration.c index 0712b5d32..47e3ae18c 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -392,7 +392,9 @@ const struct SpritePalette gUnknown_085A73E0 = { }; const struct OamData Unknown_085A73E8 = { - .size = 1, .priority = 1 + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .priority = 1 }; const union AnimCmd Unknown_085A73F0[] = { diff --git a/src/easy_chat.c b/src/easy_chat.c index b03058eb9..4cc8b9c5b 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -772,10 +772,10 @@ static const struct OamData sOamData_8597D10 = { .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 3, .paletteNum = 0, @@ -798,10 +798,10 @@ static const struct OamData sUnknown_08597D30 = { .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_H_RECTANGLE, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -851,10 +851,10 @@ static const struct OamData sUnknown_08597D80 = { .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_H_RECTANGLE, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -913,10 +913,10 @@ static const struct OamData sUnknown_08597DE8 = { .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 3, .paletteNum = 0, @@ -939,10 +939,10 @@ static const struct OamData sUnknown_08597E08 = { .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_H_RECTANGLE, + .shape = SPRITE_SHAPE(32x8), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(32x8), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -955,10 +955,10 @@ static const struct OamData gUnknown_08597E10 = { .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 68728f818..00b67a5d9 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -86,10 +86,10 @@ static const struct OamData sOamData_EggHatch = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -166,10 +166,10 @@ static const struct OamData sOamData_EggShard = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 2, .paletteNum = 0, diff --git a/src/evolution_graphics.c b/src/evolution_graphics.c index bfd46978c..e36d47c2b 100644 --- a/src/evolution_graphics.c +++ b/src/evolution_graphics.c @@ -53,10 +53,10 @@ static const struct OamData sOamData_EvoSparkle = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/field_effect.c b/src/field_effect.c index ee9dcb987..825efc380 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -270,7 +270,8 @@ const u8 gUnknown_0855C190[] = INCBIN_U8("graphics/unknown/unknown_55C190.4bpp") const u8 gUnknown_0855C1B0[] = INCBIN_U8("graphics/unknown/unknown_55C1B0.4bpp"); const u8 gUnknown_0855C1D0[] = INCBIN_U8("graphics/unknown/unknown_55C1D0.4bpp"); -bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) = { +bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) = +{ FieldEffectCmd_loadtiles, FieldEffectCmd_loadfadedpal, FieldEffectCmd_loadpal, @@ -281,25 +282,48 @@ bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) = { FieldEffectCmd_loadfadedpal_callnative, }; -const struct OamData gNewGameBirchOamAttributes = {.size = 3}; -const struct OamData gOamData_855C218 = {.size = 0}; -const struct OamData gOamData_855C220 = {.size = 1}; +const struct OamData gNewGameBirchOamAttributes = +{ + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64) +}; -const struct SpriteFrameImage gNewGameBirchPicTable[] = { +const struct OamData gOamData_855C218 = +{ + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8) +}; + +const struct OamData gOamData_855C220 = +{ + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16) +}; + +const struct SpriteFrameImage gNewGameBirchPicTable[] = +{ obj_frame_tiles(gNewGameBirchPic) }; -const struct SpritePalette gNewGameBirchObjectPaletteInfo = {.data = gNewGameBirchPalette, .tag = 0x1006}; -const union AnimCmd gNewGameBirchImageAnim[] = { +const struct SpritePalette gNewGameBirchObjectPaletteInfo = +{ + .data = gNewGameBirchPalette, + .tag = 0x1006 +}; + +const union AnimCmd gNewGameBirchImageAnim[] = +{ ANIMCMD_FRAME(.imageValue = 0, .duration = 1), ANIMCMD_END }; -const union AnimCmd *const gNewGameBirchImageAnimTable[] = { +const union AnimCmd *const gNewGameBirchImageAnimTable[] = +{ gNewGameBirchImageAnim }; -const struct SpriteTemplate gNewGameBirchObjectTemplate = { +const struct SpriteTemplate gNewGameBirchObjectTemplate = +{ .tileTag = 0xFFFF, .paletteTag = 4102, .oam = &gNewGameBirchOamAttributes, @@ -309,31 +333,47 @@ const struct SpriteTemplate gNewGameBirchObjectTemplate = { .callback = SpriteCallbackDummy }; -const struct SpritePalette gFieldEffectObjectPaletteInfo4 = {.data = gFieldEffectObjectPalette4, .tag = 0x1007}; -const struct SpritePalette gFieldEffectObjectPaletteInfo5 = {.data = gFieldEffectObjectPalette5, .tag = 0x1010}; -const struct OamData gOamData_855C26C = { - .shape = 1, - .size = 2 +const struct SpritePalette gFieldEffectObjectPaletteInfo4 = +{ + .data = gFieldEffectObjectPalette4, + .tag = 0x1007 }; -const struct SpriteFrameImage gSpriteImageTable_855C274[] = { +const struct SpritePalette gFieldEffectObjectPaletteInfo5 = +{ + .data = gFieldEffectObjectPalette5, + .tag = 0x1010 +}; + +const struct OamData gOamData_855C26C = +{ + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16) +}; + +const struct SpriteFrameImage gSpriteImageTable_855C274[] = +{ obj_frame_tiles(gSpriteImage_855A970) }; -const struct SpriteFrameImage gSpriteImageTable_855C27C[] = { +const struct SpriteFrameImage gSpriteImageTable_855C27C[] = +{ obj_frame_tiles(gSpriteImage_855A9B0), obj_frame_tiles(gSpriteImage_855AA70) }; -const struct SpriteFrameImage gSpriteImageTable_855C28C[] = { +const struct SpriteFrameImage gSpriteImageTable_855C28C[] = +{ obj_frame_tiles(gSpriteImage_855AB30) }; -const struct SpriteFrameImage gSpriteImageTable_855C294[] = { +const struct SpriteFrameImage gSpriteImageTable_855C294[] = +{ {.data = gSpriteImage_855AD30, .size = 0x200} // the macro breaks down here }; -const struct Subsprite gSubspriteTable_855C29C[] = { +const struct Subsprite gSubspriteTable_855C29C[] = +{ {.x = -12, .y = -8, .priority = 2, .tileOffset = 0, .shape = 1, .size = 0}, {.x = 4, .y = -8, .priority = 2, .tileOffset = 2, .shape = 0, .size = 0}, {.x = -12, .y = 0, .priority = 2, .tileOffset = 3, .shape = 1, .size = 0}, @@ -342,7 +382,8 @@ const struct Subsprite gSubspriteTable_855C29C[] = { const struct SubspriteTable gUnknown_0855C2AC = subsprite_table(gSubspriteTable_855C29C); -const struct Subsprite gSubspriteTable_855C2B4[] = { +const struct Subsprite gSubspriteTable_855C2B4[] = +{ {.x = -32, .y = -8, .priority = 2, .tileOffset = 0, .shape = 1, .size = 1}, {.x = 0, .y = -8, .priority = 2, .tileOffset = 4, .shape = 1, .size = 1}, {.x = -32, .y = 0, .priority = 2, .tileOffset = 8, .shape = 1, .size = 1}, @@ -351,12 +392,14 @@ const struct Subsprite gSubspriteTable_855C2B4[] = { const struct SubspriteTable gUnknown_0855C2C4 = subsprite_table(gSubspriteTable_855C2B4); -const union AnimCmd gSpriteAnim_855C2CC[] = { +const union AnimCmd gSpriteAnim_855C2CC[] = +{ ANIMCMD_FRAME(.imageValue = 0, .duration = 1), ANIMCMD_JUMP(0) }; -const union AnimCmd gSpriteAnim_855C2D4[] = { +const union AnimCmd gSpriteAnim_855C2D4[] = +{ ANIMCMD_FRAME(.imageValue = 0, .duration = 16), ANIMCMD_FRAME(.imageValue = 1, .duration = 16), ANIMCMD_FRAME(.imageValue = 0, .duration = 16), @@ -368,16 +411,19 @@ const union AnimCmd gSpriteAnim_855C2D4[] = { ANIMCMD_END }; -const union AnimCmd *const gSpriteAnimTable_855C2F8[] = { +const union AnimCmd *const gSpriteAnimTable_855C2F8[] = +{ gSpriteAnim_855C2CC, gSpriteAnim_855C2D4 }; -const union AnimCmd *const gSpriteAnimTable_855C300[] = { +const union AnimCmd *const gSpriteAnimTable_855C300[] = +{ gSpriteAnim_855C2CC }; -const struct SpriteTemplate gSpriteTemplate_855C304 = { +const struct SpriteTemplate gSpriteTemplate_855C304 = +{ .tileTag = 0xFFFF, .paletteTag = 4103, .oam = &gOamData_855C218, @@ -387,7 +433,8 @@ const struct SpriteTemplate gSpriteTemplate_855C304 = { .callback = SpriteCB_PokeballGlow }; -const struct SpriteTemplate gSpriteTemplate_855C31C = { +const struct SpriteTemplate gSpriteTemplate_855C31C = +{ .tileTag = 0xFFFF, .paletteTag = 4100, .oam = &gOamData_855C220, @@ -397,7 +444,8 @@ const struct SpriteTemplate gSpriteTemplate_855C31C = { .callback = SpriteCB_PokecenterMonitor }; -const struct SpriteTemplate gSpriteTemplate_855C334 = { +const struct SpriteTemplate gSpriteTemplate_855C334 = +{ .tileTag = 0xFFFF, .paletteTag = 4112, .oam = &gOamData_855C220, @@ -407,7 +455,8 @@ const struct SpriteTemplate gSpriteTemplate_855C334 = { .callback = SpriteCB_HallOfFameMonitor }; -const struct SpriteTemplate gSpriteTemplate_855C34C = { +const struct SpriteTemplate gSpriteTemplate_855C34C = +{ .tileTag = 0xFFFF, .paletteTag = 4112, .oam = &gOamData_855C26C, @@ -417,21 +466,24 @@ const struct SpriteTemplate gSpriteTemplate_855C34C = { .callback = SpriteCB_HallOfFameMonitor }; -void (*const gUnknown_0855C364[])(struct Task *) = { +void (*const gUnknown_0855C364[])(struct Task *) = +{ PokecenterHealEffect_0, PokecenterHealEffect_1, PokecenterHealEffect_2, PokecenterHealEffect_3 }; -void (*const gUnknown_0855C374[])(struct Task *) = { +void (*const gUnknown_0855C374[])(struct Task *) = +{ HallOfFameRecordEffect_0, HallOfFameRecordEffect_1, HallOfFameRecordEffect_2, HallOfFameRecordEffect_3 }; -void (*const gUnknown_0855C384[])(struct Sprite *) = { +void (*const gUnknown_0855C384[])(struct Sprite *) = +{ PokeballGlowEffect_0, PokeballGlowEffect_1, PokeballGlowEffect_2, @@ -442,7 +494,8 @@ void (*const gUnknown_0855C384[])(struct Sprite *) = { PokeballGlowEffect_7 }; -const struct Coords16 gUnknown_0855C3A4[] = { +const struct Coords16 gUnknown_0855C3A4[] = +{ {.x = 0, .y = 0}, {.x = 6, .y = 0}, {.x = 0, .y = 4}, @@ -455,7 +508,8 @@ const u8 gUnknown_0855C3BC[] = {16, 12, 8, 0}; const u8 gUnknown_0855C3C0[] = {16, 12, 8, 0}; const u8 gUnknown_0855C3C4[] = { 0, 0, 0, 0}; -bool8 (*const gUnknown_0855C3C8[])(struct Task *) = { +bool8 (*const gUnknown_0855C3C8[])(struct Task *) = +{ sub_80B6BCC, sub_80B6C74, sub_80B6C90, @@ -465,7 +519,8 @@ bool8 (*const gUnknown_0855C3C8[])(struct Task *) = { sub_80B6E18, }; -bool8 (*const gUnknown_0855C3E4[])(struct Task *) = { +bool8 (*const gUnknown_0855C3E4[])(struct Task *) = +{ sub_80B6EC0, sub_80B6EE0, sub_80B6F50, @@ -474,7 +529,8 @@ bool8 (*const gUnknown_0855C3E4[])(struct Task *) = { sub_80B6FA8, }; -bool8 (*const gUnknown_0855C3FC[])(struct Task *) = { +bool8 (*const gUnknown_0855C3FC[])(struct Task *) = +{ sub_80B7114, sub_80B7190, sub_80B71D0, @@ -484,7 +540,8 @@ bool8 (*const gUnknown_0855C3FC[])(struct Task *) = { sub_80B72F4, }; -bool8 (*const gUnknown_0855C418[])(struct Task *, struct EventObject *) = { +bool8 (*const gUnknown_0855C418[])(struct Task *, struct EventObject *) = +{ sub_80B73D0, waterfall_1_do_anim_probably, waterfall_2_wait_anim_finish_probably, @@ -492,13 +549,15 @@ bool8 (*const gUnknown_0855C418[])(struct Task *, struct EventObject *) = { sub_80B7478, }; -bool8 (*const gUnknown_0855C42C[])(struct Task *) = { +bool8 (*const gUnknown_0855C42C[])(struct Task *) = +{ dive_1_lock, dive_2_unknown, dive_3_unknown, }; -bool8 (*const gUnknown_0855C438[])(struct Task *, struct EventObject *, struct Sprite *) = { +bool8 (*const gUnknown_0855C438[])(struct Task *, struct EventObject *, struct Sprite *) = +{ sub_80B764C, sub_80B7684, sub_80B76B8, @@ -507,14 +566,16 @@ bool8 (*const gUnknown_0855C438[])(struct Task *, struct EventObject *, struct S sub_80B7814, }; -bool8 (*const gUnknown_0855C450[])(struct Task *, struct EventObject *, struct Sprite *) = { +bool8 (*const gUnknown_0855C450[])(struct Task *, struct EventObject *, struct Sprite *) = +{ sub_80B78EC, sub_80B791C, sub_80B7968, sub_80B79BC, }; -bool8 (*const gUnknown_0855C460[])(struct Task *, struct EventObject *, struct Sprite *) = { +bool8 (*const gUnknown_0855C460[])(struct Task *, struct EventObject *, struct Sprite *) = +{ sub_80B7AE8, sub_80B7B18, sub_80B7B94, @@ -522,7 +583,8 @@ bool8 (*const gUnknown_0855C460[])(struct Task *, struct EventObject *, struct S sub_80B7BF4, }; -void (*const gEscapeRopeFieldEffectFuncs[])(struct Task *) = { +void (*const gEscapeRopeFieldEffectFuncs[])(struct Task *) = +{ EscapeRopeFieldEffect_Step0, EscapeRopeFieldEffect_Step1, }; diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c index be8fdc6cb..6ec83f1a0 100644 --- a/src/field_weather_effect.c +++ b/src/field_weather_effect.c @@ -48,10 +48,10 @@ static const struct OamData gOamData_839A9DC = .objMode = 1, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 3, .paletteNum = 0, @@ -577,10 +577,10 @@ static const struct OamData gOamData_839AA68 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 2, + .shape = SPRITE_SHAPE(16x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(16x32), .tileNum = 0, .priority = 1, .paletteNum = 2, @@ -648,10 +648,10 @@ static const struct OamData gOamData_839AAD4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -704,10 +704,10 @@ static const struct OamData gOamData_839AB2C = .objMode = 1, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -1517,10 +1517,10 @@ const struct OamData gOamData_839ABB8 = .objMode = 1, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 15, @@ -1754,10 +1754,10 @@ const struct OamData gOamData_839ABF0 = .objMode = 1, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -1953,10 +1953,10 @@ const struct OamData gOamData_839AC1C = .objMode = 1, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index a715608c5..b1f4a6368 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -132,10 +132,10 @@ static const struct OamData sOamData_CutGrass = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 1, .priority = 1, .paletteNum = 1, diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index d4d6075f3..5d1920aac 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -93,8 +93,8 @@ static const struct OamData gOamData_858E4D8 = .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -246,8 +246,8 @@ static const struct OamData gOamData_858E658 = .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_V_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2, }; diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 2c31dba01..8eba90d96 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -178,10 +178,10 @@ static const struct OamData sOamData_85E53FC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/intro.c b/src/intro.c index 84127cf64..e97fbedb0 100644 --- a/src/intro.c +++ b/src/intro.c @@ -145,10 +145,10 @@ static const struct OamData gUnknown_085E4A94 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -214,10 +214,10 @@ static const struct OamData gUnknown_085E4B28 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -251,10 +251,10 @@ static const struct OamData gUnknown_085E4B58 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -307,10 +307,10 @@ static const struct OamData gUnknown_085E4BBC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -356,10 +356,10 @@ static const struct OamData gUnknown_085E4C14 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -441,10 +441,10 @@ static const struct OamData gUnknown_085E4CF0 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 2, + .shape = SPRITE_SHAPE(16x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(16x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -481,10 +481,10 @@ static const struct OamData gUnknown_085E4D2C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -572,10 +572,10 @@ static const struct OamData gUnknown_085E4DD4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -588,10 +588,10 @@ static const struct OamData gUnknown_085E4DDC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -604,10 +604,10 @@ static const struct OamData gUnknown_085E4DE4 = .objMode = 1, .mosaic = 0, .bpp = 0, - .shape = 2, + .shape = SPRITE_SHAPE(32x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(32x64), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -804,10 +804,10 @@ static const struct OamData gUnknown_085E4FB0 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -857,10 +857,10 @@ static const struct OamData gUnknown_085E501C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/intro_credits_graphics.c b/src/intro_credits_graphics.c index b98708324..29ee2067f 100644 --- a/src/intro_credits_graphics.c +++ b/src/intro_credits_graphics.c @@ -57,43 +57,51 @@ static void nullsub_65(struct Sprite *sprite); static void sub_817B7C4(struct Sprite *sprite); static void nullsub_66(struct Sprite *sprite); -static const struct SpriteTemplate gUnknown_085F504C = { +static const struct SpriteTemplate gUnknown_085F504C = +{ 2000, 0xFFFF, &gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_817B62C }; -static const struct CompressedSpriteSheet gUnknown_085F5064[] = { +static const struct CompressedSpriteSheet gUnknown_085F5064[] = +{ { gUnknown_085F16A8, 0x400, 2000 }, { NULL } }; -static const union AnimCmd gUnknown_085F5074[] = { +static const union AnimCmd gUnknown_085F5074[] = +{ ANIMCMD_FRAME( 0, 30), ANIMCMD_END }; -static const union AnimCmd gUnknown_085F507C[] = { +static const union AnimCmd gUnknown_085F507C[] = +{ ANIMCMD_FRAME(16, 30), ANIMCMD_END }; -static const union AnimCmd gUnknown_085F5084[] = { +static const union AnimCmd gUnknown_085F5084[] = +{ ANIMCMD_FRAME(20, 30), ANIMCMD_END }; -static const union AnimCmd gUnknown_085F508C[] = { +static const union AnimCmd gUnknown_085F508C[] = +{ ANIMCMD_FRAME(22, 30), ANIMCMD_END }; -static const union AnimCmd *const gUnknown_085F5094[] = { +static const union AnimCmd *const gUnknown_085F5094[] = +{ gUnknown_085F5074, gUnknown_085F507C, gUnknown_085F5084, gUnknown_085F508C }; -static const struct IntroCreditsSpriteMetadata gUnknown_085F50A4[] = { +static const struct IntroCreditsSpriteMetadata gUnknown_085F50A4[] = +{ { 0, ST_OAM_SQUARE, 2, 72, 32, 100, 0xc00 }, { 0, ST_OAM_SQUARE, 2, 158, 32, 100, 0xc00 }, { 1, ST_OAM_SQUARE, 1, 192, 40, 101, 0x800 }, @@ -105,33 +113,39 @@ static const struct IntroCreditsSpriteMetadata gUnknown_085F50A4[] = { { 3, ST_OAM_H_RECTANGLE, 0, 240, 46, 103, 0x100 }, }; -static const struct CompressedSpriteSheet gUnknown_085F50EC[] = { +static const struct CompressedSpriteSheet gUnknown_085F50EC[] = +{ { gIntro2TreeTiles, 0x400, 2000 }, { NULL } }; -static const union AnimCmd gUnknown_085F50FC[] = { +static const union AnimCmd gUnknown_085F50FC[] = +{ ANIMCMD_FRAME( 0, 30), ANIMCMD_END }; -static const union AnimCmd gUnknown_085F5104[] = { +static const union AnimCmd gUnknown_085F5104[] = +{ ANIMCMD_FRAME(16, 30), ANIMCMD_END }; -static const union AnimCmd gUnknown_085F510C[] = { +static const union AnimCmd gUnknown_085F510C[] = +{ ANIMCMD_FRAME(24, 30), ANIMCMD_END }; -static const union AnimCmd *const gUnknown_085F5114[] = { +static const union AnimCmd *const gUnknown_085F5114[] = +{ gUnknown_085F50FC, gUnknown_085F5104, gUnknown_085F510C }; -static const struct IntroCreditsSpriteMetadata gUnknown_085F5120[] = { +static const struct IntroCreditsSpriteMetadata gUnknown_085F5120[] = +{ { 0, ST_OAM_SQUARE, 2, 16, 88, 100, 0x2000 }, { 0, ST_OAM_SQUARE, 2, 80, 88, 100, 0x2000 }, { 0, ST_OAM_SQUARE, 2, 144, 88, 100, 0x2000 }, @@ -146,21 +160,25 @@ static const struct IntroCreditsSpriteMetadata gUnknown_085F5120[] = { { 2, ST_OAM_V_RECTANGLE, 2, 248, 88, 102, 0x800 }, }; -static const struct CompressedSpriteSheet gUnknown_085F5180[] = { +static const struct CompressedSpriteSheet gUnknown_085F5180[] = +{ { gIntro2NightTiles, 0x400, 2000 }, { NULL } }; -static const union AnimCmd gUnknown_085F5190[] = { +static const union AnimCmd gUnknown_085F5190[] = +{ ANIMCMD_FRAME(0, 30), ANIMCMD_END }; -static const union AnimCmd *const gUnknown_085F5198[] = { +static const union AnimCmd *const gUnknown_085F5198[] = +{ gUnknown_085F5190 }; -static const struct IntroCreditsSpriteMetadata gUnknown_085F519C[] = { +static const struct IntroCreditsSpriteMetadata gUnknown_085F519C[] = +{ { 0, ST_OAM_SQUARE, 2, 24, 88, 100, 0x1000 }, { 0, ST_OAM_SQUARE, 2, 64, 88, 100, 0x1000 }, { 0, ST_OAM_SQUARE, 2, 104, 88, 100, 0x1000 }, @@ -169,11 +187,16 @@ static const struct IntroCreditsSpriteMetadata gUnknown_085F519C[] = { { 0, ST_OAM_SQUARE, 2, 224, 88, 100, 0x1000 }, }; -static const struct OamData gOamData_85F51CC = { - .y = 160, .shape = ST_OAM_SQUARE, .size = 3, .priority = 1 +static const struct OamData gOamData_85F51CC = +{ + .y = 160, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), + .priority = 1 }; -static const union AnimCmd gUnknown_085F51D4[] = { +static const union AnimCmd gUnknown_085F51D4[] = +{ ANIMCMD_FRAME( 0, 8), ANIMCMD_FRAME( 64, 8), ANIMCMD_FRAME(128, 8), @@ -181,23 +204,31 @@ static const union AnimCmd gUnknown_085F51D4[] = { ANIMCMD_JUMP(0) }; -static const union AnimCmd *const gUnknown_085F51E8[] = { +static const union AnimCmd *const gUnknown_085F51E8[] = +{ gUnknown_085F51D4 }; -static const struct SpriteTemplate gUnknown_085F51EC = { +static const struct SpriteTemplate gUnknown_085F51EC = +{ 1002, 1002, &gOamData_85F51CC, gUnknown_085F51E8, NULL, gDummySpriteAffineAnimTable, nullsub_65 }; -static const struct SpriteTemplate gUnknown_085F5204 = { +static const struct SpriteTemplate gUnknown_085F5204 = +{ 1003, 1003, &gOamData_85F51CC, gUnknown_085F51E8, NULL, gDummySpriteAffineAnimTable, nullsub_65 }; -static const struct OamData gUnknown_085F521C = { - .y = 160, .shape = ST_OAM_H_RECTANGLE, .size = 3, .priority = 1 +static const struct OamData gUnknown_085F521C = +{ + .y = 160, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), + .priority = 1 }; -static const union AnimCmd gUnknown_085F5224[] = { +static const union AnimCmd gUnknown_085F5224[] = +{ ANIMCMD_FRAME( 0, 8), ANIMCMD_FRAME( 32, 8), ANIMCMD_FRAME( 64, 8), @@ -205,71 +236,89 @@ static const union AnimCmd gUnknown_085F5224[] = { ANIMCMD_JUMP(0) }; -static const union AnimCmd *const gUnknown_085F5238[] = { +static const union AnimCmd *const gUnknown_085F5238[] = +{ gUnknown_085F5224 }; -static const struct SpriteTemplate gUnknown_085F523C = { +static const struct SpriteTemplate gUnknown_085F523C = +{ 1001, 1002, &gUnknown_085F521C, gUnknown_085F5238, NULL, gDummySpriteAffineAnimTable, sub_817B7C4 }; -static const struct SpriteTemplate gUnknown_085F5254 = { +static const struct SpriteTemplate gUnknown_085F5254 = +{ 1001, 1003, &gUnknown_085F521C, gUnknown_085F5238, NULL, gDummySpriteAffineAnimTable, sub_817B7C4 }; -static const struct OamData gUnknown_085F526C = { - .y = 160, .shape = ST_OAM_SQUARE, .size = 3, .priority = 1 +static const struct OamData gUnknown_085F526C = +{ + .y = 160, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), + .priority = 1 }; -static const union AnimCmd gUnknown_085F5274[] = { +static const union AnimCmd gUnknown_085F5274[] = +{ ANIMCMD_FRAME( 0, 16), ANIMCMD_END }; -static const union AnimCmd gUnknown_085F527C[] = { +static const union AnimCmd gUnknown_085F527C[] = +{ ANIMCMD_FRAME( 64, 16), ANIMCMD_END }; -static const union AnimCmd *const gUnknown_085F5284[] = { +static const union AnimCmd *const gUnknown_085F5284[] = +{ gUnknown_085F5274, gUnknown_085F527C }; -static const struct SpriteTemplate gUnknown_085F528C = { +static const struct SpriteTemplate gUnknown_085F528C = +{ 1004, 1004, &gUnknown_085F526C, gUnknown_085F5284, NULL, gDummySpriteAffineAnimTable, nullsub_66 }; -static const struct SpriteTemplate gUnknown_085F52A4 = { +static const struct SpriteTemplate gUnknown_085F52A4 = +{ 1005, 1005, &gUnknown_085F526C, gUnknown_085F5284, NULL, gDummySpriteAffineAnimTable, nullsub_66 }; -const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet[] = { +const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet[] = +{ { gIntro2BrendanNoTurnGfx, 0x2000, 1002 }, { NULL } }; -const struct CompressedSpriteSheet gIntro2MaySpriteSheet[] = { +const struct CompressedSpriteSheet gIntro2MaySpriteSheet[] = +{ { gIntro2MayNoTurnGfx, 0x2000, 1003 }, { NULL } }; -const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet[] = { +const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet[] = +{ { gIntro2BicycleTiles, 0x1000, 1001 }, { NULL } }; -static const struct CompressedSpriteSheet gUnknown_085F52EC[] = { +static const struct CompressedSpriteSheet gUnknown_085F52EC[] = +{ { gIntro2FlygonGfx, 0x1000, 1004 }, { NULL } }; -const struct CompressedSpriteSheet gIntro2FlygonSpriteSheet[] = { +const struct CompressedSpriteSheet gIntro2FlygonSpriteSheet[] = +{ { gIntro2FlygonGfx, 0x1000, 1005 }, { NULL } }; -const struct SpritePalette gIntroBikeAndFlygonPalette[] = { +const struct SpritePalette gIntroBikeAndFlygonPalette[] = +{ { gIntro2BrendanNoTurnPal, 1002 }, { gIntro2BrendanNoTurnPal, 1003 }, { gIntro2FlygonPal, 1004 }, @@ -277,32 +326,38 @@ const struct SpritePalette gIntroBikeAndFlygonPalette[] = { { NULL } }; -const struct CompressedSpriteSheet gUnknown_085F5334[] = { +const struct CompressedSpriteSheet gUnknown_085F5334[] = +{ { gIntro2BrendanTiles, 0x3800, 1002 }, { NULL } }; -const struct CompressedSpriteSheet gUnknown_085F5344[] = { +const struct CompressedSpriteSheet gUnknown_085F5344[] = +{ { gIntro2MayTiles, 0x3800, 1003 }, { NULL } }; -const struct CompressedSpriteSheet gUnknown_085F5354[] = { +const struct CompressedSpriteSheet gUnknown_085F5354[] = +{ { gIntro2BicycleTiles, 0x1000, 1001 }, { NULL } }; -static const struct CompressedSpriteSheet gUnknown_085F5364[] = { +static const struct CompressedSpriteSheet gUnknown_085F5364[] = +{ { gIntro2LatiosTiles, 0x1000, 1004 }, { NULL } }; -static const struct CompressedSpriteSheet gUnknown_085F5374[] = { +static const struct CompressedSpriteSheet gUnknown_085F5374[] = +{ { gIntro2LatiasTiles, 0x1000, 1005 }, { NULL } }; -const struct SpritePalette gUnknown_085F5384[] = { +const struct SpritePalette gUnknown_085F5384[] = +{ { gIntro2BrendanPalette, 1002 }, { gIntro2MayPalette, 1003 }, { gIntro2LatiosPalette, 1004 }, @@ -310,12 +365,14 @@ const struct SpritePalette gUnknown_085F5384[] = { { NULL } }; -const struct CompressedSpriteSheet gUnknown_085F53AC[] = { +const struct CompressedSpriteSheet gUnknown_085F53AC[] = +{ { gIntro2BrendanTiles, 0x2000, 1002}, { NULL } }; -const struct CompressedSpriteSheet gUnknown_085F53BC[] = { +const struct CompressedSpriteSheet gUnknown_085F53BC[] = +{ { gIntro2MayTiles, 0x2000, 1003}, { NULL } }; diff --git a/src/item_icon.c b/src/item_icon.c index e9379dbba..7bf1a29ca 100644 --- a/src/item_icon.c +++ b/src/item_icon.c @@ -20,10 +20,10 @@ static const struct OamData sOamData_ItemIcon = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 2, diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index 669195b33..83ed3abfe 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -36,10 +36,10 @@ static const struct OamData sOamData_857FAA4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -146,10 +146,10 @@ static const struct OamData sOamData_857FB64 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 4, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -217,10 +217,10 @@ static const struct OamData sOamData_857FBC8 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 7, @@ -234,10 +234,10 @@ static const struct OamData sOamData_857FBD0 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 7, @@ -374,10 +374,10 @@ static const struct OamData sOamData_857FDFC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/link_rfu.c b/src/link_rfu.c index d80ff2ae9..a557397f0 100644 --- a/src/link_rfu.c +++ b/src/link_rfu.c @@ -155,7 +155,8 @@ const u8 sWireless_RSEtoASCIITable[] = { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00 }; const struct OamData sWirelessStatusIndicatorOamData = { - .size = 1 + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16) }; static const union AnimCmd sWirelessStatusIndicatorAnim0[] = { // 3 bars diff --git a/src/list_menu.c b/src/list_menu.c index 51d7dcb15..a5786754c 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -129,10 +129,10 @@ static const struct OamData sOamData_ScrollArrowIndicator = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -186,8 +186,8 @@ static const struct Subsprite sSubsprite_RedOutline1 = { .x = 0, .y = 0, - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .tileOffset = 0, .priority = 0, }; @@ -196,8 +196,8 @@ static const struct Subsprite sSubsprite_RedOutline2 = { .x = 0, .y = 0, - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .tileOffset = 1, .priority = 0, }; @@ -206,8 +206,8 @@ static const struct Subsprite sSubsprite_RedOutline3 = { .x = 0, .y = 0, - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .tileOffset = 2, .priority = 0, }; @@ -216,8 +216,8 @@ static const struct Subsprite sSubsprite_RedOutline4 = { .x = 0, .y = 0, - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .tileOffset = 3, .priority = 0, }; @@ -226,8 +226,8 @@ static const struct Subsprite sSubsprite_RedOutline5 = { .x = 0, .y = 0, - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .tileOffset = 4, .priority = 0, }; @@ -236,8 +236,8 @@ static const struct Subsprite sSubsprite_RedOutline6 = { .x = 0, .y = 0, - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .tileOffset = 5, .priority = 0, }; @@ -246,8 +246,8 @@ static const struct Subsprite sSubsprite_RedOutline7 = { .x = 0, .y = 0, - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .tileOffset = 6, .priority = 0, }; @@ -256,8 +256,8 @@ static const struct Subsprite sSubsprite_RedOutline8 = { .x = 0, .y = 0, - .shape = 0, - .size = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .tileOffset = 7, .priority = 0, }; @@ -269,10 +269,10 @@ static const struct OamData sOamData_RedArrowCursor = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 3fb5ca40d..b5745d812 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -37,10 +37,10 @@ static const struct OamData sOamData_859F4E8 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 4f5834db1..898180df4 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -142,10 +142,10 @@ static const struct OamData gOamData_8617DF4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 3, @@ -192,10 +192,10 @@ static const struct OamData sCeilingCrumble2OamData = .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -230,10 +230,10 @@ static const struct OamData sCeilingCrumble1OamData = .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/mon_markings.c b/src/mon_markings.c index 48f0f5ecb..f8b128045 100644 --- a/src/mon_markings.c +++ b/src/mon_markings.c @@ -30,10 +30,10 @@ static const struct OamData gUnknown_0859EE7C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -47,10 +47,10 @@ static const struct OamData gUnknown_0859EE84 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -156,10 +156,10 @@ static const struct OamData gUnknown_0859EF1C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x8), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(32x8), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/money.c b/src/money.c index 4ff8086ea..7b95a75ab 100644 --- a/src/money.c +++ b/src/money.c @@ -24,10 +24,10 @@ static const struct OamData sOamData_MoneyLabel = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x16), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x16), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/naming_screen.c b/src/naming_screen.c index 22bbb84d7..75b7c8566 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1910,10 +1910,10 @@ const struct OamData gOamData_858BFEC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -1927,10 +1927,10 @@ const struct OamData gOamData_858BFF4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -1944,10 +1944,10 @@ const struct OamData gOamData_858BFFC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x16), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x16), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/party_menu.c b/src/party_menu.c index ec35fc068..bedd0ce57 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -1175,10 +1175,10 @@ static const struct OamData gOamData_83765EC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -1231,10 +1231,10 @@ static const struct OamData sOamData_8615ED8 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -1287,10 +1287,10 @@ static const struct OamData sOamData_8615F20 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -1366,10 +1366,10 @@ static const struct OamData sOamData_8615F90 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x8), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(32x8), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/pokeball.c b/src/pokeball.c index d4605ccd8..793609ec2 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -99,10 +99,10 @@ static const struct OamData sBallOamData = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 2, .paletteNum = 0, diff --git a/src/pokeblock.c b/src/pokeblock.c index 2682754aa..ee18d0251 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -222,10 +222,10 @@ static const struct OamData sOamData_PokeblockCase = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 2, .paletteNum = 0, diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index da803f454..59ba1b4dc 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -463,10 +463,10 @@ static const struct OamData sThrownPokeblockOamData = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/pokedex.c b/src/pokedex.c index 4bf8dff6d..cceb50ba1 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -248,10 +248,10 @@ static const struct OamData sOamData_855CFE4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -265,10 +265,10 @@ static const struct OamData sOamData_855CFEC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = ST_OAM_H_RECTANGLE, + .shape = SPRITE_SHAPE(16x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(16x8), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -282,10 +282,10 @@ static const struct OamData sOamData_855CFF4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = ST_OAM_H_RECTANGLE, + .shape = SPRITE_SHAPE(32x16), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x16), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -299,10 +299,10 @@ static const struct OamData sOamData_855CFFC = .objMode = 2, .mosaic = 0, .bpp = 0, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -316,10 +316,10 @@ static const struct OamData sOamData_855D004 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = ST_OAM_H_RECTANGLE, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -333,10 +333,10 @@ static const struct OamData sOamData_855D00C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = ST_OAM_V_RECTANGLE, + .shape = SPRITE_SHAPE(8x16), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x16), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index eeea3c210..00fe9ab82 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -83,14 +83,21 @@ static const u32 sAreaGlow_Gfx[] = INCBIN_U32("graphics/pokedex/area_glow.4bpp.l static const u16 sSpeciesHiddenFromAreaScreen[] = { SPECIES_WYNAUT }; -static const u16 sMovingRegionMapSections[3] = { MAPSEC_MARINE_CAVE, MAPSEC_UNDERWATER_MARINE_CAVE, MAPSEC_TERRA_CAVE }; +static const u16 sMovingRegionMapSections[3] = +{ + MAPSEC_MARINE_CAVE, + MAPSEC_UNDERWATER_MARINE_CAVE, + MAPSEC_TERRA_CAVE +}; -static const u16 sFeebasData[][3] = { +static const u16 sFeebasData[][3] = +{ {SPECIES_FEEBAS, MAP_GROUP(ROUTE119), MAP_NUM(ROUTE119)}, {NUM_SPECIES} }; -static const u16 sLandmarkData[][2] = { +static const u16 sLandmarkData[][2] = +{ {MAPSEC_SKY_PILLAR, FLAG_LANDMARK_SKY_PILLAR}, {MAPSEC_SEAFLOOR_CAVERN, FLAG_LANDMARK_SEAFLOOR_CAVERN}, {MAPSEC_ALTERING_CAVE_2, FLAG_LANDMARK_ALTERING_CAVE}, @@ -100,7 +107,8 @@ static const u16 sLandmarkData[][2] = { {MAPSEC_NONE} }; -static const u8 sAreaGlowTilemapMapping[] = { +static const u8 sAreaGlowTilemapMapping[] = +{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x11, 0x20, 0x02, 0x03, 0x27, 0x2d, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x12, 0x21, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x2a, 0x2e, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, @@ -119,7 +127,8 @@ static const u8 sAreaGlowTilemapMapping[] = { 0x1f, 0x22, 0x25, 0x03, 0x28, 0x2d, 0x2c, 0x07, 0x2b, 0x2e, 0x2f, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, }; -static const struct UnkStruct_1C4D70 sUnknown_085B4018 = { +static const struct UnkStruct_1C4D70 sUnknown_085B4018 = +{ .bg = 3, .unk2 = 0, .unk10 = 0, @@ -127,21 +136,26 @@ static const struct UnkStruct_1C4D70 sUnknown_085B4018 = { }; static const u8 sAreaMarkerTiles[]; -static const struct SpriteSheet sAreaMarkerSpriteSheet = { +static const struct SpriteSheet sAreaMarkerSpriteSheet = +{ sAreaMarkerTiles, 0x80, 2 }; static const u16 sAreaMarkerPalette[]; -static const struct SpritePalette sAreaMarkerSpritePalette = { +static const struct SpritePalette sAreaMarkerSpritePalette = +{ sAreaMarkerPalette, 2 }; -static const struct OamData sAreaMarkerOamData = { - .size = 1, +static const struct OamData sAreaMarkerOamData = +{ + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 1 }; -static const struct SpriteTemplate sAreaMarkerSpriteTemplate = { +static const struct SpriteTemplate sAreaMarkerSpriteTemplate = +{ 2, 2, &sAreaMarkerOamData, @@ -154,16 +168,20 @@ static const struct SpriteTemplate sAreaMarkerSpriteTemplate = { static const u16 sAreaMarkerPalette[] = INCBIN_U16("graphics/pokedex/area_marker.gbapal"); static const u8 sAreaMarkerTiles[] = INCBIN_U8("graphics/pokedex/area_marker.4bpp"); -static const struct SpritePalette sAreaUnknownSpritePalette = { +static const struct SpritePalette sAreaUnknownSpritePalette = +{ gPokedexAreaScreenAreaUnknown_Pal, 3 }; -static const struct OamData sAreaUnknownOamData = { - .size = 2, +static const struct OamData sAreaUnknownOamData = +{ + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 1 }; -static const struct SpriteTemplate sAreaUnknownSpriteTemplate = { +static const struct SpriteTemplate sAreaUnknownSpriteTemplate = +{ 3, 3, &sAreaUnknownOamData, diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c index c385141d5..8ca0c8d6e 100755 --- a/src/pokedex_cry_screen.c +++ b/src/pokedex_cry_screen.c @@ -54,7 +54,8 @@ const u16 gUnknown_085B8378[] = INCBIN_U16("graphics/pokedex/cry_meter_map.bin") const u16 gUnknown_085B8418[] = INCBIN_U16("graphics/pokedex/cry_meter.gbapal"); const u8 gUnknown_085B8438[] = INCBIN_U8("graphics/pokedex/cry_meter.4bpp.lz"); -const u16 gUnknown_085B8770[][72] = { +const u16 gUnknown_085B8770[][72] = +{ { 0x0000, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, 0x0400, 0x0404, 0x0408, 0x040C, 0x0410, 0x0414, 0x0418, 0x041C, @@ -142,7 +143,8 @@ const u16 gUnknown_085B8BF0[] = INCBIN_U16("graphics/pokedex/85B8C10.gbapal"); const u8 gUnknown_085B8C10[] = INCBIN_U8("graphics/pokedex/85B8C10.4bpp"); const u8 gUnknown_085B8C30[] = {0xF0, 0x0F}; -const u8 gUnknown_085B8C32[][16] = { +const u8 gUnknown_085B8C32[][16] = +{ { 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F @@ -152,23 +154,28 @@ const u8 gUnknown_085B8C32[][16] = { } }; -const union AnimCmd gSpriteAnim_85B8C54[] = { +const union AnimCmd gSpriteAnim_85B8C54[] = +{ ANIMCMD_FRAME(0, 30), ANIMCMD_END }; -const union AnimCmd *const gSpriteAnimTable_85B8C5C[] = { +const union AnimCmd *const gSpriteAnimTable_85B8C5C[] = +{ gSpriteAnim_85B8C54 }; -const struct OamData gOamData_85B8C60 = { +const struct OamData gOamData_85B8C60 = +{ .y = 160, .affineMode = ST_OAM_AFFINE_NORMAL, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 1 }; -const struct SpriteTemplate gUnknown_085B8C68 = { +const struct SpriteTemplate gUnknown_085B8C68 = +{ 0x2000, 0x2000, &gOamData_85B8C60, @@ -178,12 +185,14 @@ const struct SpriteTemplate gUnknown_085B8C68 = { sub_814596C }; -const struct SpriteSheet gCryMeterNeedleSpriteSheets[] = { +const struct SpriteSheet gCryMeterNeedleSpriteSheets[] = +{ {CryMeterNeedleTiles, 0x800, 0x2000}, {} }; -const struct SpritePalette gCryMeterNeedleSpritePalettes[] = { +const struct SpritePalette gCryMeterNeedleSpritePalettes[] = +{ {CryMeterNeedlePalette, 0x2000}, {} }; diff --git a/src/pokemon.c b/src/pokemon.c index a984abbb9..1ee9c4cff 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2462,10 +2462,10 @@ static const struct OamData sOamData_8329F20 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index ecb8f4950..4ff182a0e 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -931,10 +931,10 @@ const struct OamData sMonIconOamData = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index c5d40877b..30f5af14c 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -969,10 +969,10 @@ static const struct OamData sOamData_857286C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -986,10 +986,10 @@ static const struct OamData sOamData_8572874 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(16x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(16x8), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -1062,10 +1062,10 @@ static const struct OamData sOamData_85728EC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -1467,8 +1467,8 @@ static const struct SpriteSheet gUnknown_0857B080 = {gPCGfx_Arrow, 0x80, 6}; static const struct OamData gOamData_83BB298 = { - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2 }; @@ -1503,7 +1503,8 @@ static const struct SpriteTemplate gSpriteTemplate_857B0A8 = static const struct OamData gOamData_83BB2D0 = { - .shape = ST_OAM_V_RECTANGLE, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 2 }; @@ -2004,7 +2005,7 @@ static void sub_80C7958(u8 curBox) u8 spriteId; struct SpriteTemplate template; struct OamData oamData = {}; - oamData.size = 3; + oamData.size = SPRITE_SIZE(64x64); oamData.paletteNum = 1; template = (struct SpriteTemplate){ 0, 0, &oamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy @@ -2017,8 +2018,8 @@ static void sub_80C7958(u8 curBox) spriteId = CreateSprite(&template, 160, 96, 0); gUnknown_02039D04->unk_0000 = gSprites + spriteId; - oamData.shape = ST_OAM_V_RECTANGLE; - oamData.size = 1; + oamData.shape = SPRITE_SHAPE(8x32); + oamData.size = SPRITE_SIZE(8x32); template.tileTag = gUnknown_02039D04->unk_0240 + 1; template.anims = sSpriteAnimTable_8571710; for (i = 0; i < 4; i++) @@ -8490,12 +8491,14 @@ static void sub_80CFC14(void) static const struct OamData sOamData_857BA0C = { - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 1, }; static const struct OamData sOamData_857BA14 = { - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 1, }; @@ -9358,10 +9361,10 @@ static const struct OamData sOamData_857BBA4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 3bbc832a0..3a5b06d45 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -710,10 +710,10 @@ static const struct OamData sOamData_MoveTypes = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x16), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x16), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -886,10 +886,10 @@ static const struct OamData gOamData_861CFF4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -975,10 +975,10 @@ static const struct OamData sOamData_StatusCondition = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x8), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(32x8), .tileNum = 0, .priority = 3, .paletteNum = 0, diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c index 00a73a0a2..e2497a8dc 100644 --- a/src/rayquaza_scene.c +++ b/src/rayquaza_scene.c @@ -105,10 +105,10 @@ static const struct OamData sOamData_862A6BC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -122,10 +122,10 @@ static const struct OamData sOamData_862A6C4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -139,10 +139,10 @@ static const struct OamData sOamData_862A6CC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -156,10 +156,10 @@ static const struct OamData sOamData_862A6D4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x16), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x16), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -173,10 +173,10 @@ static const struct OamData sOamData_862A6DC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(16x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(16x8), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -190,10 +190,10 @@ static const struct OamData sOamData_862A6E4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 2, + .shape = SPRITE_SHAPE(16x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(16x32), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -207,10 +207,10 @@ static const struct OamData sOamData_862A6EC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 2, .paletteNum = 0, @@ -224,10 +224,10 @@ static const struct OamData sOamData_862A6F4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x8), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(32x8), .tileNum = 0, .priority = 2, .paletteNum = 0, diff --git a/src/region_map.c b/src/region_map.c index 8dadc78a7..a8b3fc3b2 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -106,7 +106,8 @@ static const u8 sRegionMap_MapSectionLayout[] = INCBIN_U8("graphics/pokenav/regi #include "data/region_map/region_map_entries.h" -static const u16 sRegionMap_SpecialPlaceLocations[][2] = { +static const u16 sRegionMap_SpecialPlaceLocations[][2] = +{ {MAPSEC_UNDERWATER_TERRA_CAVE, MAPSEC_ROUTE_105}, {MAPSEC_UNDERWATER_124, MAPSEC_ROUTE_124}, {MAPSEC_UNDERWATER_UNK1, MAPSEC_ROUTE_129}, @@ -133,13 +134,15 @@ static const u16 sRegionMap_SpecialPlaceLocations[][2] = { {MAPSEC_NONE, MAPSEC_NONE} }; -static const u16 sRegionMap_MarineCaveMapSecIds[] = { +static const u16 sRegionMap_MarineCaveMapSecIds[] = +{ MAPSEC_MARINE_CAVE, MAPSEC_UNDERWATER_MARINE_CAVE, MAPSEC_UNDERWATER_MARINE_CAVE }; -static const u16 sTerraCaveMapSectionIds[] = { +static const u16 sTerraCaveMapSectionIds[] = +{ MAPSEC_ROUTE_114, MAPSEC_ROUTE_114, MAPSEC_ROUTE_115, @@ -158,7 +161,8 @@ static const u16 sTerraCaveMapSectionIds[] = { MAPSEC_ROUTE_129 }; -static const struct UCoords16 sTerraCaveLocationCoords[] = { +static const struct UCoords16 sTerraCaveLocationCoords[] = +{ {0x00, 0x0a}, {0x00, 0x0c}, {0x18, 0x03}, @@ -169,21 +173,27 @@ static const struct UCoords16 sTerraCaveLocationCoords[] = { {0x18, 0x0a} }; -static const u8 sRegionMap_MapSecAquaHideoutOld[] = { +static const u8 sRegionMap_MapSecAquaHideoutOld[] = +{ MAPSEC_AQUA_HIDEOUT_OLD }; -static const struct OamData sRegionMapCursorOam = { - .size = 1, .priority = 1 +static const struct OamData sRegionMapCursorOam = +{ + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .priority = 1 }; -static const union AnimCmd sRegionMapCursorAnim1[] = { +static const union AnimCmd sRegionMapCursorAnim1[] = +{ ANIMCMD_FRAME(0, 20), ANIMCMD_FRAME(4, 20), ANIMCMD_JUMP(0) }; -static const union AnimCmd sRegionMapCursorAnim2[] = { +static const union AnimCmd sRegionMapCursorAnim2[] = +{ ANIMCMD_FRAME( 0, 10), ANIMCMD_FRAME(16, 10), ANIMCMD_FRAME(32, 10), @@ -191,37 +201,49 @@ static const union AnimCmd sRegionMapCursorAnim2[] = { ANIMCMD_JUMP(0) }; -static const union AnimCmd *const sRegionMapCursorAnimTable[] = { +static const union AnimCmd *const sRegionMapCursorAnimTable[] = +{ sRegionMapCursorAnim1, sRegionMapCursorAnim2 }; -static const struct SpritePalette sRegionMapCursorSpritePalette = { sRegionMapCursorPal, 0 }; - -static const struct SpriteTemplate sRegionMapCursorSpriteTemplate = { - 0, - 0, - &sRegionMapCursorOam, - sRegionMapCursorAnimTable, - NULL, - gDummySpriteAffineAnimTable, - SpriteCallback_CursorFull +static const struct SpritePalette sRegionMapCursorSpritePalette = +{ + .data = sRegionMapCursorPal, + .tag = 0 }; -static const struct OamData sRegionMapPlayerIconOam = { - .size = 1, .priority = 2 +static const struct SpriteTemplate sRegionMapCursorSpriteTemplate = +{ + .tileTag = 0, + .paletteTag = 0, + .oam = &sRegionMapCursorOam, + .anims = sRegionMapCursorAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallback_CursorFull }; -static const union AnimCmd sRegionMapPlayerIconAnim1[] = { +static const struct OamData sRegionMapPlayerIconOam = +{ + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .priority = 2 +}; + +static const union AnimCmd sRegionMapPlayerIconAnim1[] = +{ ANIMCMD_FRAME(0, 5), ANIMCMD_END }; -static const union AnimCmd *const sRegionMapPlayerIconAnimTable[] = { +static const union AnimCmd *const sRegionMapPlayerIconAnimTable[] = +{ sRegionMapPlayerIconAnim1 }; -static const u8 sRegionMapEventSectionIds[] = { +static const u8 sRegionMapEventSectionIds[] = +{ MAPSEC_BIRTH_ISLAND_2, MAPSEC_FARAWAY_ISLAND, MAPSEC_NAVEL_ROCK2 @@ -237,7 +259,8 @@ static const u16 Unknown_085A1D48[] = INCBIN_U16("graphics/pokenav/fly_target_ic static const u32 sUnknown_085A1D68[] = INCBIN_U32("graphics/pokenav/fly_target_icons.4bpp.lz"); -static const u8 sMapHealLocations[][3] = { +static const u8 sMapHealLocations[][3] = +{ {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F}, {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), HEAL_LOCATION_OLDALE_TOWN}, {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), HEAL_LOCATION_DEWFORD_TOWN}, @@ -290,83 +313,154 @@ static const u8 sMapHealLocations[][3] = { {MAP_GROUP(ROUTE134), MAP_NUM(ROUTE134), 0} }; -static const u8 *const gUnknown_085A1ED4[] = { +static const u8 *const gUnknown_085A1ED4[] = +{ gText_PokemonLeague, gText_PokemonCenter }; -static const struct { +static const struct +{ const u8 *const *name; u16 mapSecId; u16 flag; -} gUnknown_085A1EDC[] = { +} +gUnknown_085A1EDC[] = +{ gUnknown_085A1ED4, MAPSEC_EVER_GRANDE_CITY, FLAG_LANDMARK_POKEMON_LEAGUE }; -static const struct BgTemplate gUnknown_085A1EE4[] = { - { .bg = 0, .charBaseIndex = 0, .mapBaseIndex = 31, .screenSize = 0, .paletteMode = 0, .priority = 0 }, - { .bg = 1, .charBaseIndex = 3, .mapBaseIndex = 30, .screenSize = 0, .paletteMode = 0, .priority = 1 }, - { .bg = 2, .charBaseIndex = 2, .mapBaseIndex = 28, .screenSize = 2, .paletteMode = 1, .priority = 2 } +static const struct BgTemplate gUnknown_085A1EE4[] = +{ + { + .bg = 0, + .charBaseIndex = 0, + .mapBaseIndex = 31, + .screenSize = 0, + .paletteMode = 0, + .priority = 0 + }, + { + .bg = 1, + .charBaseIndex = 3, + .mapBaseIndex = 30, + .screenSize = 0, + .paletteMode = 0, + .priority = 1 + }, + { + .bg = 2, + .charBaseIndex = 2, + .mapBaseIndex = 28, + .screenSize = 2, + .paletteMode = 1, + .priority = 2 + } }; -static const struct WindowTemplate gUnknown_085A1EF0[] = { - { 0, 17, 17, 12, 2, 15, 0x01 }, - { 0, 17, 15, 12, 4, 15, 0x19 }, - { 0, 1, 18, 14, 2, 15, 0x49 }, +static const struct WindowTemplate gUnknown_085A1EF0[] = +{ + { + .bg = 0, + .tilemapLeft = 17, + .tilemapTop = 17, + .width = 12, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x01 + }, + { + .bg = 0, + .tilemapLeft = 17, + .tilemapTop = 15, + .width = 12, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x19 + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 18, + .width = 14, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x49 + }, DUMMY_WIN_TEMPLATE }; -static const struct SpritePalette gUnknown_085A1F10 = { - Unknown_085A1D48, 2 +static const struct SpritePalette gUnknown_085A1F10 = +{ + .data = Unknown_085A1D48, + .tag = 2 }; -static const u16 sUnknown_085A1F18[][2] = { - {FLAG_LANDMARK_BATTLE_FRONTIER, MAPSEC_BATTLE_FRONTIER}, - {-1, MAPSEC_NONE} +static const u16 sUnknown_085A1F18[][2] = +{ + { + FLAG_LANDMARK_BATTLE_FRONTIER, + MAPSEC_BATTLE_FRONTIER + }, + { + -1, + MAPSEC_NONE + } }; -static const struct OamData gOamData_085A1F20 = { +static const struct OamData gOamData_085A1F20 = +{ + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), .priority = 2 }; -static const union AnimCmd gUnknown_085A1F28[] = { +static const union AnimCmd gUnknown_085A1F28[] = +{ ANIMCMD_FRAME( 0, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F30[] = { +static const union AnimCmd gUnknown_085A1F30[] = +{ ANIMCMD_FRAME( 1, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F38[] = { +static const union AnimCmd gUnknown_085A1F38[] = +{ ANIMCMD_FRAME( 3, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F40[] = { +static const union AnimCmd gUnknown_085A1F40[] = +{ ANIMCMD_FRAME( 5, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F48[] = { +static const union AnimCmd gUnknown_085A1F48[] = +{ ANIMCMD_FRAME( 6, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F50[] = { +static const union AnimCmd gUnknown_085A1F50[] = +{ ANIMCMD_FRAME( 8, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F58[] = { +static const union AnimCmd gUnknown_085A1F58[] = +{ ANIMCMD_FRAME(10, 5), ANIMCMD_END }; -static const union AnimCmd *const gUnknown_085A1F60[] = { +static const union AnimCmd *const gUnknown_085A1F60[] = +{ gUnknown_085A1F28, gUnknown_085A1F30, gUnknown_085A1F38, @@ -376,14 +470,15 @@ static const union AnimCmd *const gUnknown_085A1F60[] = { gUnknown_085A1F58 }; -static const struct SpriteTemplate gUnknown_085A1F7C = { - 2, - 2, - &gOamData_085A1F20, - gUnknown_085A1F60, - NULL, - gDummySpriteAffineAnimTable, - SpriteCallbackDummy +static const struct SpriteTemplate gUnknown_085A1F7C = +{ + .tileTag = 2, + .paletteTag = 2, + .oam = &gOamData_085A1F20, + .anims = gUnknown_085A1F60, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy }; // .text diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index ce9f5b98b..6ee757607 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -108,10 +108,10 @@ static const struct OamData sOamData_08510464 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(8x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(8x8), .tileNum = 0, .priority = 0, .paletteNum = 0, diff --git a/src/rotating_gate.c b/src/rotating_gate.c index 3513f092e..44d291dc4 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -236,10 +236,10 @@ static const struct OamData sOamData_RotatingGateLarge = .objMode = 0, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 2, .paletteNum = 2, @@ -253,10 +253,10 @@ static const struct OamData sOamData_RotatingGateRegular = .objMode = 0, .mosaic = 0, .bpp = ST_OAM_4BPP, - .shape = ST_OAM_SQUARE, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 2, .paletteNum = 2, diff --git a/src/roulette.c b/src/roulette.c index 05d5006f0..5c08c99a0 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -2311,18 +2311,18 @@ static const u32 RouletteCursorTiles[] = INCBIN_U32("graphics/roulette/cursor.4b static const struct SpritePalette gUnknown_085B7384[] = { - { RouletteSpritePalette_01, 1 }, - { RouletteSpritePalette_02, 2 }, - { RouletteSpritePalette_03, 3 }, - { RouletteSpritePalette_04, 4 }, - { RouletteSpritePalette_05, 5 }, - { RouletteSpritePalette_06, 6 }, - { RouletteSpritePalette_07, 7 }, - { RouletteSpritePalette_08, 8 }, - { RouletteSpritePalette_09, 9 }, - { RouletteSpritePalette_10, 10 }, - { RouletteSpritePalette_11, 11 }, - { RouletteSpritePalette_12, 12 }, + { .data = RouletteSpritePalette_01, .tag = 1 }, + { .data = RouletteSpritePalette_02, .tag = 2 }, + { .data = RouletteSpritePalette_03, .tag = 3 }, + { .data = RouletteSpritePalette_04, .tag = 4 }, + { .data = RouletteSpritePalette_05, .tag = 5 }, + { .data = RouletteSpritePalette_06, .tag = 6 }, + { .data = RouletteSpritePalette_07, .tag = 7 }, + { .data = RouletteSpritePalette_08, .tag = 8 }, + { .data = RouletteSpritePalette_09, .tag = 9 }, + { .data = RouletteSpritePalette_10, .tag = 10 }, + { .data = RouletteSpritePalette_11, .tag = 11 }, + { .data = RouletteSpritePalette_12, .tag = 12 }, {} }; @@ -2330,8 +2330,8 @@ static const struct OamData gOamData_85B73EC = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 1, }; @@ -2339,8 +2339,8 @@ static const struct OamData gOamData_85B73F4 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 1, }; @@ -2349,35 +2349,41 @@ static const struct OamData gOamData_85B73FC = .y = 60, .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 2, }; -static const union AnimCmd gSpriteAnim_85B7404[] = { +static const union AnimCmd gSpriteAnim_85B7404[] = +{ ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_85B740C[] = { +static const union AnimCmd *const gSpriteAnimTable_85B740C[] = +{ gSpriteAnim_85B7404 }; -static const union AffineAnimCmd gSpriteAffineAnim_85B7410[] = { +static const union AffineAnimCmd gSpriteAffineAnim_85B7410[] = +{ AFFINEANIMCMD_END }; -static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7418[] = { +static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7418[] = +{ gSpriteAffineAnim_85B7410 }; -static const struct CompressedSpriteSheet gUnknown_085B741C = { +static const struct CompressedSpriteSheet gUnknown_085B741C = +{ .data = RoulettePokeIcons2Tiles, .size = 0xC00, .tag = 0 }; -static const union AnimCmd gSpriteAnim_85B7420[] = { +static const union AnimCmd gSpriteAnim_85B7420[] = +{ ANIMCMD_FRAME(0, 0), ANIMCMD_FRAME(32, 0), ANIMCMD_FRAME(64, 0), @@ -2393,67 +2399,82 @@ static const union AnimCmd gSpriteAnim_85B7420[] = { ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_85B7458[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7458[] = +{ &gSpriteAnim_85B7420[0] }; -static const union AnimCmd *const gSpriteAnimTable_85B745C[] = { +static const union AnimCmd *const gSpriteAnimTable_85B745C[] = +{ &gSpriteAnim_85B7420[1] }; -static const union AnimCmd *const gSpriteAnimTable_85B7460[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7460[] = +{ &gSpriteAnim_85B7420[2] }; -static const union AnimCmd *const gSpriteAnimTable_85B7464[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7464[] = +{ &gSpriteAnim_85B7420[3] }; -static const union AnimCmd *const gSpriteAnimTable_85B7468[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7468[] = +{ &gSpriteAnim_85B7420[4] }; -static const union AnimCmd *const gSpriteAnimTable_85B746C[] = { +static const union AnimCmd *const gSpriteAnimTable_85B746C[] = +{ &gSpriteAnim_85B7420[5] }; -static const union AnimCmd *const gSpriteAnimTable_85B7470[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7470[] = +{ &gSpriteAnim_85B7420[6] }; -static const union AnimCmd *const gSpriteAnimTable_85B7474[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7474[] = +{ &gSpriteAnim_85B7420[7] }; -static const union AnimCmd *const gSpriteAnimTable_85B7478[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7478[] = +{ &gSpriteAnim_85B7420[8] }; -static const union AnimCmd *const gSpriteAnimTable_85B747C[] = { +static const union AnimCmd *const gSpriteAnimTable_85B747C[] = +{ &gSpriteAnim_85B7420[9] }; -static const union AnimCmd *const gSpriteAnimTable_85B7480[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7480[] = +{ &gSpriteAnim_85B7420[10] }; -static const union AnimCmd *const gSpriteAnimTable_85B7484[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7484[] = +{ &gSpriteAnim_85B7420[11] }; -static const struct CompressedSpriteSheet gUnknown_085B7488 = { +static const struct CompressedSpriteSheet gUnknown_085B7488 = +{ .data = gRouletteHeadersTiles, .size = 0x1600, .tag = 4 }; -static const struct CompressedSpriteSheet gUnknown_085B7490 = { +static const struct CompressedSpriteSheet gUnknown_085B7490 = +{ .data = RoulettePokeIconsTiles, .size = 0x400, .tag = 5 }; -static const union AnimCmd gSpriteAnim_85B7498[] = { +static const union AnimCmd gSpriteAnim_85B7498[] = +{ ANIMCMD_FRAME(0, 0), ANIMCMD_FRAME(16, 0), ANIMCMD_FRAME(32, 0), @@ -2468,7 +2489,8 @@ static const union AnimCmd gSpriteAnim_85B7498[] = { ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_85B74C8[] = { +static const union AnimCmd gSpriteAnim_85B74C8[] = +{ ANIMCMD_FRAME(0, 0), ANIMCMD_FRAME(4, 0), ANIMCMD_FRAME(8, 0), @@ -2476,47 +2498,58 @@ static const union AnimCmd gSpriteAnim_85B74C8[] = { ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_85B74DC[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74DC[] = +{ &gSpriteAnim_85B7498[0] }; -static const union AnimCmd *const gSpriteAnimTable_85B74E0[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74E0[] = +{ &gSpriteAnim_85B7498[2] }; -static const union AnimCmd *const gSpriteAnimTable_85B74E4[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74E4[] = +{ &gSpriteAnim_85B7498[4] }; -static const union AnimCmd *const gSpriteAnimTable_85B74E8[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74E8[] = +{ &gSpriteAnim_85B7498[6] }; -static const union AnimCmd *const gSpriteAnimTable_85B74EC[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74EC[] = +{ &gSpriteAnim_85B7498[8] }; -static const union AnimCmd *const gSpriteAnimTable_85B74F0[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74F0[] = +{ &gSpriteAnim_85B7498[9] }; -static const union AnimCmd *const gSpriteAnimTable_85B74F4[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74F4[] = +{ &gSpriteAnim_85B7498[10] }; -static const union AnimCmd *const gSpriteAnimTable_85B74F8[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74F8[] = +{ &gSpriteAnim_85B74C8[0] }; -static const union AnimCmd *const gSpriteAnimTable_85B74FC[] = { +static const union AnimCmd *const gSpriteAnimTable_85B74FC[] = +{ &gSpriteAnim_85B74C8[1] }; -static const union AnimCmd *const gSpriteAnimTable_85B7500[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7500[] = +{ &gSpriteAnim_85B74C8[2] }; -static const union AnimCmd *const gSpriteAnimTable_85B7504[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7504[] = +{ &gSpriteAnim_85B74C8[3] }; @@ -2747,8 +2780,8 @@ static const struct OamData gOamData_85B7730 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 3, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 1, }; @@ -2756,8 +2789,8 @@ static const struct OamData gOamData_85B7738 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_V_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 1, }; @@ -2765,8 +2798,8 @@ static const struct OamData gOamData_85B7740 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 1, }; @@ -2774,8 +2807,8 @@ static const struct OamData gOamData_85B7748 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), .priority = 1, }; @@ -2809,7 +2842,8 @@ static const struct CompressedSpriteSheet gUnknown_085B7750[] = {} }; -static const union AnimCmd gSpriteAnim_85B7780[] = { +static const union AnimCmd gSpriteAnim_85B7780[] = +{ ANIMCMD_FRAME(0, 0), ANIMCMD_FRAME(2, 0), ANIMCMD_FRAME(4, 0), @@ -2824,11 +2858,13 @@ static const union AnimCmd gSpriteAnim_85B7780[] = { //ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_85B77A8[] = { +static const union AnimCmd *const gSpriteAnimTable_85B77A8[] = +{ gSpriteAnim_85B7780 }; -static const union AnimCmd gSpriteAnim_85B77AC[] = { +static const union AnimCmd gSpriteAnim_85B77AC[] = +{ ANIMCMD_FRAME(0, 0), ANIMCMD_FRAME(8, 0), ANIMCMD_FRAME(16, 0), @@ -2837,11 +2873,13 @@ static const union AnimCmd gSpriteAnim_85B77AC[] = { ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_85B77C4[] = { +static const union AnimCmd *const gSpriteAnimTable_85B77C4[] = +{ gSpriteAnim_85B77AC }; -static const union AnimCmd gSpriteAnim_85B77C8[] = { +static const union AnimCmd gSpriteAnim_85B77C8[] = +{ ANIMCMD_FRAME(0, 0), ANIMCMD_FRAME(2, 0), ANIMCMD_FRAME(4, 0), @@ -2850,7 +2888,8 @@ static const union AnimCmd gSpriteAnim_85B77C8[] = { ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_85B77E0[] = { +static const union AnimCmd *const gSpriteAnimTable_85B77E0[] = +{ gSpriteAnim_85B77C8 }; @@ -2913,8 +2952,8 @@ static const struct OamData gOamData_85B785C = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -2924,7 +2963,8 @@ static const struct CompressedSpriteSheet gUnknown_085B7864 = { .tag = 12 }; -static const union AnimCmd gSpriteAnim_85B786C[] = { +static const union AnimCmd gSpriteAnim_85B786C[] = +{ ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(4, 5), ANIMCMD_FRAME(8, 5), @@ -2932,7 +2972,8 @@ static const union AnimCmd gSpriteAnim_85B786C[] = { ANIMCMD_JUMP(0) }; -static const union AnimCmd gSpriteAnim_85B7880[] = { +static const union AnimCmd gSpriteAnim_85B7880[] = +{ ANIMCMD_FRAME(0, 10), ANIMCMD_FRAME(4, 10), ANIMCMD_FRAME(8, 10), @@ -2940,7 +2981,8 @@ static const union AnimCmd gSpriteAnim_85B7880[] = { ANIMCMD_JUMP(0) }; -static const union AnimCmd gSpriteAnim_85B7894[] = { +static const union AnimCmd gSpriteAnim_85B7894[] = +{ ANIMCMD_FRAME(0, 15), ANIMCMD_FRAME(4, 15), ANIMCMD_FRAME(8, 15), @@ -2948,7 +2990,8 @@ static const union AnimCmd gSpriteAnim_85B7894[] = { ANIMCMD_JUMP(0) }; -static const union AnimCmd gSpriteAnim_85B78A8[] = { +static const union AnimCmd gSpriteAnim_85B78A8[] = +{ ANIMCMD_FRAME(4, 2), ANIMCMD_FRAME(8, 5), ANIMCMD_FRAME(4, 5), @@ -2956,7 +2999,8 @@ static const union AnimCmd gSpriteAnim_85B78A8[] = { ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_85B78BC[] = { +static const union AnimCmd gSpriteAnim_85B78BC[] = +{ ANIMCMD_FRAME(4, 2), ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(4, 4), @@ -2965,7 +3009,8 @@ static const union AnimCmd gSpriteAnim_85B78BC[] = { ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_85B78D4[] = { +static const union AnimCmd gSpriteAnim_85B78D4[] = +{ ANIMCMD_FRAME(0, 2), ANIMCMD_FRAME(4, 5), ANIMCMD_FRAME(8, 5), @@ -2973,12 +3018,14 @@ static const union AnimCmd gSpriteAnim_85B78D4[] = { ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_85B78E8[] = { +static const union AnimCmd gSpriteAnim_85B78E8[] = +{ ANIMCMD_FRAME(12, 0), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_85B78F0[] = { +static const union AnimCmd gSpriteAnim_85B78F0[] = +{ ANIMCMD_FRAME(8, 2), ANIMCMD_FRAME(4, 5), ANIMCMD_FRAME(0, 5), @@ -2986,7 +3033,8 @@ static const union AnimCmd gSpriteAnim_85B78F0[] = { ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_85B7904[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7904[] = +{ gSpriteAnim_85B786C, gSpriteAnim_85B7880, gSpriteAnim_85B7894, @@ -3014,12 +3062,13 @@ static const struct OamData gOamData_85B7940 = .y = 81, .affineMode = ST_OAM_AFFINE_DOUBLE, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 2, }; -static const struct CompressedSpriteSheet gUnknown_085B7948 = { +static const struct CompressedSpriteSheet gUnknown_085B7948 = +{ .data = gRouletteCenter_Gfx, .size = 0x800, .tag = 6 @@ -3040,8 +3089,8 @@ static const struct OamData gOamData_85B7968 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2, }; @@ -3049,18 +3098,20 @@ static const struct OamData gOamData_85B7970 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 2, }; -static const struct CompressedSpriteSheet gUnknown_085B7978 = { +static const struct CompressedSpriteSheet gUnknown_085B7978 = +{ .data = gUnknown_085B67FC, .size = 0xE00, .tag = 13 }; -static const union AnimCmd gSpriteAnim_85B7980[] = { +static const union AnimCmd gSpriteAnim_85B7980[] = +{ ANIMCMD_FRAME(0, 6), ANIMCMD_FRAME(16, 6), ANIMCMD_FRAME(32, 6), @@ -3070,45 +3121,53 @@ static const union AnimCmd gSpriteAnim_85B7980[] = { ANIMCMD_JUMP(2) }; -static const union AnimCmd gSpriteAnim_85B799C[] = { +static const union AnimCmd gSpriteAnim_85B799C[] = +{ ANIMCMD_FRAME(80, 10), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_85B79A4[] = { +static const union AnimCmd gSpriteAnim_85B79A4[] = +{ ANIMCMD_FRAME(80, 10, .hFlip = TRUE), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_85B79AC[] = { +static const union AnimCmd gSpriteAnim_85B79AC[] = +{ ANIMCMD_FRAME(80, 20), ANIMCMD_FRAME(96, 20), ANIMCMD_JUMP(0) }; -static const union AnimCmd gSpriteAnim_85B79B8[] = { +static const union AnimCmd gSpriteAnim_85B79B8[] = +{ ANIMCMD_FRAME(80, 20, .hFlip = TRUE), ANIMCMD_FRAME(96, 20, .hFlip = TRUE), ANIMCMD_JUMP(0) }; -static const union AnimCmd gSpriteAnim_85B79C4[] = { +static const union AnimCmd gSpriteAnim_85B79C4[] = +{ ANIMCMD_FRAME(80, 10), ANIMCMD_FRAME(96, 10), ANIMCMD_JUMP(0) }; -static const union AnimCmd gSpriteAnim_85B79D0[] = { +static const union AnimCmd gSpriteAnim_85B79D0[] = +{ ANIMCMD_FRAME(80, 10, .hFlip = TRUE), ANIMCMD_FRAME(96, 10, .hFlip = TRUE), ANIMCMD_JUMP(0) }; -static const union AnimCmd *const gSpriteAnimTable_85B79DC[] = { +static const union AnimCmd *const gSpriteAnimTable_85B79DC[] = +{ gSpriteAnim_85B7980 }; -static const union AnimCmd *const gSpriteAnimTable_85B79E0[] = { +static const union AnimCmd *const gSpriteAnimTable_85B79E0[] = +{ gSpriteAnim_85B799C, gSpriteAnim_85B79A4, gSpriteAnim_85B79AC, @@ -3143,8 +3202,8 @@ static const struct OamData gOamData_85B7A28 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_SQUARE, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 2, }; @@ -3152,8 +3211,8 @@ static const struct OamData gOamData_85B7A30 = { .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2, }; @@ -3161,24 +3220,27 @@ static const struct OamData gOamData_85B7A38 = { .affineMode = ST_OAM_AFFINE_NORMAL, .objMode = ST_OAM_OBJ_NORMAL, - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2, }; -static const struct CompressedSpriteSheet gUnknown_085B7A40 = { +static const struct CompressedSpriteSheet gUnknown_085B7A40 = +{ .data = gUnknown_085B7290, .size = 0x180, .tag = 14 }; -static const union AffineAnimCmd gSpriteAffineAnim_85B7A48[] = { +static const union AffineAnimCmd gSpriteAffineAnim_85B7A48[] = +{ AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), AFFINEANIMCMD_FRAME(2, 2, 0, 60), AFFINEANIMCMD_END }; -static const union AffineAnimCmd gSpriteAffineAnim_85B7A60[] = { +static const union AffineAnimCmd gSpriteAffineAnim_85B7A60[] = +{ AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(-2, 0x0, 0, 15), AFFINEANIMCMD_FRAME(-1, -2, 0, 15), @@ -3186,38 +3248,46 @@ static const union AffineAnimCmd gSpriteAffineAnim_85B7A60[] = { AFFINEANIMCMD_END }; -static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7A88[] = { +static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7A88[] = +{ gSpriteAffineAnim_85B7A48 }; -static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7A8C[] = { +static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7A8C[] = +{ gSpriteAffineAnim_85B7A60 }; -static const union AffineAnimCmd gSpriteAffineAnim_85B7A90[] = { +static const union AffineAnimCmd gSpriteAffineAnim_85B7A90[] = +{ AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_END }; -static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7AA0[] = { +static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7AA0[] = +{ gSpriteAffineAnim_85B7A90 }; -static const union AnimCmd gSpriteAnim_85B7AA4[] = { +static const union AnimCmd gSpriteAnim_85B7AA4[] = +{ ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_85B7AAC[] = { +static const union AnimCmd gSpriteAnim_85B7AAC[] = +{ ANIMCMD_FRAME(4, 0), ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_85B7AB4[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7AB4[] = +{ gSpriteAnim_85B7AA4 }; -static const union AnimCmd *const gSpriteAnimTable_85B7AB8[] = { +static const union AnimCmd *const gSpriteAnimTable_85B7AB8[] = +{ gSpriteAnim_85B7AAC }; diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 08f193890..415907585 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -47,19 +47,19 @@ EWRAM_DATA u8 gSaveFailedUnused2[4] = {0}; static const struct OamData sClockOamData = { - 160, // Y - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0 + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0 }; static const struct BgTemplate gUnknown_085EFD88[3] = diff --git a/src/sprite.c b/src/sprite.c index 4087dd8c4..d2ea7889c 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -91,21 +91,21 @@ typedef void (*AnimFunc)(struct Sprite *); typedef void (*AnimCmdFunc)(struct Sprite *); typedef void (*AffineAnimCmdFunc)(u8 matrixNum, struct Sprite *); -#define DUMMY_OAM_DATA \ -{ \ - 160, /* Y (off-screen) */ \ - 0, \ - 0, \ - 0, \ - 0, \ - 0, \ - 304, /* X */ \ - 0, \ - 0, \ - 0, \ - 3, /* lowest priority */ \ - 0, \ - 0 \ +#define DUMMY_OAM_DATA \ +{ \ + .y = 160, \ + .affineMode = 0, \ + .objMode = 0, \ + .mosaic = 0, \ + .bpp = 0, \ + .shape = SPRITE_SHAPE(8x8), \ + .x = 304, \ + .matrixNum = 0, \ + .size = SPRITE_SIZE(8x8), \ + .tileNum = 0, \ + .priority = 3, /* lowest priority */ \ + .paletteNum = 0, \ + .affineParam = 0 \ } #define ANIM_END 0xFFFF diff --git a/src/starter_choose.c b/src/starter_choose.c index 4ed53539f..c3d636175 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -170,10 +170,10 @@ static const struct OamData gOamData_85B1E10 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -187,10 +187,10 @@ static const struct OamData gOamData_85B1E18 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -204,10 +204,10 @@ static const struct OamData gOamData_85B1E20 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -296,21 +296,35 @@ static const union AffineAnimCmd * const gSpriteAffineAnimTable_85B1ED4[] = {gSp static const struct CompressedSpriteSheet gUnknown_085B1ED8[] = { - gUnknown_085B18AC, 0x0800, 0x1000, - NULL, + { + .data = gUnknown_085B18AC, + .size = 0x0800, + .tag = 0x1000 + }, + {} }; static const struct CompressedSpriteSheet gUnknown_085B1EE8[] = { - gUnknown_085B1BCC, 0x0800, 0x1001, - NULL, + { + .data = gUnknown_085B1BCC, + .size = 0x0800, + .tag = 0x1001 + }, + {} }; static const struct SpritePalette gUnknown_085B1EF8[] = { - gBirchBallarrow_Pal, 0x1000, - gBirchCircle_Pal, 0x1001, - NULL, + { + .data = gBirchBallarrow_Pal, + .tag = 0x1000 + }, + { + .data = gBirchCircle_Pal, + .tag = 0x1001 + }, + {}, }; static const struct SpriteTemplate sSpriteTemplate_Hand = diff --git a/src/title_screen.c b/src/title_screen.c index 80d5464fa..b9ef53000 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -23,9 +23,7 @@ #include "constants/rgb.h" #include "constants/songs.h" -#define VERSION_BANNER_SHAPE 1 #define VERSION_BANNER_RIGHT_TILEOFFSET 64 -#define VERSION_BANNER_BYTES 0x1000 #define VERSION_BANNER_LEFT_X 98 #define VERSION_BANNER_RIGHT_X 162 #define VERSION_BANNER_Y 2 @@ -108,10 +106,10 @@ static const struct OamData sVersionBannerLeftOamData = .objMode = 0, .mosaic = 0, .bpp = 1, - .shape = VERSION_BANNER_SHAPE, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -125,10 +123,10 @@ static const struct OamData sVersionBannerRightOamData = .objMode = 0, .mosaic = 0, .bpp = 1, - .shape = VERSION_BANNER_SHAPE, + .shape = SPRITE_SHAPE(64x32), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -181,8 +179,12 @@ static const struct SpriteTemplate sVersionBannerRightSpriteTemplate = static const struct CompressedSpriteSheet sSpriteSheet_EmeraldVersion[] = { - {gTitleScreenEmeraldVersionGfx, VERSION_BANNER_BYTES, 1000}, - {NULL}, + { + .data = gTitleScreenEmeraldVersionGfx, + .size = 0x1000, + .tag = 1000 + }, + {}, }; static const struct OamData sOamData_CopyrightBanner = @@ -192,10 +194,10 @@ static const struct OamData sOamData_CopyrightBanner = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(32x8), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(32x8), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -280,14 +282,21 @@ static const struct SpriteTemplate sStartCopyrightBannerSpriteTemplate = static const struct CompressedSpriteSheet sSpriteSheet_PressStart[] = { - {gTitleScreenPressStartGfx, 0x520, 1001}, - {NULL}, + { + .data = gTitleScreenPressStartGfx, + .size = 0x520, + .tag = 1001 + }, + {}, }; static const struct SpritePalette sSpritePalette_PressStart[] = { - {gTitleScreenPressStartPal, 1001}, - {NULL}, + { + .data = gTitleScreenPressStartPal, + .tag = 1001 + }, + {}, }; static const struct OamData sPokemonLogoShineOamData = @@ -297,10 +306,10 @@ static const struct OamData sPokemonLogoShineOamData = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -331,8 +340,12 @@ static const struct SpriteTemplate sPokemonLogoShineSpriteTemplate = static const struct CompressedSpriteSheet sPokemonLogoShineSpriteSheet[] = { - {sTitleScreenLogoShineGfx, 0x800, 1002}, - {NULL}, + { + .data = sTitleScreenLogoShineGfx, + .size = 0x800, + .tag = 1002 + }, + {}, }; // code diff --git a/src/trade.c b/src/trade.c index 9a9828f34..be6768fe3 100644 --- a/src/trade.c +++ b/src/trade.c @@ -256,72 +256,89 @@ static const u8 gText_YourOnlyPkmnForBattle[] = _("That's your only\nPOKéMON fo static const u8 gText_WaitingForYourFriend[] = _("{COLOR DARK_GREY}{HIGHLIGHT WHITE}{SHADOW LIGHT_GREY}Waiting for your friend\nto finish…"); static const u8 gText_YourFriendWantsToTrade[] = _("Your friend wants\nto trade POKéMON."); -static const struct OamData gOamData_832DC14 = { - .shape = ST_OAM_H_RECTANGLE, - .size = 2, +static const struct OamData gOamData_832DC14 = +{ + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 1 }; -static const struct OamData gOamData_832DC1C = { - .shape = ST_OAM_H_RECTANGLE, - .size = 3, +static const struct OamData gOamData_832DC1C = +{ + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 1 }; -static const union AnimCmd gSpriteAnim_832DC24[] = { +static const union AnimCmd gSpriteAnim_832DC24[] = +{ ANIMCMD_FRAME(0, 5), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_832DC2C[] = { +static const union AnimCmd gSpriteAnim_832DC2C[] = +{ ANIMCMD_FRAME(32, 5), ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_832DC34[] = { +static const union AnimCmd *const gSpriteAnimTable_832DC34[] = +{ gSpriteAnim_832DC24, gSpriteAnim_832DC2C }; -static const struct SpriteSheet gUnknown_0832DC3C = { - gUnknown_08DDC6E4, 0x800, 300 +static const struct SpriteSheet gUnknown_0832DC3C = +{ + .data = gUnknown_08DDC6E4, + .size = 0x800, + .tag = 300 }; -static const struct SpritePalette gUnknown_0832DC44 = { - gUnknown_08DDB444, 2345 +static const struct SpritePalette gUnknown_0832DC44 = +{ + .data = gUnknown_08DDB444, + .tag = 2345 }; -static const union AnimCmd gSpriteAnim_832DC4C[] = { +static const union AnimCmd gSpriteAnim_832DC4C[] = +{ ANIMCMD_FRAME(0, 5), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_832DC54[] = { +static const union AnimCmd gSpriteAnim_832DC54[] = +{ ANIMCMD_FRAME(8, 5), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_832DC5C[] = { +static const union AnimCmd gSpriteAnim_832DC5C[] = +{ ANIMCMD_FRAME(16, 5), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_832DC64[] = { +static const union AnimCmd gSpriteAnim_832DC64[] = +{ ANIMCMD_FRAME(24, 5), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_832DC6C[] = { +static const union AnimCmd gSpriteAnim_832DC6C[] = +{ ANIMCMD_FRAME(32, 5), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_832DC74[] = { +static const union AnimCmd gSpriteAnim_832DC74[] = +{ ANIMCMD_FRAME(40, 5), ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_832DC7C[] = { +static const union AnimCmd *const gSpriteAnimTable_832DC7C[] = +{ gSpriteAnim_832DC4C, gSpriteAnim_832DC54, gSpriteAnim_832DC5C, @@ -355,7 +372,8 @@ static const struct SpriteTemplate gSpriteTemplate_832DCAC = static const u16 TradeScreenTextPalette[] = INCBIN_U16("graphics/trade/text.gbapal"); static const struct SpritePalette gSpritePalette_TradeScreenText = { - TradeScreenTextPalette, 4925 + .data = TradeScreenTextPalette, + .tag = 4925 }; // This is used to determine the next mon to select when the D-Pad is @@ -367,7 +385,6 @@ static const struct SpritePalette gSpritePalette_TradeScreenText = // 2 3 8 9 // 4 5 10 11 // 12 - static const u8 gTradeNextSelectedMonTable[][4][6] = { { @@ -471,7 +488,8 @@ static const u8 gTradeMonSpriteCoords[][2] = {23, 18} // CANCEL }; -static const u8 gTradeLevelDisplayCoords[][6][2] = { +static const u8 gTradeLevelDisplayCoords[][6][2] = +{ { // Your party {5, 4}, @@ -492,7 +510,8 @@ static const u8 gTradeLevelDisplayCoords[][6][2] = { } }; -static const u8 gTradeMonBoxCoords[][6][2] = { +static const u8 gTradeMonBoxCoords[][6][2] = +{ { // Your party {1, 3}, @@ -513,7 +532,8 @@ static const u8 gTradeMonBoxCoords[][6][2] = { } }; -static const u8 sUnref_0832DE6E[] = { +static const u8 sUnref_0832DE6E[] = +{ 0x00, 0x0e, 0x0f, 0x1d, 0x03, 0x05, @@ -544,7 +564,8 @@ static const u8 *const gUnknown_0832DE94[] = gJPText_832DB2E }; -static const struct MenuAction gUnknown_0832DEAC[] = { +static const struct MenuAction gUnknown_0832DEAC[] = +{ {gText_Summary4, sub_807A000}, {gText_Trade3, sub_807A024} }; @@ -817,12 +838,15 @@ static const u16 gUnknown_08337EA0[] = INCBIN_U16("graphics/trade/black.gbapal") static const u32 gUnknown_08337EC0[] = INCBIN_U32("graphics/trade/wireless_signal.4bpp.lz"); static const u32 gUnknown_08338550[] = INCBIN_U32("graphics/trade/wireless_signal.bin.lz"); -static const struct OamData gOamData_8338C44 = { +static const struct OamData gOamData_8338C44 = +{ .affineMode = 1, - .size = 1 + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16) }; -static const union AnimCmd gSpriteAnim_8338C4C[] = { +static const union AnimCmd gSpriteAnim_8338C4C[] = +{ ANIMCMD_FRAME( 0, 3), ANIMCMD_FRAME( 4, 3), ANIMCMD_FRAME( 8, 3), @@ -840,7 +864,8 @@ static const union AnimCmd gSpriteAnim_8338C4C[] = { ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_8338C88[] = { +static const union AnimCmd gSpriteAnim_8338C88[] = +{ ANIMCMD_FRAME( 0, 3), ANIMCMD_FRAME( 4, 3), ANIMCMD_FRAME( 8, 3), @@ -858,171 +883,213 @@ static const union AnimCmd gSpriteAnim_8338C88[] = { ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_8338C88[] = { +static const union AnimCmd *const gSpriteAnimTable_8338C88[] = +{ gSpriteAnim_8338C4C, gSpriteAnim_8338C88 }; -static const union AffineAnimCmd gSpriteAffineAnim_8338CCC[] = { +static const union AffineAnimCmd gSpriteAffineAnim_8338CCC[] = +{ AFFINEANIMCMD_FRAME(0, 0, 0, 1), AFFINEANIMCMD_END }; -static const union AffineAnimCmd gSpriteAffineAnim_8338CDC[] = { +static const union AffineAnimCmd gSpriteAffineAnim_8338CDC[] = +{ AFFINEANIMCMD_FRAME(-8, 0, 0, 20), AFFINEANIMCMD_END }; -static const union AffineAnimCmd gSpriteAffineAnim_8338CEC[] = { +static const union AffineAnimCmd gSpriteAffineAnim_8338CEC[] = +{ AFFINEANIMCMD_FRAME(0x60, 0x100, 0, 0), AFFINEANIMCMD_FRAME( 0, 0, 0, 5), AFFINEANIMCMD_FRAME( 8, 0, 0, 20), AFFINEANIMCMD_END }; -static const union AffineAnimCmd *const gSpriteAffineAnimTable_8338D0C[] = { +static const union AffineAnimCmd *const gSpriteAffineAnimTable_8338D0C[] = +{ gSpriteAffineAnim_8338CCC, gSpriteAffineAnim_8338CDC, gSpriteAffineAnim_8338CEC }; -static const struct SpriteSheet gUnknown_08338D18 = { - gTradeBallTiles, 0x600, 5557 +static const struct SpriteSheet gUnknown_08338D18 = +{ + .data = gTradeBallTiles, + .size = 0x600, + .tag = 5557 }; -static const struct SpritePalette gUnknown_08338D20 = { - gTradeBallPalette, 5558 +static const struct SpritePalette gUnknown_08338D20 = +{ + .data = gTradeBallPalette, + .tag = 5558 }; -static const struct SpriteTemplate gSpriteTemplate_8338D28 = { - 5557, - 5558, - &gOamData_8338C44, - gSpriteAnimTable_8338C88, - NULL, - gSpriteAffineAnimTable_8338D0C, - sub_807E55C +static const struct SpriteTemplate gSpriteTemplate_8338D28 = +{ + .tileTag = 5557, + .paletteTag = 5558, + .oam = &gOamData_8338C44, + .anims = gSpriteAnimTable_8338C88, + .images = NULL, + .affineAnims = gSpriteAffineAnimTable_8338D0C, + .callback = sub_807E55C }; -static const struct OamData gOamData_8338D40 = { +static const struct OamData gOamData_8338D40 = +{ .affineMode = 1, .objMode = 1, - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 1 }; -static const union AnimCmd gSpriteAnim_8338D48[] = { +static const union AnimCmd gSpriteAnim_8338D48[] = +{ ANIMCMD_FRAME(0, 5, .hFlip = TRUE, .vFlip = TRUE), ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_8338D50[] = { +static const union AnimCmd *const gSpriteAnimTable_8338D50[] = +{ gSpriteAnim_8338D48 }; -static const union AffineAnimCmd gSpriteAffineAnim_8338D54[] = { +static const union AffineAnimCmd gSpriteAffineAnim_8338D54[] = +{ AFFINEANIMCMD_FRAME(-10, -10, 0, 5), AFFINEANIMCMD_FRAME(10, 10, 0, 5), AFFINEANIMCMD_JUMP(0) }; -static const union AffineAnimCmd *const gSpriteAffineAnimTable_8338D6C[] = { +static const union AffineAnimCmd *const gSpriteAffineAnimTable_8338D6C[] = +{ gSpriteAffineAnim_8338D54 }; -static const struct SpriteSheet gUnknown_08338D70 = { - gTradeGlow1Tiles, 0x200, 5550 +static const struct SpriteSheet gUnknown_08338D70 = +{ + .data = gTradeGlow1Tiles, + .size = 0x200, + .tag = 5550 }; -static const struct SpritePalette gUnknown_08338D78 = { - gUnknown_08330940, 5551 +static const struct SpritePalette gUnknown_08338D78 = +{ + .data = gUnknown_08330940, + .tag = 5551 }; -static const struct SpritePalette gUnknown_08338D80 = { - gUnknown_083308E0, 5555 +static const struct SpritePalette gUnknown_08338D80 = +{ + .data = gUnknown_083308E0, + .tag = 5555 }; -static const struct SpriteTemplate gUnknown_08338D88 = { - 5550, - 5551, - &gOamData_8338D40, - gSpriteAnimTable_8338D50, - NULL, - gSpriteAffineAnimTable_8338D6C, - sub_807AA28 +static const struct SpriteTemplate gUnknown_08338D88 = +{ + .tileTag = 5550, + .paletteTag = 5551, + .oam = &gOamData_8338D40, + .anims = gSpriteAnimTable_8338D50, + .images = NULL, + .affineAnims = gSpriteAffineAnimTable_8338D6C, + .callback = sub_807AA28 }; -static const struct OamData gOamData_8338DA0 = { - .shape = ST_OAM_V_RECTANGLE, - .size = 2, +static const struct OamData gOamData_8338DA0 = +{ + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 1 }; -static const union AnimCmd gSpriteAnim_8338DA8[] = { +static const union AnimCmd gSpriteAnim_8338DA8[] = +{ ANIMCMD_FRAME(0, 5, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_8338DB0[] = { +static const union AnimCmd gSpriteAnim_8338DB0[] = +{ ANIMCMD_FRAME(8, 5, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_8338DB8[] = { +static const union AnimCmd *const gSpriteAnimTable_8338DB8[] = +{ gSpriteAnim_8338DA8, gSpriteAnim_8338DB0 }; -static const struct SpriteSheet gUnknown_08338DC0 = { - gTradeGlow2Tiles, 0x300, 5552 +static const struct SpriteSheet gUnknown_08338DC0 = +{ + .data = gTradeGlow2Tiles, + .size = 0x300, + .tag = 5552 }; -static const struct SpriteTemplate gSpriteTemplate_8338DC8 = { - 5552, - 5551, - &gOamData_8338DA0, - gSpriteAnimTable_8338DB8, - NULL, - gDummySpriteAffineAnimTable, - sub_807AA7C +static const struct SpriteTemplate gSpriteTemplate_8338DC8 = +{ + .tileTag = 5552, + .paletteTag = 5551, + .oam = &gOamData_8338DA0, + .anims = gSpriteAnimTable_8338DB8, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_807AA7C }; -static const struct OamData gOamData_8338DE0 = { - .shape = ST_OAM_V_RECTANGLE, - .size = 2, +static const struct OamData gOamData_8338DE0 = +{ + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), .priority = 1 }; -static const union AnimCmd gSpriteAnim_8338DE8[] = { +static const union AnimCmd gSpriteAnim_8338DE8[] = +{ ANIMCMD_FRAME(0, 10), ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_8338DF0[] = { +static const union AnimCmd *const gSpriteAnimTable_8338DF0[] = +{ gSpriteAnim_8338DE8 }; -static const struct SpriteSheet gUnknown_08338DF4 = { - gTradeCableEndTiles, 0x100, 5554 +static const struct SpriteSheet gUnknown_08338DF4 = +{ + .data = gTradeCableEndTiles, + .size = 0x100, + .tag = 5554 }; -static const struct SpriteTemplate gSpriteTemplate_8338DFC = { - 5554, - 5555, - &gOamData_8338DE0, - gSpriteAnimTable_8338DF0, - NULL, - gDummySpriteAffineAnimTable, - sub_807AABC +static const struct SpriteTemplate gSpriteTemplate_8338DFC = +{ + .tileTag = 5554, + .paletteTag = 5555, + .oam = &gOamData_8338DE0, + .anims = gSpriteAnimTable_8338DF0, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_807AABC }; -static const struct OamData gOamData_8338E14 = { - .shape = ST_OAM_H_RECTANGLE, - .size = 3, +static const struct OamData gOamData_8338E14 = +{ + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), .priority = 1 }; -static const union AnimCmd gSpriteAnim_8338E1C[] = { +static const union AnimCmd gSpriteAnim_8338E1C[] = +{ ANIMCMD_FRAME( 0, 2, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(32, 2, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(64, 2, .vFlip = TRUE, .hFlip = TRUE), @@ -1034,7 +1101,8 @@ static const union AnimCmd gSpriteAnim_8338E1C[] = { ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_8338E40[] = { +static const union AnimCmd gSpriteAnim_8338E40[] = +{ ANIMCMD_FRAME( 0, 2, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(32, 2, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(64, 2, .vFlip = TRUE, .hFlip = TRUE), @@ -1046,50 +1114,60 @@ static const union AnimCmd gSpriteAnim_8338E40[] = { ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_8338E64[] = { +static const union AnimCmd *const gSpriteAnimTable_8338E64[] = +{ gSpriteAnim_8338E1C }; -static const union AnimCmd *const gSpriteAnimTable_8338E68[] = { +static const union AnimCmd *const gSpriteAnimTable_8338E68[] = +{ gSpriteAnim_8338E40 }; -static const struct SpriteSheet gUnknown_08338E6C = { - gTradeGBAScreenTiles, 0x1000, 5556 +static const struct SpriteSheet gUnknown_08338E6C = +{ + .data = gTradeGBAScreenTiles, + .size = 0x1000, + .tag = 5556 }; -static const struct SpriteTemplate gSpriteTemplate_8338E74 = { - 5556, - 5555, - &gOamData_8338E14, - gSpriteAnimTable_8338E64, - NULL, - gDummySpriteAffineAnimTable, - sub_807AB04 +static const struct SpriteTemplate gSpriteTemplate_8338E74 = +{ + .tileTag = 5556, + .paletteTag = 5555, + .oam = &gOamData_8338E14, + .anims = gSpriteAnimTable_8338E64, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_807AB04 }; -static const struct SpriteTemplate gSpriteTemplate_8338E8C = { - 5556, - 5555, - &gOamData_8338E14, - gSpriteAnimTable_8338E68, - NULL, - gDummySpriteAffineAnimTable, - sub_807AB04 +static const struct SpriteTemplate gSpriteTemplate_8338E8C = +{ + .tileTag = 5556, + .paletteTag = 5555, + .oam = &gOamData_8338E14, + .anims = gSpriteAnimTable_8338E68, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_807AB04 }; static const u16 gUnknown_08338EA4[] = INCBIN_U16("graphics/trade/unknown_338EA4.gbapal"); -static const union AffineAnimCmd gSpriteAffineAnim_8338EBC[] = { +static const union AffineAnimCmd gSpriteAffineAnim_8338EBC[] = +{ AFFINEANIMCMD_FRAME(-0x100, 0x100, 0, 0), AFFINEANIMCMD_JUMP(0) }; -static const union AffineAnimCmd *const gSpriteAffineAnimTable_8338ECC[] = { +static const union AffineAnimCmd *const gSpriteAffineAnimTable_8338ECC[] = +{ gSpriteAffineAnim_8338EBC }; -static const struct InGameTrade gIngameTrades[] = { +static const struct InGameTrade gIngameTrades[] = +{ { _("DOTS"), SPECIES_SEEDOT, 5, 4, 5, 4, 4, 4, @@ -1131,7 +1209,8 @@ static const struct InGameTrade gIngameTrades[] = { } }; -static const u16 gIngameTradeMail[][10] = { +static const u16 gIngameTradeMail[][10] = +{ { EC_WORD_BE, EC_WORD_NICE, @@ -1233,7 +1312,8 @@ static const struct BgTemplate gUnknown_08339014[] = }, }; -static const s8 gTradeBallVerticalVelocityTable[] = { +static const s8 gTradeBallVerticalVelocityTable[] = +{ 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 2, 2, diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index d57685423..8172f09e6 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -43,13 +43,18 @@ static EWRAM_DATA struct PicData sSpritePics[PICS_COUNT] = {}; // .rodata static const struct PicData sDummyPicData = {}; + static const struct OamData gUnknown_0860B064 = { - .size = 3 + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64) }; + static const struct OamData gUnknown_0860B06C = { - .affineMode = 1, .size = 3 + .affineMode = 1, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64) }; // .text diff --git a/src/trainer_see.c b/src/trainer_see.c index 16ea88a45..9925aa6bc 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -100,10 +100,10 @@ static const struct OamData sOamData_Icons = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -112,13 +112,22 @@ static const struct OamData sOamData_Icons = static const struct SpriteFrameImage sSpriteImageTable_ExclamationQuestionMark[] = { - {sEmotion_ExclamationMarkGfx, 0x80}, - {sEmotion_QuestionMarkGfx, 0x80} + { + .data = sEmotion_ExclamationMarkGfx, + .size = 0x80 + }, + { + .data = sEmotion_QuestionMarkGfx, + .size = 0x80 + } }; static const struct SpriteFrameImage sSpriteImageTable_HeartIcon[] = { - {sEmotion_HeartGfx, 0x80} + { + .data = sEmotion_HeartGfx, + .size = 0x80 + } }; static const union AnimCmd sSpriteAnim_Icons1[] = diff --git a/src/unk_transition.c b/src/unk_transition.c index d56998b5b..99479c866 100644 --- a/src/unk_transition.c +++ b/src/unk_transition.c @@ -40,7 +40,7 @@ static const u32 gUnknown_0862AF30[] = INCBIN_U32("graphics/battle_transitions/f static const u32 gUnknown_0862B0DC[] = INCBIN_U32("graphics/battle_transitions/frontier_transition_circles.4bpp.lz"); static const u16 gUnknown_0862B53C[] = INCBIN_U16("graphics/battle_transitions/frontier_transition.gbapal"); -// Unused Empty data. Feel free to delete. +// Unused Empty data. static const u8 sFiller[0x1C0] = {0}; static const struct OamData sOamData_862B71C = @@ -50,10 +50,10 @@ static const struct OamData sOamData_862B71C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 1, .paletteNum = 0, @@ -62,12 +62,15 @@ static const struct OamData sOamData_862B71C = static const struct CompressedSpriteSheet sUnknown_0862B724 = { - gUnknown_0862B0DC, 0x1800, 11920 + .data = gUnknown_0862B0DC, + .size = 0x1800, + .tag = 11920 }; static const struct SpritePalette sUnknown_0862B72C = { - gUnknown_0862B53C, 11920 + .data = gUnknown_0862B53C, + .tag = 11920 }; static const union AnimCmd sSpriteAnim_862B734[] = diff --git a/src/wallclock.c b/src/wallclock.c index d3bbcf7a2..810abb1d1 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -93,6 +93,7 @@ static const struct WindowTemplate gUnknown_085B21DC[] = }, DUMMY_WIN_TEMPLATE }; + static const struct WindowTemplate gUnknown_085B21F4 = { .bg = 0, @@ -103,7 +104,9 @@ static const struct WindowTemplate gUnknown_085B21F4 = .paletteNum = 14, .baseBlock = 572 }; -static const struct BgTemplate gUnknown_085B21FC[] = { + +static const struct BgTemplate gUnknown_085B21FC[] = +{ { .bg = 0, .charBaseIndex = 2, @@ -123,34 +126,57 @@ static const struct BgTemplate gUnknown_085B21FC[] = { .priority = 2 } }; -static const struct CompressedSpriteSheet gUnknown_085B2208 = { + +static const struct CompressedSpriteSheet gUnknown_085B2208 = +{ sUnknown_085B1F58, 0x2000, TAG_GFX_WALL_CLOCK_HAND }; -static const u32 filler_85B2210[2] = {}; -static const struct SpritePalette gUnknown_085B2218[] = { - { gWallclockMale_Pal, TAG_PAL_WALL_CLOCK_HAND }, - { gWallclockFemale_Pal, 0x1001 }, + +static const u8 filler_85B2210[8] = {0}; + +static const struct SpritePalette gUnknown_085B2218[] = +{ + { + .data = gWallclockMale_Pal, + .tag = TAG_PAL_WALL_CLOCK_HAND + }, + { + .data = gWallclockFemale_Pal, + .tag = 0x1001 + }, {} }; -static const struct OamData Unknown_085B2230 = { + +static const struct OamData Unknown_085B2230 = +{ .y = 160, - .size = 3, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), .priority = 1, }; -static const union AnimCmd Unknown_085B2238[] = { + +static const union AnimCmd Unknown_085B2238[] = +{ ANIMCMD_FRAME(0, 30), ANIMCMD_END, }; -static const union AnimCmd Unknown_085B2240[] = { + +static const union AnimCmd Unknown_085B2240[] = +{ ANIMCMD_FRAME(64, 30), ANIMCMD_END, }; -static const union AnimCmd *const gUnknown_085B2248[] = { + +static const union AnimCmd *const gUnknown_085B2248[] = +{ Unknown_085B2238 }; -static const union AnimCmd *const gUnknown_085B224C[] = { + +static const union AnimCmd *const gUnknown_085B224C[] = +{ Unknown_085B2240 }; + static const struct SpriteTemplate gUnknown_085B2250 = { .tileTag = TAG_GFX_WALL_CLOCK_HAND, @@ -161,6 +187,7 @@ static const struct SpriteTemplate gUnknown_085B2250 = .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_MinuteHand, }; + static const struct SpriteTemplate gUnknown_085B2268 = { .tileTag = TAG_GFX_WALL_CLOCK_HAND, @@ -171,25 +198,37 @@ static const struct SpriteTemplate gUnknown_085B2268 = .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_HourHand, }; -static const struct OamData Unknown_085B2280 = { + +static const struct OamData Unknown_085B2280 = +{ .y = 160, - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 3, }; -static const union AnimCmd Unknown_085B2288[] = { + +static const union AnimCmd Unknown_085B2288[] = +{ ANIMCMD_FRAME(132, 30), ANIMCMD_END, }; -static const union AnimCmd Unknown_085B2290[] = { + +static const union AnimCmd Unknown_085B2290[] = +{ ANIMCMD_FRAME(128, 30), ANIMCMD_END, }; -static const union AnimCmd *const gUnknown_085B2298[] = { + +static const union AnimCmd *const gUnknown_085B2298[] = +{ Unknown_085B2288 }; -static const union AnimCmd *const gUnknown_085B229C[] = { + +static const union AnimCmd *const gUnknown_085B229C[] = +{ Unknown_085B2290 }; + static const struct SpriteTemplate gUnknown_085B22A0 = { .tileTag = TAG_GFX_WALL_CLOCK_HAND, @@ -200,6 +239,7 @@ static const struct SpriteTemplate gUnknown_085B22A0 = .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_AMIndicator }; + static const struct SpriteTemplate gUnknown_085B22B8 = { .tileTag = TAG_GFX_WALL_CLOCK_HAND, @@ -210,7 +250,9 @@ static const struct SpriteTemplate gUnknown_085B22B8 = .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_PMIndicator }; -static const s8 sClockHandCoords[][2] = { + +static const s8 sClockHandCoords[][2] = +{ { 0x00, -0x18}, { 0x01, -0x19}, { 0x01, -0x19},