}
/* we do not like generated pixbufs for games. only those that are in the png. */
- if (ABS(gd_elements[i].image_game)>GD_NUM_OF_CELLS_X*GD_NUM_OF_CELLS_Y)
+ if (ABS(gd_elements[i].image_game) > GD_NUM_OF_CELLS_X * GD_NUM_OF_CELLS_Y)
Error("game pixbuf for element %x (%s) bigger than png size", i, gd_elements[i].name);
if (gd_elements[i].image < 0)
Error("editor pixbuf for element %x (%s) should not be animated", i, gd_elements[i].name);
- if (gd_elements[i].properties&P_CAN_BE_HAMMERED && gd_element_get_hammered((GdElement) i) == O_NONE)
+ if (gd_elements[i].properties & P_CAN_BE_HAMMERED && gd_element_get_hammered((GdElement) i) == O_NONE)
Error("element %x (%s) can be hammered, but get_hammered_element does not define another one", i, gd_elements[i].name);
}
/* other types */
/* check if its pointer is not the same as another one's */
/* +1 is added so it is never zero */
- if (!(gd_cave_properties[i].flags&GD_DONT_SAVE) && strcmp(gd_cave_properties[i].identifier, "") == 0)
+ if (!(gd_cave_properties[i].flags & GD_DONT_SAVE) && strcmp(gd_cave_properties[i].identifier, "") == 0)
{
Error ("property should have a bdcff identifier: line %d, name %s",
i, gd_cave_properties[i].name);
for (x = 0; x < cave->w; x++)
{
/* timer for the cell > 0? */
- if (cave->hammered_reappear[y][x]>0)
+ if (cave->hammered_reappear[y][x] > 0)
{
/* decrease timer */
cave->hammered_reappear[y][x]--;
/* if no horizontal movement possible, choose vertical */
if (dir == 2 && (dirmask & 12) == 0)
dir = 0;
- else if (dir == 0 && (dirmask&3) == 0) /* and vice versa */
+ else if (dir == 0 && (dirmask & 3) == 0) /* and vice versa */
dir = 2;
dir += g_rand_int_range(rand, 0, 2); /* dir */
#undef AUTO
#endif
-#define TRUE 1
-#define FALSE 0
-#define AUTO -1
+#define TRUE 1
+#define FALSE 0
+#define AUTO -1
#ifndef MIN
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef ABS
-#define ABS(a) ((a) < 0 ? -(a) : (a))
+#define ABS(a) ((a) < 0 ? -(a) : (a))
#endif
#ifndef SIGN
-#define SIGN(a) ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
+#define SIGN(a) ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
#endif
#ifndef ODD
-#define ODD(a) (((a) & 1) == 1)
+#define ODD(a) (((a) & 1) == 1)
#endif
#ifndef EVEN
-#define EVEN(a) (((a) & 1) == 0)
+#define EVEN(a) (((a) & 1) == 0)
#endif
-#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
+#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
-#define PTR_TO_INT(p) ((int) (long) (p))
-#define PTR_TO_UINT(p) ((unsigned int) (unsigned long) (p))
+#define PTR_TO_INT(p) ((int) (long) (p))
+#define PTR_TO_UINT(p) ((unsigned int) (unsigned long) (p))
-#define INT_TO_PTR(i) ((void *) (long) (i))
-#define UINT_TO_PTR(u) ((void *) (unsigned long) (u))
+#define INT_TO_PTR(i) ((void *) (long) (i))
+#define UINT_TO_PTR(u) ((void *) (unsigned long) (u))
struct ListNode