diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2022-02-09 11:11:37 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2022-02-09 11:11:37 -0500 |
commit | 8b7458eca127d29dba6f986a7db5264060d8301e (patch) | |
tree | 4f161037a75d36461a2599946d2b9a1f7073fe69 | |
parent | 4bc03820965772778ce1f94bec4f8c9a5d0179ae (diff) |
Update names that have changed
-rw-r--r-- | Custom-Border-Dimensions.md | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Custom-Border-Dimensions.md b/Custom-Border-Dimensions.md index ff8484d..89ab238 100644 --- a/Custom-Border-Dimensions.md +++ b/Custom-Border-Dimensions.md @@ -23,24 +23,24 @@ struct MapLayout ## 2. Use dimensions fields to read border data Next we need to use these new fields when we're trying to access border data. -In [src/fieldmap.c](https://github.com/pret/pokeemerald/blob/master/src/fieldmap.c), find the definition of the macro `MapGridGetBorderTileAt` and replace it with the version below: +In [src/fieldmap.c](https://github.com/pret/pokeemerald/blob/master/src/fieldmap.c), find the definition of the macro `GetBorderBlockAt` and replace it with the version below: ```c -#define MapGridGetBorderTileAt(x, y) ({ \ - u16 block; \ - s32 xprime; \ - s32 yprime; \ - \ - const struct MapLayout *mapLayout = gMapHeader.mapLayout; \ - \ - xprime = x - 7; \ - xprime += 8 * mapLayout->borderWidth; \ - xprime %= mapLayout->borderWidth; \ - \ - yprime = y - 7; \ - yprime += 8 * mapLayout->borderHeight; \ - yprime %= mapLayout->borderHeight; \ - \ - block = mapLayout->border[xprime + yprime * mapLayout->borderWidth] | METATILE_COLLISION_MASK; \ +#define GetBorderBlockAt(x, y) ({ \ + u16 block; \ + s32 xprime; \ + s32 yprime; \ + \ + const struct MapLayout *mapLayout = gMapHeader.mapLayout; \ + \ + xprime = x - 7; \ + xprime += 8 * mapLayout->borderWidth; \ + xprime %= mapLayout->borderWidth; \ + \ + yprime = y - 7; \ + yprime += 8 * mapLayout->borderHeight; \ + yprime %= mapLayout->borderHeight; \ + \ + block = mapLayout->border[xprime + yprime * mapLayout->borderWidth] | MAPGRID_COLLISION_MASK; \ }) ``` |