#define D 0x08
#define LOCKED 0x10
#define ACTIVE 0x20
-#define RLOOP (R << 6)
-#define ULOOP (U << 6)
-#define LLOOP (L << 6)
-#define DLOOP (D << 6)
-#define LOOP(dir) ((dir) << 6)
+#define RERR (R << 6)
+#define UERR (U << 6)
+#define LERR (L << 6)
+#define DERR (D << 6)
+#define ERR(dir) ((dir) << 6)
/* Rotations: Anticlockwise, Clockwise, Flip, general rotate */
#define A(x) ( (((x) & 0x07) << 1) | (((x) & 0x08) >> 3) )
COL_ENDPOINT,
COL_POWERED,
COL_BARRIER,
- COL_LOOP,
+ COL_ERR,
NCOLOURS
};
OFFSETWH(x1, y1, x, y, dir, w, h);
if ((tiles[y1*w+x1] & F(dir)) &&
findloop_is_loop_edge(fls, y*w+x, y1*w+x1))
- flags |= LOOP(dir);
+ flags |= ERR(dir);
}
}
loops[y*w+x] = flags;
ret[COL_BARRIER * 3 + 2] = 0.0F;
/*
- * Highlighted loops are red as well.
+ * Highlighted errors are red as well.
*/
- ret[COL_LOOP * 3 + 0] = 1.0F;
- ret[COL_LOOP * 3 + 1] = 0.0F;
- ret[COL_LOOP * 3 + 2] = 0.0F;
+ ret[COL_ERR * 3 + 0] = 1.0F;
+ ret[COL_ERR * 3 + 1] = 0.0F;
+ ret[COL_ERR * 3 + 2] = 0.0F;
/*
* Unpowered endpoints are blue.
#define TILE_KEYBOARD_CURSOR (1<<8) /* 1 bit if cursor is here */
#define TILE_WIRE_SHIFT 9 /* 8 bits: RR UU LL DD
* Each pair: 0=no wire, 1=unpowered,
- * 2=powered, 3=loop err highlight */
+ * 2=powered, 3=error highlight */
#define TILE_ENDPOINT_SHIFT 17 /* 2 bits: 0=no endpoint, 1=unpowered,
* 2=powered, 3=power-source square */
#define TILE_WIRE_ON_EDGE_SHIFT 19 /* 8 bits: RR UU LL DD,
for (pass = 0; pass < 2; pass++) {
int x, y, w, h;
int col = (pass == 0 || edgetype == 1 ? COL_WIRE :
- edgetype == 2 ? COL_POWERED : COL_LOOP);
+ edgetype == 2 ? COL_POWERED : COL_ERR);
int halfwidth = pass == 0 ? 2*LINE_THICK-1 : LINE_THICK-1;
if (X(d) < 0) {
draw_wires(dr, cx, cy, radius, tile,
0x4, COL_POWERED, LINE_THICK-1, matrix);
draw_wires(dr, cx, cy, radius, tile,
- 0x8, COL_LOOP, LINE_THICK-1, matrix);
+ 0x8, COL_ERR, LINE_THICK-1, matrix);
/*
* Draw the central box.
}
if (t & d) {
- int edgeval = (t & LOOP(d) ? 3 : t & ACTIVE ? 2 : 1);
+ int edgeval = (t & ERR(d) ? 3 : t & ACTIVE ? 2 : 1);
todraw(ds, dx, dy) |= edgeval << (TILE_WIRE_SHIFT + dsh*2);
if (!(gx == tx && gy == ty)) {
todraw(ds, dx + X(d), dy + Y(d)) |=