Allow flipping levels horizontally or vertically
When a special level is created, there's a chance it gets flipped horizontally and/or vertically. Add new level flags "noflip", "noflipx", and "noflipy" to prevent flipping the level. Add a wiz-mode command #wizlevelflip to test the flipping on current level - although this doesn't flip everything, as level flipping is meant to happen during level creation.
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
void strbuf_empty (strbuf *)
|
||||
void strbuf_nl_to_crlf (strbuf_t *)
|
||||
char * nonconst (const char *, char *)
|
||||
int swapbits (int, int, int)
|
||||
=*/
|
||||
#ifdef LINT
|
||||
#define Static /* pacify lint */
|
||||
@@ -1290,4 +1291,14 @@ char *buf;
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* swapbits(val, bita, bitb) swaps bit a with bit b in val */
|
||||
int
|
||||
swapbits(val, bita, bitb)
|
||||
int val, bita, bitb;
|
||||
{
|
||||
int tmp = ((val >> bita) & 1) ^ ((val >> bitb) & 1);
|
||||
|
||||
return (val ^ ((tmp << bita) | (tmp << bitb)));
|
||||
}
|
||||
|
||||
/*hacklib.c*/
|
||||
|
||||
Reference in New Issue
Block a user