}
else
{
- /* object is code&3f, object type is upper 2 bits */
+ /* object is code & 3f, object type is upper 2 bits */
elem = import_func(code & 0x3F, index);
switch ((code >> 6) & 3)
if (uncompressed[0x380])
cave->creatures_direction_auto_change_time = uncompressed[0x381];
- cave->colorb = gd_c64_color(uncompressed[0x384]&0xf); /* border */
- cave->color0 = gd_c64_color(uncompressed[0x385]&0xf);
- cave->color1 = gd_c64_color(uncompressed[0x386]&0xf);
- cave->color2 = gd_c64_color(uncompressed[0x387]&0xf);
- cave->color3 = gd_c64_color(uncompressed[0x388]&0x7); /* lower 3 bits only! */
+ cave->colorb = gd_c64_color(uncompressed[0x384] & 0xf); /* border */
+ cave->color0 = gd_c64_color(uncompressed[0x385] & 0xf);
+ cave->color1 = gd_c64_color(uncompressed[0x386] & 0xf);
+ cave->color2 = gd_c64_color(uncompressed[0x387] & 0xf);
+ cave->color3 = gd_c64_color(uncompressed[0x388] & 0x7); /* lower 3 bits only! */
cave->color4 = cave->color3;
cave->color5 = cave->color1;
- cave->intermission = uncompressed[0x389]!=0;
+ cave->intermission = uncompressed[0x389] != 0;
/* if it is intermission but not scrollable */
if (cave->intermission && !uncompressed[0x38c])
GD_MV_LEFT = 7,
GD_MV_UP_LEFT = 8,
- /* to be able to type GD_MV_TWICE+GD_MV_DOWN, for example */
+ /* to be able to type GD_MV_TWICE + GD_MV_DOWN, for example */
GD_MV_TWICE = 8,
/* directions * 2 */
static inline boolean is_space_dir(const GdCave *cave, const int x, const int y,
const GdDirection dir)
{
- GdElement e = get_dir(cave, x, y, dir)&O_MASK;
+ GdElement e = get_dir(cave, x, y, dir) & O_MASK;
return (e == O_SPACE || e == O_LAVA);
}
static inline void store_dir(GdCave *cave, const int x, const int y,
const GdDirection dir, const GdElement element)
{
- store(cave, x + gd_dx[dir], y + gd_dy[dir], element|SCANNED);
+ store(cave, x + gd_dx[dir], y + gd_dy[dir], element | SCANNED);
}
/* store an element to a neighbouring cell */
{
/* if we find a scanned element, change it to the normal one, and that's all. */
/* this is required, for example for chasing stones, which have moved, always passing slime! */
- if (get(cave, x, y)&SCANNED)
+ if (get(cave, x, y) & SCANNED)
{
store(cave, x, y, get(cave, x, y) & ~SCANNED);
rand = g_rand_new_with_seed(seed);
/* for c64 random, use the 2*8 lsb. */
- gd_c64_random_set_seed(&c64_rand, seed/256%256, seed%256);
+ gd_c64_random_set_seed(&c64_rand, seed / 256 % 256, seed % 256);
/* change coordinates if not in correct order */
if (y1 > y2)
O_MAX_ALL,
- SCANNED=0x100,
- COVERED=0x200,
+ SCANNED = 0x100,
+ COVERED = 0x200,
/* binary AND this to elements to get rid of properties above. */
O_MASK = ~(SCANNED | COVERED)