summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/decoration.c314
-rw-r--r--src/field_map_obj.c274
-rw-r--r--src/secret_base.c890
-rw-r--r--src/tv.c1112
-rw-r--r--src/util.c690
5 files changed, 1632 insertions, 1648 deletions
diff --git a/src/decoration.c b/src/decoration.c
index 73a2a6749..a2b0dcd31 100755
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -18,22 +18,6 @@
#include "field_weather.h"
#include "decoration.h"
-#define DECORATION(_id, _name, _permission, _shape, _category, _price, _description, _tiles) {\
-.id = _id,\
-.name = _name,\
-.permission = _permission,\
-.shape = _shape,\
-.category = _category,\
-.price = _price,\
-.description = _description,\
-.tiles = _tiles\
-}
-
-#define MENUACTION2(_text, _func) {.text = _text, .func = _func}
-#define MENUACTION3(_func1, _func2) {.func1 = _func1, .func2 = _func2}
-#define STRUCT_803EC860(_data1, _data2, _data3, _size) {.tiles = _data1, .y = _data2, .x = _data3, .size = _size}
-#define DECOSPRITETEMPLATE(_shape, _size, _x, _y) {.shape = _shape, .size = _size, .x = _x, .y = _y}
-
const u8 DecorDesc_SMALL_DESK[] = _(
"A small desk built\n"
"for one.");
@@ -1255,127 +1239,127 @@ const u16 DecorGfx_REGISTEEL_DOLL[] = {
};
const struct Decoration gDecorations[] = {
- DECORATION(DECOR_NONE, _("SMALL DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_DESK, 0, DecorDesc_SMALL_DESK, DecorGfx_SMALL_DESK),
- DECORATION(DECOR_SMALL_DESK, _("SMALL DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_DESK, 3000, DecorDesc_SMALL_DESK, DecorGfx_SMALL_DESK),
- DECORATION(DECOR_POKEMON_DESK, _("POKéMON DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_DESK, 3000, DecorDesc_POKEMON_DESK, DecorGfx_POKEMON_DESK),
- DECORATION(DECOR_HEAVY_DESK, _("HEAVY DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x2, DECORCAT_DESK, 6000, DecorDesc_HEAVY_DESK, DecorGfx_HEAVY_DESK),
- DECORATION(DECOR_RAGGED_DESK, _("RAGGED DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x2, DECORCAT_DESK, 6000, DecorDesc_RAGGED_DESK, DecorGfx_RAGGED_DESK),
- DECORATION(DECOR_COMFORT_DESK, _("COMFORT DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x2, DECORCAT_DESK, 6000, DecorDesc_COMFORT_DESK, DecorGfx_COMFORT_DESK),
- DECORATION(DECOR_PRETTY_DESK, _("PRETTY DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x3, DECORCAT_DESK, 9000, DecorDesc_PRETTY_DESK, DecorGfx_PRETTY_DESK),
- DECORATION(DECOR_BRICK_DESK, _("BRICK DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x3, DECORCAT_DESK, 9000, DecorDesc_BRICK_DESK, DecorGfx_BRICK_DESK),
- DECORATION(DECOR_CAMP_DESK, _("CAMP DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x3, DECORCAT_DESK, 9000, DecorDesc_CAMP_DESK, DecorGfx_CAMP_DESK),
- DECORATION(DECOR_HARD_DESK, _("HARD DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x3, DECORCAT_DESK, 9000, DecorDesc_HARD_DESK, DecorGfx_HARD_DESK),
- DECORATION(DECOR_SMALL_CHAIR, _("SMALL CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_SMALL_CHAIR, DecorGfx_SMALL_CHAIR),
- DECORATION(DECOR_POKEMON_CHAIR, _("POKéMON CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_POKEMON_CHAIR, DecorGfx_POKEMON_CHAIR),
- DECORATION(DECOR_HEAVY_CHAIR, _("HEAVY CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_HEAVY_CHAIR, DecorGfx_HEAVY_CHAIR),
- DECORATION(DECOR_PRETTY_CHAIR, _("PRETTY CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_PRETTY_CHAIR, DecorGfx_PRETTY_CHAIR),
- DECORATION(DECOR_COMFORT_CHAIR, _("COMFORT CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_COMFORT_CHAIR, DecorGfx_COMFORT_CHAIR),
- DECORATION(DECOR_RAGGED_CHAIR, _("RAGGED CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_RAGGED_CHAIR, DecorGfx_RAGGED_CHAIR),
- DECORATION(DECOR_BRICK_CHAIR, _("BRICK CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_BRICK_CHAIR, DecorGfx_BRICK_CHAIR),
- DECORATION(DECOR_CAMP_CHAIR, _("CAMP CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_CAMP_CHAIR, DecorGfx_CAMP_CHAIR),
- DECORATION(DECOR_HARD_CHAIR, _("HARD CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_HARD_CHAIR, DecorGfx_HARD_CHAIR),
- DECORATION(DECOR_RED_PLANT, _("RED PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_PLANT, 3000, DecorDesc_RED_PLANT, DecorGfx_RED_PLANT),
- DECORATION(DECOR_TROPICAL_PLANT, _("TROPICAL PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_PLANT, 3000, DecorDesc_TROPICAL_PLANT, DecorGfx_TROPICAL_PLANT),
- DECORATION(DECOR_PRETTY_FLOWERS, _("PRETTY FLOWERS"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_PLANT, 3000, DecorDesc_PRETTY_FLOWERS, DecorGfx_PRETTY_FLOWERS),
- DECORATION(DECOR_COLORFUL_PLANT, _("COLORFUL PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_2x2, DECORCAT_PLANT, 5000, DecorDesc_COLORFUL_PLANT, DecorGfx_COLORFUL_PLANT),
- DECORATION(DECOR_BIG_PLANT, _("BIG PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_2x2, DECORCAT_PLANT, 5000, DecorDesc_BIG_PLANT, DecorGfx_BIG_PLANT),
- DECORATION(DECOR_GORGEOUS_PLANT, _("GORGEOUS PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_2x2, DECORCAT_PLANT, 5000, DecorDesc_GORGEOUS_PLANT, DecorGfx_GORGEOUS_PLANT),
- DECORATION(DECOR_RED_BRICK, _("RED BRICK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 500, DecorDesc_RED_BRICK, DecorGfx_RED_BRICK),
- DECORATION(DECOR_YELLOW_BRICK, _("YELLOW BRICK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 500, DecorDesc_YELLOW_BRICK, DecorGfx_YELLOW_BRICK),
- DECORATION(DECOR_BLUE_BRICK, _("BLUE BRICK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 500, DecorDesc_BLUE_BRICK, DecorGfx_BLUE_BRICK),
- DECORATION(DECOR_RED_BALLOON, _("RED BALLOON"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_RED_BALLOON, DecorGfx_RED_BALLOON),
- DECORATION(DECOR_BLUE_BALLOON, _("BLUE BALLOON"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_BLUE_BALLOON, DecorGfx_BLUE_BALLOON),
- DECORATION(DECOR_YELLOW_BALLOON, _("YELLOW BALLOON"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_YELLOW_BALLOON, DecorGfx_YELLOW_BALLOON),
- DECORATION(DECOR_RED_TENT, _("RED TENT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_ORNAMENT, 10000, DecorDesc_RED_TENT, DecorGfx_RED_TENT),
- DECORATION(DECOR_BLUE_TENT, _("BLUE TENT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_ORNAMENT, 10000, DecorDesc_BLUE_TENT, DecorGfx_BLUE_TENT),
- DECORATION(DECOR_SOLID_BOARD, _("SOLID BOARD"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 3000, DecorDesc_SOLID_BOARD, DecorGfx_SOLID_BOARD),
- DECORATION(DECOR_SLIDE, _("SLIDE"), DECORPERM_PASS_FLOOR, DECORSHAPE_2x4, DECORCAT_ORNAMENT, 8000, DecorDesc_SLIDE, DecorGfx_SLIDE),
- DECORATION(DECOR_FENCE_LENGTH, _("FENCE LENGTH"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_FENCE_LENGTH, DecorGfx_FENCE_LENGTH),
- DECORATION(DECOR_FENCE_WIDTH, _("FENCE WIDTH"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_FENCE_WIDTH, DecorGfx_FENCE_WIDTH),
- DECORATION(DECOR_TIRE, _("TIRE"), DECORPERM_SOLID_FLOOR, DECORSHAPE_2x2, DECORCAT_ORNAMENT, 800, DecorDesc_TIRE, DecorGfx_TIRE),
- DECORATION(DECOR_STAND, _("STAND"), DECORPERM_PASS_FLOOR, DECORSHAPE_4x2, DECORCAT_ORNAMENT, 7000, DecorDesc_STAND, DecorGfx_STAND),
- DECORATION(DECOR_MUD_BALL, _("MUD BALL"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 200, DecorDesc_MUD_BALL, DecorGfx_MUD_BALL),
- DECORATION(DECOR_BREAKABLE_DOOR, _("BREAKABLE DOOR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 3000, DecorDesc_BREAKABLE_DOOR, DecorGfx_BREAKABLE_DOOR),
- DECORATION(DECOR_SAND_ORNAMENT, _("SAND ORNAMENT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 3000, DecorDesc_SAND_ORNAMENT, DecorGfx_SAND_ORNAMENT),
- DECORATION(DECOR_SILVER_SHIELD, _("SILVER SHIELD"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 0, DecorDesc_SILVER_SHIELD, DecorGfx_SILVER_SHIELD),
- DECORATION(DECOR_GOLD_SHIELD, _("GOLD SHIELD"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 0, DecorDesc_GOLD_SHIELD, DecorGfx_GOLD_SHIELD),
- DECORATION(DECOR_GLASS_ORNAMENT, _("GLASS ORNAMENT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 0, DecorDesc_GLASS_ORNAMENT, DecorGfx_GLASS_ORNAMENT),
- DECORATION(DECOR_TV, _("TV"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 3000, DecorDesc_TV, DecorGfx_TV),
- DECORATION(DECOR_ROUND_TV, _("ROUND TV"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 4000, DecorDesc_ROUND_TV, DecorGfx_ROUND_TV),
- DECORATION(DECOR_CUTE_TV, _("CUTE TV"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 4000, DecorDesc_CUTE_TV, DecorGfx_CUTE_TV),
- DECORATION(DECOR_GLITTER_MAT, _("GLITTER MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 2000, DecorDesc_GLITTER_MAT, DecorGfx_GLITTER_MAT),
- DECORATION(DECOR_JUMP_MAT, _("JUMP MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 2000, DecorDesc_JUMP_MAT, DecorGfx_JUMP_MAT),
- DECORATION(DECOR_SPIN_MAT, _("SPIN MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 2000, DecorDesc_SPIN_MAT, DecorGfx_SPIN_MAT),
- DECORATION(DECOR_C_LOW_NOTE_MAT, _("C Low NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_C_LOW_NOTE_MAT, DecorGfx_C_LOW_NOTE_MAT),
- DECORATION(DECOR_D_NOTE_MAT, _("D NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_D_NOTE_MAT, DecorGfx_D_NOTE_MAT),
- DECORATION(DECOR_E_NOTE_MAT, _("E NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_E_NOTE_MAT, DecorGfx_E_NOTE_MAT),
- DECORATION(DECOR_F_NOTE_MAT, _("F NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_F_NOTE_MAT, DecorGfx_F_NOTE_MAT),
- DECORATION(DECOR_G_NOTE_MAT, _("G NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_G_NOTE_MAT, DecorGfx_G_NOTE_MAT),
- DECORATION(DECOR_A_NOTE_MAT, _("A NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_A_NOTE_MAT, DecorGfx_A_NOTE_MAT),
- DECORATION(DECOR_B_NOTE_MAT, _("B NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_B_NOTE_MAT, DecorGfx_B_NOTE_MAT),
- DECORATION(DECOR_C_HIGH_NOTE_MAT, _("C High NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_C_HIGH_NOTE_MAT, DecorGfx_C_HIGH_NOTE_MAT),
- DECORATION(DECOR_SURF_MAT, _("SURF MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_SURF_MAT, DecorGfx_SURF_MAT),
- DECORATION(DECOR_THUNDER_MAT, _("THUNDER MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_THUNDER_MAT, DecorGfx_THUNDER_MAT),
- DECORATION(DECOR_FIRE_BLAST_MAT, _("FIRE BLAST MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_FIRE_BLAST_MAT, DecorGfx_FIRE_BLAST_MAT),
- DECORATION(DECOR_POWDER_SNOW_MAT, _("POWDER SNOW MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_POWDER_SNOW_MAT, DecorGfx_POWDER_SNOW_MAT),
- DECORATION(DECOR_ATTRACT_MAT, _("ATTRACT MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_ATTRACT_MAT, DecorGfx_ATTRACT_MAT),
- DECORATION(DECOR_FISSURE_MAT, _("FISSURE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_FISSURE_MAT, DecorGfx_FISSURE_MAT),
- DECORATION(DECOR_SPIKES_MAT, _("SPIKES MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_SPIKES_MAT, DecorGfx_SPIKES_MAT),
- DECORATION(DECOR_BALL_POSTER, _("BALL POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_BALL_POSTER, DecorGfx_BALL_POSTER),
- DECORATION(DECOR_GREEN_POSTER, _("GREEN POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_GREEN_POSTER, DecorGfx_GREEN_POSTER),
- DECORATION(DECOR_RED_POSTER, _("RED POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_RED_POSTER, DecorGfx_RED_POSTER),
- DECORATION(DECOR_BLUE_POSTER, _("BLUE POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_BLUE_POSTER, DecorGfx_BLUE_POSTER),
- DECORATION(DECOR_CUTE_POSTER, _("CUTE POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_CUTE_POSTER, DecorGfx_CUTE_POSTER),
- DECORATION(DECOR_PIKA_POSTER, _("PIKA POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_PIKA_POSTER, DecorGfx_PIKA_POSTER),
- DECORATION(DECOR_LONG_POSTER, _("LONG POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_LONG_POSTER, DecorGfx_LONG_POSTER),
- DECORATION(DECOR_SEA_POSTER, _("SEA POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_SEA_POSTER, DecorGfx_SEA_POSTER),
- DECORATION(DECOR_SKY_POSTER, _("SKY POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_SKY_POSTER, DecorGfx_SKY_POSTER),
- DECORATION(DECOR_KISS_POSTER, _("KISS POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_KISS_POSTER, DecorGfx_KISS_POSTER),
- DECORATION(DECOR_PICHU_DOLL, _("PICHU DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_PICHU_DOLL, DecorGfx_PICHU_DOLL),
- DECORATION(DECOR_PIKACHU_DOLL, _("PIKACHU DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_PIKACHU_DOLL, DecorGfx_PIKACHU_DOLL),
- DECORATION(DECOR_MARILL_DOLL, _("MARILL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_MARILL_DOLL, DecorGfx_MARILL_DOLL),
- DECORATION(DECOR_TOGEPI_DOLL, _("TOGEPI DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_TOGEPI_DOLL, DecorGfx_TOGEPI_DOLL),
- DECORATION(DECOR_CYNDAQUIL_DOLL, _("CYNDAQUIL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_CYNDAQUIL_DOLL, DecorGfx_CYNDAQUIL_DOLL),
- DECORATION(DECOR_CHIKORITA_DOLL, _("CHIKORITA DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_CHIKORITA_DOLL, DecorGfx_CHIKORITA_DOLL),
- DECORATION(DECOR_TOTODILE_DOLL, _("TOTODILE DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_TOTODILE_DOLL, DecorGfx_TOTODILE_DOLL),
- DECORATION(DECOR_JIGGLYPUFF_DOLL, _("JIGGLYPUFF DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_JIGGLYPUFF_DOLL, DecorGfx_JIGGLYPUFF_DOLL),
- DECORATION(DECOR_MEOWTH_DOLL, _("MEOWTH DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_MEOWTH_DOLL, DecorGfx_MEOWTH_DOLL),
- DECORATION(DECOR_CLEFAIRY_DOLL, _("CLEFAIRY DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_CLEFAIRY_DOLL, DecorGfx_CLEFAIRY_DOLL),
- DECORATION(DECOR_DITTO_DOLL, _("DITTO DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_DITTO_DOLL, DecorGfx_DITTO_DOLL),
- DECORATION(DECOR_SMOOCHUM_DOLL, _("SMOOCHUM DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_SMOOCHUM_DOLL, DecorGfx_SMOOCHUM_DOLL),
- DECORATION(DECOR_TREECKO_DOLL, _("TREECKO DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_TREECKO_DOLL, DecorGfx_TREECKO_DOLL),
- DECORATION(DECOR_TORCHIC_DOLL, _("TORCHIC DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_TORCHIC_DOLL, DecorGfx_TORCHIC_DOLL),
- DECORATION(DECOR_MUDKIP_DOLL, _("MUDKIP DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_MUDKIP_DOLL, DecorGfx_MUDKIP_DOLL),
- DECORATION(DECOR_DUSKULL_DOLL, _("DUSKULL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_DUSKULL_DOLL, DecorGfx_DUSKULL_DOLL),
- DECORATION(DECOR_WYNAUT_DOLL, _("WYNAUT DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_WYNAUT_DOLL, DecorGfx_WYNAUT_DOLL),
- DECORATION(DECOR_BALTOY_DOLL, _("BALTOY DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_BALTOY_DOLL, DecorGfx_BALTOY_DOLL),
- DECORATION(DECOR_KECLEON_DOLL, _("KECLEON DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_KECLEON_DOLL, DecorGfx_KECLEON_DOLL),
- DECORATION(DECOR_AZURILL_DOLL, _("AZURILL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_AZURILL_DOLL, DecorGfx_AZURILL_DOLL),
- DECORATION(DECOR_SKITTY_DOLL, _("SKITTY DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_SKITTY_DOLL, DecorGfx_SKITTY_DOLL),
- DECORATION(DECOR_SWABLU_DOLL, _("SWABLU DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_SWABLU_DOLL, DecorGfx_SWABLU_DOLL),
- DECORATION(DECOR_GULPIN_DOLL, _("GULPIN DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_GULPIN_DOLL, DecorGfx_GULPIN_DOLL),
- DECORATION(DECOR_LOTAD_DOLL, _("LOTAD DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_LOTAD_DOLL, DecorGfx_LOTAD_DOLL),
- DECORATION(DECOR_SEEDOT_DOLL, _("SEEDOT DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_SEEDOT_DOLL, DecorGfx_SEEDOT_DOLL),
- DECORATION(DECOR_PIKA_CUSHION, _("PIKA CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_PIKA_CUSHION, DecorGfx_PIKA_CUSHION),
- DECORATION(DECOR_ROUND_CUSHION, _("ROUND CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_ROUND_CUSHION, DecorGfx_ROUND_CUSHION),
- DECORATION(DECOR_KISS_CUSHION, _("KISS CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_KISS_CUSHION, DecorGfx_KISS_CUSHION),
- DECORATION(DECOR_ZIGZAG_CUSHION, _("ZIGZAG CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_ZIGZAG_CUSHION, DecorGfx_ZIGZAG_CUSHION),
- DECORATION(DECOR_SPIN_CUSHION, _("SPIN CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_SPIN_CUSHION, DecorGfx_SPIN_CUSHION),
- DECORATION(DECOR_DIAMOND_CUSHION, _("DIAMOND CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_DIAMOND_CUSHION, DecorGfx_DIAMOND_CUSHION),
- DECORATION(DECOR_BALL_CUSHION, _("BALL CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_BALL_CUSHION, DecorGfx_BALL_CUSHION),
- DECORATION(DECOR_GRASS_CUSHION, _("GRASS CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_GRASS_CUSHION, DecorGfx_GRASS_CUSHION),
- DECORATION(DECOR_FIRE_CUSHION, _("FIRE CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_FIRE_CUSHION, DecorGfx_FIRE_CUSHION),
- DECORATION(DECOR_WATER_CUSHION, _("WATER CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_WATER_CUSHION, DecorGfx_WATER_CUSHION),
- DECORATION(DECOR_SNORLAX_DOLL, _("SNORLAX DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_SNORLAX_DOLL, DecorGfx_SNORLAX_DOLL),
- DECORATION(DECOR_RHYDON_DOLL, _("RHYDON DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_RHYDON_DOLL, DecorGfx_RHYDON_DOLL),
- DECORATION(DECOR_LAPRAS_DOLL, _("LAPRAS DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_LAPRAS_DOLL, DecorGfx_LAPRAS_DOLL),
- DECORATION(DECOR_VENUSAUR_DOLL, _("VENUSAUR DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_VENUSAUR_DOLL, DecorGfx_VENUSAUR_DOLL),
- DECORATION(DECOR_CHARIZARD_DOLL, _("CHARIZARD DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_CHARIZARD_DOLL, DecorGfx_CHARIZARD_DOLL),
- DECORATION(DECOR_BLASTOISE_DOLL, _("BLASTOISE DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_BLASTOISE_DOLL, DecorGfx_BLASTOISE_DOLL),
- DECORATION(DECOR_WAILMER_DOLL, _("WAILMER DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_WAILMER_DOLL, DecorGfx_WAILMER_DOLL),
- DECORATION(DECOR_REGIROCK_DOLL, _("REGIROCK DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGIROCK_DOLL, DecorGfx_REGIROCK_DOLL),
- DECORATION(DECOR_REGICE_DOLL, _("REGICE DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGICE_DOLL, DecorGfx_REGICE_DOLL),
- DECORATION(DECOR_REGISTEEL_DOLL, _("REGISTEEL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGISTEEL_DOLL, DecorGfx_REGISTEEL_DOLL)
+ {DECOR_NONE, _("SMALL DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_DESK, 0, DecorDesc_SMALL_DESK, DecorGfx_SMALL_DESK},
+ {DECOR_SMALL_DESK, _("SMALL DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_DESK, 3000, DecorDesc_SMALL_DESK, DecorGfx_SMALL_DESK},
+ {DECOR_POKEMON_DESK, _("POKéMON DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_DESK, 3000, DecorDesc_POKEMON_DESK, DecorGfx_POKEMON_DESK},
+ {DECOR_HEAVY_DESK, _("HEAVY DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x2, DECORCAT_DESK, 6000, DecorDesc_HEAVY_DESK, DecorGfx_HEAVY_DESK},
+ {DECOR_RAGGED_DESK, _("RAGGED DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x2, DECORCAT_DESK, 6000, DecorDesc_RAGGED_DESK, DecorGfx_RAGGED_DESK},
+ {DECOR_COMFORT_DESK, _("COMFORT DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x2, DECORCAT_DESK, 6000, DecorDesc_COMFORT_DESK, DecorGfx_COMFORT_DESK},
+ {DECOR_PRETTY_DESK, _("PRETTY DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x3, DECORCAT_DESK, 9000, DecorDesc_PRETTY_DESK, DecorGfx_PRETTY_DESK},
+ {DECOR_BRICK_DESK, _("BRICK DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x3, DECORCAT_DESK, 9000, DecorDesc_BRICK_DESK, DecorGfx_BRICK_DESK},
+ {DECOR_CAMP_DESK, _("CAMP DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x3, DECORCAT_DESK, 9000, DecorDesc_CAMP_DESK, DecorGfx_CAMP_DESK},
+ {DECOR_HARD_DESK, _("HARD DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_3x3, DECORCAT_DESK, 9000, DecorDesc_HARD_DESK, DecorGfx_HARD_DESK},
+ {DECOR_SMALL_CHAIR, _("SMALL CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_SMALL_CHAIR, DecorGfx_SMALL_CHAIR},
+ {DECOR_POKEMON_CHAIR, _("POKéMON CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_POKEMON_CHAIR, DecorGfx_POKEMON_CHAIR},
+ {DECOR_HEAVY_CHAIR, _("HEAVY CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_HEAVY_CHAIR, DecorGfx_HEAVY_CHAIR},
+ {DECOR_PRETTY_CHAIR, _("PRETTY CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_PRETTY_CHAIR, DecorGfx_PRETTY_CHAIR},
+ {DECOR_COMFORT_CHAIR, _("COMFORT CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_COMFORT_CHAIR, DecorGfx_COMFORT_CHAIR},
+ {DECOR_RAGGED_CHAIR, _("RAGGED CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_RAGGED_CHAIR, DecorGfx_RAGGED_CHAIR},
+ {DECOR_BRICK_CHAIR, _("BRICK CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_BRICK_CHAIR, DecorGfx_BRICK_CHAIR},
+ {DECOR_CAMP_CHAIR, _("CAMP CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_CAMP_CHAIR, DecorGfx_CAMP_CHAIR},
+ {DECOR_HARD_CHAIR, _("HARD CHAIR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_CHAIR, 2000, DecorDesc_HARD_CHAIR, DecorGfx_HARD_CHAIR},
+ {DECOR_RED_PLANT, _("RED PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_PLANT, 3000, DecorDesc_RED_PLANT, DecorGfx_RED_PLANT},
+ {DECOR_TROPICAL_PLANT, _("TROPICAL PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_PLANT, 3000, DecorDesc_TROPICAL_PLANT, DecorGfx_TROPICAL_PLANT},
+ {DECOR_PRETTY_FLOWERS, _("PRETTY FLOWERS"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_PLANT, 3000, DecorDesc_PRETTY_FLOWERS, DecorGfx_PRETTY_FLOWERS},
+ {DECOR_COLORFUL_PLANT, _("COLORFUL PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_2x2, DECORCAT_PLANT, 5000, DecorDesc_COLORFUL_PLANT, DecorGfx_COLORFUL_PLANT},
+ {DECOR_BIG_PLANT, _("BIG PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_2x2, DECORCAT_PLANT, 5000, DecorDesc_BIG_PLANT, DecorGfx_BIG_PLANT},
+ {DECOR_GORGEOUS_PLANT, _("GORGEOUS PLANT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_2x2, DECORCAT_PLANT, 5000, DecorDesc_GORGEOUS_PLANT, DecorGfx_GORGEOUS_PLANT},
+ {DECOR_RED_BRICK, _("RED BRICK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 500, DecorDesc_RED_BRICK, DecorGfx_RED_BRICK},
+ {DECOR_YELLOW_BRICK, _("YELLOW BRICK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 500, DecorDesc_YELLOW_BRICK, DecorGfx_YELLOW_BRICK},
+ {DECOR_BLUE_BRICK, _("BLUE BRICK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 500, DecorDesc_BLUE_BRICK, DecorGfx_BLUE_BRICK},
+ {DECOR_RED_BALLOON, _("RED BALLOON"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_RED_BALLOON, DecorGfx_RED_BALLOON},
+ {DECOR_BLUE_BALLOON, _("BLUE BALLOON"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_BLUE_BALLOON, DecorGfx_BLUE_BALLOON},
+ {DECOR_YELLOW_BALLOON, _("YELLOW BALLOON"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_YELLOW_BALLOON, DecorGfx_YELLOW_BALLOON},
+ {DECOR_RED_TENT, _("RED TENT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_ORNAMENT, 10000, DecorDesc_RED_TENT, DecorGfx_RED_TENT},
+ {DECOR_BLUE_TENT, _("BLUE TENT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_ORNAMENT, 10000, DecorDesc_BLUE_TENT, DecorGfx_BLUE_TENT},
+ {DECOR_SOLID_BOARD, _("SOLID BOARD"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 3000, DecorDesc_SOLID_BOARD, DecorGfx_SOLID_BOARD},
+ {DECOR_SLIDE, _("SLIDE"), DECORPERM_PASS_FLOOR, DECORSHAPE_2x4, DECORCAT_ORNAMENT, 8000, DecorDesc_SLIDE, DecorGfx_SLIDE},
+ {DECOR_FENCE_LENGTH, _("FENCE LENGTH"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_FENCE_LENGTH, DecorGfx_FENCE_LENGTH},
+ {DECOR_FENCE_WIDTH, _("FENCE WIDTH"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 500, DecorDesc_FENCE_WIDTH, DecorGfx_FENCE_WIDTH},
+ {DECOR_TIRE, _("TIRE"), DECORPERM_SOLID_FLOOR, DECORSHAPE_2x2, DECORCAT_ORNAMENT, 800, DecorDesc_TIRE, DecorGfx_TIRE},
+ {DECOR_STAND, _("STAND"), DECORPERM_PASS_FLOOR, DECORSHAPE_4x2, DECORCAT_ORNAMENT, 7000, DecorDesc_STAND, DecorGfx_STAND},
+ {DECOR_MUD_BALL, _("MUD BALL"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 200, DecorDesc_MUD_BALL, DecorGfx_MUD_BALL},
+ {DECOR_BREAKABLE_DOOR, _("BREAKABLE DOOR"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 3000, DecorDesc_BREAKABLE_DOOR, DecorGfx_BREAKABLE_DOOR},
+ {DECOR_SAND_ORNAMENT, _("SAND ORNAMENT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 3000, DecorDesc_SAND_ORNAMENT, DecorGfx_SAND_ORNAMENT},
+ {DECOR_SILVER_SHIELD, _("SILVER SHIELD"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 0, DecorDesc_SILVER_SHIELD, DecorGfx_SILVER_SHIELD},
+ {DECOR_GOLD_SHIELD, _("GOLD SHIELD"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 0, DecorDesc_GOLD_SHIELD, DecorGfx_GOLD_SHIELD},
+ {DECOR_GLASS_ORNAMENT, _("GLASS ORNAMENT"), DECORPERM_BEHIND_FLOOR, DECORSHAPE_1x2, DECORCAT_ORNAMENT, 0, DecorDesc_GLASS_ORNAMENT, DecorGfx_GLASS_ORNAMENT},
+ {DECOR_TV, _("TV"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 3000, DecorDesc_TV, DecorGfx_TV},
+ {DECOR_ROUND_TV, _("ROUND TV"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 4000, DecorDesc_ROUND_TV, DecorGfx_ROUND_TV},
+ {DECOR_CUTE_TV, _("CUTE TV"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_ORNAMENT, 4000, DecorDesc_CUTE_TV, DecorGfx_CUTE_TV},
+ {DECOR_GLITTER_MAT, _("GLITTER MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 2000, DecorDesc_GLITTER_MAT, DecorGfx_GLITTER_MAT},
+ {DECOR_JUMP_MAT, _("JUMP MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 2000, DecorDesc_JUMP_MAT, DecorGfx_JUMP_MAT},
+ {DECOR_SPIN_MAT, _("SPIN MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 2000, DecorDesc_SPIN_MAT, DecorGfx_SPIN_MAT},
+ {DECOR_C_LOW_NOTE_MAT, _("C Low NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_C_LOW_NOTE_MAT, DecorGfx_C_LOW_NOTE_MAT},
+ {DECOR_D_NOTE_MAT, _("D NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_D_NOTE_MAT, DecorGfx_D_NOTE_MAT},
+ {DECOR_E_NOTE_MAT, _("E NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_E_NOTE_MAT, DecorGfx_E_NOTE_MAT},
+ {DECOR_F_NOTE_MAT, _("F NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_F_NOTE_MAT, DecorGfx_F_NOTE_MAT},
+ {DECOR_G_NOTE_MAT, _("G NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_G_NOTE_MAT, DecorGfx_G_NOTE_MAT},
+ {DECOR_A_NOTE_MAT, _("A NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_A_NOTE_MAT, DecorGfx_A_NOTE_MAT},
+ {DECOR_B_NOTE_MAT, _("B NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_B_NOTE_MAT, DecorGfx_B_NOTE_MAT},
+ {DECOR_C_HIGH_NOTE_MAT, _("C High NOTE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_1x1, DECORCAT_MAT, 500, DecorDesc_C_HIGH_NOTE_MAT, DecorGfx_C_HIGH_NOTE_MAT},
+ {DECOR_SURF_MAT, _("SURF MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_SURF_MAT, DecorGfx_SURF_MAT},
+ {DECOR_THUNDER_MAT, _("THUNDER MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_THUNDER_MAT, DecorGfx_THUNDER_MAT},
+ {DECOR_FIRE_BLAST_MAT, _("FIRE BLAST MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_FIRE_BLAST_MAT, DecorGfx_FIRE_BLAST_MAT},
+ {DECOR_POWDER_SNOW_MAT, _("POWDER SNOW MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_POWDER_SNOW_MAT, DecorGfx_POWDER_SNOW_MAT},
+ {DECOR_ATTRACT_MAT, _("ATTRACT MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_ATTRACT_MAT, DecorGfx_ATTRACT_MAT},
+ {DECOR_FISSURE_MAT, _("FISSURE MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_FISSURE_MAT, DecorGfx_FISSURE_MAT},
+ {DECOR_SPIKES_MAT, _("SPIKES MAT"), DECORPERM_PASS_FLOOR, DECORSHAPE_3x3, DECORCAT_MAT, 4000, DecorDesc_SPIKES_MAT, DecorGfx_SPIKES_MAT},
+ {DECOR_BALL_POSTER, _("BALL POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_BALL_POSTER, DecorGfx_BALL_POSTER},
+ {DECOR_GREEN_POSTER, _("GREEN POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_GREEN_POSTER, DecorGfx_GREEN_POSTER},
+ {DECOR_RED_POSTER, _("RED POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_RED_POSTER, DecorGfx_RED_POSTER},
+ {DECOR_BLUE_POSTER, _("BLUE POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_BLUE_POSTER, DecorGfx_BLUE_POSTER},
+ {DECOR_CUTE_POSTER, _("CUTE POSTER"), DECORPERM_NA_WALL, DECORSHAPE_1x1, DECORCAT_POSTER, 1000, DecorDesc_CUTE_POSTER, DecorGfx_CUTE_POSTER},
+ {DECOR_PIKA_POSTER, _("PIKA POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_PIKA_POSTER, DecorGfx_PIKA_POSTER},
+ {DECOR_LONG_POSTER, _("LONG POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_LONG_POSTER, DecorGfx_LONG_POSTER},
+ {DECOR_SEA_POSTER, _("SEA POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_SEA_POSTER, DecorGfx_SEA_POSTER},
+ {DECOR_SKY_POSTER, _("SKY POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_SKY_POSTER, DecorGfx_SKY_POSTER},
+ {DECOR_KISS_POSTER, _("KISS POSTER"), DECORPERM_NA_WALL, DECORSHAPE_2x1, DECORCAT_POSTER, 1500, DecorDesc_KISS_POSTER, DecorGfx_KISS_POSTER},
+ {DECOR_PICHU_DOLL, _("PICHU DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_PICHU_DOLL, DecorGfx_PICHU_DOLL},
+ {DECOR_PIKACHU_DOLL, _("PIKACHU DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_PIKACHU_DOLL, DecorGfx_PIKACHU_DOLL},
+ {DECOR_MARILL_DOLL, _("MARILL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_MARILL_DOLL, DecorGfx_MARILL_DOLL},
+ {DECOR_TOGEPI_DOLL, _("TOGEPI DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_TOGEPI_DOLL, DecorGfx_TOGEPI_DOLL},
+ {DECOR_CYNDAQUIL_DOLL, _("CYNDAQUIL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_CYNDAQUIL_DOLL, DecorGfx_CYNDAQUIL_DOLL},
+ {DECOR_CHIKORITA_DOLL, _("CHIKORITA DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_CHIKORITA_DOLL, DecorGfx_CHIKORITA_DOLL},
+ {DECOR_TOTODILE_DOLL, _("TOTODILE DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_TOTODILE_DOLL, DecorGfx_TOTODILE_DOLL},
+ {DECOR_JIGGLYPUFF_DOLL, _("JIGGLYPUFF DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_JIGGLYPUFF_DOLL, DecorGfx_JIGGLYPUFF_DOLL},
+ {DECOR_MEOWTH_DOLL, _("MEOWTH DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_MEOWTH_DOLL, DecorGfx_MEOWTH_DOLL},
+ {DECOR_CLEFAIRY_DOLL, _("CLEFAIRY DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_CLEFAIRY_DOLL, DecorGfx_CLEFAIRY_DOLL},
+ {DECOR_DITTO_DOLL, _("DITTO DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_DITTO_DOLL, DecorGfx_DITTO_DOLL},
+ {DECOR_SMOOCHUM_DOLL, _("SMOOCHUM DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_SMOOCHUM_DOLL, DecorGfx_SMOOCHUM_DOLL},
+ {DECOR_TREECKO_DOLL, _("TREECKO DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_TREECKO_DOLL, DecorGfx_TREECKO_DOLL},
+ {DECOR_TORCHIC_DOLL, _("TORCHIC DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_TORCHIC_DOLL, DecorGfx_TORCHIC_DOLL},
+ {DECOR_MUDKIP_DOLL, _("MUDKIP DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_MUDKIP_DOLL, DecorGfx_MUDKIP_DOLL},
+ {DECOR_DUSKULL_DOLL, _("DUSKULL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_DUSKULL_DOLL, DecorGfx_DUSKULL_DOLL},
+ {DECOR_WYNAUT_DOLL, _("WYNAUT DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_WYNAUT_DOLL, DecorGfx_WYNAUT_DOLL},
+ {DECOR_BALTOY_DOLL, _("BALTOY DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_BALTOY_DOLL, DecorGfx_BALTOY_DOLL},
+ {DECOR_KECLEON_DOLL, _("KECLEON DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_KECLEON_DOLL, DecorGfx_KECLEON_DOLL},
+ {DECOR_AZURILL_DOLL, _("AZURILL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_AZURILL_DOLL, DecorGfx_AZURILL_DOLL},
+ {DECOR_SKITTY_DOLL, _("SKITTY DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_SKITTY_DOLL, DecorGfx_SKITTY_DOLL},
+ {DECOR_SWABLU_DOLL, _("SWABLU DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_SWABLU_DOLL, DecorGfx_SWABLU_DOLL},
+ {DECOR_GULPIN_DOLL, _("GULPIN DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_GULPIN_DOLL, DecorGfx_GULPIN_DOLL},
+ {DECOR_LOTAD_DOLL, _("LOTAD DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_LOTAD_DOLL, DecorGfx_LOTAD_DOLL},
+ {DECOR_SEEDOT_DOLL, _("SEEDOT DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_DOLL, 3000, DecorDesc_SEEDOT_DOLL, DecorGfx_SEEDOT_DOLL},
+ {DECOR_PIKA_CUSHION, _("PIKA CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_PIKA_CUSHION, DecorGfx_PIKA_CUSHION},
+ {DECOR_ROUND_CUSHION, _("ROUND CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_ROUND_CUSHION, DecorGfx_ROUND_CUSHION},
+ {DECOR_KISS_CUSHION, _("KISS CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_KISS_CUSHION, DecorGfx_KISS_CUSHION},
+ {DECOR_ZIGZAG_CUSHION, _("ZIGZAG CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_ZIGZAG_CUSHION, DecorGfx_ZIGZAG_CUSHION},
+ {DECOR_SPIN_CUSHION, _("SPIN CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_SPIN_CUSHION, DecorGfx_SPIN_CUSHION},
+ {DECOR_DIAMOND_CUSHION, _("DIAMOND CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_DIAMOND_CUSHION, DecorGfx_DIAMOND_CUSHION},
+ {DECOR_BALL_CUSHION, _("BALL CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_BALL_CUSHION, DecorGfx_BALL_CUSHION},
+ {DECOR_GRASS_CUSHION, _("GRASS CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_GRASS_CUSHION, DecorGfx_GRASS_CUSHION},
+ {DECOR_FIRE_CUSHION, _("FIRE CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_FIRE_CUSHION, DecorGfx_FIRE_CUSHION},
+ {DECOR_WATER_CUSHION, _("WATER CUSHION"), DECORPERM_SOLID_MAT, DECORSHAPE_1x1, DECORCAT_CUSHION, 2000, DecorDesc_WATER_CUSHION, DecorGfx_WATER_CUSHION},
+ {DECOR_SNORLAX_DOLL, _("SNORLAX DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_SNORLAX_DOLL, DecorGfx_SNORLAX_DOLL},
+ {DECOR_RHYDON_DOLL, _("RHYDON DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_RHYDON_DOLL, DecorGfx_RHYDON_DOLL},
+ {DECOR_LAPRAS_DOLL, _("LAPRAS DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_LAPRAS_DOLL, DecorGfx_LAPRAS_DOLL},
+ {DECOR_VENUSAUR_DOLL, _("VENUSAUR DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_VENUSAUR_DOLL, DecorGfx_VENUSAUR_DOLL},
+ {DECOR_CHARIZARD_DOLL, _("CHARIZARD DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_CHARIZARD_DOLL, DecorGfx_CHARIZARD_DOLL},
+ {DECOR_BLASTOISE_DOLL, _("BLASTOISE DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_BLASTOISE_DOLL, DecorGfx_BLASTOISE_DOLL},
+ {DECOR_WAILMER_DOLL, _("WAILMER DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_WAILMER_DOLL, DecorGfx_WAILMER_DOLL},
+ {DECOR_REGIROCK_DOLL, _("REGIROCK DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGIROCK_DOLL, DecorGfx_REGIROCK_DOLL},
+ {DECOR_REGICE_DOLL, _("REGICE DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGICE_DOLL, DecorGfx_REGICE_DOLL},
+ {DECOR_REGISTEEL_DOLL, _("REGISTEEL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGISTEEL_DOLL, DecorGfx_REGISTEEL_DOLL}
};
const u8 *const gUnknown_083EC5E4[] = {
@@ -1390,10 +1374,10 @@ const u8 *const gUnknown_083EC5E4[] = {
};
const struct MenuAction2 gUnknown_083EC604[] = {
- MENUACTION2(SecretBaseText_Decorate, sub_80FF160),
- MENUACTION2(SecretBaseText_PutAway, sub_8100A0C),
- MENUACTION2(SecretBaseText_Toss, sub_8101700),
- MENUACTION2(gUnknownText_Exit, gpu_pal_decompress_alloc_tag_and_upload)
+ {SecretBaseText_Decorate, sub_80FF160},
+ {SecretBaseText_PutAway, sub_8100A0C},
+ {SecretBaseText_Toss, sub_8101700},
+ {gUnknownText_Exit, gpu_pal_decompress_alloc_tag_and_upload}
};
const u8 *const gUnknown_083EC624[] = {
@@ -1404,10 +1388,10 @@ const u8 *const gUnknown_083EC624[] = {
};
const struct MenuAction3 gUnknown_083EC634[] = {
- MENUACTION3(sub_80FF5BC, sub_80FF058),
- MENUACTION3(sub_81017A0, sub_80FF058),
- MENUACTION3(sub_81017A0, sub_80FF058),
- MENUACTION3(sub_8109D04, sub_80FF058)
+ {sub_80FF5BC, sub_80FF058},
+ {sub_81017A0, sub_80FF058},
+ {sub_81017A0, sub_80FF058},
+ {sub_8109D04, sub_80FF058}
};
const u16 gUnknown_083EC654[] = {0x6318, 0x739C, 0x7FFF};
@@ -1445,29 +1429,29 @@ const u8 Unknown_3EC824[] = {4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 7, 4, 5, 4, 5, 4,
const u8 Unknown_3EC848[] = {4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 7, 4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 7};
const struct UnkStruct_803EC860 gUnknown_083EC860[] = {
- STRUCT_803EC860(Unknown_3EC660, Unknown_3EC6F0, Unknown_3EC7A8, 0x4),
- STRUCT_803EC860(Unknown_3EC68C, Unknown_3EC6F4, Unknown_3EC7AC, 0x8),
- STRUCT_803EC860(Unknown_3EC664, Unknown_3EC6FC, Unknown_3EC7B4, 0xc),
- STRUCT_803EC860(Unknown_3EC694, Unknown_3EC708, Unknown_3EC7C0, 0x20),
- STRUCT_803EC860(Unknown_3EC670, Unknown_3EC728, Unknown_3EC7E0, 0x10),
- STRUCT_803EC860(Unknown_3EC68C, Unknown_3EC738, Unknown_3EC7F0, 0x8),
- STRUCT_803EC860(Unknown_3EC680, Unknown_3EC740, Unknown_3EC7F8, 0xc),
- STRUCT_803EC860(Unknown_3EC694, Unknown_3EC74C, Unknown_3EC804, 0x20),
- STRUCT_803EC860(Unknown_3EC6B4, Unknown_3EC76C, Unknown_3EC824, 0x24),
- STRUCT_803EC860(Unknown_3EC6D8, Unknown_3EC790, Unknown_3EC848, 0x18)
+ {Unknown_3EC660, Unknown_3EC6F0, Unknown_3EC7A8, 0x4},
+ {Unknown_3EC68C, Unknown_3EC6F4, Unknown_3EC7AC, 0x8},
+ {Unknown_3EC664, Unknown_3EC6FC, Unknown_3EC7B4, 0xc},
+ {Unknown_3EC694, Unknown_3EC708, Unknown_3EC7C0, 0x20},
+ {Unknown_3EC670, Unknown_3EC728, Unknown_3EC7E0, 0x10},
+ {Unknown_3EC68C, Unknown_3EC738, Unknown_3EC7F0, 0x8},
+ {Unknown_3EC680, Unknown_3EC740, Unknown_3EC7F8, 0xc},
+ {Unknown_3EC694, Unknown_3EC74C, Unknown_3EC804, 0x20},
+ {Unknown_3EC6B4, Unknown_3EC76C, Unknown_3EC824, 0x24},
+ {Unknown_3EC6D8, Unknown_3EC790, Unknown_3EC848, 0x18}
};
const struct UnkStruct_083EC900 gUnknown_083EC900[] = {
- DECOSPRITETEMPLATE(0, 1, 0x78, 0x4e),
- DECOSPRITETEMPLATE(1, 2, 0x80, 0x4e),
- DECOSPRITETEMPLATE(1, 3, 0x90, 0x56),
- DECOSPRITETEMPLATE(1, 3, 0x90, 0x46),
- DECOSPRITETEMPLATE(0, 2, 0x80, 0x46),
- DECOSPRITETEMPLATE(2, 2, 0x78, 0x46),
- DECOSPRITETEMPLATE(2, 3, 0x80, 0x56),
- DECOSPRITETEMPLATE(2, 3, 0x80, 0x36),
- DECOSPRITETEMPLATE(0, 3, 0x90, 0x46),
- DECOSPRITETEMPLATE(1, 3, 0x90, 0x46)
+ {0, 1, 0x78, 0x4e},
+ {1, 2, 0x80, 0x4e},
+ {1, 3, 0x90, 0x56},
+ {1, 3, 0x90, 0x46},
+ {0, 2, 0x80, 0x46},
+ {2, 2, 0x78, 0x46},
+ {2, 3, 0x80, 0x56},
+ {2, 3, 0x80, 0x36},
+ {0, 3, 0x90, 0x46},
+ {1, 3, 0x90, 0x46}
};
const union AnimCmd gSpriteAnim_83EC928[] = {
diff --git a/src/field_map_obj.c b/src/field_map_obj.c
index eaad98cb0..26cd1de02 100644
--- a/src/field_map_obj.c
+++ b/src/field_map_obj.c
@@ -4302,39 +4302,39 @@ __attribute__((naked))
int state_to_direction(u8 a0, u8 a1, u8 a2)
{
asm(".syntax unified\n\
- push {r4,lr}\n\
- lsls r0, 24\n\
- lsrs r4, r0, 24\n\
- lsls r1, 24\n\
- lsrs r1, 24\n\
- adds r0, r1, 0\n\
- lsls r2, 24\n\
- lsrs r2, 24\n\
- cmp r1, 0\n\
- beq _08060BFC\n\
- cmp r2, 0\n\
- beq _08060BFC\n\
- cmp r1, 0x4\n\
- bhi _08060BFC\n\
- cmp r2, 0x4\n\
- bls _08060C00\n\
+ push {r4,lr}\n\
+ lsls r0, 24\n\
+ lsrs r4, r0, 24\n\
+ lsls r1, 24\n\
+ lsrs r1, 24\n\
+ adds r0, r1, 0\n\
+ lsls r2, 24\n\
+ lsrs r2, 24\n\
+ cmp r1, 0\n\
+ beq _08060BFC\n\
+ cmp r2, 0\n\
+ beq _08060BFC\n\
+ cmp r1, 0x4\n\
+ bhi _08060BFC\n\
+ cmp r2, 0x4\n\
+ bls _08060C00\n\
_08060BFC:\n\
- movs r0, 0\n\
- b _08060C12\n\
+ movs r0, 0\n\
+ b _08060C12\n\
_08060C00:\n\
- adds r1, r2, 0\n\
- bl zffu_offset_calc\n\
- ldr r2, _08060C18 @ =gUnknown_08375767\n\
- lsls r1, r4, 2\n\
- subs r1, 0x5\n\
- adds r0, r1\n\
- adds r0, r2\n\
- ldrb r0, [r0]\n\
+ adds r1, r2, 0\n\
+ bl zffu_offset_calc\n\
+ ldr r2, _08060C18 @ =gUnknown_08375767\n\
+ lsls r1, r4, 2\n\
+ subs r1, 0x5\n\
+ adds r0, r1\n\
+ adds r0, r2\n\
+ ldrb r0, [r0]\n\
_08060C12:\n\
- pop {r4}\n\
- pop {r1}\n\
- bx r1\n\
- .align 2, 0\n\
+ pop {r4}\n\
+ pop {r1}\n\
+ bx r1\n\
+ .align 2, 0\n\
_08060C18: .4byte gUnknown_08375767\n\
.syntax divided\n");
}
@@ -6609,121 +6609,121 @@ void sub_80634E8(struct MapObject *mapObject, struct Sprite *sprite)
__attribute__((naked))
void sub_80634E8(struct MapObject *mapObject, struct Sprite *sprite) {
asm(".syntax unified\n\
- push {r4-r6,lr}\n\
- adds r5, r0, 0\n\
- adds r4, r1, 0\n\
- ldrb r1, [r5, 0x1]\n\
- movs r0, 0x41\n\
- negs r0, r0\n\
- ands r0, r1\n\
- strb r0, [r5, 0x1]\n\
- ldrb r0, [r5, 0x5]\n\
- bl GetFieldObjectGraphicsInfo\n\
- adds r6, r0, 0\n\
- adds r0, r4, 0\n\
- adds r0, 0x3E\n\
- ldrb r1, [r0]\n\
- movs r0, 0x2\n\
- ands r0, r1\n\
- cmp r0, 0\n\
- beq _0806354C\n\
- ldrh r1, [r4, 0x24]\n\
- ldrh r0, [r4, 0x20]\n\
- adds r1, r0\n\
- adds r0, r4, 0\n\
- adds r0, 0x28\n\
- ldrb r0, [r0]\n\
- lsls r0, 24\n\
- asrs r0, 24\n\
- ldr r2, _08063544 @ =gSpriteCoordOffsetX\n\
- adds r0, r1\n\
- ldrh r2, [r2]\n\
- adds r0, r2\n\
- lsls r0, 16\n\
- lsrs r3, r0, 16\n\
- ldrh r1, [r4, 0x26]\n\
- ldrh r0, [r4, 0x22]\n\
- adds r1, r0\n\
- adds r0, r4, 0\n\
- adds r0, 0x29\n\
- ldrb r0, [r0]\n\
- lsls r0, 24\n\
- asrs r0, 24\n\
- ldr r2, _08063548 @ =gSpriteCoordOffsetY\n\
- adds r0, r1\n\
- ldrh r2, [r2]\n\
- adds r0, r2\n\
- b _08063574\n\
- .align 2, 0\n\
+ push {r4-r6,lr}\n\
+ adds r5, r0, 0\n\
+ adds r4, r1, 0\n\
+ ldrb r1, [r5, 0x1]\n\
+ movs r0, 0x41\n\
+ negs r0, r0\n\
+ ands r0, r1\n\
+ strb r0, [r5, 0x1]\n\
+ ldrb r0, [r5, 0x5]\n\
+ bl GetFieldObjectGraphicsInfo\n\
+ adds r6, r0, 0\n\
+ adds r0, r4, 0\n\
+ adds r0, 0x3E\n\
+ ldrb r1, [r0]\n\
+ movs r0, 0x2\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _0806354C\n\
+ ldrh r1, [r4, 0x24]\n\
+ ldrh r0, [r4, 0x20]\n\
+ adds r1, r0\n\
+ adds r0, r4, 0\n\
+ adds r0, 0x28\n\
+ ldrb r0, [r0]\n\
+ lsls r0, 24\n\
+ asrs r0, 24\n\
+ ldr r2, _08063544 @ =gSpriteCoordOffsetX\n\
+ adds r0, r1\n\
+ ldrh r2, [r2]\n\
+ adds r0, r2\n\
+ lsls r0, 16\n\
+ lsrs r3, r0, 16\n\
+ ldrh r1, [r4, 0x26]\n\
+ ldrh r0, [r4, 0x22]\n\
+ adds r1, r0\n\
+ adds r0, r4, 0\n\
+ adds r0, 0x29\n\
+ ldrb r0, [r0]\n\
+ lsls r0, 24\n\
+ asrs r0, 24\n\
+ ldr r2, _08063548 @ =gSpriteCoordOffsetY\n\
+ adds r0, r1\n\
+ ldrh r2, [r2]\n\
+ adds r0, r2\n\
+ b _08063574\n\
+ .align 2, 0\n\
_08063544: .4byte gSpriteCoordOffsetX\n\
_08063548: .4byte gSpriteCoordOffsetY\n\
_0806354C:\n\
- ldrh r1, [r4, 0x24]\n\
- ldrh r0, [r4, 0x20]\n\
- adds r1, r0\n\
- adds r0, r4, 0\n\
- adds r0, 0x28\n\
- ldrb r0, [r0]\n\
- lsls r0, 24\n\
- asrs r0, 24\n\
- adds r0, r1\n\
- lsls r0, 16\n\
- lsrs r3, r0, 16\n\
- ldrh r1, [r4, 0x26]\n\
- ldrh r0, [r4, 0x22]\n\
- adds r1, r0\n\
- adds r0, r4, 0\n\
- adds r0, 0x29\n\
- ldrb r0, [r0]\n\
- lsls r0, 24\n\
- asrs r0, 24\n\
- adds r0, r1\n\
+ ldrh r1, [r4, 0x24]\n\
+ ldrh r0, [r4, 0x20]\n\
+ adds r1, r0\n\
+ adds r0, r4, 0\n\
+ adds r0, 0x28\n\
+ ldrb r0, [r0]\n\
+ lsls r0, 24\n\
+ asrs r0, 24\n\
+ adds r0, r1\n\
+ lsls r0, 16\n\
+ lsrs r3, r0, 16\n\
+ ldrh r1, [r4, 0x26]\n\
+ ldrh r0, [r4, 0x22]\n\
+ adds r1, r0\n\
+ adds r0, r4, 0\n\
+ adds r0, 0x29\n\
+ ldrb r0, [r0]\n\
+ lsls r0, 24\n\
+ asrs r0, 24\n\
+ adds r0, r1\n\
_08063574:\n\
- lsls r0, 16\n\
- lsrs r2, r0, 16\n\
- ldrh r0, [r6, 0x8]\n\
- adds r0, r3\n\
- lsls r0, 16\n\
- lsrs r1, r0, 16\n\
- ldrh r0, [r6, 0xA]\n\
- adds r0, r2\n\
- lsls r0, 16\n\
- lsrs r4, r0, 16\n\
- lsls r0, r3, 16\n\
- asrs r0, 16\n\
- cmp r0, 0xFF\n\
- bgt _0806359C\n\
- lsls r0, r1, 16\n\
- asrs r0, 16\n\
- movs r1, 0x10\n\
- negs r1, r1\n\
- cmp r0, r1\n\
- bge _080635A4\n\
+ lsls r0, 16\n\
+ lsrs r2, r0, 16\n\
+ ldrh r0, [r6, 0x8]\n\
+ adds r0, r3\n\
+ lsls r0, 16\n\
+ lsrs r1, r0, 16\n\
+ ldrh r0, [r6, 0xA]\n\
+ adds r0, r2\n\
+ lsls r0, 16\n\
+ lsrs r4, r0, 16\n\
+ lsls r0, r3, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0xFF\n\
+ bgt _0806359C\n\
+ lsls r0, r1, 16\n\
+ asrs r0, 16\n\
+ movs r1, 0x10\n\
+ negs r1, r1\n\
+ cmp r0, r1\n\
+ bge _080635A4\n\
_0806359C:\n\
- ldrb r0, [r5, 0x1]\n\
- movs r1, 0x40\n\
- orrs r0, r1\n\
- strb r0, [r5, 0x1]\n\
+ ldrb r0, [r5, 0x1]\n\
+ movs r1, 0x40\n\
+ orrs r0, r1\n\
+ strb r0, [r5, 0x1]\n\
_080635A4:\n\
- lsls r0, r2, 16\n\
- asrs r0, 16\n\
- cmp r0, 0xAF\n\
- bgt _080635B8\n\
- lsls r0, r4, 16\n\
- asrs r0, 16\n\
- movs r1, 0x10\n\
- negs r1, r1\n\
- cmp r0, r1\n\
- bge _080635C0\n\
+ lsls r0, r2, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0xAF\n\
+ bgt _080635B8\n\
+ lsls r0, r4, 16\n\
+ asrs r0, 16\n\
+ movs r1, 0x10\n\
+ negs r1, r1\n\
+ cmp r0, r1\n\
+ bge _080635C0\n\
_080635B8:\n\
- ldrb r0, [r5, 0x1]\n\
- movs r1, 0x40\n\
- orrs r0, r1\n\
- strb r0, [r5, 0x1]\n\
+ ldrb r0, [r5, 0x1]\n\
+ movs r1, 0x40\n\
+ orrs r0, r1\n\
+ strb r0, [r5, 0x1]\n\
_080635C0:\n\
- pop {r4-r6}\n\
- pop {r0}\n\
- bx r0\n\
+ pop {r4-r6}\n\
+ pop {r0}\n\
+ bx r0\n\
.syntax divided\n");
}
#endif
diff --git a/src/secret_base.c b/src/secret_base.c
index 4ff0b6b17..aae3853f9 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -392,84 +392,84 @@ void sub_80BBCCC(u8 flagIn)
{
asm(".syntax unified\n\
push {r4-r7,lr}\n\
- mov r7, r8\n\
- push {r7}\n\
- sub sp, 0x4\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- mov r8, r0\n\
- bl CurrentMapIsSecretBase\n\
- lsls r0, 24\n\
- cmp r0, 0\n\
- beq _080BBDBC\n\
- ldr r0, _080BBD70 @ =0x00004054\n\
- bl VarGet\n\
- lsls r0, 16\n\
- lsrs r5, r0, 16\n\
- movs r1, 0\n\
- mov r0, sp\n\
- strh r1, [r0]\n\
- ldr r6, _080BBD74 @ =gSaveBlock1\n\
- mov r4, sp\n\
- ldr r0, _080BBD78 @ =0x00001a2a\n\
- adds r7, r6, r0\n\
+ mov r7, r8\n\
+ push {r7}\n\
+ sub sp, 0x4\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ mov r8, r0\n\
+ bl CurrentMapIsSecretBase\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080BBDBC\n\
+ ldr r0, _080BBD70 @ =0x00004054\n\
+ bl VarGet\n\
+ lsls r0, 16\n\
+ lsrs r5, r0, 16\n\
+ movs r1, 0\n\
+ mov r0, sp\n\
+ strh r1, [r0]\n\
+ ldr r6, _080BBD74 @ =gSaveBlock1\n\
+ mov r4, sp\n\
+ ldr r0, _080BBD78 @ =0x00001a2a\n\
+ adds r7, r6, r0\n\
_080BBCFC:\n\
- lsls r0, r5, 2\n\
- adds r0, r5\n\
- lsls r0, 5\n\
- ldrh r1, [r4]\n\
- adds r2, r0, r1\n\
- ldr r1, _080BBD7C @ =0x00001a1a\n\
- adds r0, r6, r1\n\
- adds r1, r2, r0\n\
- ldrb r0, [r1]\n\
- subs r0, 0x1\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0x77\n\
- bhi _080BBD3A\n\
- ldr r0, _080BBD80 @ =gDecorations\n\
- ldrb r3, [r1]\n\
- lsls r1, r3, 5\n\
- adds r1, r0\n\
- ldrb r0, [r1, 0x11]\n\
- cmp r0, 0x4\n\
- beq _080BBD3A\n\
- adds r0, r2, r7\n\
- ldrb r2, [r0]\n\
- lsrs r0, r2, 4\n\
- adds r0, 0x7\n\
- movs r1, 0xF\n\
- ands r1, r2\n\
- adds r1, 0x7\n\
- adds r2, r3, 0\n\
- bl sub_80FF394\n\
+ lsls r0, r5, 2\n\
+ adds r0, r5\n\
+ lsls r0, 5\n\
+ ldrh r1, [r4]\n\
+ adds r2, r0, r1\n\
+ ldr r1, _080BBD7C @ =0x00001a1a\n\
+ adds r0, r6, r1\n\
+ adds r1, r2, r0\n\
+ ldrb r0, [r1]\n\
+ subs r0, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x77\n\
+ bhi _080BBD3A\n\
+ ldr r0, _080BBD80 @ =gDecorations\n\
+ ldrb r3, [r1]\n\
+ lsls r1, r3, 5\n\
+ adds r1, r0\n\
+ ldrb r0, [r1, 0x11]\n\
+ cmp r0, 0x4\n\
+ beq _080BBD3A\n\
+ adds r0, r2, r7\n\
+ ldrb r2, [r0]\n\
+ lsrs r0, r2, 4\n\
+ adds r0, 0x7\n\
+ movs r1, 0xF\n\
+ ands r1, r2\n\
+ adds r1, 0x7\n\
+ adds r2, r3, 0\n\
+ bl sub_80FF394\n\
_080BBD3A:\n\
- ldrh r0, [r4]\n\
- adds r0, 0x1\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- strh r0, [r4]\n\
- cmp r0, 0xF\n\
- bls _080BBCFC\n\
- cmp r5, 0\n\
- beq _080BBD88\n\
- mov r4, sp\n\
- adds r4, 0x2\n\
- movs r2, 0x88\n\
- lsls r2, 2\n\
- mov r0, sp\n\
- adds r1, r4, 0\n\
- bl sub_80BB764\n\
- mov r0, sp\n\
- ldrh r0, [r0]\n\
- adds r0, 0x7\n\
- ldrh r1, [r4]\n\
- adds r1, 0x7\n\
- ldr r2, _080BBD84 @ =0x00000e21\n\
- bl MapGridSetMetatileIdAt\n\
- b _080BBDBC\n\
- .align 2, 0\n\
+ ldrh r0, [r4]\n\
+ adds r0, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ strh r0, [r4]\n\
+ cmp r0, 0xF\n\
+ bls _080BBCFC\n\
+ cmp r5, 0\n\
+ beq _080BBD88\n\
+ mov r4, sp\n\
+ adds r4, 0x2\n\
+ movs r2, 0x88\n\
+ lsls r2, 2\n\
+ mov r0, sp\n\
+ adds r1, r4, 0\n\
+ bl sub_80BB764\n\
+ mov r0, sp\n\
+ ldrh r0, [r0]\n\
+ adds r0, 0x7\n\
+ ldrh r1, [r4]\n\
+ adds r1, 0x7\n\
+ ldr r2, _080BBD84 @ =0x00000e21\n\
+ bl MapGridSetMetatileIdAt\n\
+ b _080BBDBC\n\
+ .align 2, 0\n\
_080BBD70: .4byte 0x00004054\n\
_080BBD74: .4byte gSaveBlock1\n\
_080BBD78: .4byte 0x00001a2a\n\
@@ -477,37 +477,37 @@ _080BBD7C: .4byte 0x00001a1a\n\
_080BBD80: .4byte gDecorations\n\
_080BBD84: .4byte 0x00000e21\n\
_080BBD88:\n\
- mov r0, r8\n\
- cmp r0, 0x1\n\
- bne _080BBDBC\n\
- ldr r0, _080BBDC8 @ =0x00004089\n\
- bl VarGet\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- cmp r0, 0x1\n\
- bne _080BBDBC\n\
- mov r4, sp\n\
- adds r4, 0x2\n\
- movs r2, 0x88\n\
- lsls r2, 2\n\
- mov r0, sp\n\
- adds r1, r4, 0\n\
- bl sub_80BB764\n\
- mov r0, sp\n\
- ldrh r0, [r0]\n\
- adds r0, 0x7\n\
- ldrh r1, [r4]\n\
- adds r1, 0x7\n\
- ldr r2, _080BBDCC @ =0x00000e0a\n\
- bl MapGridSetMetatileIdAt\n\
+ mov r0, r8\n\
+ cmp r0, 0x1\n\
+ bne _080BBDBC\n\
+ ldr r0, _080BBDC8 @ =0x00004089\n\
+ bl VarGet\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ cmp r0, 0x1\n\
+ bne _080BBDBC\n\
+ mov r4, sp\n\
+ adds r4, 0x2\n\
+ movs r2, 0x88\n\
+ lsls r2, 2\n\
+ mov r0, sp\n\
+ adds r1, r4, 0\n\
+ bl sub_80BB764\n\
+ mov r0, sp\n\
+ ldrh r0, [r0]\n\
+ adds r0, 0x7\n\
+ ldrh r1, [r4]\n\
+ adds r1, 0x7\n\
+ ldr r2, _080BBDCC @ =0x00000e0a\n\
+ bl MapGridSetMetatileIdAt\n\
_080BBDBC:\n\
- add sp, 0x4\n\
- pop {r3}\n\
- mov r8, r3\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .align 2, 0\n\
+ add sp, 0x4\n\
+ pop {r3}\n\
+ mov r8, r3\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
_080BBDC8: .4byte 0x00004089\n\
_080BBDCC: .4byte 0x00000e0a\n\
.syntax divided\n");
@@ -517,220 +517,220 @@ __attribute__((naked))
void sub_80BBDD0(void)
{
asm(".syntax unified\n\
- push {r4-r7,lr}\n\
- mov r7, r10\n\
- mov r6, r9\n\
- mov r5, r8\n\
- push {r5-r7}\n\
- sub sp, 0x14\n\
- ldr r0, _080BBE00 @ =0x00004054\n\
- bl VarGet\n\
- lsls r0, 16\n\
- lsrs r4, r0, 16\n\
- bl CurrentMapIsSecretBase\n\
- lsls r0, 24\n\
- cmp r0, 0\n\
- bne _080BBE08\n\
- ldr r0, _080BBE04 @ =gSaveBlock1 + 0x2688\n\
- str r0, [sp, 0x4]\n\
- adds r0, 0xC\n\
- str r0, [sp, 0x8]\n\
- movs r1, 0xC\n\
- str r1, [sp, 0xC]\n\
- b _080BBE1E\n\
- .align 2, 0\n\
+ push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ sub sp, 0x14\n\
+ ldr r0, _080BBE00 @ =0x00004054\n\
+ bl VarGet\n\
+ lsls r0, 16\n\
+ lsrs r4, r0, 16\n\
+ bl CurrentMapIsSecretBase\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080BBE08\n\
+ ldr r0, _080BBE04 @ =gSaveBlock1 + 0x2688\n\
+ str r0, [sp, 0x4]\n\
+ adds r0, 0xC\n\
+ str r0, [sp, 0x8]\n\
+ movs r1, 0xC\n\
+ str r1, [sp, 0xC]\n\
+ b _080BBE1E\n\
+ .align 2, 0\n\
_080BBE00: .4byte 0x00004054\n\
_080BBE04: .4byte gSaveBlock1 + 0x2688\n\
_080BBE08:\n\
- lsls r1, r4, 2\n\
- adds r1, r4\n\
- lsls r1, 5\n\
- ldr r0, _080BBF7C @ =gSaveBlock1 + 0x1A1A\n\
- adds r2, r1, r0\n\
- str r2, [sp, 0x4]\n\
- adds r0, 0x10\n\
- adds r1, r0\n\
- str r1, [sp, 0x8]\n\
- movs r3, 0x10\n\
- str r3, [sp, 0xC]\n\
+ lsls r1, r4, 2\n\
+ adds r1, r4\n\
+ lsls r1, 5\n\
+ ldr r0, _080BBF7C @ =gSaveBlock1 + 0x1A1A\n\
+ adds r2, r1, r0\n\
+ str r2, [sp, 0x4]\n\
+ adds r0, 0x10\n\
+ adds r1, r0\n\
+ str r1, [sp, 0x8]\n\
+ movs r3, 0x10\n\
+ str r3, [sp, 0xC]\n\
_080BBE1E:\n\
- movs r6, 0\n\
- ldr r4, [sp, 0xC]\n\
- cmp r6, r4\n\
- bcc _080BBE28\n\
- b _080BBF6C\n\
+ movs r6, 0\n\
+ ldr r4, [sp, 0xC]\n\
+ cmp r6, r4\n\
+ bcc _080BBE28\n\
+ b _080BBF6C\n\
_080BBE28:\n\
- ldr r5, _080BBF80 @ =gSaveBlock1\n\
- mov r10, r5\n\
+ ldr r5, _080BBF80 @ =gSaveBlock1\n\
+ mov r10, r5\n\
_080BBE2C:\n\
- ldr r1, [sp, 0x4]\n\
- adds r0, r1, r6\n\
- ldrb r1, [r0]\n\
- mov r9, r0\n\
- adds r2, r6, 0x1\n\
- str r2, [sp, 0x10]\n\
- cmp r1, 0\n\
- bne _080BBE3E\n\
- b _080BBF5E\n\
+ ldr r1, [sp, 0x4]\n\
+ adds r0, r1, r6\n\
+ ldrb r1, [r0]\n\
+ mov r9, r0\n\
+ adds r2, r6, 0x1\n\
+ str r2, [sp, 0x10]\n\
+ cmp r1, 0\n\
+ bne _080BBE3E\n\
+ b _080BBF5E\n\
_080BBE3E:\n\
- ldrb r0, [r0]\n\
- lsls r0, 5\n\
- ldr r3, _080BBF84 @ =gDecorations\n\
- adds r0, r3\n\
- ldrb r0, [r0, 0x11]\n\
- cmp r0, 0x4\n\
- beq _080BBE4E\n\
- b _080BBF5E\n\
+ ldrb r0, [r0]\n\
+ lsls r0, 5\n\
+ ldr r3, _080BBF84 @ =gDecorations\n\
+ adds r0, r3\n\
+ ldrb r0, [r0, 0x11]\n\
+ cmp r0, 0x4\n\
+ beq _080BBE4E\n\
+ b _080BBF5E\n\
_080BBE4E:\n\
- movs r5, 0\n\
- ldr r0, _080BBF88 @ =gMapHeader\n\
- ldr r2, [r0, 0x4]\n\
- ldrb r3, [r2]\n\
- mov r8, r0\n\
- cmp r5, r3\n\
- bcs _080BBE8E\n\
- ldr r0, [r2, 0x4]\n\
- ldrh r1, [r0, 0x14]\n\
- ldr r4, _080BBF8C @ =gSpecialVar_0x8004\n\
- ldrh r0, [r4]\n\
- adds r0, 0xAE\n\
- adds r7, r4, 0\n\
- cmp r1, r0\n\
- beq _080BBE8E\n\
- adds r4, r2, 0\n\
- adds r2, r3, 0\n\
+ movs r5, 0\n\
+ ldr r0, _080BBF88 @ =gMapHeader\n\
+ ldr r2, [r0, 0x4]\n\
+ ldrb r3, [r2]\n\
+ mov r8, r0\n\
+ cmp r5, r3\n\
+ bcs _080BBE8E\n\
+ ldr r0, [r2, 0x4]\n\
+ ldrh r1, [r0, 0x14]\n\
+ ldr r4, _080BBF8C @ =gSpecialVar_0x8004\n\
+ ldrh r0, [r4]\n\
+ adds r0, 0xAE\n\
+ adds r7, r4, 0\n\
+ cmp r1, r0\n\
+ beq _080BBE8E\n\
+ adds r4, r2, 0\n\
+ adds r2, r3, 0\n\
_080BBE70:\n\
- adds r0, r5, 0x1\n\
- lsls r0, 24\n\
- lsrs r5, r0, 24\n\
- cmp r5, r2\n\
- bcs _080BBE8E\n\
- ldr r1, [r4, 0x4]\n\
- lsls r0, r5, 1\n\
- adds r0, r5\n\
- lsls r0, 3\n\
- adds r0, r1\n\
- ldrh r1, [r0, 0x14]\n\
- ldrh r0, [r7]\n\
- adds r0, 0xAE\n\
- cmp r1, r0\n\
- bne _080BBE70\n\
+ adds r0, r5, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r5, r0, 24\n\
+ cmp r5, r2\n\
+ bcs _080BBE8E\n\
+ ldr r1, [r4, 0x4]\n\
+ lsls r0, r5, 1\n\
+ adds r0, r5\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ ldrh r1, [r0, 0x14]\n\
+ ldrh r0, [r7]\n\
+ adds r0, 0xAE\n\
+ cmp r1, r0\n\
+ bne _080BBE70\n\
_080BBE8E:\n\
- mov r1, r8\n\
- ldr r0, [r1, 0x4]\n\
- ldrb r0, [r0]\n\
- cmp r5, r0\n\
- beq _080BBF5E\n\
- ldr r7, _080BBF90 @ =gSpecialVar_0x8006\n\
- ldr r2, [sp, 0x8]\n\
- adds r1, r2, r6\n\
- ldrb r0, [r1]\n\
- lsrs r0, 4\n\
- strh r0, [r7]\n\
- ldr r6, _080BBF94 @ =gSpecialVar_0x8007\n\
- ldrb r1, [r1]\n\
- movs r0, 0xF\n\
- ands r0, r1\n\
- strh r0, [r6]\n\
- ldrh r0, [r7]\n\
- adds r0, 0x7\n\
- ldrh r1, [r6]\n\
- adds r1, 0x7\n\
- bl MapGridGetMetatileBehaviorAt\n\
- lsls r0, 24\n\
- lsrs r4, r0, 24\n\
- adds r0, r4, 0\n\
- bl sub_80572D8\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0x1\n\
- beq _080BBEDA\n\
- adds r0, r4, 0\n\
- bl sub_80572EC\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0x1\n\
- bne _080BBF5E\n\
+ mov r1, r8\n\
+ ldr r0, [r1, 0x4]\n\
+ ldrb r0, [r0]\n\
+ cmp r5, r0\n\
+ beq _080BBF5E\n\
+ ldr r7, _080BBF90 @ =gSpecialVar_0x8006\n\
+ ldr r2, [sp, 0x8]\n\
+ adds r1, r2, r6\n\
+ ldrb r0, [r1]\n\
+ lsrs r0, 4\n\
+ strh r0, [r7]\n\
+ ldr r6, _080BBF94 @ =gSpecialVar_0x8007\n\
+ ldrb r1, [r1]\n\
+ movs r0, 0xF\n\
+ ands r0, r1\n\
+ strh r0, [r6]\n\
+ ldrh r0, [r7]\n\
+ adds r0, 0x7\n\
+ ldrh r1, [r6]\n\
+ adds r1, 0x7\n\
+ bl MapGridGetMetatileBehaviorAt\n\
+ lsls r0, 24\n\
+ lsrs r4, r0, 24\n\
+ adds r0, r4, 0\n\
+ bl sub_80572D8\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x1\n\
+ beq _080BBEDA\n\
+ adds r0, r4, 0\n\
+ bl sub_80572EC\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x1\n\
+ bne _080BBF5E\n\
_080BBEDA:\n\
- mov r3, r8\n\
- ldr r0, [r3, 0x4]\n\
- ldr r1, [r0, 0x4]\n\
- lsls r4, r5, 1\n\
- adds r4, r5\n\
- lsls r4, 3\n\
- adds r1, r4, r1\n\
- ldr r5, _080BBF98 @ =0x00003f20\n\
- adds r0, r5, 0\n\
- ldrb r1, [r1, 0x1]\n\
- adds r0, r1\n\
- ldr r1, _080BBF9C @ =gScriptResult\n\
- strh r0, [r1]\n\
- ldrh r0, [r1]\n\
- mov r2, r9\n\
- ldrb r1, [r2]\n\
- lsls r1, 5\n\
- ldr r3, _080BBFA0 @ =gDecorations + 0x1C\n\
- adds r1, r3\n\
- ldr r1, [r1]\n\
- ldrh r1, [r1]\n\
- bl VarSet\n\
- mov r5, r8\n\
- ldr r0, [r5, 0x4]\n\
- ldr r0, [r0, 0x4]\n\
- adds r4, r0\n\
- ldrb r0, [r4]\n\
- ldr r1, _080BBF9C @ =gScriptResult\n\
- strh r0, [r1]\n\
- ldr r2, _080BBF8C @ =gSpecialVar_0x8004\n\
- ldrh r0, [r2]\n\
- adds r0, 0xAE\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- bl FlagReset\n\
- ldr r3, _080BBF9C @ =gScriptResult\n\
- ldrb r0, [r3]\n\
- mov r4, r10\n\
- ldrb r1, [r4, 0x5]\n\
- ldrb r2, [r4, 0x4]\n\
- bl show_sprite\n\
- ldr r5, _080BBF9C @ =gScriptResult\n\
- ldrb r0, [r5]\n\
- ldrb r1, [r4, 0x5]\n\
- ldrb r2, [r4, 0x4]\n\
- movs r4, 0\n\
- ldrsh r3, [r7, r4]\n\
- movs r5, 0\n\
- ldrsh r4, [r6, r5]\n\
- str r4, [sp]\n\
- bl sub_805C0F8\n\
- ldr r1, _080BBF9C @ =gScriptResult\n\
- ldrb r0, [r1]\n\
- mov r2, r10\n\
- ldrb r1, [r2, 0x5]\n\
- ldrb r2, [r2, 0x4]\n\
- bl sub_805C78C\n\
- ldr r3, _080BBF8C @ =gSpecialVar_0x8004\n\
- ldrh r0, [r3]\n\
- adds r0, 0x1\n\
- strh r0, [r3]\n\
+ mov r3, r8\n\
+ ldr r0, [r3, 0x4]\n\
+ ldr r1, [r0, 0x4]\n\
+ lsls r4, r5, 1\n\
+ adds r4, r5\n\
+ lsls r4, 3\n\
+ adds r1, r4, r1\n\
+ ldr r5, _080BBF98 @ =0x00003f20\n\
+ adds r0, r5, 0\n\
+ ldrb r1, [r1, 0x1]\n\
+ adds r0, r1\n\
+ ldr r1, _080BBF9C @ =gScriptResult\n\
+ strh r0, [r1]\n\
+ ldrh r0, [r1]\n\
+ mov r2, r9\n\
+ ldrb r1, [r2]\n\
+ lsls r1, 5\n\
+ ldr r3, _080BBFA0 @ =gDecorations + 0x1C\n\
+ adds r1, r3\n\
+ ldr r1, [r1]\n\
+ ldrh r1, [r1]\n\
+ bl VarSet\n\
+ mov r5, r8\n\
+ ldr r0, [r5, 0x4]\n\
+ ldr r0, [r0, 0x4]\n\
+ adds r4, r0\n\
+ ldrb r0, [r4]\n\
+ ldr r1, _080BBF9C @ =gScriptResult\n\
+ strh r0, [r1]\n\
+ ldr r2, _080BBF8C @ =gSpecialVar_0x8004\n\
+ ldrh r0, [r2]\n\
+ adds r0, 0xAE\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ bl FlagReset\n\
+ ldr r3, _080BBF9C @ =gScriptResult\n\
+ ldrb r0, [r3]\n\
+ mov r4, r10\n\
+ ldrb r1, [r4, 0x5]\n\
+ ldrb r2, [r4, 0x4]\n\
+ bl show_sprite\n\
+ ldr r5, _080BBF9C @ =gScriptResult\n\
+ ldrb r0, [r5]\n\
+ ldrb r1, [r4, 0x5]\n\
+ ldrb r2, [r4, 0x4]\n\
+ movs r4, 0\n\
+ ldrsh r3, [r7, r4]\n\
+ movs r5, 0\n\
+ ldrsh r4, [r6, r5]\n\
+ str r4, [sp]\n\
+ bl sub_805C0F8\n\
+ ldr r1, _080BBF9C @ =gScriptResult\n\
+ ldrb r0, [r1]\n\
+ mov r2, r10\n\
+ ldrb r1, [r2, 0x5]\n\
+ ldrb r2, [r2, 0x4]\n\
+ bl sub_805C78C\n\
+ ldr r3, _080BBF8C @ =gSpecialVar_0x8004\n\
+ ldrh r0, [r3]\n\
+ adds r0, 0x1\n\
+ strh r0, [r3]\n\
_080BBF5E:\n\
- ldr r4, [sp, 0x10]\n\
- lsls r0, r4, 24\n\
- lsrs r6, r0, 24\n\
- ldr r5, [sp, 0xC]\n\
- cmp r6, r5\n\
- bcs _080BBF6C\n\
- b _080BBE2C\n\
+ ldr r4, [sp, 0x10]\n\
+ lsls r0, r4, 24\n\
+ lsrs r6, r0, 24\n\
+ ldr r5, [sp, 0xC]\n\
+ cmp r6, r5\n\
+ bcs _080BBF6C\n\
+ b _080BBE2C\n\
_080BBF6C:\n\
- add sp, 0x14\n\
- pop {r3-r5}\n\
- mov r8, r3\n\
- mov r9, r4\n\
- mov r10, r5\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .align 2, 0\n\
+ add sp, 0x14\n\
+ pop {r3-r5}\n\
+ mov r8, r3\n\
+ mov r9, r4\n\
+ mov r10, r5\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
_080BBF7C: .4byte gSaveBlock1 + 0x1A1A\n\
_080BBF80: .4byte gSaveBlock1\n\
_080BBF84: .4byte gDecorations\n\
@@ -901,148 +901,148 @@ __attribute__((naked))
void sub_80BC300(void)
{
asm(".syntax unified\n\
- push {r4-r7,lr}\n\
- mov r7, r10\n\
- mov r6, r9\n\
- mov r5, r8\n\
- push {r5-r7}\n\
- sub sp, 0xC\n\
- movs r0, 0\n\
- mov r10, r0\n\
- movs r6, 0\n\
- mov r9, r6\n\
+ push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ sub sp, 0xC\n\
+ movs r0, 0\n\
+ mov r10, r0\n\
+ movs r6, 0\n\
+ mov r9, r6\n\
_080BC314:\n\
- movs r4, 0\n\
- lsls r3, r6, 2\n\
- lsls r2, r6, 1\n\
- ldr r7, _080BC424 @ =gPlayerParty\n\
- adds r1, r6, 0x1\n\
- str r1, [sp]\n\
- adds r1, r3, 0\n\
+ movs r4, 0\n\
+ lsls r3, r6, 2\n\
+ lsls r2, r6, 1\n\
+ ldr r7, _080BC424 @ =gPlayerParty\n\
+ adds r1, r6, 0x1\n\
+ str r1, [sp]\n\
+ adds r1, r3, 0\n\
_080BC322:\n\
- adds r0, r1, r4\n\
- lsls r0, 1\n\
- ldr r5, _080BC428 @ =gSaveBlock1 + 0x1A54\n\
- adds r0, r5, r0\n\
- mov r5, r9\n\
- strh r5, [r0]\n\
- adds r0, r4, 0x1\n\
- lsls r0, 16\n\
- lsrs r4, r0, 16\n\
- cmp r4, 0x3\n\
- bls _080BC322\n\
- ldr r1, _080BC42C @ =gSaveBlock1 + 0x1A84\n\
- adds r0, r1, r2\n\
- strh r5, [r0]\n\
- ldr r5, _080BC430 @ =gSaveBlock1 + 0x1A90\n\
- adds r0, r5, r2\n\
- mov r1, r9\n\
- strh r1, [r0]\n\
- ldr r2, _080BC434 @ =gSaveBlock1 + 0x1A9C\n\
- adds r0, r2, r6\n\
- mov r5, r9\n\
- strb r5, [r0]\n\
- ldr r1, _080BC438 @ =gSaveBlock1 + 0x1A3C\n\
- adds r0, r1, r3\n\
- mov r2, r9\n\
- str r2, [r0]\n\
- ldr r3, _080BC43C @ =gSaveBlock1 + 0x1AA2\n\
- adds r0, r3, r6\n\
- strb r2, [r0]\n\
- movs r0, 0x64\n\
- adds r5, r6, 0\n\
- muls r5, r0\n\
- adds r4, r5, r7\n\
- adds r0, r4, 0\n\
- movs r1, 0xB\n\
- bl GetMonData\n\
- cmp r0, 0\n\
- beq _080BC408\n\
- adds r0, r4, 0\n\
- movs r1, 0x2D\n\
- bl GetMonData\n\
- cmp r0, 0\n\
- bne _080BC408\n\
- movs r4, 0\n\
- mov r0, r10\n\
- lsls r0, 2\n\
- mov r8, r0\n\
- mov r1, r10\n\
- lsls r7, r1, 1\n\
- adds r1, 0x1\n\
- str r1, [sp, 0x4]\n\
- ldr r2, _080BC424 @ =gPlayerParty\n\
+ adds r0, r1, r4\n\
+ lsls r0, 1\n\
+ ldr r5, _080BC428 @ =gSaveBlock1 + 0x1A54\n\
+ adds r0, r5, r0\n\
+ mov r5, r9\n\
+ strh r5, [r0]\n\
+ adds r0, r4, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r4, r0, 16\n\
+ cmp r4, 0x3\n\
+ bls _080BC322\n\
+ ldr r1, _080BC42C @ =gSaveBlock1 + 0x1A84\n\
+ adds r0, r1, r2\n\
+ strh r5, [r0]\n\
+ ldr r5, _080BC430 @ =gSaveBlock1 + 0x1A90\n\
+ adds r0, r5, r2\n\
+ mov r1, r9\n\
+ strh r1, [r0]\n\
+ ldr r2, _080BC434 @ =gSaveBlock1 + 0x1A9C\n\
+ adds r0, r2, r6\n\
+ mov r5, r9\n\
+ strb r5, [r0]\n\
+ ldr r1, _080BC438 @ =gSaveBlock1 + 0x1A3C\n\
+ adds r0, r1, r3\n\
+ mov r2, r9\n\
+ str r2, [r0]\n\
+ ldr r3, _080BC43C @ =gSaveBlock1 + 0x1AA2\n\
+ adds r0, r3, r6\n\
+ strb r2, [r0]\n\
+ movs r0, 0x64\n\
+ adds r5, r6, 0\n\
+ muls r5, r0\n\
+ adds r4, r5, r7\n\
+ adds r0, r4, 0\n\
+ movs r1, 0xB\n\
+ bl GetMonData\n\
+ cmp r0, 0\n\
+ beq _080BC408\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x2D\n\
+ bl GetMonData\n\
+ cmp r0, 0\n\
+ bne _080BC408\n\
+ movs r4, 0\n\
+ mov r0, r10\n\
+ lsls r0, 2\n\
+ mov r8, r0\n\
+ mov r1, r10\n\
+ lsls r7, r1, 1\n\
+ adds r1, 0x1\n\
+ str r1, [sp, 0x4]\n\
+ ldr r2, _080BC424 @ =gPlayerParty\n\
_080BC38E:\n\
- adds r1, r4, 0\n\
- adds r1, 0xD\n\
- adds r0, r5, r2\n\
- str r2, [sp, 0x8]\n\
- bl GetMonData\n\
- mov r3, r8\n\
- adds r1, r3, r4\n\
- lsls r1, 1\n\
- ldr r3, _080BC428 @ =gSaveBlock1 + 0x1A54\n\
- adds r1, r3, r1\n\
- strh r0, [r1]\n\
- adds r0, r4, 0x1\n\
- lsls r0, 16\n\
- lsrs r4, r0, 16\n\
- ldr r2, [sp, 0x8]\n\
- cmp r4, 0x3\n\
- bls _080BC38E\n\
- movs r0, 0x64\n\
- adds r4, r6, 0\n\
- muls r4, r0\n\
- ldr r0, _080BC424 @ =gPlayerParty\n\
- adds r4, r0\n\
- adds r0, r4, 0\n\
- movs r1, 0xB\n\
- bl GetMonData\n\
- ldr r5, _080BC42C @ =gSaveBlock1 + 0x1A84\n\
- adds r1, r5, r7\n\
- strh r0, [r1]\n\
- adds r0, r4, 0\n\
- movs r1, 0xC\n\
- bl GetMonData\n\
- ldr r2, _080BC430 @ =gSaveBlock1 + 0x1A90\n\
- adds r1, r2, r7\n\
- strh r0, [r1]\n\
- adds r0, r4, 0\n\
- movs r1, 0x38\n\
- bl GetMonData\n\
- ldr r1, _080BC434 @ =gSaveBlock1 + 0x1A9C\n\
- add r1, r10\n\
- strb r0, [r1]\n\
- adds r0, r4, 0\n\
- movs r1, 0\n\
- bl GetMonData\n\
- ldr r1, _080BC438 @ =gSaveBlock1 + 0x1A3C\n\
- add r1, r8\n\
- str r0, [r1]\n\
- adds r0, r4, 0\n\
- bl sub_80BC298\n\
- ldr r1, _080BC43C @ =gSaveBlock1 + 0x1AA2\n\
- add r1, r10\n\
- strb r0, [r1]\n\
- ldr r3, [sp, 0x4]\n\
- lsls r0, r3, 16\n\
- lsrs r0, 16\n\
- mov r10, r0\n\
+ adds r1, r4, 0\n\
+ adds r1, 0xD\n\
+ adds r0, r5, r2\n\
+ str r2, [sp, 0x8]\n\
+ bl GetMonData\n\
+ mov r3, r8\n\
+ adds r1, r3, r4\n\
+ lsls r1, 1\n\
+ ldr r3, _080BC428 @ =gSaveBlock1 + 0x1A54\n\
+ adds r1, r3, r1\n\
+ strh r0, [r1]\n\
+ adds r0, r4, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r4, r0, 16\n\
+ ldr r2, [sp, 0x8]\n\
+ cmp r4, 0x3\n\
+ bls _080BC38E\n\
+ movs r0, 0x64\n\
+ adds r4, r6, 0\n\
+ muls r4, r0\n\
+ ldr r0, _080BC424 @ =gPlayerParty\n\
+ adds r4, r0\n\
+ adds r0, r4, 0\n\
+ movs r1, 0xB\n\
+ bl GetMonData\n\
+ ldr r5, _080BC42C @ =gSaveBlock1 + 0x1A84\n\
+ adds r1, r5, r7\n\
+ strh r0, [r1]\n\
+ adds r0, r4, 0\n\
+ movs r1, 0xC\n\
+ bl GetMonData\n\
+ ldr r2, _080BC430 @ =gSaveBlock1 + 0x1A90\n\
+ adds r1, r2, r7\n\
+ strh r0, [r1]\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x38\n\
+ bl GetMonData\n\
+ ldr r1, _080BC434 @ =gSaveBlock1 + 0x1A9C\n\
+ add r1, r10\n\
+ strb r0, [r1]\n\
+ adds r0, r4, 0\n\
+ movs r1, 0\n\
+ bl GetMonData\n\
+ ldr r1, _080BC438 @ =gSaveBlock1 + 0x1A3C\n\
+ add r1, r8\n\
+ str r0, [r1]\n\
+ adds r0, r4, 0\n\
+ bl sub_80BC298\n\
+ ldr r1, _080BC43C @ =gSaveBlock1 + 0x1AA2\n\
+ add r1, r10\n\
+ strb r0, [r1]\n\
+ ldr r3, [sp, 0x4]\n\
+ lsls r0, r3, 16\n\
+ lsrs r0, 16\n\
+ mov r10, r0\n\
_080BC408:\n\
- ldr r5, [sp]\n\
- lsls r0, r5, 16\n\
- lsrs r6, r0, 16\n\
- cmp r6, 0x5\n\
- bls _080BC314\n\
- add sp, 0xC\n\
- pop {r3-r5}\n\
- mov r8, r3\n\
- mov r9, r4\n\
- mov r10, r5\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .align 2, 0\n\
+ ldr r5, [sp]\n\
+ lsls r0, r5, 16\n\
+ lsrs r6, r0, 16\n\
+ cmp r6, 0x5\n\
+ bls _080BC314\n\
+ add sp, 0xC\n\
+ pop {r3-r5}\n\
+ mov r8, r3\n\
+ mov r9, r4\n\
+ mov r10, r5\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
_080BC424: .4byte gPlayerParty\n\
_080BC428: .4byte gSaveBlock1 + 0x1A54\n\
_080BC42C: .4byte gSaveBlock1 + 0x1A84\n\
diff --git a/src/tv.c b/src/tv.c
index 566d547a6..e1bf7c8fe 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -182,100 +182,100 @@ __attribute__((naked))
u8 special_0x44(void)
{
asm(".syntax unified\n"
- " push {r4-r7,lr}\n"
- " mov r7, r9\n"
- " mov r6, r8\n"
- " push {r6,r7}\n"
- " movs r4, 0x5\n"
- " ldr r1, _080BD874 @ =gSaveBlock1\n"
- " ldr r2, _080BD878 @ =0x000027ec\n"
- " adds r0, r1, r2\n"
- " ldrb r0, [r0]\n"
- " cmp r0, 0\n"
- " beq _080BD834\n"
- " adds r2, r1, 0\n"
- " ldr r1, _080BD87C @ =0x00002738\n"
+ " push {r4-r7,lr}\n"
+ " mov r7, r9\n"
+ " mov r6, r8\n"
+ " push {r6,r7}\n"
+ " movs r4, 0x5\n"
+ " ldr r1, _080BD874 @ =gSaveBlock1\n"
+ " ldr r2, _080BD878 @ =0x000027ec\n"
+ " adds r0, r1, r2\n"
+ " ldrb r0, [r0]\n"
+ " cmp r0, 0\n"
+ " beq _080BD834\n"
+ " adds r2, r1, 0\n"
+ " ldr r1, _080BD87C @ =0x00002738\n"
"_080BD81A:\n"
- " adds r0, r4, 0x1\n"
- " lsls r0, 24\n"
- " lsrs r4, r0, 24\n"
- " cmp r4, 0x17\n"
- " bhi _080BD834\n"
- " lsls r0, r4, 3\n"
- " adds r0, r4\n"
- " lsls r0, 2\n"
- " adds r0, r2\n"
- " adds r0, r1\n"
- " ldrb r0, [r0]\n"
- " cmp r0, 0\n"
- " bne _080BD81A\n"
+ " adds r0, r4, 0x1\n"
+ " lsls r0, 24\n"
+ " lsrs r4, r0, 24\n"
+ " cmp r4, 0x17\n"
+ " bhi _080BD834\n"
+ " lsls r0, r4, 3\n"
+ " adds r0, r4\n"
+ " lsls r0, 2\n"
+ " adds r0, r2\n"
+ " adds r0, r1\n"
+ " ldrb r0, [r0]\n"
+ " cmp r0, 0\n"
+ " bne _080BD81A\n"
"_080BD834:\n"
- " bl Random\n"
- " lsls r0, 16\n"
- " lsrs r0, 16\n"
- " adds r1, r4, 0\n"
- " bl __modsi3\n"
- " lsls r0, 24\n"
- " lsrs r4, r0, 24\n"
- " mov r8, r4\n"
- " ldr r7, _080BD874 @ =gSaveBlock1\n"
- " ldr r0, _080BD87C @ =0x00002738\n"
- " adds r0, r7\n"
- " mov r9, r0\n"
+ " bl Random\n"
+ " lsls r0, 16\n"
+ " lsrs r0, 16\n"
+ " adds r1, r4, 0\n"
+ " bl __modsi3\n"
+ " lsls r0, 24\n"
+ " lsrs r4, r0, 24\n"
+ " mov r8, r4\n"
+ " ldr r7, _080BD874 @ =gSaveBlock1\n"
+ " ldr r0, _080BD87C @ =0x00002738\n"
+ " adds r0, r7\n"
+ " mov r9, r0\n"
"_080BD850:\n"
- " lsls r0, r4, 3\n"
- " adds r0, r4\n"
- " lsls r6, r0, 2\n"
- " adds r5, r6, r7\n"
- " ldr r1, _080BD87C @ =0x00002738\n"
- " adds r0, r5, r1\n"
- " ldrb r0, [r0]\n"
- " bl sub_80BFB54\n"
- " lsls r0, 24\n"
- " lsrs r0, 24\n"
- " cmp r0, 0x4\n"
- " beq _080BD884\n"
- " ldr r2, _080BD880 @ =0x00002739\n"
- " adds r0, r5, r2\n"
- " ldrb r0, [r0]\n"
- " b _080BD890\n"
- " .align 2, 0\n"
+ " lsls r0, r4, 3\n"
+ " adds r0, r4\n"
+ " lsls r6, r0, 2\n"
+ " adds r5, r6, r7\n"
+ " ldr r1, _080BD87C @ =0x00002738\n"
+ " adds r0, r5, r1\n"
+ " ldrb r0, [r0]\n"
+ " bl sub_80BFB54\n"
+ " lsls r0, 24\n"
+ " lsrs r0, 24\n"
+ " cmp r0, 0x4\n"
+ " beq _080BD884\n"
+ " ldr r2, _080BD880 @ =0x00002739\n"
+ " adds r0, r5, r2\n"
+ " ldrb r0, [r0]\n"
+ " b _080BD890\n"
+ " .align 2, 0\n"
"_080BD874: .4byte gSaveBlock1\n"
"_080BD878: .4byte 0x000027ec\n"
"_080BD87C: .4byte 0x00002738\n"
"_080BD880: .4byte 0x00002739\n"
"_080BD884:\n"
- " mov r0, r9\n"
- " adds r1, r6, r0\n"
- " ldrh r0, [r1, 0x16]\n"
- " cmp r0, 0\n"
- " bne _080BD898\n"
- " ldrb r0, [r1, 0x1]\n"
+ " mov r0, r9\n"
+ " adds r1, r6, r0\n"
+ " ldrh r0, [r1, 0x16]\n"
+ " cmp r0, 0\n"
+ " bne _080BD898\n"
+ " ldrb r0, [r1, 0x1]\n"
"_080BD890:\n"
- " cmp r0, 0x1\n"
- " bne _080BD898\n"
- " adds r0, r4, 0\n"
- " b _080BD8AC\n"
+ " cmp r0, 0x1\n"
+ " bne _080BD898\n"
+ " adds r0, r4, 0\n"
+ " b _080BD8AC\n"
"_080BD898:\n"
- " cmp r4, 0\n"
- " bne _080BD8A0\n"
- " movs r4, 0x17\n"
- " b _080BD8A6\n"
+ " cmp r4, 0\n"
+ " bne _080BD8A0\n"
+ " movs r4, 0x17\n"
+ " b _080BD8A6\n"
"_080BD8A0:\n"
- " subs r0, r4, 0x1\n"
- " lsls r0, 24\n"
- " lsrs r4, r0, 24\n"
+ " subs r0, r4, 0x1\n"
+ " lsls r0, 24\n"
+ " lsrs r4, r0, 24\n"
"_080BD8A6:\n"
- " cmp r4, r8\n"
- " bne _080BD850\n"
- " movs r0, 0xFF\n"
+ " cmp r4, r8\n"
+ " bne _080BD850\n"
+ " movs r0, 0xFF\n"
"_080BD8AC:\n"
- " pop {r3,r4}\n"
- " mov r8, r3\n"
- " mov r9, r4\n"
- " pop {r4-r7}\n"
- " pop {r1}\n"
- " bx r1\n"
+ " pop {r3,r4}\n"
+ " mov r8, r3\n"
+ " mov r9, r4\n"
+ " pop {r4-r7}\n"
+ " pop {r1}\n"
+ " bx r1\n"
".syntax divided\n");
}
#endif
@@ -680,88 +680,88 @@ void sub_80BE074(void) {
__attribute__((naked))
void sub_80BE074(void) {
asm(".syntax unified\n\
- push {r4-r7,lr}\n\
- ldr r0, _080BE118 @ =0x0000ffff\n\
- bl sub_80BF77C\n\
- lsls r0, 24\n\
- cmp r0, 0\n\
- bne _080BE112\n\
- movs r1, 0\n\
- movs r5, 0\n\
- ldr r2, _080BE11C @ =gUnknown_03004316\n\
+ push {r4-r7,lr}\n\
+ ldr r0, _080BE118 @ =0x0000ffff\n\
+ bl sub_80BF77C\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080BE112\n\
+ movs r1, 0\n\
+ movs r5, 0\n\
+ ldr r2, _080BE11C @ =gUnknown_03004316\n\
_080BE088:\n\
- adds r0, r1, r2\n\
- ldrb r0, [r0]\n\
- adds r0, r5, r0\n\
- lsls r0, 16\n\
- lsrs r5, r0, 16\n\
- adds r0, r1, 0x1\n\
- lsls r0, 24\n\
- lsrs r1, r0, 24\n\
- cmp r1, 0xA\n\
- bls _080BE088\n\
- cmp r5, 0xFF\n\
- bls _080BE0A2\n\
- movs r5, 0xFF\n\
+ adds r0, r1, r2\n\
+ ldrb r0, [r0]\n\
+ adds r0, r5, r0\n\
+ lsls r0, 16\n\
+ lsrs r5, r0, 16\n\
+ adds r0, r1, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r1, r0, 24\n\
+ cmp r1, 0xA\n\
+ bls _080BE088\n\
+ cmp r5, 0xFF\n\
+ bls _080BE0A2\n\
+ movs r5, 0xFF\n\
_080BE0A2:\n\
- cmp r5, 0x2\n\
- bls _080BE112\n\
- ldr r7, _080BE120 @ =gUnknown_02024D26\n\
- ldrb r0, [r7]\n\
- cmp r0, 0x1\n\
- bne _080BE112\n\
- ldr r6, _080BE124 @ =gSaveBlock1 + 0x2738\n\
- adds r0, r6, 0\n\
- bl sub_80BF74C\n\
- ldr r4, _080BE128 @ =gUnknown_03005D38\n\
- strb r0, [r4]\n\
- lsls r0, 24\n\
- asrs r0, 24\n\
- movs r1, 0x1\n\
- negs r1, r1\n\
- cmp r0, r1\n\
- beq _080BE112\n\
- movs r0, 0x17\n\
- bl sub_80BF1B4\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0x1\n\
- beq _080BE112\n\
- movs r0, 0\n\
- ldrsb r0, [r4, r0]\n\
- lsls r4, r0, 3\n\
- adds r4, r0\n\
- lsls r4, 2\n\
- adds r4, r6\n\
+ cmp r5, 0x2\n\
+ bls _080BE112\n\
+ ldr r7, _080BE120 @ =gUnknown_02024D26\n\
+ ldrb r0, [r7]\n\
+ cmp r0, 0x1\n\
+ bne _080BE112\n\
+ ldr r6, _080BE124 @ =gSaveBlock1 + 0x2738\n\
+ adds r0, r6, 0\n\
+ bl sub_80BF74C\n\
+ ldr r4, _080BE128 @ =gUnknown_03005D38\n\
+ strb r0, [r4]\n\
+ lsls r0, 24\n\
+ asrs r0, 24\n\
+ movs r1, 0x1\n\
+ negs r1, r1\n\
+ cmp r0, r1\n\
+ beq _080BE112\n\
+ movs r0, 0x17\n\
+ bl sub_80BF1B4\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x1\n\
+ beq _080BE112\n\
+ movs r0, 0\n\
+ ldrsb r0, [r4, r0]\n\
+ lsls r4, r0, 3\n\
+ adds r4, r0\n\
+ lsls r4, 2\n\
+ adds r4, r6\n\
@ -- Here the compiler puts the status flag in the wrong register. --\n\
- movs r1, 0\n\
- movs r0, 0x17\n\
- strb r0, [r4]\n\
- strb r1, [r4, 0x1]\n\
- ldr r1, _080BE12C @ =gUnknown_030042E0\n\
- ldrh r0, [r1, 0x6]\n\
- strh r0, [r4, 0xC]\n\
- ldrh r0, [r1, 0x20]\n\
- strh r0, [r4, 0xE]\n\
- strb r5, [r4, 0x10]\n\
- ldrb r0, [r7]\n\
- strb r0, [r4, 0x11]\n\
- ldr r0, _080BE130 @ =gMapHeader\n\
- ldrb r0, [r0, 0x14]\n\
- strb r0, [r4, 0x12]\n\
- adds r0, r4, 0\n\
- adds r0, 0x13\n\
- ldr r1, _080BE134 @ =gSaveBlock2\n\
- bl StringCopy\n\
- adds r0, r4, 0\n\
- bl sub_80BE138\n\
- movs r0, 2 @ GAME_LANGUAGE\n\
- strb r0, [r4, 0x2]\n\
+ movs r1, 0\n\
+ movs r0, 0x17\n\
+ strb r0, [r4]\n\
+ strb r1, [r4, 0x1]\n\
+ ldr r1, _080BE12C @ =gUnknown_030042E0\n\
+ ldrh r0, [r1, 0x6]\n\
+ strh r0, [r4, 0xC]\n\
+ ldrh r0, [r1, 0x20]\n\
+ strh r0, [r4, 0xE]\n\
+ strb r5, [r4, 0x10]\n\
+ ldrb r0, [r7]\n\
+ strb r0, [r4, 0x11]\n\
+ ldr r0, _080BE130 @ =gMapHeader\n\
+ ldrb r0, [r0, 0x14]\n\
+ strb r0, [r4, 0x12]\n\
+ adds r0, r4, 0\n\
+ adds r0, 0x13\n\
+ ldr r1, _080BE134 @ =gSaveBlock2\n\
+ bl StringCopy\n\
+ adds r0, r4, 0\n\
+ bl sub_80BE138\n\
+ movs r0, 2 @ GAME_LANGUAGE\n\
+ strb r0, [r4, 0x2]\n\
_080BE112:\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .align 2, 0\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
_080BE118: .4byte 0x0000ffff\n\
_080BE11C: .4byte gUnknown_03004316\n\
_080BE120: .4byte gUnknown_02024D26\n\
@@ -2033,119 +2033,119 @@ __attribute__((naked))
void GetMomOrDadStringForTVMessage(void)
{
asm(".syntax unified\n\
- push {r4,lr}\n\
- ldr r1, _080BFC40 @ =gSaveBlock1\n\
- movs r0, 0x4\n\
- ldrsb r0, [r1, r0]\n\
- cmp r0, 0x1\n\
- bne _080BFC6C\n\
- ldr r0, _080BFC44 @ =gSaveBlock2\n\
- ldrb r0, [r0, 0x8]\n\
- cmp r0, 0\n\
- bne _080BFC54\n\
- movs r0, 0x5\n\
- ldrsb r0, [r1, r0]\n\
- cmp r0, 0\n\
- bne _080BFC6C\n\
- ldr r0, _080BFC48 @ =gStringVar1\n\
- ldr r1, _080BFC4C @ =gOtherText_Mom\n\
- bl StringCopy\n\
- ldr r0, _080BFC50 @ =0x00004003\n\
- movs r1, 0x1\n\
- bl VarSet\n\
- b _080BFC6C\n\
- .align 2, 0\n\
+ push {r4,lr}\n\
+ ldr r1, _080BFC40 @ =gSaveBlock1\n\
+ movs r0, 0x4\n\
+ ldrsb r0, [r1, r0]\n\
+ cmp r0, 0x1\n\
+ bne _080BFC6C\n\
+ ldr r0, _080BFC44 @ =gSaveBlock2\n\
+ ldrb r0, [r0, 0x8]\n\
+ cmp r0, 0\n\
+ bne _080BFC54\n\
+ movs r0, 0x5\n\
+ ldrsb r0, [r1, r0]\n\
+ cmp r0, 0\n\
+ bne _080BFC6C\n\
+ ldr r0, _080BFC48 @ =gStringVar1\n\
+ ldr r1, _080BFC4C @ =gOtherText_Mom\n\
+ bl StringCopy\n\
+ ldr r0, _080BFC50 @ =0x00004003\n\
+ movs r1, 0x1\n\
+ bl VarSet\n\
+ b _080BFC6C\n\
+ .align 2, 0\n\
_080BFC40: .4byte gSaveBlock1\n\
_080BFC44: .4byte gSaveBlock2\n\
_080BFC48: .4byte gStringVar1\n\
_080BFC4C: .4byte gOtherText_Mom\n\
_080BFC50: .4byte 0x00004003\n\
_080BFC54:\n\
- movs r0, 0x5\n\
- ldrsb r0, [r1, r0]\n\
- cmp r0, 0x2\n\
- bne _080BFC6C\n\
- ldr r0, _080BFCB4 @ =gStringVar1\n\
- ldr r1, _080BFCB8 @ =gOtherText_Mom\n\
- bl StringCopy\n\
- ldr r0, _080BFCBC @ =0x00004003\n\
- movs r1, 0x1\n\
- bl VarSet\n\
+ movs r0, 0x5\n\
+ ldrsb r0, [r1, r0]\n\
+ cmp r0, 0x2\n\
+ bne _080BFC6C\n\
+ ldr r0, _080BFCB4 @ =gStringVar1\n\
+ ldr r1, _080BFCB8 @ =gOtherText_Mom\n\
+ bl StringCopy\n\
+ ldr r0, _080BFCBC @ =0x00004003\n\
+ movs r1, 0x1\n\
+ bl VarSet\n\
_080BFC6C:\n\
- ldr r4, _080BFCBC @ =0x00004003\n\
- adds r0, r4, 0\n\
- bl VarGet\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- cmp r0, 0x1\n\
- beq _080BFCAA\n\
- adds r0, r4, 0\n\
- bl VarGet\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- cmp r0, 0x2\n\
- beq _080BFCC0\n\
- adds r0, r4, 0\n\
- bl VarGet\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- cmp r0, 0x2\n\
- bls _080BFCD4\n\
- adds r0, r4, 0\n\
- bl VarGet\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- movs r1, 0x1\n\
- ands r0, r1\n\
- cmp r0, 0\n\
- bne _080BFCC0\n\
+ ldr r4, _080BFCBC @ =0x00004003\n\
+ adds r0, r4, 0\n\
+ bl VarGet\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ cmp r0, 0x1\n\
+ beq _080BFCAA\n\
+ adds r0, r4, 0\n\
+ bl VarGet\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ cmp r0, 0x2\n\
+ beq _080BFCC0\n\
+ adds r0, r4, 0\n\
+ bl VarGet\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ cmp r0, 0x2\n\
+ bls _080BFCD4\n\
+ adds r0, r4, 0\n\
+ bl VarGet\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ movs r1, 0x1\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ bne _080BFCC0\n\
_080BFCAA:\n\
- ldr r0, _080BFCB4 @ =gStringVar1\n\
- ldr r1, _080BFCB8 @ =gOtherText_Mom\n\
- bl StringCopy\n\
- b _080BFD10\n\
- .align 2, 0\n\
+ ldr r0, _080BFCB4 @ =gStringVar1\n\
+ ldr r1, _080BFCB8 @ =gOtherText_Mom\n\
+ bl StringCopy\n\
+ b _080BFD10\n\
+ .align 2, 0\n\
_080BFCB4: .4byte gStringVar1\n\
_080BFCB8: .4byte gOtherText_Mom\n\
_080BFCBC: .4byte 0x00004003\n\
_080BFCC0:\n\
- ldr r0, _080BFCCC @ =gStringVar1\n\
- ldr r1, _080BFCD0 @ =gOtherText_Dad\n\
- bl StringCopy\n\
- b _080BFD10\n\
- .align 2, 0\n\
+ ldr r0, _080BFCCC @ =gStringVar1\n\
+ ldr r1, _080BFCD0 @ =gOtherText_Dad\n\
+ bl StringCopy\n\
+ b _080BFD10\n\
+ .align 2, 0\n\
_080BFCCC: .4byte gStringVar1\n\
_080BFCD0: .4byte gOtherText_Dad\n\
_080BFCD4:\n\
- bl Random\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- movs r1, 0x1\n\
- ands r0, r1\n\
- cmp r0, 0\n\
- beq _080BFD00\n\
- ldr r0, _080BFCF8 @ =gStringVar1\n\
- ldr r1, _080BFCFC @ =gOtherText_Mom\n\
- bl StringCopy\n\
- adds r0, r4, 0\n\
- movs r1, 0x1\n\
- bl VarSet\n\
- b _080BFD10\n\
- .align 2, 0\n\
+ bl Random\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ movs r1, 0x1\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080BFD00\n\
+ ldr r0, _080BFCF8 @ =gStringVar1\n\
+ ldr r1, _080BFCFC @ =gOtherText_Mom\n\
+ bl StringCopy\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x1\n\
+ bl VarSet\n\
+ b _080BFD10\n\
+ .align 2, 0\n\
_080BFCF8: .4byte gStringVar1\n\
_080BFCFC: .4byte gOtherText_Mom\n\
_080BFD00:\n\
- ldr r0, _080BFD18 @ =gStringVar1\n\
- ldr r1, _080BFD1C @ =gOtherText_Dad\n\
- bl StringCopy\n\
- adds r0, r4, 0\n\
- movs r1, 0x2\n\
- bl VarSet\n\
+ ldr r0, _080BFD18 @ =gStringVar1\n\
+ ldr r1, _080BFD1C @ =gOtherText_Dad\n\
+ bl StringCopy\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x2\n\
+ bl VarSet\n\
_080BFD10:\n\
- pop {r4}\n\
- pop {r0}\n\
- bx r0\n\
- .align 2, 0\n\
+ pop {r4}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
_080BFD18: .4byte gStringVar1\n\
_080BFD1C: .4byte gOtherText_Dad\n\
.syntax divided\n");
@@ -2276,119 +2276,119 @@ bool8 sub_80BFF68(TVShow * arg1[25], TVShow * arg2[25], u8 idx) {
__attribute__((naked))
bool8 sub_80BFF68(TVShow * arg1[25], TVShow * arg2[25], u8 idx) {
asm(".syntax unified\n\
- push {r4-r7,lr}\n\
- sub sp, 0x4\n\
- lsls r2, 24\n\
- lsrs r7, r2, 24\n\
- ldr r4, [r0]\n\
- ldr r6, [r1]\n\
- movs r5, 0\n\
- ldr r2, _080BFFA4 @ =gUnknown_03000722\n\
- movs r1, 0\n\
- ldrsb r1, [r2, r1]\n\
- lsls r0, r1, 3\n\
- adds r0, r1\n\
- lsls r0, 2\n\
- adds r0, r6 @ this is the only mimsmatch\n\
- ldrb r0, [r0]\n\
- str r2, [sp]\n\
- bl sub_80BFB54\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- adds r1, r0, 0\n\
- ldr r2, [sp]\n\
- cmp r0, 0x3\n\
- beq _080BFFD8\n\
- cmp r0, 0x3\n\
- bgt _080BFFA8\n\
- cmp r0, 0x2\n\
- beq _080BFFAE\n\
- b _080C0026\n\
- .align 2, 0\n\
+ push {r4-r7,lr}\n\
+ sub sp, 0x4\n\
+ lsls r2, 24\n\
+ lsrs r7, r2, 24\n\
+ ldr r4, [r0]\n\
+ ldr r6, [r1]\n\
+ movs r5, 0\n\
+ ldr r2, _080BFFA4 @ =gUnknown_03000722\n\
+ movs r1, 0\n\
+ ldrsb r1, [r2, r1]\n\
+ lsls r0, r1, 3\n\
+ adds r0, r1\n\
+ lsls r0, 2\n\
+ adds r0, r6 @ this is the only mimsmatch\n\
+ ldrb r0, [r0]\n\
+ str r2, [sp]\n\
+ bl sub_80BFB54\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ adds r1, r0, 0\n\
+ ldr r2, [sp]\n\
+ cmp r0, 0x3\n\
+ beq _080BFFD8\n\
+ cmp r0, 0x3\n\
+ bgt _080BFFA8\n\
+ cmp r0, 0x2\n\
+ beq _080BFFAE\n\
+ b _080C0026\n\
+ .align 2, 0\n\
_080BFFA4: .4byte gUnknown_03000722\n\
_080BFFA8:\n\
- cmp r1, 0x4\n\
- beq _080C0000\n\
- b _080C0026\n\
+ cmp r1, 0x4\n\
+ beq _080C0000\n\
+ b _080C0026\n\
_080BFFAE:\n\
- ldr r0, _080BFFD4 @ =gUnknown_03005D38\n\
- movs r1, 0\n\
- ldrsb r1, [r0, r1]\n\
- lsls r0, r1, 3\n\
- adds r0, r1\n\
- lsls r0, 2\n\
- adds r0, r4, r0\n\
- ldrb r2, [r2]\n\
- lsls r2, 24\n\
- asrs r2, 24\n\
- lsls r1, r2, 3\n\
- adds r1, r2\n\
- lsls r1, 2\n\
- adds r1, r6, r1\n\
- adds r2, r7, 0\n\
- bl sub_80C004C\n\
- b _080C0022\n\
- .align 2, 0\n\
+ ldr r0, _080BFFD4 @ =gUnknown_03005D38\n\
+ movs r1, 0\n\
+ ldrsb r1, [r0, r1]\n\
+ lsls r0, r1, 3\n\
+ adds r0, r1\n\
+ lsls r0, 2\n\
+ adds r0, r4, r0\n\
+ ldrb r2, [r2]\n\
+ lsls r2, 24\n\
+ asrs r2, 24\n\
+ lsls r1, r2, 3\n\
+ adds r1, r2\n\
+ lsls r1, 2\n\
+ adds r1, r6, r1\n\
+ adds r2, r7, 0\n\
+ bl sub_80C004C\n\
+ b _080C0022\n\
+ .align 2, 0\n\
_080BFFD4: .4byte gUnknown_03005D38\n\
_080BFFD8:\n\
- ldr r0, _080BFFFC @ =gUnknown_03005D38\n\
- movs r1, 0\n\
- ldrsb r1, [r0, r1]\n\
- lsls r0, r1, 3\n\
- adds r0, r1\n\
- lsls r0, 2\n\
- adds r0, r4, r0\n\
- ldrb r2, [r2]\n\
- lsls r2, 24\n\
- asrs r2, 24\n\
- lsls r1, r2, 3\n\
- adds r1, r2\n\
- lsls r1, 2\n\
- adds r1, r6, r1\n\
- adds r2, r7, 0\n\
- bl sub_80C00B4\n\
- b _080C0022\n\
- .align 2, 0\n\
+ ldr r0, _080BFFFC @ =gUnknown_03005D38\n\
+ movs r1, 0\n\
+ ldrsb r1, [r0, r1]\n\
+ lsls r0, r1, 3\n\
+ adds r0, r1\n\
+ lsls r0, 2\n\
+ adds r0, r4, r0\n\
+ ldrb r2, [r2]\n\
+ lsls r2, 24\n\
+ asrs r2, 24\n\
+ lsls r1, r2, 3\n\
+ adds r1, r2\n\
+ lsls r1, 2\n\
+ adds r1, r6, r1\n\
+ adds r2, r7, 0\n\
+ bl sub_80C00B4\n\
+ b _080C0022\n\
+ .align 2, 0\n\
_080BFFFC: .4byte gUnknown_03005D38\n\
_080C0000:\n\
- ldr r0, _080C0030 @ =gUnknown_03005D38\n\
- movs r1, 0\n\
- ldrsb r1, [r0, r1]\n\
- lsls r0, r1, 3\n\
- adds r0, r1\n\
- lsls r0, 2\n\
- adds r0, r4, r0\n\
- ldrb r2, [r2]\n\
- lsls r2, 24\n\
- asrs r2, 24\n\
- lsls r1, r2, 3\n\
- adds r1, r2\n\
- lsls r1, 2\n\
- adds r1, r6, r1\n\
- adds r2, r7, 0\n\
- bl sub_80C0134\n\
+ ldr r0, _080C0030 @ =gUnknown_03005D38\n\
+ movs r1, 0\n\
+ ldrsb r1, [r0, r1]\n\
+ lsls r0, r1, 3\n\
+ adds r0, r1\n\
+ lsls r0, 2\n\
+ adds r0, r4, r0\n\
+ ldrb r2, [r2]\n\
+ lsls r2, 24\n\
+ asrs r2, 24\n\
+ lsls r1, r2, 3\n\
+ adds r1, r2\n\
+ lsls r1, 2\n\
+ adds r1, r6, r1\n\
+ adds r2, r7, 0\n\
+ bl sub_80C0134\n\
_080C0022:\n\
- lsls r0, 24\n\
- lsrs r5, r0, 24\n\
+ lsls r0, 24\n\
+ lsrs r5, r0, 24\n\
_080C0026:\n\
- cmp r5, 0x1\n\
- beq _080C0034\n\
- movs r0, 0\n\
- b _080C0040\n\
- .align 2, 0\n\
+ cmp r5, 0x1\n\
+ beq _080C0034\n\
+ movs r0, 0\n\
+ b _080C0040\n\
+ .align 2, 0\n\
_080C0030: .4byte gUnknown_03005D38\n\
_080C0034:\n\
- ldr r0, _080C0048 @ =gUnknown_03000722\n\
- ldrb r1, [r0]\n\
- adds r0, r6, 0\n\
- bl sub_80BF55C\n\
- movs r0, 0x1\n\
+ ldr r0, _080C0048 @ =gUnknown_03000722\n\
+ ldrb r1, [r0]\n\
+ adds r0, r6, 0\n\
+ bl sub_80BF55C\n\
+ movs r0, 0x1\n\
_080C0040:\n\
- add sp, 0x4\n\
- pop {r4-r7}\n\
- pop {r1}\n\
- bx r1\n\
- .align 2, 0\n\
+ add sp, 0x4\n\
+ pop {r4-r7}\n\
+ pop {r1}\n\
+ bx r1\n\
+ .align 2, 0\n\
_080C0048: .4byte gUnknown_03000722\n\
.syntax divided\n");
}
@@ -2509,206 +2509,206 @@ void sub_80C01D4(void)
__attribute__((naked))
void sub_80C01D4(void) {
asm(".syntax unified\n\
- push {r4-r6,lr}\n\
- movs r6, 0\n\
+ push {r4-r6,lr}\n\
+ movs r6, 0\n\
_080C01D8:\n\
- ldr r0, _080C01F8 @ =gSaveBlock1\n\
- lsls r2, r6, 3\n\
- adds r1, r2, r6\n\
- lsls r1, 2\n\
- adds r1, r0\n\
- ldr r0, _080C01FC @ =0x00002738\n\
- adds r1, r0\n\
- ldrb r0, [r1]\n\
- cmp r0, 0x29\n\
- bls _080C01EE\n\
- b _default\n\
+ ldr r0, _080C01F8 @ =gSaveBlock1\n\
+ lsls r2, r6, 3\n\
+ adds r1, r2, r6\n\
+ lsls r1, 2\n\
+ adds r1, r0\n\
+ ldr r0, _080C01FC @ =0x00002738\n\
+ adds r1, r0\n\
+ ldrb r0, [r1]\n\
+ cmp r0, 0x29\n\
+ bls _080C01EE\n\
+ b _default\n\
_080C01EE:\n\
- lsls r0, 2\n\
- ldr r1, _080C0200 @ =_080C0204\n\
- adds r0, r1\n\
- ldr r0, [r0]\n\
- mov pc, r0\n\
- .align 2, 0\n\
+ lsls r0, 2\n\
+ ldr r1, _080C0200 @ =_080C0204\n\
+ adds r0, r1\n\
+ ldr r0, [r0]\n\
+ mov pc, r0\n\
+ .align 2, 0\n\
_080C01F8: .4byte gSaveBlock1\n\
_080C01FC: .4byte 0x00002738\n\
_080C0200: .4byte _080C0204\n\
- .align 2, 0\n\
+ .align 2, 0\n\
_080C0204:\n\
- .4byte _break\n\
- .4byte _fanclubLetter @ TVSHOW_FAN_CLUB_LETTER\n\
- .4byte _break @ TVSHOW_RECENT_HAPPENINGS\n\
- .4byte _fanclubOpinions @ TVSHOW_PKMN_FAN_CLUB_OPINIONS\n\
- .4byte _showtype4 @ TVSHOW_UNKN_SHOWTYPE_04\n\
- .4byte _nameRater @ TVSHOW_NAME_RATER_SHOW\n\
- .4byte _bravoTrainerContest @ TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE\n\
- .4byte _bravoTrainerTower @ TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _pokemonTodayS @ TVSHOW_POKEMON_TODAY_CAUGHT\n\
- .4byte _break @ TVSHOW_SMART_SHOPPER\n\
- .4byte _pokemonTodayF @ TVSHOW_POKEMON_TODAY_FAILED\n\
- .4byte _fishing @ TVSHOW_FISHING_ADVICE\n\
- .4byte _worldOfMasters @ TVSHOW_WORLD_OF_MASTERS\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _default\n\
- .4byte _break @ TVSHOW_MASS_OUTBREAK\n\
+ .4byte _break\n\
+ .4byte _fanclubLetter @ TVSHOW_FAN_CLUB_LETTER\n\
+ .4byte _break @ TVSHOW_RECENT_HAPPENINGS\n\
+ .4byte _fanclubOpinions @ TVSHOW_PKMN_FAN_CLUB_OPINIONS\n\
+ .4byte _showtype4 @ TVSHOW_UNKN_SHOWTYPE_04\n\
+ .4byte _nameRater @ TVSHOW_NAME_RATER_SHOW\n\
+ .4byte _bravoTrainerContest @ TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE\n\
+ .4byte _bravoTrainerTower @ TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _pokemonTodayS @ TVSHOW_POKEMON_TODAY_CAUGHT\n\
+ .4byte _break @ TVSHOW_SMART_SHOPPER\n\
+ .4byte _pokemonTodayF @ TVSHOW_POKEMON_TODAY_FAILED\n\
+ .4byte _fishing @ TVSHOW_FISHING_ADVICE\n\
+ .4byte _worldOfMasters @ TVSHOW_WORLD_OF_MASTERS\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _default\n\
+ .4byte _break @ TVSHOW_MASS_OUTBREAK\n\
_fanclubLetter:\n\
- adds r0, r2, r6\n\
- lsls r0, 2\n\
- ldr r1, _080C02B8 @ =gSaveBlock1 + 0x2738\n\
- adds r0, r1\n\
- ldrh r0, [r0, 0x2]\n\
- b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
- .align 2, 0\n\
+ adds r0, r2, r6\n\
+ lsls r0, 2\n\
+ ldr r1, _080C02B8 @ =gSaveBlock1 + 0x2738\n\
+ adds r0, r1\n\
+ ldrh r0, [r0, 0x2]\n\
+ b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
+ .align 2, 0\n\
_080C02B8: .4byte gSaveBlock1 + 0x2738\n\
_fanclubOpinions:\n\
- adds r0, r2, r6\n\
- lsls r0, 2\n\
- ldr r1, _080C02C8 @ =gSaveBlock1 + 0x2738\n\
- adds r0, r1\n\
- ldrh r0, [r0, 0x2]\n\
- b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
- .align 2, 0\n\
+ adds r0, r2, r6\n\
+ lsls r0, 2\n\
+ ldr r1, _080C02C8 @ =gSaveBlock1 + 0x2738\n\
+ adds r0, r1\n\
+ ldrh r0, [r0, 0x2]\n\
+ b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
+ .align 2, 0\n\
_080C02C8: .4byte gSaveBlock1 + 0x2738\n\
_showtype4:\n\
- adds r0, r2, r6\n\
- lsls r0, 2\n\
- ldr r1, _080C02D8 @ =gSaveBlock1 + 0x2738\n\
- adds r0, r1\n\
- ldrh r0, [r0, 0x6]\n\
- b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
- .align 2, 0\n\
+ adds r0, r2, r6\n\
+ lsls r0, 2\n\
+ ldr r1, _080C02D8 @ =gSaveBlock1 + 0x2738\n\
+ adds r0, r1\n\
+ ldrh r0, [r0, 0x6]\n\
+ b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
+ .align 2, 0\n\
_080C02D8: .4byte gSaveBlock1 + 0x2738\n\
_nameRater:\n\
- adds r4, r2, r6\n\
- lsls r4, 2\n\
- ldr r0, _080C02F4 @ =gSaveBlock1 + 0x2738\n\
- adds r4, r0\n\
- ldrh r0, [r4, 0x2]\n\
- lsls r5, r6, 24\n\
- lsrs r5, 24\n\
- adds r1, r5, 0\n\
- bl sub_80C03C8\n\
- ldrh r0, [r4, 0x1C]\n\
- b _checkSpecies2 @ sub_80C03C8(r0, i)\n\
- .align 2, 0\n\
+ adds r4, r2, r6\n\
+ lsls r4, 2\n\
+ ldr r0, _080C02F4 @ =gSaveBlock1 + 0x2738\n\
+ adds r4, r0\n\
+ ldrh r0, [r4, 0x2]\n\
+ lsls r5, r6, 24\n\
+ lsrs r5, 24\n\
+ adds r1, r5, 0\n\
+ bl sub_80C03C8\n\
+ ldrh r0, [r4, 0x1C]\n\
+ b _checkSpecies2 @ sub_80C03C8(r0, i)\n\
+ .align 2, 0\n\
_080C02F4: .4byte gSaveBlock1 + 0x2738\n\
_bravoTrainerContest:\n\
- adds r0, r2, r6\n\
- lsls r0, 2\n\
- ldr r1, _080C0304 @ =gSaveBlock1 + 0x2738\n\
- adds r0, r1\n\
- ldrh r0, [r0, 0x2]\n\
- b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
- .align 2, 0\n\
+ adds r0, r2, r6\n\
+ lsls r0, 2\n\
+ ldr r1, _080C0304 @ =gSaveBlock1 + 0x2738\n\
+ adds r0, r1\n\
+ ldrh r0, [r0, 0x2]\n\
+ b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
+ .align 2, 0\n\
_080C0304: .4byte gSaveBlock1 + 0x2738\n\
_bravoTrainerTower:\n\
- adds r4, r2, r6\n\
- lsls r4, 2\n\
- ldr r0, _080C0320 @ =gSaveBlock1 + 0x2738\n\
- adds r4, r0\n\
- ldrh r0, [r4, 0xA]\n\
- lsls r5, r6, 24\n\
- lsrs r5, 24\n\
- adds r1, r5, 0\n\
- bl sub_80C03C8\n\
- ldrh r0, [r4, 0x14]\n\
- b _checkSpecies2 @ sub_80C03C8(r0, i)\n\
- .align 2, 0\n\
+ adds r4, r2, r6\n\
+ lsls r4, 2\n\
+ ldr r0, _080C0320 @ =gSaveBlock1 + 0x2738\n\
+ adds r4, r0\n\
+ ldrh r0, [r4, 0xA]\n\
+ lsls r5, r6, 24\n\
+ lsrs r5, 24\n\
+ adds r1, r5, 0\n\
+ bl sub_80C03C8\n\
+ ldrh r0, [r4, 0x14]\n\
+ b _checkSpecies2 @ sub_80C03C8(r0, i)\n\
+ .align 2, 0\n\
_080C0320: .4byte gSaveBlock1 + 0x2738\n\
_pokemonTodayS:\n\
- adds r0, r2, r6\n\
- lsls r0, 2\n\
- ldr r1, _080C0330 @ =gSaveBlock1 + 0x2738\n\
- adds r0, r1\n\
- ldrh r0, [r0, 0x10]\n\
- b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
- .align 2, 0\n\
+ adds r0, r2, r6\n\
+ lsls r0, 2\n\
+ ldr r1, _080C0330 @ =gSaveBlock1 + 0x2738\n\
+ adds r0, r1\n\
+ ldrh r0, [r0, 0x10]\n\
+ b _checkSpecies1 @ sub_80C03C8(r0, i)\n\
+ .align 2, 0\n\
_080C0330: .4byte gSaveBlock1 + 0x2738\n\
_pokemonTodayF:\n\
- adds r4, r2, r6\n\
- lsls r4, 2\n\
- ldr r0, _080C034C @ =gSaveBlock1 + 0x2738\n\
- adds r4, r0\n\
- ldrh r0, [r4, 0xC]\n\
- lsls r5, r6, 24\n\
- lsrs r5, 24\n\
- adds r1, r5, 0\n\
- bl sub_80C03C8\n\
- ldrh r0, [r4, 0xE]\n\
- b _checkSpecies2 @ sub_80C03C8(r0, i)\n\
- .align 2, 0\n\
+ adds r4, r2, r6\n\
+ lsls r4, 2\n\
+ ldr r0, _080C034C @ =gSaveBlock1 + 0x2738\n\
+ adds r4, r0\n\
+ ldrh r0, [r4, 0xC]\n\
+ lsls r5, r6, 24\n\
+ lsrs r5, 24\n\
+ adds r1, r5, 0\n\
+ bl sub_80C03C8\n\
+ ldrh r0, [r4, 0xE]\n\
+ b _checkSpecies2 @ sub_80C03C8(r0, i)\n\
+ .align 2, 0\n\
_080C034C: .4byte gSaveBlock1 + 0x2738\n\
_fishing:\n\
- adds r0, r2, r6\n\
- lsls r0, 2\n\
- ldr r1, _080C0364 @ =gSaveBlock1 + 0x2738\n\
- adds r0, r1\n\
- ldrh r0, [r0, 0x4]\n\
+ adds r0, r2, r6\n\
+ lsls r0, 2\n\
+ ldr r1, _080C0364 @ =gSaveBlock1 + 0x2738\n\
+ adds r0, r1\n\
+ ldrh r0, [r0, 0x4]\n\
_checkSpecies1:\n\
- lsls r1, r6, 24\n\
- lsrs r1, 24\n\
- bl sub_80C03C8\n\
- b _break\n\
- .align 2, 0\n\
+ lsls r1, r6, 24\n\
+ lsrs r1, 24\n\
+ bl sub_80C03C8\n\
+ b _break\n\
+ .align 2, 0\n\
_080C0364: .4byte gSaveBlock1 + 0x2738\n\
_worldOfMasters:\n\
- adds r4, r2, r6\n\
- lsls r4, 2\n\
- ldr r0, _080C0388 @ =gSaveBlock1 + 0x2738\n\
- adds r4, r0\n\
- ldrh r0, [r4, 0x8]\n\
- lsls r5, r6, 24\n\
- lsrs r5, 24\n\
- adds r1, r5, 0\n\
- bl sub_80C03C8\n\
- ldrh r0, [r4, 0x4]\n\
+ adds r4, r2, r6\n\
+ lsls r4, 2\n\
+ ldr r0, _080C0388 @ =gSaveBlock1 + 0x2738\n\
+ adds r4, r0\n\
+ ldrh r0, [r4, 0x8]\n\
+ lsls r5, r6, 24\n\
+ lsrs r5, 24\n\
+ adds r1, r5, 0\n\
+ bl sub_80C03C8\n\
+ ldrh r0, [r4, 0x4]\n\
_checkSpecies2:\n\
- adds r1, r5, 0\n\
- bl sub_80C03C8\n\
- b _break\n\
- .align 2, 0\n\
+ adds r1, r5, 0\n\
+ bl sub_80C03C8\n\
+ b _break\n\
+ .align 2, 0\n\
_080C0388: .4byte gSaveBlock1 + 0x2738\n\
_default:\n\
- lsls r0, r6, 24\n\
- lsrs r0, 24\n\
- bl sub_80C03A8\n\
+ lsls r0, r6, 24\n\
+ lsrs r0, 24\n\
+ bl sub_80C03A8\n\
_break:\n\
- adds r0, r6, 0x1\n\
- lsls r0, 16\n\
- lsrs r6, r0, 16\n\
- cmp r6, 0x17\n\
- bhi _080C03A0\n\
- b _080C01D8\n\
+ adds r0, r6, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r6, r0, 16\n\
+ cmp r6, 0x17\n\
+ bhi _080C03A0\n\
+ b _080C01D8\n\
_080C03A0:\n\
- pop {r4-r6}\n\
- pop {r0}\n\
- bx r0\n\
+ pop {r4-r6}\n\
+ pop {r0}\n\
+ bx r0\n\
.syntax divided\n");
}
#endif
@@ -2738,43 +2738,43 @@ void sub_80C0408(void) {
__attribute__((naked))
void sub_80C0408(void) {
asm(".syntax unified\n\
- push {r4-r6,lr}\n\
- ldr r0, _080C044C @ =0x00000804\n\
- bl FlagGet\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0x1\n\
- beq _080C0444\n\
- movs r2, 0\n\
- ldr r6, _080C0450 @ =gSaveBlock1\n\
- ldr r4, _080C0454 @ =0x00002739\n\
- movs r3, 0\n\
- ldr r5, _080C0458 @ =0x00002738\n\
+ push {r4-r6,lr}\n\
+ ldr r0, _080C044C @ =0x00000804\n\
+ bl FlagGet\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x1\n\
+ beq _080C0444\n\
+ movs r2, 0\n\
+ ldr r6, _080C0450 @ =gSaveBlock1\n\
+ ldr r4, _080C0454 @ =0x00002739\n\
+ movs r3, 0\n\
+ ldr r5, _080C0458 @ =0x00002738\n\
_080C0422:\n\
- lsls r0, r2, 3\n\
- adds r0, r2\n\
- lsls r0, 2\n\
- adds r1, r0, r6\n\
- adds r0, r1, r5\n\
- ldrb r0, [r0]\n\
- cmp r0, 0x7\n\
- beq _080C0436\n\
- cmp r0, 0x29\n\
- bne _080C043A\n\
+ lsls r0, r2, 3\n\
+ adds r0, r2\n\
+ lsls r0, 2\n\
+ adds r1, r0, r6\n\
+ adds r0, r1, r5\n\
+ ldrb r0, [r0]\n\
+ cmp r0, 0x7\n\
+ beq _080C0436\n\
+ cmp r0, 0x29\n\
+ bne _080C043A\n\
_080C0436:\n\
- adds r0, r1, r4\n\
- strb r3, [r0]\n\
+ adds r0, r1, r4\n\
+ strb r3, [r0]\n\
_080C043A:\n\
- adds r0, r2, 0x1\n\
- lsls r0, 16\n\
- lsrs r2, r0, 16\n\
- cmp r2, 0x17\n\
- bls _080C0422\n\
+ adds r0, r2, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r2, r0, 16\n\
+ cmp r2, 0x17\n\
+ bls _080C0422\n\
_080C0444:\n\
- pop {r4-r6}\n\
- pop {r0}\n\
- bx r0\n\
- .align 2, 0\n\
+ pop {r4-r6}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
_080C044C: .4byte 0x00000804\n\
_080C0450: .4byte gSaveBlock1\n\
_080C0454: .4byte 0x00002739\n\
diff --git a/src/util.c b/src/util.c
index 2278c50fe..55608854c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -6,41 +6,41 @@ extern const u8 gSpriteDimensions[3][4][2];
extern const u16 gCrc16Table[];
u8 CreateInvisibleSpriteWithCallback(void (*callback)(struct Sprite *)) {
- u8 sprite = CreateSprite(&gInvisibleSpriteTemplate, 248, 168, 14);
- gSprites[sprite].invisible = TRUE;
- gSprites[sprite].callback = callback;
- return sprite;
+ u8 sprite = CreateSprite(&gInvisibleSpriteTemplate, 248, 168, 14);
+ gSprites[sprite].invisible = TRUE;
+ gSprites[sprite].callback = callback;
+ return sprite;
}
void StoreWordInTwoHalfwords(u16 *h, u32 w) {
- h[0] = (u16)(w);
- h[1] = (u16)(w >> 16);
+ h[0] = (u16)(w);
+ h[1] = (u16)(w >> 16);
}
void LoadWordFromTwoHalfwords(u16 *h, u32 *w) {
- *w = h[0] | (s16)h[1] << 16;
+ *w = h[0] | (s16)h[1] << 16;
}
void SetBgAffineStruct(struct BgAffineSrcData *src, u32 texX, u32 texY, s16 scrX, s16 scrY, s16 sx, s16 sy, u16 alpha) {
- src->texX = texX;
- src->texY = texY;
- src->scrX = scrX;
- src->scrY = scrY;
- src->sx = sx;
- src->sy = sy;
- src->alpha = alpha;
+ src->texX = texX;
+ src->texY = texY;
+ src->scrX = scrX;
+ src->scrY = scrY;
+ src->sx = sx;
+ src->sy = sy;
+ src->alpha = alpha;
}
void DoBgAffineSet(struct BgAffineDstData *dest, u32 texX, u32 texY, s16 scrX, s16 scrY, s16 sx, s16 sy, u16 alpha) {
- struct BgAffineSrcData src;
- SetBgAffineStruct(
- &src,
- texX, texY,
- scrX, scrY,
- sx, sy,
- alpha
- );
- BgAffineSet(&src, dest, 1);
+ struct BgAffineSrcData src;
+ SetBgAffineStruct(
+ &src,
+ texX, texY,
+ scrX, scrY,
+ sx, sy,
+ alpha
+ );
+ BgAffineSet(&src, dest, 1);
}
#ifdef NONMATCHING
@@ -48,342 +48,342 @@ void DoBgAffineSet(struct BgAffineDstData *dest, u32 texX, u32 texY, s16 scrX, s
// Functionally equivalent.
// Only the two yflip loops don't match.
void CopySpriteTiles(u8 shape, u8 size, u8 *tiles, u16 *tilemap, u8 *output) {
- u8 x, y;
- s8 i, j;
- u8 xflip[32];
- u8 h = gSpriteDimensions[shape][size][1];
- u8 w = gSpriteDimensions[shape][size][0];
- for (y = 0; y < h; y++) {
- int filler = 32 - w;
- for (x = 0; x < w; x++) {
- int tile = (*tilemap & 0x3ff) * 32;
- int attr = *tilemap & 0xc00;
- if (attr == 0) {
- void *src = tiles + tile;
- void *dest = output;
- int length = 32;
- DmaCopy32(3, src, dest, length);
- } else if (attr == 0x800) { // yflip
- for (i = 0; i < 8; i++) {
- void *src = tiles;
- void *dest = output;
- int length = 4;
- // this is likely wrong, but makes it closer to matching
- src += tile + (7 - i) * 4;
- dest += i * 4;
- DmaCopy32(3, src, dest, length);
- }
- } else { // xflip
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 4; j++) {
- u8 i2 = i * 4;
- xflip[i2 + (3-j)] = (tiles[tile + i2 + j] & 0xf) << 4;
- xflip[i2 + (3-j)] |= tiles[tile + i2 + j] >> 4;
- }
- }
- if (*tilemap & 0x800) { // yflip
- for (i = 0; i < 8; i++) {
- void *src = xflip + (7-i) * 4;
- void *dest = output + i*4;
- int length = 4;
- DmaCopy32(3, src, dest, length);
- }
- } else {
- void *src = xflip;
- void *dest = output;
- int length = 32;
- DmaCopy32(3, src, dest, length);
- }
- }
- tilemap++;
- output += 32;
- }
- tilemap += filler;
- }
+ u8 x, y;
+ s8 i, j;
+ u8 xflip[32];
+ u8 h = gSpriteDimensions[shape][size][1];
+ u8 w = gSpriteDimensions[shape][size][0];
+ for (y = 0; y < h; y++) {
+ int filler = 32 - w;
+ for (x = 0; x < w; x++) {
+ int tile = (*tilemap & 0x3ff) * 32;
+ int attr = *tilemap & 0xc00;
+ if (attr == 0) {
+ void *src = tiles + tile;
+ void *dest = output;
+ int length = 32;
+ DmaCopy32(3, src, dest, length);
+ } else if (attr == 0x800) { // yflip
+ for (i = 0; i < 8; i++) {
+ void *src = tiles;
+ void *dest = output;
+ int length = 4;
+ // this is likely wrong, but makes it closer to matching
+ src += tile + (7 - i) * 4;
+ dest += i * 4;
+ DmaCopy32(3, src, dest, length);
+ }
+ } else { // xflip
+ for (i = 0; i < 8; i++) {
+ for (j = 0; j < 4; j++) {
+ u8 i2 = i * 4;
+ xflip[i2 + (3-j)] = (tiles[tile + i2 + j] & 0xf) << 4;
+ xflip[i2 + (3-j)] |= tiles[tile + i2 + j] >> 4;
+ }
+ }
+ if (*tilemap & 0x800) { // yflip
+ for (i = 0; i < 8; i++) {
+ void *src = xflip + (7-i) * 4;
+ void *dest = output + i*4;
+ int length = 4;
+ DmaCopy32(3, src, dest, length);
+ }
+ } else {
+ void *src = xflip;
+ void *dest = output;
+ int length = 32;
+ DmaCopy32(3, src, dest, length);
+ }
+ }
+ tilemap++;
+ output += 32;
+ }
+ tilemap += filler;
+ }
}
#else
__attribute__((naked)) void CopySpriteTiles(u8 shape, u8 size, u8 *tiles, u16 *tilemap, u8 *output) {
- asm("\n"
- " .syntax unified\n"
- " push {r4-r7,lr}\n"
- " mov r7, r10\n"
- " mov r6, r9\n"
- " mov r5, r8\n"
- " push {r5-r7}\n"
- " sub sp, 0x3C\n"
- " str r2, [sp, 0x20]\n"
- " adds r4, r3, 0\n"
- " ldr r7, [sp, 0x5C]\n"
- " lsls r0, 24\n"
- " lsls r1, 24\n"
- " ldr r2, _08041008 @ =gSpriteDimensions\n"
- " lsrs r1, 23\n"
- " lsrs r0, 21\n"
- " adds r1, r0\n"
- " adds r0, r2, 0x1\n"
- " adds r0, r1, r0\n"
- " ldrb r0, [r0]\n"
- " str r0, [sp, 0x24]\n"
- " adds r1, r2\n"
- " ldrb r1, [r1]\n"
- " str r1, [sp, 0x28]\n"
- " movs r1, 0\n"
- " cmp r1, r0\n"
- " bcc _08040FB4\n"
- " b _08041136\n"
- "_08040FB4:\n"
- " movs r0, 0x20\n"
- " ldr r2, [sp, 0x28]\n"
- " subs r0, r2\n"
- " lsls r0, 1\n"
- " str r0, [sp, 0x2C]\n"
- "_08040FBE:\n"
- " movs r2, 0\n"
- " adds r1, 0x1\n"
- " str r1, [sp, 0x34]\n"
- " ldr r3, [sp, 0x28]\n"
- " cmp r2, r3\n"
- " bcc _08040FCC\n"
- " b _08041124\n"
- "_08040FCC:\n"
- " ldr r0, _0804100C @ =0x040000d4\n"
- " mov r8, r0\n"
- "_08040FD0:\n"
- " ldrh r1, [r4]\n"
- " ldr r0, _08041010 @ =0x000003ff\n"
- " ands r0, r1\n"
- " lsls r0, 5\n"
- " mov r12, r0\n"
- " movs r0, 0xC0\n"
- " lsls r0, 4\n"
- " ands r0, r1\n"
- " mov r3, sp\n"
- " strh r1, [r3, 0x38]\n"
- " cmp r0, 0\n"
- " bne _08041018\n"
- " ldr r0, [sp, 0x20]\n"
- " add r0, r12\n"
- " mov r1, r8\n"
- " str r0, [r1]\n"
- " str r7, [r1, 0x4]\n"
- " ldr r3, _08041014 @ =0x84000008\n"
- " str r3, [r1, 0x8]\n"
- " ldr r0, [r1, 0x8]\n"
- " adds r4, 0x2\n"
- " str r4, [sp, 0x30]\n"
- " adds r7, 0x20\n"
- " mov r10, r7\n"
- " adds r2, 0x1\n"
- " mov r9, r2\n"
- " b _08041112\n"
- " .align 2, 0\n"
- "_08041008: .4byte gSpriteDimensions\n"
- "_0804100C: .4byte 0x040000d4\n"
- "_08041010: .4byte 0x000003ff\n"
- "_08041014: .4byte 0x84000008\n"
- "_08041018:\n"
- " movs r1, 0x80\n"
- " lsls r1, 4\n"
- " cmp r0, r1\n"
- " bne _08041068\n"
- " movs r3, 0\n"
- " adds r4, 0x2\n"
- " str r4, [sp, 0x30]\n"
- " movs r0, 0x20\n"
- " adds r0, r7\n"
- " mov r10, r0\n"
- " adds r2, 0x1\n"
- " mov r9, r2\n"
- " ldr r4, _08041060 @ =0x040000d4\n"
- " ldr r6, _08041064 @ =0x84000001\n"
- " movs r5, 0x7\n"
- "_08041036:\n"
- " lsls r2, r3, 24\n"
- " asrs r2, 24\n"
- " subs r0, r5, r2\n"
- " lsls r0, 2\n"
- " add r0, r12\n"
- " ldr r1, [sp, 0x20]\n"
- " adds r0, r1, r0\n"
- " lsls r1, r2, 2\n"
- " adds r1, r7, r1\n"
- " str r0, [r4]\n"
- " str r1, [r4, 0x4]\n"
- " str r6, [r4, 0x8]\n"
- " ldr r0, [r4, 0x8]\n"
- " adds r2, 0x1\n"
- " lsls r2, 24\n"
- " lsrs r3, r2, 24\n"
- " asrs r2, 24\n"
- " cmp r2, 0x7\n"
- " ble _08041036\n"
- " b _08041112\n"
- " .align 2, 0\n"
- "_08041060: .4byte 0x040000d4\n"
- "_08041064: .4byte 0x84000001\n"
- "_08041068:\n"
- " movs r3, 0\n"
- " adds r4, 0x2\n"
- " str r4, [sp, 0x30]\n"
- " movs r0, 0x20\n"
- " adds r0, r7\n"
- " mov r10, r0\n"
- " adds r2, 0x1\n"
- " mov r9, r2\n"
- "_08041078:\n"
- " movs r2, 0\n"
- " lsls r4, r3, 24\n"
- " lsls r0, r4, 2\n"
- " lsrs r0, 24\n"
- " adds r6, r0, 0x3\n"
- " mov r1, r12\n"
- " adds r5, r1, r0\n"
- "_08041086:\n"
- " lsls r1, r2, 24\n"
- " asrs r1, 24\n"
- " subs r0, r6, r1\n"
- " mov r2, sp\n"
- " adds r3, r2, r0\n"
- " adds r0, r5, r1\n"
- " ldr r2, [sp, 0x20]\n"
- " adds r0, r2, r0\n"
- " ldrb r2, [r0]\n"
- " movs r0, 0xF\n"
- " ands r0, r2\n"
- " lsls r0, 4\n"
- " lsrs r2, 4\n"
- " orrs r0, r2\n"
- " strb r0, [r3]\n"
- " adds r1, 0x1\n"
- " lsls r1, 24\n"
- " lsrs r2, r1, 24\n"
- " asrs r1, 24\n"
- " cmp r1, 0x3\n"
- " ble _08041086\n"
- " movs r3, 0x80\n"
- " lsls r3, 17\n"
- " adds r0, r4, r3\n"
- " lsrs r3, r0, 24\n"
- " asrs r0, 24\n"
- " cmp r0, 0x7\n"
- " ble _08041078\n"
- " movs r0, 0x80\n"
- " lsls r0, 4\n"
- " mov r1, sp\n"
- " ldrh r1, [r1, 0x38]\n"
- " ands r0, r1\n"
- " cmp r0, 0\n"
- " beq _08041104\n"
- " movs r3, 0\n"
- " ldr r4, _080410FC @ =0x040000d4\n"
- " ldr r6, _08041100 @ =0x84000001\n"
- " movs r5, 0x7\n"
- "_080410D4:\n"
- " lsls r1, r3, 24\n"
- " asrs r1, 24\n"
- " subs r0, r5, r1\n"
- " lsls r0, 2\n"
- " mov r3, sp\n"
- " adds r2, r3, r0\n"
- " lsls r0, r1, 2\n"
- " adds r0, r7, r0\n"
- " str r2, [r4]\n"
- " str r0, [r4, 0x4]\n"
- " str r6, [r4, 0x8]\n"
- " ldr r0, [r4, 0x8]\n"
- " adds r1, 0x1\n"
- " lsls r1, 24\n"
- " lsrs r3, r1, 24\n"
- " asrs r1, 24\n"
- " cmp r1, 0x7\n"
- " ble _080410D4\n"
- " b _08041112\n"
- " .align 2, 0\n"
- "_080410FC: .4byte 0x040000d4\n"
- "_08041100: .4byte 0x84000001\n"
- "_08041104:\n"
- " mov r0, sp\n"
- " mov r1, r8\n"
- " str r0, [r1]\n"
- " str r7, [r1, 0x4]\n"
- " ldr r2, _08041148 @ =0x84000008\n"
- " str r2, [r1, 0x8]\n"
- " ldr r0, [r1, 0x8]\n"
- "_08041112:\n"
- " ldr r4, [sp, 0x30]\n"
- " mov r7, r10\n"
- " mov r3, r9\n"
- " lsls r0, r3, 24\n"
- " lsrs r2, r0, 24\n"
- " ldr r0, [sp, 0x28]\n"
- " cmp r2, r0\n"
- " bcs _08041124\n"
- " b _08040FD0\n"
- "_08041124:\n"
- " ldr r1, [sp, 0x2C]\n"
- " adds r4, r1\n"
- " ldr r2, [sp, 0x34]\n"
- " lsls r0, r2, 24\n"
- " lsrs r1, r0, 24\n"
- " ldr r3, [sp, 0x24]\n"
- " cmp r1, r3\n"
- " bcs _08041136\n"
- " b _08040FBE\n"
- "_08041136:\n"
- " add sp, 0x3C\n"
- " pop {r3-r5}\n"
- " mov r8, r3\n"
- " mov r9, r4\n"
- " mov r10, r5\n"
- " pop {r4-r7}\n"
- " pop {r0}\n"
- " bx r0\n"
- " .align 2, 0\n"
- "_08041148: .4byte 0x84000008\n"
- " .syntax divided\n"
- );
+ asm("\n"
+ " .syntax unified\n"
+ " push {r4-r7,lr}\n"
+ " mov r7, r10\n"
+ " mov r6, r9\n"
+ " mov r5, r8\n"
+ " push {r5-r7}\n"
+ " sub sp, 0x3C\n"
+ " str r2, [sp, 0x20]\n"
+ " adds r4, r3, 0\n"
+ " ldr r7, [sp, 0x5C]\n"
+ " lsls r0, 24\n"
+ " lsls r1, 24\n"
+ " ldr r2, _08041008 @ =gSpriteDimensions\n"
+ " lsrs r1, 23\n"
+ " lsrs r0, 21\n"
+ " adds r1, r0\n"
+ " adds r0, r2, 0x1\n"
+ " adds r0, r1, r0\n"
+ " ldrb r0, [r0]\n"
+ " str r0, [sp, 0x24]\n"
+ " adds r1, r2\n"
+ " ldrb r1, [r1]\n"
+ " str r1, [sp, 0x28]\n"
+ " movs r1, 0\n"
+ " cmp r1, r0\n"
+ " bcc _08040FB4\n"
+ " b _08041136\n"
+ "_08040FB4:\n"
+ " movs r0, 0x20\n"
+ " ldr r2, [sp, 0x28]\n"
+ " subs r0, r2\n"
+ " lsls r0, 1\n"
+ " str r0, [sp, 0x2C]\n"
+ "_08040FBE:\n"
+ " movs r2, 0\n"
+ " adds r1, 0x1\n"
+ " str r1, [sp, 0x34]\n"
+ " ldr r3, [sp, 0x28]\n"
+ " cmp r2, r3\n"
+ " bcc _08040FCC\n"
+ " b _08041124\n"
+ "_08040FCC:\n"
+ " ldr r0, _0804100C @ =0x040000d4\n"
+ " mov r8, r0\n"
+ "_08040FD0:\n"
+ " ldrh r1, [r4]\n"
+ " ldr r0, _08041010 @ =0x000003ff\n"
+ " ands r0, r1\n"
+ " lsls r0, 5\n"
+ " mov r12, r0\n"
+ " movs r0, 0xC0\n"
+ " lsls r0, 4\n"
+ " ands r0, r1\n"
+ " mov r3, sp\n"
+ " strh r1, [r3, 0x38]\n"
+ " cmp r0, 0\n"
+ " bne _08041018\n"
+ " ldr r0, [sp, 0x20]\n"
+ " add r0, r12\n"
+ " mov r1, r8\n"
+ " str r0, [r1]\n"
+ " str r7, [r1, 0x4]\n"
+ " ldr r3, _08041014 @ =0x84000008\n"
+ " str r3, [r1, 0x8]\n"
+ " ldr r0, [r1, 0x8]\n"
+ " adds r4, 0x2\n"
+ " str r4, [sp, 0x30]\n"
+ " adds r7, 0x20\n"
+ " mov r10, r7\n"
+ " adds r2, 0x1\n"
+ " mov r9, r2\n"
+ " b _08041112\n"
+ " .align 2, 0\n"
+ "_08041008: .4byte gSpriteDimensions\n"
+ "_0804100C: .4byte 0x040000d4\n"
+ "_08041010: .4byte 0x000003ff\n"
+ "_08041014: .4byte 0x84000008\n"
+ "_08041018:\n"
+ " movs r1, 0x80\n"
+ " lsls r1, 4\n"
+ " cmp r0, r1\n"
+ " bne _08041068\n"
+ " movs r3, 0\n"
+ " adds r4, 0x2\n"
+ " str r4, [sp, 0x30]\n"
+ " movs r0, 0x20\n"
+ " adds r0, r7\n"
+ " mov r10, r0\n"
+ " adds r2, 0x1\n"
+ " mov r9, r2\n"
+ " ldr r4, _08041060 @ =0x040000d4\n"
+ " ldr r6, _08041064 @ =0x84000001\n"
+ " movs r5, 0x7\n"
+ "_08041036:\n"
+ " lsls r2, r3, 24\n"
+ " asrs r2, 24\n"
+ " subs r0, r5, r2\n"
+ " lsls r0, 2\n"
+ " add r0, r12\n"
+ " ldr r1, [sp, 0x20]\n"
+ " adds r0, r1, r0\n"
+ " lsls r1, r2, 2\n"
+ " adds r1, r7, r1\n"
+ " str r0, [r4]\n"
+ " str r1, [r4, 0x4]\n"
+ " str r6, [r4, 0x8]\n"
+ " ldr r0, [r4, 0x8]\n"
+ " adds r2, 0x1\n"
+ " lsls r2, 24\n"
+ " lsrs r3, r2, 24\n"
+ " asrs r2, 24\n"
+ " cmp r2, 0x7\n"
+ " ble _08041036\n"
+ " b _08041112\n"
+ " .align 2, 0\n"
+ "_08041060: .4byte 0x040000d4\n"
+ "_08041064: .4byte 0x84000001\n"
+ "_08041068:\n"
+ " movs r3, 0\n"
+ " adds r4, 0x2\n"
+ " str r4, [sp, 0x30]\n"
+ " movs r0, 0x20\n"
+ " adds r0, r7\n"
+ " mov r10, r0\n"
+ " adds r2, 0x1\n"
+ " mov r9, r2\n"
+ "_08041078:\n"
+ " movs r2, 0\n"
+ " lsls r4, r3, 24\n"
+ " lsls r0, r4, 2\n"
+ " lsrs r0, 24\n"
+ " adds r6, r0, 0x3\n"
+ " mov r1, r12\n"
+ " adds r5, r1, r0\n"
+ "_08041086:\n"
+ " lsls r1, r2, 24\n"
+ " asrs r1, 24\n"
+ " subs r0, r6, r1\n"
+ " mov r2, sp\n"
+ " adds r3, r2, r0\n"
+ " adds r0, r5, r1\n"
+ " ldr r2, [sp, 0x20]\n"
+ " adds r0, r2, r0\n"
+ " ldrb r2, [r0]\n"
+ " movs r0, 0xF\n"
+ " ands r0, r2\n"
+ " lsls r0, 4\n"
+ " lsrs r2, 4\n"
+ " orrs r0, r2\n"
+ " strb r0, [r3]\n"
+ " adds r1, 0x1\n"
+ " lsls r1, 24\n"
+ " lsrs r2, r1, 24\n"
+ " asrs r1, 24\n"
+ " cmp r1, 0x3\n"
+ " ble _08041086\n"
+ " movs r3, 0x80\n"
+ " lsls r3, 17\n"
+ " adds r0, r4, r3\n"
+ " lsrs r3, r0, 24\n"
+ " asrs r0, 24\n"
+ " cmp r0, 0x7\n"
+ " ble _08041078\n"
+ " movs r0, 0x80\n"
+ " lsls r0, 4\n"
+ " mov r1, sp\n"
+ " ldrh r1, [r1, 0x38]\n"
+ " ands r0, r1\n"
+ " cmp r0, 0\n"
+ " beq _08041104\n"
+ " movs r3, 0\n"
+ " ldr r4, _080410FC @ =0x040000d4\n"
+ " ldr r6, _08041100 @ =0x84000001\n"
+ " movs r5, 0x7\n"
+ "_080410D4:\n"
+ " lsls r1, r3, 24\n"
+ " asrs r1, 24\n"
+ " subs r0, r5, r1\n"
+ " lsls r0, 2\n"
+ " mov r3, sp\n"
+ " adds r2, r3, r0\n"
+ " lsls r0, r1, 2\n"
+ " adds r0, r7, r0\n"
+ " str r2, [r4]\n"
+ " str r0, [r4, 0x4]\n"
+ " str r6, [r4, 0x8]\n"
+ " ldr r0, [r4, 0x8]\n"
+ " adds r1, 0x1\n"
+ " lsls r1, 24\n"
+ " lsrs r3, r1, 24\n"
+ " asrs r1, 24\n"
+ " cmp r1, 0x7\n"
+ " ble _080410D4\n"
+ " b _08041112\n"
+ " .align 2, 0\n"
+ "_080410FC: .4byte 0x040000d4\n"
+ "_08041100: .4byte 0x84000001\n"
+ "_08041104:\n"
+ " mov r0, sp\n"
+ " mov r1, r8\n"
+ " str r0, [r1]\n"
+ " str r7, [r1, 0x4]\n"
+ " ldr r2, _08041148 @ =0x84000008\n"
+ " str r2, [r1, 0x8]\n"
+ " ldr r0, [r1, 0x8]\n"
+ "_08041112:\n"
+ " ldr r4, [sp, 0x30]\n"
+ " mov r7, r10\n"
+ " mov r3, r9\n"
+ " lsls r0, r3, 24\n"
+ " lsrs r2, r0, 24\n"
+ " ldr r0, [sp, 0x28]\n"
+ " cmp r2, r0\n"
+ " bcs _08041124\n"
+ " b _08040FD0\n"
+ "_08041124:\n"
+ " ldr r1, [sp, 0x2C]\n"
+ " adds r4, r1\n"
+ " ldr r2, [sp, 0x34]\n"
+ " lsls r0, r2, 24\n"
+ " lsrs r1, r0, 24\n"
+ " ldr r3, [sp, 0x24]\n"
+ " cmp r1, r3\n"
+ " bcs _08041136\n"
+ " b _08040FBE\n"
+ "_08041136:\n"
+ " add sp, 0x3C\n"
+ " pop {r3-r5}\n"
+ " mov r8, r3\n"
+ " mov r9, r4\n"
+ " mov r10, r5\n"
+ " pop {r4-r7}\n"
+ " pop {r0}\n"
+ " bx r0\n"
+ " .align 2, 0\n"
+ "_08041148: .4byte 0x84000008\n"
+ " .syntax divided\n"
+ );
}
#endif
int CountTrailingZeroBits(u32 value) {
- u8 i;
- for (i = 0; i < 32; i++) {
- if ((value & 1) == 0) {
- value >>= 1;
- } else {
- return i;
- }
- }
- return 0;
+ u8 i;
+ for (i = 0; i < 32; i++) {
+ if ((value & 1) == 0) {
+ value >>= 1;
+ } else {
+ return i;
+ }
+ }
+ return 0;
}
u16 CalcCRC16(u8 *data, int length) {
- u16 i, j;
- u16 crc = 0x1121;
- for (i = 0; i < length; i++) {
- crc ^= data[i];
- for (j = 0; j < 8; j++) {
- if (crc & 1) {
- crc = (crc >> 1) ^ 0x8408;
- } else {
- crc >>= 1;
- }
- }
- }
- return ~crc;
+ u16 i, j;
+ u16 crc = 0x1121;
+ for (i = 0; i < length; i++) {
+ crc ^= data[i];
+ for (j = 0; j < 8; j++) {
+ if (crc & 1) {
+ crc = (crc >> 1) ^ 0x8408;
+ } else {
+ crc >>= 1;
+ }
+ }
+ }
+ return ~crc;
}
u16 CalcCRC16WithTable(u8 *data, int length) {
- u16 i;
- u16 crc = 0x1121;
- u8 byte;
- for (i = 0; i < length; i++) {
- byte = crc >> 8;
- crc ^= data[i];
- crc = byte ^ gCrc16Table[(u8)crc];
- }
- return ~crc;
+ u16 i;
+ u16 crc = 0x1121;
+ u8 byte;
+ for (i = 0; i < length; i++) {
+ byte = crc >> 8;
+ crc ^= data[i];
+ crc = byte ^ gCrc16Table[(u8)crc];
+ }
+ return ~crc;
}