Some decoration labels, use constant for tileset size
This commit is contained in:
parent
039108284d
commit
0ca76fc179
3 changed files with 100 additions and 89 deletions
|
@ -1,37 +1,37 @@
|
||||||
const u8 Unknown_085A6FB0[] = {
|
static const u8 sDecorTilemap_1x1_Tiles[] = {
|
||||||
0x00, 0x01, 0x02, 0x03
|
0x00, 0x01, 0x02, 0x03
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A6FB4[] = {
|
static const u8 sDecorTilemap_3x1_Tiles[] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
|
||||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A6FC0[] = {
|
static const u8 sDecorTilemap_2x2_Tiles[] = {
|
||||||
0x00, 0x01, 0x02, 0x03,
|
0x00, 0x01, 0x02, 0x03,
|
||||||
0x04, 0x05, 0x06, 0x07,
|
0x04, 0x05, 0x06, 0x07,
|
||||||
0x08, 0x09, 0x0a, 0x0b,
|
0x08, 0x09, 0x0a, 0x0b,
|
||||||
0x0c, 0x0d, 0x0e, 0x0f
|
0x0c, 0x0d, 0x0e, 0x0f
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A6FD0[] = {
|
static const u8 sDecorTilemap_1x3_Tiles[] = {
|
||||||
0x00, 0x01, 0x04, 0x05,
|
0x00, 0x01, 0x04, 0x05,
|
||||||
0x08, 0x09, 0x0c, 0x0d,
|
0x08, 0x09, 0x0c, 0x0d,
|
||||||
0x10, 0x11, 0x14, 0x15
|
0x10, 0x11, 0x14, 0x15
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A6FDC[] = {
|
static const u8 sDecorTilemap_2x1_Tiles[] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A6FE4[] = {
|
static const u8 sDecorTilemap_4x2_Tiles[] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||||
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
|
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7004[] = {
|
static const u8 sDecorTilemap_3x3_Tiles[] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
|
||||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
|
||||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
|
0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
|
||||||
|
@ -40,60 +40,60 @@ const u8 Unknown_085A7004[] = {
|
||||||
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d
|
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7028[] = {
|
static const u8 sDecorTilemap_3x2_Tiles[] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
|
||||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
|
||||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
|
0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
|
||||||
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d
|
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7040[] = {
|
static const u8 sDecorTilemap_1x1_Y[] = {
|
||||||
0x00, 0x00, 0x00, 0x00
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7044[] = {
|
static const u8 sDecorTilemap_2x1_Y[] = {
|
||||||
0x00, 0x00, 0x01, 0x01,
|
0x00, 0x00, 0x01, 0x01,
|
||||||
0x00, 0x00, 0x01, 0x01
|
0x00, 0x00, 0x01, 0x01
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A704C[] = {
|
static const u8 sDecorTilemap_3x1_Y[] = {
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02
|
0x00, 0x00, 0x01, 0x01, 0x02, 0x02
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7058[] = {
|
static const u8 sDecorTilemap_4x2_Y[] = {
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03,
|
0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03,
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03,
|
0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03,
|
||||||
0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07,
|
0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07,
|
||||||
0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07
|
0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7078[] = {
|
static const u8 sDecorTilemap_2x2_Y[] = {
|
||||||
0x00, 0x00, 0x01, 0x01,
|
0x00, 0x00, 0x01, 0x01,
|
||||||
0x00, 0x00, 0x01, 0x01,
|
0x00, 0x00, 0x01, 0x01,
|
||||||
0x02, 0x02, 0x03, 0x03,
|
0x02, 0x02, 0x03, 0x03,
|
||||||
0x02, 0x02, 0x03, 0x03
|
0x02, 0x02, 0x03, 0x03
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7088[] = {
|
static const u8 sDecorTilemap_1x2_Y[] = {
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00,
|
||||||
0x01, 0x01, 0x01, 0x01
|
0x01, 0x01, 0x01, 0x01
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7090[] = {
|
static const u8 sDecorTilemap_1x3_Y[] = {
|
||||||
0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00,
|
||||||
0x01, 0x01, 0x01, 0x01,
|
0x01, 0x01, 0x01, 0x01,
|
||||||
0x02, 0x02, 0x02, 0x02
|
0x02, 0x02, 0x02, 0x02
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A709C[] = {
|
static const u8 sDecorTilemap_2x4_Y[] = {
|
||||||
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
|
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
|
||||||
0x02, 0x02, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03,
|
0x02, 0x02, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03,
|
||||||
0x04, 0x04, 0x05, 0x05, 0x04, 0x04, 0x05, 0x05,
|
0x04, 0x04, 0x05, 0x05, 0x04, 0x04, 0x05, 0x05,
|
||||||
0x06, 0x06, 0x07, 0x07, 0x06, 0x06, 0x07, 0x07
|
0x06, 0x06, 0x07, 0x07, 0x06, 0x06, 0x07, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A70BC[] = {
|
static const u8 sDecorTilemap_3x3_Y[] = {
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
||||||
0x03, 0x03, 0x04, 0x04, 0x05, 0x05,
|
0x03, 0x03, 0x04, 0x04, 0x05, 0x05,
|
||||||
|
@ -102,60 +102,60 @@ const u8 Unknown_085A70BC[] = {
|
||||||
0x06, 0x06, 0x07, 0x07, 0x08, 0x08
|
0x06, 0x06, 0x07, 0x07, 0x08, 0x08
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A70E0[] = {
|
static const u8 sDecorTilemap_3x2_Y[] = {
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
||||||
0x03, 0x03, 0x04, 0x04, 0x05, 0x05,
|
0x03, 0x03, 0x04, 0x04, 0x05, 0x05,
|
||||||
0x03, 0x03, 0x04, 0x04, 0x05, 0x05
|
0x03, 0x03, 0x04, 0x04, 0x05, 0x05
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A70F8[] = {
|
static const u8 sDecorTilemap_1x1_X[] = {
|
||||||
0x04, 0x05, 0x06, 0x07
|
0x04, 0x05, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A70FC[] = {
|
static const u8 sDecorTilemap_2x1_X[] = {
|
||||||
0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07
|
0x06, 0x07, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7104[] = {
|
static const u8 sDecorTilemap_3x1_X[] = {
|
||||||
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07, 0x06, 0x07
|
0x06, 0x07, 0x06, 0x07, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7110[] = {
|
static const u8 sDecorTilemap_4x2_X[] = {
|
||||||
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
|
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07
|
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7130[] = {
|
static const u8 sDecorTilemap_2x2_X[] = {
|
||||||
0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07,
|
0x06, 0x07, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07
|
0x06, 0x07, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7140[] = {
|
static const u8 sDecorTilemap_1x2_X[] = {
|
||||||
0x04, 0x05, 0x06, 0x07,
|
0x04, 0x05, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x06, 0x07
|
0x04, 0x05, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7148[] = {
|
static const u8 sDecorTilemap_1x3_X[] = {
|
||||||
0x04, 0x05, 0x06, 0x07,
|
0x04, 0x05, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x06, 0x07,
|
0x04, 0x05, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x06, 0x07
|
0x04, 0x05, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7154[] = {
|
static const u8 sDecorTilemap_2x4_X[] = {
|
||||||
0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07,
|
0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07,
|
0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07,
|
0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07
|
0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7174[] = {
|
static const u8 sDecorTilemap_3x3_X[] = {
|
||||||
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
|
0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
||||||
|
@ -164,67 +164,78 @@ const u8 Unknown_085A7174[] = {
|
||||||
0x06, 0x07, 0x06, 0x07, 0x06, 0x07
|
0x06, 0x07, 0x06, 0x07, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const u8 Unknown_085A7198[] = {
|
static const u8 sDecorTilemap_3x2_X[] = {
|
||||||
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
|
0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
|
||||||
0x06, 0x07, 0x06, 0x07, 0x06, 0x07
|
0x06, 0x07, 0x06, 0x07, 0x06, 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct {
|
#define DECORSIZE(width, height)((width) * (height) * 4)
|
||||||
|
|
||||||
|
static const struct {
|
||||||
const u8 *tiles;
|
const u8 *tiles;
|
||||||
const u8 *y;
|
const u8 *y;
|
||||||
const u8 *x;
|
const u8 *x;
|
||||||
u8 size;
|
u8 size;
|
||||||
} gUnknown_085A71B0[] = {
|
} sDecorTilemaps[] = {
|
||||||
{
|
[DECORSHAPE_1x1] = {
|
||||||
Unknown_085A6FB0,
|
.tiles = sDecorTilemap_1x1_Tiles,
|
||||||
Unknown_085A7040,
|
.y = sDecorTilemap_1x1_Y,
|
||||||
Unknown_085A70F8,
|
.x = sDecorTilemap_1x1_X,
|
||||||
0x04
|
.size = DECORSIZE(1, 1)
|
||||||
}, {
|
},
|
||||||
Unknown_085A6FDC,
|
[DECORSHAPE_2x1] = {
|
||||||
Unknown_085A7044,
|
.tiles = sDecorTilemap_2x1_Tiles,
|
||||||
Unknown_085A70FC,
|
.y = sDecorTilemap_2x1_Y,
|
||||||
0x08
|
.x = sDecorTilemap_2x1_X,
|
||||||
}, {
|
.size = DECORSIZE(2, 1)
|
||||||
Unknown_085A6FB4,
|
},
|
||||||
Unknown_085A704C,
|
[DECORSHAPE_3x1] = {
|
||||||
Unknown_085A7104,
|
.tiles = sDecorTilemap_3x1_Tiles,
|
||||||
0x0c
|
.y = sDecorTilemap_3x1_Y,
|
||||||
}, {
|
.x = sDecorTilemap_3x1_X,
|
||||||
Unknown_085A6FE4,
|
.size = DECORSIZE(3, 1)
|
||||||
Unknown_085A7058,
|
},
|
||||||
Unknown_085A7110,
|
[DECORSHAPE_4x2] = {
|
||||||
0x20
|
.tiles = sDecorTilemap_4x2_Tiles,
|
||||||
}, {
|
.y = sDecorTilemap_4x2_Y,
|
||||||
Unknown_085A6FC0,
|
.x = sDecorTilemap_4x2_X,
|
||||||
Unknown_085A7078,
|
.size = DECORSIZE(4, 2)
|
||||||
Unknown_085A7130,
|
},
|
||||||
0x10
|
[DECORSHAPE_2x2] = {
|
||||||
}, {
|
.tiles = sDecorTilemap_2x2_Tiles,
|
||||||
Unknown_085A6FDC,
|
.y = sDecorTilemap_2x2_Y,
|
||||||
Unknown_085A7088,
|
.x = sDecorTilemap_2x2_X,
|
||||||
Unknown_085A7140,
|
.size = DECORSIZE(2, 2)
|
||||||
0x08
|
},
|
||||||
}, {
|
[DECORSHAPE_1x2] = {
|
||||||
Unknown_085A6FD0,
|
.tiles = sDecorTilemap_2x1_Tiles,
|
||||||
Unknown_085A7090,
|
.y = sDecorTilemap_1x2_Y,
|
||||||
Unknown_085A7148,
|
.x = sDecorTilemap_1x2_X,
|
||||||
0x0c
|
.size = DECORSIZE(1, 2)
|
||||||
}, {
|
},
|
||||||
Unknown_085A6FE4,
|
[DECORSHAPE_1x3] = {
|
||||||
Unknown_085A709C,
|
.tiles = sDecorTilemap_1x3_Tiles,
|
||||||
Unknown_085A7154,
|
.y = sDecorTilemap_1x3_Y,
|
||||||
0x20
|
.x = sDecorTilemap_1x3_X,
|
||||||
}, {
|
.size = DECORSIZE(1, 3)
|
||||||
Unknown_085A7004,
|
},
|
||||||
Unknown_085A70BC,
|
[DECORSHAPE_2x4] = {
|
||||||
Unknown_085A7174,
|
.tiles = sDecorTilemap_4x2_Tiles,
|
||||||
0x24
|
.y = sDecorTilemap_2x4_Y,
|
||||||
}, {
|
.x = sDecorTilemap_2x4_X,
|
||||||
Unknown_085A7028,
|
.size = DECORSIZE(2, 4)
|
||||||
Unknown_085A70E0,
|
},
|
||||||
Unknown_085A7198,
|
[DECORSHAPE_3x3] = {
|
||||||
0x18
|
.tiles = sDecorTilemap_3x3_Tiles,
|
||||||
|
.y = sDecorTilemap_3x3_Y,
|
||||||
|
.x = sDecorTilemap_3x3_X,
|
||||||
|
.size = DECORSIZE(3, 3)
|
||||||
|
},
|
||||||
|
[DECORSHAPE_3x2] = {
|
||||||
|
.tiles = sDecorTilemap_3x2_Tiles,
|
||||||
|
.y = sDecorTilemap_3x2_Y,
|
||||||
|
.x = sDecorTilemap_3x2_X,
|
||||||
|
.size = DECORSIZE(3, 2)
|
||||||
}};
|
}};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define DECOR_TILE(name) (METATILE_SecretBase_##name - 0x200)
|
#define DECOR_TILE(name) (METATILE_SecretBase_##name - NUM_TILES_IN_PRIMARY)
|
||||||
|
|
||||||
const u16 DecorGfx_SMALL_DESK[] = {
|
const u16 DecorGfx_SMALL_DESK[] = {
|
||||||
DECOR_TILE(SmallDesk)
|
DECOR_TILE(SmallDesk)
|
||||||
|
|
|
@ -1210,7 +1210,7 @@ static void ShowDecorationOnMap_(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight,
|
||||||
for (i = 0; i < decWidth; i++)
|
for (i = 0; i < decWidth; i++)
|
||||||
{
|
{
|
||||||
x = mapX + i;
|
x = mapX + i;
|
||||||
behavior = GetBehaviorByMetatileId(0x200 + gDecorations[decoration].tiles[j * decWidth + i]);
|
behavior = GetBehaviorByMetatileId(NUM_TILES_IN_PRIMARY + gDecorations[decoration].tiles[j * decWidth + i]);
|
||||||
if (MetatileBehavior_IsSecretBaseImpassable(behavior) == TRUE || (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (behavior >> METATILE_ELEVATION_SHIFT)))
|
if (MetatileBehavior_IsSecretBaseImpassable(behavior) == TRUE || (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (behavior >> METATILE_ELEVATION_SHIFT)))
|
||||||
impassableFlag = METATILE_COLLISION_MASK;
|
impassableFlag = METATILE_COLLISION_MASK;
|
||||||
else
|
else
|
||||||
|
@ -1224,9 +1224,9 @@ static void ShowDecorationOnMap_(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight,
|
||||||
|
|
||||||
elevation = GetDecorationElevation(gDecorations[decoration].id, j * decWidth + i);
|
elevation = GetDecorationElevation(gDecorations[decoration].id, j * decWidth + i);
|
||||||
if (elevation != 0xFFFF)
|
if (elevation != 0xFFFF)
|
||||||
MapGridSetMetatileEntryAt(x, y, (gDecorations[decoration].tiles[j * decWidth + i] + (0x200 | overlapsWall)) | impassableFlag | elevation);
|
MapGridSetMetatileEntryAt(x, y, (gDecorations[decoration].tiles[j * decWidth + i] + (NUM_TILES_IN_PRIMARY | overlapsWall)) | impassableFlag | elevation);
|
||||||
else
|
else
|
||||||
MapGridSetMetatileIdAt(x, y, (gDecorations[decoration].tiles[j * decWidth + i] + (0x200 | overlapsWall)) | impassableFlag);
|
MapGridSetMetatileIdAt(x, y, (gDecorations[decoration].tiles[j * decWidth + i] + (NUM_TILES_IN_PRIMARY | overlapsWall)) | impassableFlag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1524,7 +1524,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration)
|
||||||
{
|
{
|
||||||
curX = gTasks[taskId].tCursorX + j;
|
curX = gTasks[taskId].tCursorX + j;
|
||||||
behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY);
|
behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY);
|
||||||
behaviorBy = GetBehaviorByMetatileId(0x200 + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ELEVATION_MASK;
|
behaviorBy = GetBehaviorByMetatileId(NUM_TILES_IN_PRIMARY + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ELEVATION_MASK;
|
||||||
if (!IsFloorOrBoardAndHole(behaviorAt, decoration))
|
if (!IsFloorOrBoardAndHole(behaviorAt, decoration))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -1545,7 +1545,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration)
|
||||||
{
|
{
|
||||||
curX = gTasks[taskId].tCursorX + j;
|
curX = gTasks[taskId].tCursorX + j;
|
||||||
behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY);
|
behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY);
|
||||||
behaviorBy = GetBehaviorByMetatileId(0x200 + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ELEVATION_MASK;
|
behaviorBy = GetBehaviorByMetatileId(NUM_TILES_IN_PRIMARY + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ELEVATION_MASK;
|
||||||
if (!MetatileBehavior_IsNormal(behaviorAt) && !IsNonBlockNonElevated(behaviorAt, behaviorBy))
|
if (!MetatileBehavior_IsNormal(behaviorAt) && !IsNonBlockNonElevated(behaviorAt, behaviorBy))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -1562,7 +1562,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration)
|
||||||
{
|
{
|
||||||
curX = gTasks[taskId].tCursorX + j;
|
curX = gTasks[taskId].tCursorX + j;
|
||||||
behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY);
|
behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY);
|
||||||
behaviorBy = GetBehaviorByMetatileId(0x200 + decoration->tiles[j]) & METATILE_ELEVATION_MASK;
|
behaviorBy = GetBehaviorByMetatileId(NUM_TILES_IN_PRIMARY + decoration->tiles[j]) & METATILE_ELEVATION_MASK;
|
||||||
if (!MetatileBehavior_IsNormal(behaviorAt) && !MetatileBehavior_IsSecretBaseNorthWall(behaviorAt))
|
if (!MetatileBehavior_IsNormal(behaviorAt) && !MetatileBehavior_IsSecretBaseNorthWall(behaviorAt))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -1971,9 +1971,9 @@ static void SetDecorSelectionMetatiles(struct PlaceDecorationGraphicsDataBuffer
|
||||||
u8 shape;
|
u8 shape;
|
||||||
|
|
||||||
shape = data->decoration->shape;
|
shape = data->decoration->shape;
|
||||||
for (i = 0; i < gUnknown_085A71B0[shape].size; i++)
|
for (i = 0; i < sDecorTilemaps[shape].size; i++)
|
||||||
{
|
{
|
||||||
data->tiles[gUnknown_085A71B0[shape].tiles[i]] = GetMetatile(data->decoration->tiles[gUnknown_085A71B0[shape].y[i]] * 8 + gUnknown_085A71B0[shape].x[i]);
|
data->tiles[sDecorTilemaps[shape].tiles[i]] = GetMetatile(data->decoration->tiles[sDecorTilemaps[shape].y[i]] * 8 + sDecorTilemaps[shape].x[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue