-1, ED_AREA_1X1_SETTINGS_YPOS(1),
0, ED_AREA_1X1_SETTINGS_YOFF,
GADGET_ID_CUSTOM_GRAPHIC, GADGET_ID_CUSTOM_USE_GRAPHIC,
- &custom_element.gfx_element_initial,1, 1,
+ &custom_element.gfx_element_initial, 1, 1,
NULL, NULL, NULL, NULL, "custom graphic element"
},
static int ed_tilesize = DEFAULT_EDITOR_TILESIZE;
static int ed_tilesize_default = DEFAULT_EDITOR_TILESIZE;
-#define IN_ED_FIELD(x,y) IN_FIELD(x, y, ed_fieldx, ed_fieldy)
+#define IN_ED_FIELD(x, y) IN_FIELD(x, y, ed_fieldx, ed_fieldy)
// drawing elements on the three mouse buttons
static int new_element1 = EL_WALL;
// set position for gadgets with dynamically determined position
if (checkbutton_info[id].x != -1) // do not change dynamic positions
- ModifyGadget(gi, GDI_X, SX + ED_SETTINGS_X(checkbutton_info[id].x),GDI_END);
+ ModifyGadget(gi, GDI_X, SX + ED_SETTINGS_X(checkbutton_info[id].x), GDI_END);
ModifyGadget(gi, GDI_Y, SY + ED_SETTINGS_Y(checkbutton_info[id].y), GDI_END);
x_left = gi->x - xoffset_left;
{ EL_NUT, &level.score[SC_NUT], TEXT_CRACKING },
{ EL_DYNAMITE, &level.score[SC_DYNAMITE], TEXT_COLLECTING },
{ EL_EM_DYNAMITE, &level.score[SC_DYNAMITE], TEXT_COLLECTING },
- { EL_DYNABOMB_INCREASE_NUMBER,&level.score[SC_DYNAMITE],TEXT_COLLECTING },
- { EL_DYNABOMB_INCREASE_SIZE, &level.score[SC_DYNAMITE],TEXT_COLLECTING },
- { EL_DYNABOMB_INCREASE_POWER, &level.score[SC_DYNAMITE],TEXT_COLLECTING },
+ { EL_DYNABOMB_INCREASE_NUMBER,&level.score[SC_DYNAMITE], TEXT_COLLECTING },
+ { EL_DYNABOMB_INCREASE_SIZE, &level.score[SC_DYNAMITE], TEXT_COLLECTING },
+ { EL_DYNABOMB_INCREASE_POWER, &level.score[SC_DYNAMITE], TEXT_COLLECTING },
{ EL_SHIELD_NORMAL, &level.score[SC_SHIELD], TEXT_COLLECTING },
{ EL_SHIELD_DEADLY, &level.score[SC_SHIELD], TEXT_COLLECTING },
{ EL_EXTRA_TIME, &level.extra_time_score, TEXT_COLLECTING },
DrawArcExt(from_x, from_y, to_x2, to_y2, element, change_level);
DrawArcExt(from_x, from_y, mirror_to_x2, to_y2, element, change_level);
DrawArcExt(from_x, from_y, to_x2, mirror_to_y2, element, change_level);
- DrawArcExt(from_x, from_y, mirror_to_x2, mirror_to_y2, element,change_level);
+ DrawArcExt(from_x, from_y, mirror_to_x2, mirror_to_y2, element, change_level);
}
#endif
sy = ly - level_ypos;
}
- if (IN_ED_FIELD(sx,sy) && IN_LEV_FIELD(lx, ly))
+ if (IN_ED_FIELD(sx, sy) && IN_LEV_FIELD(lx, ly))
{
if (button_status) // if (gi->state == GD_BUTTON_PRESSED)
{
CONF_CONTENT_NUM_BYTES : 1)
#define CONF_ELEMENT_BYTE_POS(i) ((i) * CONF_ELEMENT_NUM_BYTES)
-#define CONF_ELEMENTS_ELEMENT(b,i) ((b[CONF_ELEMENT_BYTE_POS(i)] << 8) | \
+#define CONF_ELEMENTS_ELEMENT(b, i) ((b[CONF_ELEMENT_BYTE_POS(i)] << 8) | \
(b[CONF_ELEMENT_BYTE_POS(i) + 1]))
#define CONF_CONTENT_ELEMENT_POS(c,x,y) ((c) * CONF_CONTENT_NUM_ELEMENTS + \
vp_playfield->width = MIN(vp_playfield->width, vp_playfield->max_width);
if (vp_playfield->max_height != -1)
- vp_playfield->height = MIN(vp_playfield->height,vp_playfield->max_height);
+ vp_playfield->height = MIN(vp_playfield->height, vp_playfield->max_height);
// adjust playfield position according to specified alignment
ELEMENT_CAN_ENTER_FIELD_BASE_3(e, x, y, Tile[x][y] == EL_DIAMOND)
#define DARK_YAMYAM_CAN_ENTER_FIELD(e, x, y) \
- ELEMENT_CAN_ENTER_FIELD_BASE_3(e, x,y, IS_FOOD_DARK_YAMYAM(Tile[x][y]))
+ ELEMENT_CAN_ENTER_FIELD_BASE_3(e, x, y, IS_FOOD_DARK_YAMYAM(Tile[x][y]))
#define PACMAN_CAN_ENTER_FIELD(e, x, y) \
ELEMENT_CAN_ENTER_FIELD_BASE_3(e, x, y, IS_AMOEBOID(Tile[x][y]))
static void ExecuteCustomElementAction(int, int, int, int);
static boolean ChangeElement(int, int, int, int);
-static boolean CheckTriggeredElementChangeExt(int, int, int, int, int,int,int);
+static boolean CheckTriggeredElementChangeExt(int, int, int, int, int, int, int);
#define CheckTriggeredElementChange(x, y, e, ev) \
- CheckTriggeredElementChangeExt(x,y,e,ev, CH_PLAYER_ANY,CH_SIDE_ANY, -1)
+ CheckTriggeredElementChangeExt(x,y,e,ev, CH_PLAYER_ANY, CH_SIDE_ANY, -1)
#define CheckTriggeredElementChangeByPlayer(x, y, e, ev, p, s) \
CheckTriggeredElementChangeExt(x, y, e, ev, p, s, -1)
#define CheckTriggeredElementChangeBySide(x, y, e, ev, s) \
static int MovingOrBlocked2ElementIfNotLeaving(int x, int y)
{
// like MovingOrBlocked2Element(), but if element is moving
- // and (x,y) is the field the moving element is just leaving,
+ // and (x, y) is the field the moving element is just leaving,
// return EL_BLOCKED instead of the element value
int element = Tile[x][y];
boolean can_turn_left =
CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, left_x, left_y);
boolean can_turn_right =
- CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, right_x,right_y);
+ CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, right_x, right_y);
if (element_info[element].move_stepsize == 0) // "not moving"
return;
PlayLevelSound(newx, newy, SND_PENGUIN_PASSING);
if (IN_SCR_FIELD(SCREENX(newx), SCREENY(newy)))
- DrawGraphicThruMask(SCREENX(newx),SCREENY(newy), el2img(element), 0);
+ DrawGraphicThruMask(SCREENX(newx), SCREENY(newy), el2img(element), 0);
game.friends_still_needed--;
if (!game.friends_still_needed &&
}
else if (IS_FOOD_PENGUIN(Tile[newx][newy]))
{
- if (DigField(local_player, x, y, newx, newy, 0,0, DF_DIG) == MP_MOVING)
+ if (DigField(local_player, x, y, newx, newy, 0, 0, DF_DIG) == MP_MOVING)
TEST_DrawLevelField(newx, newy);
else
GfxDir[x][y] = MovDir[x][y] = MV_NONE;
if (pushed_by_player) // special case: moving object pushed by player
{
- MovPos[x][y] = SIGN(MovPos[x][y]) * (TILEX - ABS(PLAYERINFO(x,y)->MovPos));
+ MovPos[x][y] = SIGN(MovPos[x][y]) * (TILEX - ABS(PLAYERINFO(x, y)->MovPos));
}
else if (use_step_delay) // special case: moving object has step delay
{
CheckElementChangeByPlayer(newx, newy, element, CE_PUSHED_BY_PLAYER,
player->index_bit, push_side);
- CheckTriggeredElementChangeByPlayer(newx,newy, element, CE_PLAYER_PUSHES_X,
+ CheckTriggeredElementChangeByPlayer(newx, newy, element, CE_PLAYER_PUSHES_X,
player->index_bit, push_side);
}
element == EL_DIAGONAL_SHRINKING ||
element == EL_DIAGONAL_GROWING)
{
- graphic = el_act_dir2img(GfxElement[x][y], GfxAction[x][y],GfxDir[x][y]);
+ graphic = el_act_dir2img(GfxElement[x][y], GfxAction[x][y], GfxDir[x][y]);
DrawLevelGraphicAnimationIfNeeded(x, y, graphic);
}
y = RND(lev_fieldy);
element = Tile[x][y];
- if (!IS_PLAYER(x,y) &&
+ if (!IS_PLAYER(x, y) &&
(element == EL_EMPTY ||
CAN_GROW_INTO(element) ||
element == EL_QUICKSAND_EMPTY ||
!AllPlayersInSight(player, new_jx, new_jy))
return MP_NO_ACTION;
- can_move = DigField(player, jx, jy, new_jx, new_jy, real_dx,real_dy, DF_DIG);
+ can_move = DigField(player, jx, jy, new_jx, new_jy, real_dx, real_dy, DF_DIG);
if (can_move != MP_MOVING)
return can_move;
if (IS_WALKABLE(old_element) && !ACCESS_FROM(old_element, move_direction))
return MP_NO_ACTION; // field has no opening in this direction
- if (IS_PASSABLE(old_element) && !ACCESS_FROM(old_element,opposite_direction))
+ if (IS_PASSABLE(old_element) && !ACCESS_FROM(old_element, opposite_direction))
return MP_NO_ACTION; // field has no opening in this direction
if (player_can_move && element == EL_ACID && move_direction == MV_DOWN)
return FALSE;
}
- file_version = cleanup_em_level(raw_leveldata, raw_leveldata_length,filename);
+ file_version = cleanup_em_level(raw_leveldata, raw_leveldata_length, filename);
if (file_version == FILE_VERSION_EM_UNKNOWN)
{
if(len >= 2106 && (buf[1983] == 116 || buf[2047] == 116)) // v4
if(len >= 2106 && (buf[1983] == 27 || buf[2047] == 219)) // v3
-buf[0]=241;buf[1]=248;for(i=0,j=101;i<2106;i++,j+=7)buf[i]=(buf[i]^j)-17; // decrypt
+buf[0] = 241; buf[1] = 248; for(i = 0, j = 101; i < 2106; i++, j += 7) buf[i] = (buf[i] ^ j) - 17; // decrypt
number of movements (calls to logic) = time * 50 / 8
short Box[MAX_PLAYFIELD_WIDTH][MAX_PLAYFIELD_HEIGHT];
short Angle[MAX_PLAYFIELD_WIDTH][MAX_PLAYFIELD_HEIGHT];
- short LX,LY, XS,YS, ELX,ELY;
- short CT,Ct;
+ short LX, LY;
+ short XS, YS;
+ short ELX, ELY;
+ short CT, Ct;
int last_LX, last_LY, last_hit_mask;
int hold_x, hold_y;
int x, y;
} move_xy[] =
{
- { 0, 0 },
- {-1, 0 },
- {+1, 0 },
- { 0, 0 },
- { 0, -1 },
- { 0, 0 }, { 0, 0 }, { 0, 0 },
- { 0, +1 }
+ { 0, 0 },
+ { -1, 0 },
+ { +1, 0 },
+ { 0, 0 },
+ { 0, -1 },
+ { 0, 0 }, { 0, 0 }, { 0, 0 },
+ { 0, +1 }
};
static struct
{
int left, right, back;
} turn[] =
{
- { 0, 0, 0 },
+ { 0, 0, 0 },
{ MV_DOWN, MV_UP, MV_RIGHT },
- { MV_UP, MV_DOWN, MV_LEFT },
- { 0, 0, 0 },
- { MV_LEFT, MV_RIGHT, MV_DOWN },
- { 0,0,0 }, { 0,0,0 }, { 0,0,0 },
- { MV_RIGHT, MV_LEFT, MV_UP }
+ { MV_UP, MV_DOWN, MV_LEFT },
+ { 0, 0, 0 },
+ { MV_LEFT, MV_RIGHT, MV_DOWN },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { MV_RIGHT, MV_LEFT, MV_UP }
};
int element = Tile[x][y];
void InitElementProperties_MM(void)
{
- int i,j;
+ int i, j;
static int ep_grid[] =
{
struct LaserInfo laser;
-short LX,LY, XS,YS, ELX,ELY;
-short CT,Ct;
+short LX, LY;
+short XS, YS;
+short ELX, ELY;
+short CT, Ct;
int dSX, dSY;
int cSX, cSY;
#define ENVELOPE_OPENING_NR(e) ((e) - EL_ENVELOPE_1_OPENING)
#define CAN_MOVE(e) ((e) == EL_PACMAN)
-#define IS_FREE(x,y) (Tile[x][y] == EL_EMPTY)
+#define IS_FREE(x, y) (Tile[x][y] == EL_EMPTY)
-#define IS_MOVING(x,y) (MovPos[x][y] != 0)
-#define IS_BLOCKED(x,y) (Tile[x][y] == EL_BLOCKED)
-#define IS_DRAWABLE(e) ((e) < EL_BLOCKED)
-#define IS_NOT_DRAWABLE(e) ((e) >= EL_BLOCKED)
-
-#define PLAYERINFO(x,y) (&stored_player[StorePlayer[x][y]-EL_SPIELER1])
+#define IS_MOVING(x, y) (MovPos[x][y] != 0)
+#define IS_BLOCKED(x, y) (Tile[x][y] == EL_BLOCKED)
+#define IS_DRAWABLE(e) ((e) < EL_BLOCKED)
+#define IS_NOT_DRAWABLE(e) ((e) >= EL_BLOCKED)
#define WALL_BASE(e) ((e) & 0xfff0)
#define WALL_BITS(e) ((e) & 0x000f)
void DrawGraphic_MM(int x, int y, int graphic)
{
#if DEBUG
- if (!IN_SCR_FIELD(x,y))
+ if (!IN_SCR_FIELD(x, y))
{
Debug("game:mm:DrawGraphic_MM", "x = %d, y = %d, graphic = %d",
x, y, graphic);
void DrawGraphicThruMask_MM(int x, int y, int graphic, int frame)
{
#if DEBUG
- if (!IN_SCR_FIELD(x,y))
+ if (!IN_SCR_FIELD(x, y))
{
- Debug("game:mm:DrawGraphicThruMask_MM", "x = %d,y = %d, graphic = %d",
+ Debug("game:mm:DrawGraphicThruMask_MM", "x = %d, y = %d, graphic = %d",
x, y, graphic);
Debug("game:mm:DrawGraphicThruMask_MM", "This should never happen!");
DrawGraphicThruMaskExt_MM(drawto_mm, cFX + x * TILEX, cFY + y * TILEY,
graphic, frame);
- MarkTileDirty(x,y);
+ MarkTileDirty(x, y);
}
void DrawGraphicThruMaskExt_MM(DrawBuffer *d, int dest_x, int dest_y,
BlitBitmap(bitmap, d, src_x, src_y, MINI_TILEX, MINI_TILEY, x, y);
}
-void DrawGraphicShifted_MM(int x,int y, int dx,int dy, int graphic,
- int cut_mode, int mask_mode)
+void DrawGraphicShifted_MM(int x, int y, int dx, int dy, int graphic,
+ int cut_mode, int mask_mode)
{
int width = TILEX, height = TILEY;
int cx = 0, cy = 0;
dest_y = cFY + y * TILEY + dy;
#if DEBUG
- if (!IN_SCR_FIELD(x,y))
+ if (!IN_SCR_FIELD(x, y))
{
Debug("game:mm:DrawGraphicShifted_MM", "x = %d, y = %d, graphic = %d",
x, y, graphic);
BlitBitmap(src_bitmap, drawto_mm,
src_x, src_y, width, height, dest_x, dest_y);
- MarkTileDirty(x,y);
+ MarkTileDirty(x, y);
}
void DrawScreenElementExt_MM(int x, int y, int dx, int dy, int element,
DrawScreenField_MM(SCREENX(x), SCREENY(y));
else if (IS_MOVING(x, y))
{
- int newx,newy;
+ int newx, newy;
Moving2Blocked(x, y, &newx, &newy);
if (IN_SCR_FIELD(SCREENX(newx), SCREENY(newy)))
void DrawLevel_MM(void)
{
- int x,y;
+ int x, y;
ClearWindow();
int xsn_m3 = xsn_m2 + 10;
time_t xsn_e0 = time(NULL);
struct tm *xsn_t0 = localtime(&xsn_e0);
- struct tm xsn_t1 = { 0,0,0, xsn_m2*3, xsn_m3/3, xsn_t0->tm_year, 0,0,-1 };
+ struct tm xsn_t1 = { 0,0,0, xsn_m2 * 3, xsn_m3 / 3, xsn_t0->tm_year, 0,0,-1 };
time_t xsn_e1 = mktime(&xsn_t1);
int xsn_c0 = (25 * xsn_m3) << xsn_m1;
int xsn_c1 = (xsn_t1.tm_wday - xsn_m1) * !!xsn_t1.tm_wday;
struct hashtable *
create_hashtable(unsigned int minsize, float maxloadfactor,
unsigned int (*hashf) (void*),
- int (*eqf) (void*,void*))
+ int (*eqf) (void*, void*))
{
struct hashtable *h;
unsigned int i, size = 1u;
while ((e = h->table[i]) != NULL)
{
h->table[i] = e->next;
- index = indexFor(newsize,e->h);
+ index = indexFor(newsize, e->h);
e->next = newtable[index];
newtable[index] = e;
}
{
for (pE = &(newtable[i]), e = *pE; e != NULL; e = *pE)
{
- index = indexFor(newsize,e->h);
+ index = indexFor(newsize, e->h);
if (index == i)
{
return 0;
}
- e->h = hash(h,k);
- index = indexFor(h->tablelength,e->h);
+ e->h = hash(h, k);
+ index = indexFor(h->tablelength, e->h);
e->k = k;
e->v = v;
e->next = h->table[index];
struct entry *e;
unsigned int hashvalue, index;
- hashvalue = hash(h,k);
- index = indexFor(h->tablelength,hashvalue);
+ hashvalue = hash(h, k);
+ index = indexFor(h->tablelength, hashvalue);
e = h->table[index];
while (e != NULL)
struct entry *e;
unsigned int hashvalue, index;
- hashvalue = hash(h,k);
- index = indexFor(h->tablelength,hashvalue);
+ hashvalue = hash(h, k);
+ index = indexFor(h->tablelength, hashvalue);
e = h->table[index];
while (e != NULL)
struct entry *e;
struct entry **pE;
void *v;
- unsigned int index = indexFor(h->tablelength,hash(h,k));
+ unsigned int index = indexFor(h->tablelength, hash(h, k));
pE = &(h->table[index]);
e = *pE;
}
/*****************************************************************************/
-/* key - return the key of the (key,value) pair at the current position */
+/* key - return the key of the (key, value) pair at the current position */
void *
hashtable_iterator_key(struct hashtable_itr *i)
}
/*****************************************************************************/
-/* value - return the value of the (key,value) pair at the current position */
+/* value - return the value of the (key, value) pair at the current position */
void *
hashtable_iterator_value(struct hashtable_itr *i)
int
hashtable_iterator_advance(struct hashtable_itr *itr)
{
- unsigned int j,tablelength;
+ unsigned int j, tablelength;
struct entry **table;
struct entry *next;
struct hashtable *
create_hashtable(unsigned int minsize, float maxloadfactor,
unsigned int (*hashfunction) (void*),
- int (*key_eq_fn) (void*,void*));
+ int (*key_eq_fn) (void*, void*));
/*****************************************************************************
* hashtable_insert
#define DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \
static int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
- return hashtable_insert(h,k,v); \
+ return hashtable_insert(h, k, v); \
}
/*****************************************************************************
#define DEFINE_HASHTABLE_CHANGE(fnname, keytype, valuetype) \
static int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
- return hashtable_change(h,k,v); \
+ return hashtable_change(h, k, v); \
}
/*****************************************************************************
#define DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \
static valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
- return (valuetype *) (hashtable_search(h,k)); \
+ return (valuetype *) (hashtable_search(h, k)); \
}
/*****************************************************************************
#define DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \
static valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
- return (valuetype *) (hashtable_remove(h,k)); \
+ return (valuetype *) (hashtable_remove(h, k)); \
}
hashtable_iterator(struct hashtable *h);
/*****************************************************************************/
-/* key - return the key of the (key,value) pair at the current position */
+/* key - return the key of the (key, value) pair at the current position */
void *
hashtable_iterator_key(struct hashtable_itr *i);
/*****************************************************************************/
-/* value - return the value of the (key,value) pair at the current position */
+/* value - return the value of the (key, value) pair at the current position */
void *
hashtable_iterator_value(struct hashtable_itr *i);
case 1:
{
// Assuming 8-bpp
- *((Uint8 *)surface->pixels + y*surface->pitch + x) = color;
+ *((Uint8 *)surface->pixels + y * surface->pitch + x) = color;
}
break;
case 2:
{
// Probably 15-bpp or 16-bpp
- *((Uint16 *)surface->pixels + y*surface->pitch/2 + x) = color;
+ *((Uint16 *)surface->pixels + y * surface->pitch / 2 + x) = color;
}
break;
int shift;
// Gack - slow, but endian correct
- pix = (Uint8 *)surface->pixels + y * surface->pitch + x*3;
+ pix = (Uint8 *)surface->pixels + y * surface->pitch + x * 3;
shift = surface->format->Rshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
shift = surface->format->Gshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
shift = surface->format->Bshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
}
break;
case 4:
{
// Probably 32-bpp
- *((Uint32 *)surface->pixels + y*surface->pitch/4 + x) = color;
+ *((Uint32 *)surface->pixels + y * surface->pitch / 4 + x) = color;
}
break;
}
static void _PutPixel8(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
- *((Uint8 *)surface->pixels + y*surface->pitch + x) = color;
+ *((Uint8 *)surface->pixels + y * surface->pitch + x) = color;
}
static void _PutPixel16(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
- *((Uint16 *)surface->pixels + y*surface->pitch/2 + x) = color;
+ *((Uint16 *)surface->pixels + y * surface->pitch / 2 + x) = color;
}
static void _PutPixel24(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
int shift;
// Gack - slow, but endian correct
- pix = (Uint8 *)surface->pixels + y * surface->pitch + x*3;
+ pix = (Uint8 *)surface->pixels + y * surface->pitch + x * 3;
shift = surface->format->Rshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
shift = surface->format->Gshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
shift = surface->format->Bshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
}
static void _PutPixel32(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
- *((Uint32 *)surface->pixels + y*surface->pitch/4 + x) = color;
+ *((Uint32 *)surface->pixels + y * surface->pitch / 4 + x) = color;
}
-static void _PutPixelX(SDL_Surface *dest,Sint16 x,Sint16 y,Uint32 color)
+static void _PutPixelX(SDL_Surface *dest, Sint16 x, Sint16 y, Uint32 color)
{
switch (dest->format->BytesPerPixel)
{
case 1:
- *((Uint8 *)dest->pixels + y*dest->pitch + x) = color;
+ *((Uint8 *)dest->pixels + y * dest->pitch + x) = color;
break;
case 2:
- *((Uint16 *)dest->pixels + y*dest->pitch/2 + x) = color;
+ *((Uint16 *)dest->pixels + y * dest->pitch / 2 + x) = color;
break;
case 3:
- _PutPixel24(dest,x,y,color);
+ _PutPixel24(dest, x, y, color);
break;
case 4:
- *((Uint32 *)dest->pixels + y*dest->pitch/4 + x) = color;
+ *((Uint32 *)dest->pixels + y * dest->pitch / 4 + x) = color;
break;
}
}
switch (dest->format->BytesPerPixel)
{
case 1:
- return y*dest->pitch;
+ return y * dest->pitch;
break;
case 2:
- return y*dest->pitch/2;
+ return y * dest->pitch / 2;
break;
case 3:
- return y*dest->pitch;
+ return y * dest->pitch;
break;
case 4:
- return y*dest->pitch/4;
+ return y * dest->pitch / 4;
break;
}
}
int shift;
// Gack - slow, but endian correct
- pix = (Uint8 *)surface->pixels + ypitch + x*3;
+ pix = (Uint8 *)surface->pixels + ypitch + x * 3;
shift = surface->format->Rshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
shift = surface->format->Gshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
shift = surface->format->Bshift;
- *(pix+shift/8) = color>>shift;
+ *(pix + shift / 8) = color>>shift;
}
break;
#define SOUND_VOLUME_LEFT(x) (stereo_volume[x])
#define SOUND_VOLUME_RIGHT(x) (stereo_volume[SOUND_MAX_LEFT2RIGHT-x])
-#define SAME_SOUND_NR(x,y) ((x).nr == (y).nr)
-#define SAME_SOUND_DATA(x,y) ((x).data_ptr == (y).data_ptr)
+#define SAME_SOUND_NR(x, y) ((x).nr == (y).nr)
+#define SAME_SOUND_DATA(x, y) ((x).data_ptr == (y).data_ptr)
-#define SOUND_VOLUME_FROM_PERCENT(v,p) ((p) < 0 ? SOUND_MIN_VOLUME : \
+#define SOUND_VOLUME_FROM_PERCENT(v, p) ((p) < 0 ? SOUND_MIN_VOLUME : \
(p) > 100 ? (v) : \
(p) * (v) / 100)
#define SOUND_VOLUME_LOOPS(v) SOUND_VOLUME_FROM_PERCENT(v, setup.volume_loops)
#define SOUND_VOLUME_MUSIC(v) SOUND_VOLUME_FROM_PERCENT(v, setup.volume_music)
-#define SETUP_SOUND_VOLUME(v,s) ((s) & SND_CTRL_MUSIC ? \
+#define SETUP_SOUND_VOLUME(v, s) ((s) & SND_CTRL_MUSIC ? \
SOUND_VOLUME_MUSIC(v) : \
(s) & SND_CTRL_LOOP ? \
SOUND_VOLUME_LOOPS(v) : \
#define VALIGN_MIDDLE (1 << 2)
#define VALIGN_DEFAULT VALIGN_TOP
-#define ALIGNED_XPOS(x,w,a) ((a) == ALIGN_CENTER ? (x) - (w) / 2 : \
+#define ALIGNED_XPOS(x, w, a) ((a) == ALIGN_CENTER ? (x) - (w) / 2 : \
(a) == ALIGN_RIGHT ? (x) - (w) : (x))
-#define ALIGNED_YPOS(y,h,v) ((v) == VALIGN_MIDDLE ? (y) - (h) / 2 : \
+#define ALIGNED_YPOS(y, h, v) ((v) == VALIGN_MIDDLE ? (y) - (h) / 2 : \
(v) == VALIGN_BOTTOM ? (y) - (h) : (y))
#define ALIGNED_TEXT_XPOS(p) ALIGNED_XPOS((p)->x, (p)->width, (p)->align)
#define ALIGNED_TEXT_YPOS(p) ALIGNED_YPOS((p)->y, (p)->height, (p)->valign)
void ReCreateBitmap(Bitmap **, int, int);
void FreeBitmap(Bitmap *);
void BlitBitmap(Bitmap *, Bitmap *, int, int, int, int, int, int);
-void BlitBitmapTiled(Bitmap *, Bitmap *, int, int, int, int, int, int, int,int);
+void BlitBitmapTiled(Bitmap *, Bitmap *, int, int, int, int, int, int, int, int);
void FadeRectangle(int, int, int, int, int, int, int,
void (*draw_border_function)(void));
void FillRectangle(Bitmap *, int, int, int, int, Pixel);
void DrawSimpleWhiteLine(Bitmap *, int, int, int, int);
void DrawLines(Bitmap *, struct XY *, int, Pixel);
Pixel GetPixel(Bitmap *, int, int);
-Pixel GetPixelFromRGB(Bitmap *, unsigned int,unsigned int,unsigned int);
+Pixel GetPixelFromRGB(Bitmap *, unsigned int, unsigned int, unsigned int);
void KeyboardAutoRepeatOn(void);
void KeyboardAutoRepeatOff(void);
#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
{
uint32_t offset_truncated = 0;
if (pfilefunc->zfile_func64.zseek64_file != NULL)
- return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);
+ return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque, filestream, offset, origin);
offset_truncated = (uint32_t)offset;
if (offset_truncated != offset)
return -1;
- return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream, offset_truncated, origin);
+ return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque, filestream, offset_truncated, origin);
}
uint64_t call_ztell64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream)
seek_file_func zseek32_file;
} zlib_filefunc64_32_def;
-#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
-#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
-/*#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))*/
-/*#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode))*/
-#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))
-#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))
-
-voidpf call_zopen64(const zlib_filefunc64_32_def *pfilefunc,const void*filename, int mode);
+#define ZREAD64(filefunc, filestream, buf, size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque, filestream, buf, size))
+#define ZWRITE64(filefunc, filestream, buf, size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque, filestream, buf, size))
+/*#define ZTELL64(filefunc, filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque, filestream))*/
+/*#define ZSEEK64(filefunc, filestream, pos, mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque, filestream, pos, mode))*/
+#define ZCLOSE64(filefunc, filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque, filestream))
+#define ZERROR64(filefunc, filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque, filestream))
+
+voidpf call_zopen64(const zlib_filefunc64_32_def *pfilefunc, const void *filename, int mode);
voidpf call_zopendisk64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, uint32_t number_disk, int mode);
long call_zseek64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream, uint64_t offset, int origin);
uint64_t call_ztell64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream);
void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def *p_filefunc64_32, const zlib_filefunc_def *p_filefunc32);
-#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode)))
-#define ZOPENDISK64(filefunc,filestream,diskn,mode) (call_zopendisk64((&(filefunc)),(filestream),(diskn),(mode)))
-#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream)))
-#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))
+#define ZOPEN64(filefunc, filename, mode) (call_zopen64((&(filefunc)), (filename), (mode)))
+#define ZOPENDISK64(filefunc, filestream, diskn, mode) (call_zopendisk64((&(filefunc)), (filestream), (diskn), (mode)))
+#define ZTELL64(filefunc, filestream) (call_ztell64((&(filefunc)), (filestream)))
+#define ZSEEK64(filefunc, filestream, pos, mode) (call_zseek64((&(filefunc)), (filestream), (pos), (mode)))
#ifdef __cplusplus
}
err = unzGetCurrentFileInfo64(uf, &file_info, filename_inzip, sizeof(filename_inzip), NULL, 0, NULL, 0);
if (err != UNZ_OK)
{
- debug_printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
+ debug_printf("error %d with zipfile in unzGetCurrentFileInfo\n", err);
return err;
}
#define EP_BITMASK_DEFAULT 0
#define PROPERTY_BIT(p) (1u << ((p) % 32))
-#define PROPERTY_VAR(e,p) (element_info[e].properties[(p) / 32])
-#define HAS_PROPERTY(e,p) ((PROPERTY_VAR(e, p) & PROPERTY_BIT(p)) != 0)
-#define SET_PROPERTY(e,p,v) ((v) ? \
+#define PROPERTY_VAR(e, p) (element_info[e].properties[(p) / 32])
+#define HAS_PROPERTY(e, p) ((PROPERTY_VAR(e, p) & PROPERTY_BIT(p)) != 0)
+#define SET_PROPERTY(e, p, v) ((v) ? \
(PROPERTY_VAR(e,p) |= PROPERTY_BIT(p)) : \
(PROPERTY_VAR(e,p) &= ~PROPERTY_BIT(p)))
#define CH_EVENT_BITFIELD_NR(e) (e / 32)
#define CH_EVENT_BIT(e) (1 << ((e) % 32))
-#define CH_EVENT_VAR(e,c) (element_info[e].change->has_event[c])
-#define CH_ANY_EVENT_VAR(e,c) (element_info[e].has_change_event[c])
+#define CH_EVENT_VAR(e, c) (element_info[e].change->has_event[c])
+#define CH_ANY_EVENT_VAR(e, c) (element_info[e].has_change_event[c])
-#define PAGE_HAS_CHANGE_EVENT(p,c) ((p)->has_event[c])
-#define HAS_CHANGE_EVENT(e,c) (IS_CUSTOM_ELEMENT(e) && \
- CH_EVENT_VAR(e,c))
-#define HAS_ANY_CHANGE_EVENT(e,c) (IS_CUSTOM_ELEMENT(e) && \
- CH_ANY_EVENT_VAR(e,c))
+#define PAGE_HAS_CHANGE_EVENT(p, c) ((p)->has_event[c])
+#define HAS_CHANGE_EVENT(e, c) (IS_CUSTOM_ELEMENT(e) && \
+ CH_EVENT_VAR(e, c))
+#define HAS_ANY_CHANGE_EVENT(e, c) (IS_CUSTOM_ELEMENT(e) && \
+ CH_ANY_EVENT_VAR(e, c))
-#define SET_CHANGE_EVENT(e,c,v) (IS_CUSTOM_ELEMENT(e) ? \
- CH_EVENT_VAR(e,c) = (v) : 0)
-#define SET_ANY_CHANGE_EVENT(e,c,v) (IS_CUSTOM_ELEMENT(e) ? \
- CH_ANY_EVENT_VAR(e,c) = (v) : 0)
+#define SET_CHANGE_EVENT(e, c, v) (IS_CUSTOM_ELEMENT(e) ? \
+ CH_EVENT_VAR(e, c) = (v) : 0)
+#define SET_ANY_CHANGE_EVENT(e, c, v) (IS_CUSTOM_ELEMENT(e) ? \
+ CH_ANY_EVENT_VAR(e, c) = (v) : 0)
// values for player bitmasks
#define PLAYER_BITS_NONE 0
#define IS_FREE(x, y) (Tile[x][y] == EL_EMPTY && !IS_PLAYER(x, y))
#define IS_FREE_OR_PLAYER(x, y) (Tile[x][y] == EL_EMPTY)
-#define IS_MOVING(x,y) (MovPos[x][y] != 0)
-#define IS_FALLING(x,y) (MovPos[x][y] != 0 && MovDir[x][y] == MV_DOWN)
-#define IS_BLOCKED(x,y) (Tile[x][y] == EL_BLOCKED)
+#define IS_MOVING(x, y) (MovPos[x][y] != 0)
+#define IS_FALLING(x, y) (MovPos[x][y] != 0 && MovDir[x][y] == MV_DOWN)
+#define IS_BLOCKED(x, y) (Tile[x][y] == EL_BLOCKED)
#define IS_MV_DIAGONAL(x) ((x) & MV_HORIZONTAL && (x) & MV_VERTICAL)
#define TAPE_IS_EMPTY(x) ((x).length == 0)
#define TAPE_IS_STOPPED(x) (!(x).recording && !(x).playing)
-#define PLAYERINFO(x,y) (&stored_player[StorePlayer[x][y]-EL_PLAYER_1])
+#define PLAYERINFO(x, y) (&stored_player[StorePlayer[x][y] - EL_PLAYER_1])
#define SHIELD_ON(p) ((p)->shield_normal_time_left > 0)
-#define ENEMY_PROTECTED_FIELD(x,y) (IS_PROTECTED(Tile[x][y]) || \
+#define ENEMY_PROTECTED_FIELD(x, y) (IS_PROTECTED(Tile[x][y]) || \
IS_PROTECTED(Back[x][y]))
-#define EXPLOSION_PROTECTED_FIELD(x,y) (IS_EXPLOSION_PROOF(Tile[x][y]))
-#define PLAYER_ENEMY_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) || \
+#define EXPLOSION_PROTECTED_FIELD(x, y) (IS_EXPLOSION_PROOF(Tile[x][y]))
+#define PLAYER_ENEMY_PROTECTED(x, y) (SHIELD_ON(PLAYERINFO(x, y)) || \
ENEMY_PROTECTED_FIELD(x, y))
#define PLAYER_EXPLOSION_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) || \
EXPLOSION_PROTECTED_FIELD(x, y))
#define PLAYER_DROPPING(p,x,y) ((p)->is_dropping && \
(p)->drop_x == (x) && (p)->drop_y == (y))
-#define PLAYER_NR_GFX(g,i) ((g) + i * (IMG_PLAYER_2 - IMG_PLAYER_1))
+#define PLAYER_NR_GFX(g, i) ((g) + i * (IMG_PLAYER_2 - IMG_PLAYER_1))
#define GET_PLAYER_ELEMENT(e) ((e) >= EL_PLAYER_1 && (e) <= EL_PLAYER_4 ? \
(e) : EL_PLAYER_1)
// set current scroll delay value to configured scroll delay value
scroll_delay_current =
- getTreeInfoFromIdentifier(scroll_delays,i_to_a(setup.scroll_delay_value));
+ getTreeInfoFromIdentifier(scroll_delays, i_to_a(setup.scroll_delay_value));
// if that fails, set current scroll delay to reliable default value
if (scroll_delay_current == NULL)
// set current volume value to configured volume value
volume_simple_current =
- getTreeInfoFromIdentifier(volumes_simple,i_to_a(setup.volume_simple));
+ getTreeInfoFromIdentifier(volumes_simple, i_to_a(setup.volume_simple));
// if that fails, set current volume to reliable default value
if (volume_simple_current == NULL)
// set current volume value to configured volume value
volume_loops_current =
- getTreeInfoFromIdentifier(volumes_loops,i_to_a(setup.volume_loops));
+ getTreeInfoFromIdentifier(volumes_loops, i_to_a(setup.volume_loops));
// if that fails, set current volume to reliable default value
if (volume_loops_current == NULL)
// set current volume value to configured volume value
volume_music_current =
- getTreeInfoFromIdentifier(volumes_music,i_to_a(setup.volume_music));
+ getTreeInfoFromIdentifier(volumes_music, i_to_a(setup.volume_music));
// if that fails, set current volume to reliable default value
if (volume_music_current == NULL)
case SCREEN_CTRL_ID_SCROLL_UP:
if (game_status == GAME_MODE_NAMES)
- HandleChoosePlayerName(0,0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleChoosePlayerName(0, 0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELS)
- HandleChooseLevelSet(0,0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleChooseLevelSet(0, 0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELNR)
- HandleChooseLevelNr(0,0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleChooseLevelNr(0, 0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_SETUP)
- HandleSetupScreen(0,0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleSetupScreen(0, 0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_INFO)
- HandleInfoScreen(0,0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleInfoScreen(0, 0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_SCORES)
- HandleHallOfFame(0,0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleHallOfFame(0, 0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
break;
case SCREEN_CTRL_ID_SCROLL_DOWN:
if (game_status == GAME_MODE_NAMES)
- HandleChoosePlayerName(0,0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleChoosePlayerName(0, 0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELS)
- HandleChooseLevelSet(0,0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleChooseLevelSet(0, 0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_LEVELNR)
- HandleChooseLevelNr(0,0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleChooseLevelNr(0, 0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_SETUP)
- HandleSetupScreen(0,0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleSetupScreen(0, 0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_INFO)
- HandleInfoScreen(0,0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleInfoScreen(0, 0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
else if (game_status == GAME_MODE_SCORES)
- HandleHallOfFame(0,0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
+ HandleHallOfFame(0, 0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
break;
case SCREEN_CTRL_ID_SCROLL_VERTICAL:
if (game_status == GAME_MODE_NAMES)
- HandleChoosePlayerName(0,0,999,gi->event.item_position,MB_MENU_INITIALIZE);
+ HandleChoosePlayerName(0, 0, 999, gi->event.item_position, MB_MENU_INITIALIZE);
else if (game_status == GAME_MODE_LEVELS)
- HandleChooseLevelSet(0,0,999,gi->event.item_position,MB_MENU_INITIALIZE);
+ HandleChooseLevelSet(0, 0, 999, gi->event.item_position, MB_MENU_INITIALIZE);
else if (game_status == GAME_MODE_LEVELNR)
- HandleChooseLevelNr(0,0,999,gi->event.item_position,MB_MENU_INITIALIZE);
+ HandleChooseLevelNr(0, 0, 999, gi->event.item_position, MB_MENU_INITIALIZE);
else if (game_status == GAME_MODE_SETUP)
- HandleSetupScreen(0,0, 999,gi->event.item_position,MB_MENU_INITIALIZE);
+ HandleSetupScreen(0, 0, 999, gi->event.item_position, MB_MENU_INITIALIZE);
else if (game_status == GAME_MODE_INFO)
- HandleInfoScreen(0,0, 999,gi->event.item_position,MB_MENU_INITIALIZE);
+ HandleInfoScreen(0, 0, 999, gi->event.item_position, MB_MENU_INITIALIZE);
else if (game_status == GAME_MODE_SCORES)
- HandleHallOfFame(0,0, 999,gi->event.item_position,MB_MENU_INITIALIZE);
+ HandleHallOfFame(0, 0, 999, gi->event.item_position, MB_MENU_INITIALIZE);
break;
case SCREEN_CTRL_ID_NETWORK_SERVER:
#if DEBUG
if (!IN_SCR_FIELD(x, y))
{
- Debug("draw:DrawGraphicThruMask", "x = %d,y = %d, graphic = %d",
+ Debug("draw:DrawGraphicThruMask", "x = %d, y = %d, graphic = %d",
x, y, graphic);
Debug("draw:DrawGraphicThruMask", "This should never happen!");
#if DEBUG
if (!IN_SCR_FIELD(x, y))
{
- Debug("draw:DrawFixedGraphicThruMask", "x = %d,y = %d, graphic = %d",
+ Debug("draw:DrawFixedGraphicThruMask", "x = %d, y = %d, graphic = %d",
x, y, graphic);
Debug("draw:DrawFixedGraphicThruMask", "This should never happen!");
void DrawMiniGraphic(int x, int y, int graphic)
{
- DrawMiniGraphicExt(drawto, SX + x * MINI_TILEX,SY + y * MINI_TILEY, graphic);
+ DrawMiniGraphicExt(drawto, SX + x * MINI_TILEX, SY + y * MINI_TILEY, graphic);
MarkTileDirty(x / 2, y / 2);
}
}
if (graphic_info[graphic].double_movement) // EM style movement images
- DrawGraphicShiftedDouble(x, y, dx, dy, graphic, frame, cut_mode,mask_mode);
+ DrawGraphicShiftedDouble(x, y, dx, dy, graphic, frame, cut_mode, mask_mode);
else
- DrawGraphicShiftedNormal(x, y, dx, dy, graphic, frame, cut_mode,mask_mode);
+ DrawGraphicShiftedNormal(x, y, dx, dy, graphic, frame, cut_mode, mask_mode);
}
static void DrawGraphicShiftedThruMask(int x, int y, int dx, int dy,
DrawScreenField(SCREENX(x), SCREENY(y));
else if (IS_MOVING(x, y))
{
- int newx,newy;
+ int newx, newy;
Moving2Blocked(x, y, &newx, &newy);
if (IN_SCR_FIELD(SCREENX(newx), SCREENY(newy)))
void DrawLevel(int draw_background_mask)
{
- int x,y;
+ int x, y;
SetMainBackgroundImage(IMG_BACKGROUND_PLAYING);
SetDrawBackgroundMask(draw_background_mask);
void DrawSizedLevel(int size_x, int size_y, int scroll_x, int scroll_y,
int tilesize)
{
- int x,y;
+ int x, y;
for (x = 0; x < size_x; x++)
for (y = 0; y < size_y; y++)
void DrawMiniLevel(int size_x, int size_y, int scroll_x, int scroll_y)
{
- int x,y;
+ int x, y;
for (x = 0; x < size_x; x++)
for (y = 0; y < size_y; y++)
return graphic;
}
else
- return el_act_dir2img(player->artwork_element, player->GfxAction,move_dir);
+ return el_act_dir2img(player->artwork_element, player->GfxAction, move_dir);
}
static boolean equalGraphics(int graphic1, int graphic2)