From ad365a35c1536740cbcbc10bee66e5dd908c39e7 Mon Sep 17 00:00:00 2001 From: garak Date: Thu, 18 Jul 2019 14:29:48 -0400 Subject: name metatiles --- src/scrcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scrcmd.c') diff --git a/src/scrcmd.c b/src/scrcmd.c index d37e1180d..015fae69f 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1909,7 +1909,7 @@ bool8 ScrCmd_setmetatile(struct ScriptContext *ctx) if (!v8) MapGridSetMetatileIdAt(x, y, metatileId); else - MapGridSetMetatileIdAt(x, y, metatileId | 0xC00); + MapGridSetMetatileIdAt(x, y, metatileId | METATILE_COLLISION_MASK); return FALSE; } -- cgit v1.2.3 From 39683e0362a63ecbffc289b1e45d3e10106fbc58 Mon Sep 17 00:00:00 2001 From: garak Date: Mon, 29 Jul 2019 14:42:28 -0400 Subject: use more accurate metatile collision expression --- src/scrcmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/scrcmd.c') diff --git a/src/scrcmd.c b/src/scrcmd.c index 015fae69f..6084cfc5d 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1902,14 +1902,14 @@ bool8 ScrCmd_setmetatile(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); u16 metatileId = VarGet(ScriptReadHalfword(ctx)); - u16 v8 = VarGet(ScriptReadHalfword(ctx)); + u16 impassable = VarGet(ScriptReadHalfword(ctx)); x += 7; y += 7; - if (!v8) + if (!impassable) MapGridSetMetatileIdAt(x, y, metatileId); else - MapGridSetMetatileIdAt(x, y, metatileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, metatileId | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); return FALSE; } -- cgit v1.2.3