Add macros for metatile manipulation

This commit is contained in:
Phlosioneer authored and huderlem committed 2019-02-28 22:21:16 -06:00
1 parent 9ed0f77528
commit 189d387f01
12 files changed
+70 -61

No files matched your search

+3 -2
View File
@@ -39,6 +39,7 @@
#include "tv.h"
#include "data2.h"
#include "constants/layouts.h"
#include "constants/metatile_behaviors.h"
// Static type declarations
@@ -853,9 +854,9 @@ void SetTVMetatilesOnMap(int width, int height, u16 tileId)
{
for (x = 0; x < width; x ++)
{
if (MapGridGetMetatileBehaviorAt(x, y) == 0x86) // is this tile a TV?
if (MapGridGetMetatileBehaviorAt(x, y) == MB_TELEVISION)
{
MapGridSetMetatileIdAt(x, y, tileId | 0xc00);
MapGridSetMetatileIdAt(x, y, tileId | MAP_IMPASSABLE_MASK);
}
}
}