for(xx=0; xx<SCR_FIELDX; xx++)
for(yy=0; yy<SCR_FIELDY; yy++)
- DrawNewScreenField(xx,yy);
+ DrawScreenField(xx,yy);
DrawAllPlayers();
SetDrawtoField(DRAW_DIRECT);
-#define COMPILE_DATE_STRING "[2002-10-24 01:36]"
+#define COMPILE_DATE_STRING "[2002-10-27 02:23]"
{
x = (dx == 1 ? 0 : ed_fieldx - 1);
for(y=0; y<ed_fieldy; y++)
- DrawNewMiniElementOrWall(x, y, from_x, from_y);
+ DrawMiniElementOrWall(x, y, from_x, from_y);
}
else if (dy)
{
y = (dy == 1 ? 0 : ed_fieldy - 1);
for(x=0; x<ed_fieldx; x++)
- DrawNewMiniElementOrWall(x, y, from_x, from_y);
+ DrawMiniElementOrWall(x, y, from_x, from_y);
}
redraw_mask |= REDRAW_FIELD;
gd_x2 = DOOR_GFX_PAGEX6 + ED_ELEMENTLIST_XPOS;
gd_y = DOOR_GFX_PAGEY1 + ED_ELEMENTLIST_YPOS;
- getNewMiniGraphicSource(el2img(editor_element[i]),
- &deco_bitmap, &deco_x, &deco_y);
+ getMiniGraphicSource(el2img(editor_element[i]),
+ &deco_bitmap, &deco_x, &deco_y);
deco_xpos = (ED_ELEMENTLIST_XSIZE - MINI_TILEX) / 2;
deco_ypos = (ED_ELEMENTLIST_YSIZE - MINI_TILEY) / 2;
DOOR_GFX_PAGEX6, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
/* draw mouse button brush elements */
- DrawNewMiniGraphicExt(drawto,
+ DrawMiniGraphicExt(drawto,
DX + ED_WIN_MB_LEFT_XPOS, DY + ED_WIN_MB_LEFT_YPOS,
el2img(new_element1));
- DrawNewMiniGraphicExt(drawto,
+ DrawMiniGraphicExt(drawto,
DX + ED_WIN_MB_MIDDLE_XPOS, DY + ED_WIN_MB_MIDDLE_YPOS,
el2img(new_element2));
- DrawNewMiniGraphicExt(drawto,
+ DrawMiniGraphicExt(drawto,
DX + ED_WIN_MB_RIGHT_XPOS, DY + ED_WIN_MB_RIGHT_YPOS,
el2img(new_element3));
if (button == 1)
{
new_element1 = element;
- DrawNewMiniGraphicExt(drawto,
+ DrawMiniGraphicExt(drawto,
DX + ED_WIN_MB_LEFT_XPOS, DY + ED_WIN_MB_LEFT_YPOS,
el2img(new_element1));
}
else if (button == 2)
{
new_element2 = element;
- DrawNewMiniGraphicExt(drawto,
+ DrawMiniGraphicExt(drawto,
DX + ED_WIN_MB_MIDDLE_XPOS, DY + ED_WIN_MB_MIDDLE_YPOS,
el2img(new_element2));
}
else
{
new_element3 = element;
- DrawNewMiniGraphicExt(drawto,
+ DrawMiniGraphicExt(drawto,
DX + ED_WIN_MB_RIGHT_XPOS, DY + ED_WIN_MB_RIGHT_YPOS,
el2img(new_element3));
}
AdjustLevelScrollPosition();
AdjustEditorScrollbar(GADGET_ID_SCROLL_HORIZONTAL);
AdjustEditorScrollbar(GADGET_ID_SCROLL_VERTICAL);
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
MapMainDrawingArea();
}
/* draw decorative border for the object */
for (y=0; y<2; y++)
for (x=0; x<2; x++)
- DrawNewMiniElement(area_x + x, area_y + y, EL_SAND);
+ DrawMiniElement(area_x + x, area_y + y, EL_SAND);
ClearRectangle(drawto,
area_sx + MINI_TILEX/2 - 1, area_sy + MINI_TILEY/2 - 1,
area_sx, area_sy, 3 * MINI_TILEX, 3 * MINI_TILEY,
area_sx - MINI_TILEX/2, area_sy - MINI_TILEY/2);
- DrawNewMiniElement(area_x, area_y, ElementContent[0][0][0]);
+ DrawMiniElement(area_x, area_y, ElementContent[0][0][0]);
MapDrawingArea(GADGET_ID_RANDOM_BACKGROUND);
}
/* draw decorative border for the object */
for (y=0; y<2; y++)
for (x=0; x<2; x++)
- DrawNewMiniElement(area_x + x, area_y + y, EL_SAND);
+ DrawMiniElement(area_x + x, area_y + y, EL_SAND);
ClearRectangle(drawto,
area_sx + MINI_TILEX/2 - 1, area_sy + MINI_TILEY/2 - 1,
DrawText(area_sx + TILEX, area_sy + 1, "Content of amoeba",
FS_SMALL, font_color);
- DrawNewMiniElement(area_x, area_y, ElementContent[0][0][0]);
+ DrawMiniElement(area_x, area_y, ElementContent[0][0][0]);
MapDrawingArea(GADGET_ID_AMOEBA_CONTENT);
}
{
for (y=0; y<4; y++)
for (x=0; x<4; x++)
- DrawNewMiniElement(area_x + 5 * (i % 4) + x, area_y + 6 * (i / 4) + y,
+ DrawMiniElement(area_x + 5 * (i % 4) + x, area_y + 6 * (i / 4) + y,
EL_SAND);
ClearRectangle(drawto,
{
for (y=0; y<3; y++)
for (x=0; x<3; x++)
- DrawNewMiniElement(area_x + 5 * (i % 4) + x, area_y + 6 * (i / 4) + y,
+ DrawMiniElement(area_x + 5 * (i % 4) + x, area_y + 6 * (i / 4) + y,
ElementContent[i][x][y]);
DrawTextF(area_sx - SX + 5 * (i % 4) * MINI_TILEX + MINI_TILEX + 1,
/* draw some decorative border for the object */
for (y=0; y<3; y++)
for (x=0; x<3; x++)
- DrawNewMiniElement(xstart + x , ystart + y, EL_SAND);
+ DrawMiniElement(xstart + x , ystart + y, EL_SAND);
ClearRectangle(drawto,
SX + xstart * MINI_TILEX + MINI_TILEX/2 - 1,
SX + xstart * MINI_TILEX - MINI_TILEX/2,
SY + ystart * MINI_TILEY - MINI_TILEY/2);
- DrawNewGraphic(xstart / 2, ystart / 2, el2img(properties_element), 0);
+ DrawGraphic(xstart / 2, ystart / 2, el2img(properties_element), 0);
/* copy the whole stuff to the definitive location */
BlitBitmap(drawto, drawto,
int lx = sx + level_xpos;
int ly = sy + level_ypos;
- DrawNewMiniElement(sx, sy, (element < 0 ? Feld[lx][ly] : element));
+ DrawMiniElement(sx, sy, (element < 0 ? Feld[lx][ly] : element));
if (change_level)
Feld[lx][ly] = element;
break;
case TEXT_SETCURSOR:
- DrawNewMiniElement(last_sx, last_sy, Feld[lx][ly]);
+ DrawMiniElement(last_sx, last_sy, Feld[lx][ly]);
DrawAreaBorder(sx, sy, sx, sy);
last_sx = sx;
last_sy = sy;
if (sx > start_sx)
{
Feld[lx - 1][ly] = delete_buffer[sx - start_sx - 1];
- DrawNewMiniElement(sx - 1, sy, Feld[lx - 1][ly]);
+ DrawMiniElement(sx - 1, sy, Feld[lx - 1][ly]);
DrawLevelText(sx - 1, sy, 0, TEXT_SETCURSOR);
}
break;
case TEXT_END:
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
- DrawNewMiniElement(sx, sy, Feld[lx][ly]);
+ DrawMiniElement(sx, sy, Feld[lx][ly]);
typing = FALSE;
break;
int ly = sy + level_ypos;
if (element == -1)
- DrawNewMiniElement(sx, sy, Feld[lx][ly]);
+ DrawMiniElement(sx, sy, Feld[lx][ly]);
else
DrawAreaBorder(sx, sy, sx, sy);
}
last_border_element = BorderElement;
SetBorderElement();
if (BorderElement != last_border_element)
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
#if 0
#ifdef DEBUG
for (y=0; y<lev_fieldy; y++)
Feld[x][y] = new_element;
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
return;
}
}
}
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
}
Feld[x][y] =
FieldBackup[(x + wrap_dx) % lev_fieldx][(y + wrap_dy) % lev_fieldy];
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
CopyLevelToUndoBuffer(UNDO_ACCUMULATE);
}
Feld[x][y] = EL_EMPTY;
if (x - level_xpos >= 0 && x - level_xpos < ed_fieldx &&
y - level_ypos >= 0 && y - level_ypos < ed_fieldy)
- DrawNewMiniElement(x - level_xpos, y - level_ypos,
+ DrawMiniElement(x - level_xpos, y - level_ypos,
EL_EMPTY);
}
}
}
Feld[lx][ly] = new_element;
- DrawNewMiniElement(sx, sy, new_element);
+ DrawMiniElement(sx, sy, new_element);
}
}
else
{
- DrawNewMiniGraphicExt(drawto,
+ DrawMiniGraphicExt(drawto,
gi->x + sx * MINI_TILEX,
gi->y + sy * MINI_TILEY,
el2img(new_element));
- DrawNewMiniGraphicExt(window,
+ DrawMiniGraphicExt(window,
gi->x + sx * MINI_TILEX,
gi->y + sy * MINI_TILEY,
el2img(new_element));
if (button_press_event && Feld[lx][ly] != new_element)
{
FloodFill(lx, ly, new_element);
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
}
break;
if (button == 1)
ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_RIGHT);
else
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_HORIZONTAL],
GDI_SCROLLBAR_ITEM_POSITION, level_xpos + 1, GDI_END);
if (button == 1)
ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_LEFT);
else
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_HORIZONTAL],
GDI_SCROLLBAR_ITEM_POSITION, level_xpos + 1, GDI_END);
if (button == 1)
ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_DOWN);
else
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_VERTICAL],
GDI_SCROLLBAR_ITEM_POSITION, level_ypos + 1, GDI_END);
if (button == 1)
ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_UP);
else
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_VERTICAL],
GDI_SCROLLBAR_ITEM_POSITION, level_ypos + 1, GDI_END);
case GADGET_ID_SCROLL_HORIZONTAL:
level_xpos = gi->event.item_position - 1;
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
break;
case GADGET_ID_SCROLL_VERTICAL:
level_ypos = gi->event.item_position - 1;
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
break;
case GADGET_ID_SCROLL_LIST_UP:
int element = editor_element[element_shift + i];
UnmapGadget(gi);
- getNewMiniGraphicSource(el2img(element), &gd->bitmap, &gd->x, &gd->y);
+ getMiniGraphicSource(el2img(element), &gd->bitmap, &gd->x, &gd->y);
ModifyGadget(gi, GDI_INFO_TEXT, getElementInfoText(element), GDI_END);
MapGadget(gi);
}
for(x=0; x<lev_fieldx; x++)
for(y=0; y<lev_fieldy; y++)
Feld[x][y] = UndoBuffer[undo_buffer_position][x][y];
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos,level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos,level_ypos);
break;
case GADGET_ID_INFO:
Feld[x][y] = (button == 1 ? EL_EMPTY : new_element);
CopyLevelToUndoBuffer(GADGET_ID_CLEAR);
- DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
break;
case GADGET_ID_SAVE:
for (i=0; i<MAX_PLAYERS; i++)
for (j=0; j<4; j++)
if (stored_player[i].key[j])
- DrawNewMiniGraphicExt(drawto, DX_KEYS + j * MINI_TILEX, DY_KEYS,
+ DrawMiniGraphicExt(drawto, DX_KEYS + j * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + j);
DrawText(DX + XX_EMERALDS, DY + YY_EMERALDS,
#endif
/* Hero disappears */
- DrawNewLevelField(ExitX, ExitY);
+ DrawLevelField(ExitX, ExitY);
BackToFront();
if (tape.playing)
MovPos[newx][newy] = MovDir[newx][newy] = MovDelay[newx][newy] = 0;
GfxAction[oldx][oldy] = GfxAction[newx][newy] = GFX_ACTION_DEFAULT;
- DrawNewLevelField(oldx, oldy);
- DrawNewLevelField(newx, newy);
+ DrawLevelField(oldx, oldy);
+ DrawLevelField(newx, newy);
}
void DrawDynamite(int x, int y)
{
int sx = SCREENX(x), sy = SCREENY(y);
-#if 0
- int graphic = el2gfx(Feld[x][y]);
-#else
int graphic = el2img(Feld[x][y]);
-#endif
int frame;
if (!IN_SCR_FIELD(sx, sy) || IS_PLAYER(x, y))
return;
if (Store[x][y])
-#if 0
- DrawGraphic(sx, sy, el2gfx(Store[x][y]));
-#else
- DrawNewGraphic(sx, sy, el2img(Store[x][y]), 0);
-#endif
+ DrawGraphic(sx, sy, el2img(Store[x][y]), 0);
-#if 0
- if (Feld[x][y] == EL_DYNAMITE_ACTIVE)
- {
- if ((frame = (96 - MovDelay[x][y]) / 12) > 6)
- frame = 6;
- }
- else
- {
- if ((frame = ((96 - MovDelay[x][y]) / 6) % 8) > 3)
- frame = 7 - frame;
- }
-#else
- frame = getNewGraphicAnimationFrame(graphic, 96 - MovDelay[x][y]);
-#endif
+ frame = getGraphicAnimationFrame(graphic, 96 - MovDelay[x][y]);
/*
printf("-> %d: %d [%d]\n", graphic, frame, MovDelay[x][y]);
*/
-#if 0
if (game.emulation == EMU_SUPAPLEX)
- DrawGraphic(sx, sy, GFX_SP_DISK_RED);
+ DrawGraphic(sx, sy, IMG_SP_DISK_RED, 0);
else if (Store[x][y])
- DrawGraphicThruMask(sx, sy, graphic + frame);
+ DrawGraphicThruMask(sx, sy, graphic, frame);
else
- DrawGraphic(sx, sy, graphic + frame);
-#else
- if (game.emulation == EMU_SUPAPLEX)
- DrawNewGraphic(sx, sy, IMG_SP_DISK_RED, 0);
- else if (Store[x][y])
- DrawNewGraphicThruMask(sx, sy, graphic, frame);
- else
- DrawNewGraphic(sx, sy, graphic, frame);
-#endif
+ DrawGraphic(sx, sy, graphic, frame);
}
void CheckDynamite(int x, int y)
InitField(x, y, FALSE);
if (CAN_MOVE(element) || COULD_MOVE(element))
InitMovDir(x, y);
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
if (IS_PLAYER(x, y) && !PLAYERINFO(x,y)->present)
StorePlayer[x][y] = 0;
}
else if (!(phase % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
{
-#if 0
- int graphic = GFX_EXPLOSION;
-
- if (game.emulation == EMU_SUPAPLEX)
- graphic = (Store[x][y] == EL_SP_INFOTRON ?
- GFX_SP_EXPLODE_INFOTRON :
- GFX_SP_EXPLODE_EMPTY);
-
- graphic += (phase / delay - 1);
-#else
int graphic = IMG_EXPLOSION;
int frame = (phase / delay - 1);
graphic = (Store[x][y] == EL_SP_INFOTRON ?
IMG_SP_EXPLOSION_INFOTRON :
IMG_SP_EXPLOSION);
-#endif
if (phase == delay)
DrawCrumbledSand(SCREENX(x), SCREENY(y));
if (IS_PFORTE(Store[x][y]))
{
- DrawNewLevelElement(x, y, Store[x][y]);
-#if 0
- DrawGraphicThruMask(SCREENX(x), SCREENY(y), graphic);
-#else
- DrawNewGraphicThruMask(SCREENX(x), SCREENY(y), graphic, frame);
-#endif
+ DrawLevelElement(x, y, Store[x][y]);
+ DrawGraphicThruMask(SCREENX(x), SCREENY(y), graphic, frame);
}
else
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), graphic);
-#else
- DrawNewGraphic(SCREENX(x), SCREENY(y), graphic, frame);
-#endif
+ DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
}
}
}
else /* go on */
{
-#if 0
- int graphic =
- (element == EL_ACID_SPLASH_LEFT ? GFX_BLURB_LEFT : GFX_BLURB_RIGHT);
-#else
int graphic = (element == EL_ACID_SPLASH_LEFT ?
IMG_ACID_SPLASH_LEFT :
IMG_ACID_SPLASH_RIGHT);
-#endif
if (!MovDelay[x][y]) /* initialize animation counter */
MovDelay[x][y] = 9;
{
MovDelay[x][y]--;
if (MovDelay[x][y]/2 && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), graphic+4-MovDelay[x][y]/2);
-#else
{
- int frame = getNewGraphicAnimationFrame(graphic, 8 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(graphic, 8 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), graphic, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_EMPTY;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
if (e_belt_nr == belt_nr)
{
Feld[xx][yy] = belt_base_switch_element[belt_nr] + belt_dir_nr;
- DrawNewLevelField(xx, yy);
+ DrawLevelField(xx, yy);
}
}
else if (IS_BELT(element) && belt_dir != MV_NO_MOVING)
int belt_part = Feld[xx][yy] - belt_base_element[belt_nr];
Feld[xx][yy] = belt_base_active_element[belt_nr] + belt_part;
- DrawNewLevelField(xx, yy);
+ DrawLevelField(xx, yy);
}
}
else if (IS_BELT_ACTIVE(element) && belt_dir == MV_NO_MOVING)
int belt_part = Feld[xx][yy] - belt_base_active_element[belt_nr];
Feld[xx][yy] = belt_base_element[belt_nr] + belt_part;
- DrawNewLevelField(xx, yy);
+ DrawLevelField(xx, yy);
}
}
}
element == EL_SWITCHGATE_SWITCH_DOWN)
{
Feld[xx][yy] = EL_SWITCHGATE_SWITCH_UP + game.switchgate_pos;
- DrawNewLevelField(xx, yy);
+ DrawLevelField(xx, yy);
}
else if (element == EL_SWITCHGATE_OPEN ||
element == EL_SWITCHGATE_OPENING)
game.light_time_left > 0)
{
Feld[x][y] = EL_LIGHT_SWITCH_ACTIVE;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
else if (element == EL_LIGHT_SWITCH_ACTIVE &&
game.light_time_left == 0)
{
Feld[x][y] = EL_LIGHT_SWITCH;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
else if (element == EL_INVISIBLE_STEELWALL ||
element == EL_INVISIBLE_WALL ||
if (game.light_time_left > 0)
Feld[x][y] = getInvisibleActiveFromInvisibleElement(element);
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
else if (element == EL_INVISIBLE_STEELWALL_ACTIVE ||
element == EL_INVISIBLE_WALL_ACTIVE ||
if (game.light_time_left == 0)
Feld[x][y] = getInvisibleFromInvisibleActiveElement(element);
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
element == EL_SP_SNIKSNAK ||
element == EL_SP_ELECTRON ||
element == EL_MOLE))
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
if (element == EL_ROBOT ||
element == EL_YAMYAM || element == EL_DARK_YAMYAM)
{
- int phase = MovDelay[x][y] % 8;
-
- if (phase > 3)
- phase = 7 - phase;
-
if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), el2gfx(element) + phase);
-#else
{
int graphic = el2img(element);
- int frame = getNewGraphicAnimationFrame(graphic, MovDelay[x][y] % 8);
+ int frame = getGraphicAnimationFrame(graphic, MovDelay[x][y] % 8);
- DrawNewGraphic(SCREENX(x), SCREENY(y), graphic, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
}
-#endif
if (MovDelay[x][y] % 4 == 3)
{
}
}
else if (element == EL_SP_ELECTRON)
-#if 0
- DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_SP_ELECTRON);
-#endif
+ DrawGraphicAnimation(x, y, IMG_SP_ELECTRON);
else if (element == EL_DRAGON)
{
int i;
int dir = MovDir[x][y];
int dx = (dir == MV_LEFT ? -1 : dir == MV_RIGHT ? +1 : 0);
int dy = (dir == MV_UP ? -1 : dir == MV_DOWN ? +1 : 0);
-#if 0
- int graphic = (dir == MV_LEFT ? GFX_FLAMMEN_LEFT :
- dir == MV_RIGHT ? GFX_FLAMMEN_RIGHT :
- dir == MV_UP ? GFX_FLAMMEN_UP :
- dir == MV_DOWN ? GFX_FLAMMEN_DOWN : GFX_LEERRAUM);
- int phase = FrameCounter % 2;
-#else
int graphic = (dir == MV_LEFT ? IMG_FLAMES_LEFT1 :
dir == MV_RIGHT ? IMG_FLAMES_RIGHT1 :
dir == MV_UP ? IMG_FLAMES_UP1 :
dir == MV_DOWN ? IMG_FLAMES_DOWN1 : IMG_EMPTY);
- int frame = getNewGraphicAnimationFrame(graphic, -1);
-#endif
+ int frame = getGraphicAnimationFrame(graphic, -1);
for (i=1; i<=3; i++)
{
Feld[xx][yy] = EL_FLAMES;
if (IN_SCR_FIELD(sx, sy))
-#if 0
- DrawGraphic(sx, sy, graphic + phase*3 + i-1);
-#else
- DrawNewGraphic(sx, sy, flame_graphic, frame);
-#endif
+ DrawGraphic(sx, sy, flame_graphic, frame);
}
else
{
if (Feld[xx][yy] == EL_FLAMES)
Feld[xx][yy] = EL_EMPTY;
- DrawNewLevelField(xx, yy);
+ DrawLevelField(xx, yy);
}
}
}
if (Feld[newx][newy] == EL_EXIT_OPEN)
{
Feld[x][y] = EL_EMPTY;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
PlaySoundLevel(newx, newy, SND_PENGUIN_PASSING_EXIT);
if (IN_SCR_FIELD(SCREENX(newx), SCREENY(newy)))
-#if 0
- DrawGraphicThruMask(SCREENX(newx), SCREENY(newy), el2gfx(element));
-#else
- DrawNewGraphicThruMask(SCREENX(newx), SCREENY(newy), el2img(element),
- 0);
-#endif
+ DrawGraphicThruMask(SCREENX(newx),SCREENY(newy), el2img(element), 0);
local_player->friends_still_needed--;
if (!local_player->friends_still_needed &&
else if (IS_MAMPF3(Feld[newx][newy]))
{
if (DigField(local_player, newx, newy, 0, 0, DF_DIG) == MF_MOVING)
- DrawNewLevelField(newx, newy);
+ DrawLevelField(newx, newy);
else
MovDir[x][y] = MV_NO_MOVING;
}
if (IS_PLAYER(x, y))
DrawPlayerField(x, y);
else
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
return;
}
}
else
{
Feld[newx][newy] = EL_EMPTY;
- DrawNewLevelField(newx, newy);
+ DrawLevelField(newx, newy);
}
PlaySoundLevel(x, y, SND_PIG_EATING);
if (IS_PLAYER(x, y))
DrawPlayerField(x, y);
else
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
return;
}
}
if (IS_PLAYER(x, y))
DrawPlayerField(x, y);
else
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
return;
}
else
if (IS_PLAYER(x, y))
DrawPlayerField(x, y);
else
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
PlaySoundLevel(x, y, SND_DRAGON_ATTACKING);
else
{
Feld[newx][newy] = EL_EMPTY;
- DrawNewLevelField(newx, newy);
+ DrawLevelField(newx, newy);
}
PlaySoundLevel(x, y, SND_YAMYAM_EATING);
else
{
Feld[newx][newy] = EL_EMPTY;
- DrawNewLevelField(newx, newy);
+ DrawLevelField(newx, newy);
}
PlaySoundLevel(x, y, SND_DARK_YAMYAM_EATING);
else /* element == EL_PACMAN */
{
Feld[newx][newy] = EL_EMPTY;
- DrawNewLevelField(newx, newy);
+ DrawLevelField(newx, newy);
PlaySoundLevel(x, y, SND_PACMAN_EATING);
}
}
if (element == EL_BUG || element == EL_SPACESHIP ||
element == EL_SP_SNIKSNAK)
-#if 0
DrawLevelField(x, y);
-#else
- DrawNewLevelField(x, y);
-#endif
else if (element == EL_BUG || element == EL_SPACESHIP ||
element == EL_SP_SNIKSNAK || element == EL_MOLE)
-#if 0
DrawLevelField(x, y);
-#else
- DrawNewLevelField(x, y);
-#endif
else if (element == EL_BD_BUTTERFLY || element == EL_BD_FIREFLY)
-#if 0
- DrawGraphicAnimation(x, y, el2gfx(element), 2, 4, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, el2img(element));
-#endif
+ DrawGraphicAnimation(x, y, el2img(element));
else if (element == EL_SATELLITE)
-#if 0
- DrawGraphicAnimation(x, y, GFX_SONDE_START, 8, 2, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_SATELLITE);
-#endif
+ DrawGraphicAnimation(x, y, IMG_SATELLITE);
else if (element == EL_SP_ELECTRON)
-#if 0
- DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_SP_ELECTRON);
-#endif
+ DrawGraphicAnimation(x, y, IMG_SP_ELECTRON);
if (DONT_TOUCH(element))
TestIfBadThingTouchesHero(x, y);
};
Feld[x][y] = EL_SAND;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
for(i=0; i<4; i++)
{
yy = y + xy[i][1];
if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_SAND)
- DrawNewLevelField(xx, yy); /* for "DrawCrumbledSand()" */
+ DrawLevelField(xx, yy); /* for "DrawCrumbledSand()" */
}
}
if (!CAN_MOVE(element))
MovDir[newx][newy] = 0;
- DrawNewLevelField(x, y);
- DrawNewLevelField(newx, newy);
+ DrawLevelField(x, y);
+ DrawLevelField(newx, newy);
Stop[newx][newy] = TRUE;
JustStopped[newx][newy] = 3;
if (GfxAction[x][y] == GFX_ACTION_DEFAULT)
GfxAction[x][y] = GFX_ACTION_MOVING;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
AmoebaNr[x][y] = 0;
Feld[x][y] = new_element;
InitField(x, y, FALSE);
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
done = TRUE;
}
}
{
MovDelay[x][y]--;
if (MovDelay[x][y]/2 && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_AMOEBING + 3 - MovDelay[x][y]/2);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_AMOEBA_CREATING,
- 6 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_AMOEBA_CREATING,
+ 6 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_AMOEBA_CREATING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_AMOEBA_CREATING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = Store[x][y];
Store[x][y] = 0;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
{
MovDelay[x][y]--;
if (MovDelay[x][y]/2 && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_AMOEBING + MovDelay[x][y]/2);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_AMOEBA_SHRINKING,
- 6 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_AMOEBA_SHRINKING,
+ 6 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_AMOEBA_SHRINKING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_AMOEBA_SHRINKING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_EMPTY;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
/* don't let mole enter this field in this cycle;
(give priority to objects falling to this field from above) */
if (!level.amoeba_speed)
{
Feld[ax][ay] = EL_AMOEBA_DEAD;
- DrawNewLevelField(ax, ay);
+ DrawLevelField(ax, ay);
return;
}
if (i == 4 && (!waiting_for_player || game.emulation == EMU_BOULDERDASH))
{
Feld[ax][ay] = EL_AMOEBA_DEAD;
- DrawNewLevelField(ax, ay);
+ DrawLevelField(ax, ay);
AmoebaCnt[AmoebaNr[ax][ay]]--;
if (AmoebaCnt[AmoebaNr[ax][ay]] <= 0) /* amoeba is completely dead */
return;
}
- DrawNewLevelField(newax, neway);
+ DrawLevelField(newax, neway);
}
void Life(int ax, int ay)
{
Feld[xx][yy] = EL_EMPTY;
if (!Stop[xx][yy])
- DrawNewLevelField(xx, yy);
+ DrawLevelField(xx, yy);
Stop[xx][yy] = TRUE;
changed = TRUE;
}
Feld[xx][yy] = element;
MovDelay[xx][yy] = (element == EL_GAMEOFLIFE ? 0 : life_time-1);
if (!Stop[xx][yy])
- DrawNewLevelField(xx, yy);
+ DrawLevelField(xx, yy);
Stop[xx][yy] = TRUE;
changed = TRUE;
}
if (MovDelay[x][y])
{
if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_ABLENK+MovDelay[x][y]%4);
-#else
- {
- int frame = getNewGraphicAnimationFrame(IMG_ROBOT_WHEEL_ACTIVE, -1);
+ {
+ int frame = getGraphicAnimationFrame(IMG_ROBOT_WHEEL_ACTIVE, -1);
+
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_ROBOT_WHEEL_ACTIVE, frame);
+ }
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_ROBOT_WHEEL_ACTIVE, frame);
- }
-#endif
if (!(MovDelay[x][y]%4))
PlaySoundLevel(x, y, SND_ROBOT_WHEEL_ACTIVE);
return;
}
Feld[x][y] = EL_ROBOT_WHEEL;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
if (ZX == x && ZY == y)
ZX = ZY = -1;
}
if (MovDelay[x][y])
{
if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y),
- GFX_TIMEGATE_SWITCH + MovDelay[x][y]%4);
-#else
- {
- int frame = getNewGraphicAnimationFrame(IMG_TIMEGATE_SWITCH_ACTIVE, -1);
+ {
+ int frame = getGraphicAnimationFrame(IMG_TIMEGATE_SWITCH_ACTIVE, -1);
+
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_SWITCH_ACTIVE, frame);
+ }
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_SWITCH_ACTIVE, frame);
- }
-#endif
if (!(MovDelay[x][y]%4))
PlaySoundLevel(x, y, SND_TIMEGATE_SWITCH_ACTIVE);
return;
}
Feld[x][y] = EL_TIMEGATE_SWITCH;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
if (ZX == x && ZY == y)
ZX = ZY = -1;
}
void Blubber(int x, int y)
{
-#if 0
- if (y > 0 && IS_MOVING(x, y - 1) && MovDir[x][y - 1] == MV_DOWN)
- DrawNewLevelField(x, y - 1);
- else
- DrawGraphicAnimation(x, y, GFX_GEBLUBBER, 4, 10, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_ACID);
-#endif
+ DrawGraphicAnimation(x, y, IMG_ACID);
}
void NussKnacken(int x, int y)
{
MovDelay[x][y]--;
if (MovDelay[x][y]/2 && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y),
- GFX_CRACKINGNUT + 3 - MovDelay[x][y]/2);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_NUT_CRACKING,
- 6 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_NUT_CRACKING,
+ 6 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_NUT_CRACKING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_NUT_CRACKING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_EMERALD;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
{
MovDelay[x][y]--;
if (MovDelay[x][y]/2 && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y),
- GFX_PEARL_BREAKING + 4 - MovDelay[x][y]/2);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_PEARL_BREAKING,
- 8 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_PEARL_BREAKING,
+ 8 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_PEARL_BREAKING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_PEARL_BREAKING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_EMPTY;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
void SiebAktivieren(int x, int y, int type)
{
-#if 0
- int graphic = (type == 1 ? GFX_MAGIC_WALL_FULL : GFX_MAGIC_WALL_BD_FULL) + 3;
-
- DrawGraphicAnimation(x, y, graphic, 4, 4, ANIM_REVERSE);
-#else
int graphic = (type == 1 ? IMG_MAGIC_WALL_FULL : IMG_BD_MAGIC_WALL_FULL);
- DrawNewGraphicAnimation(x, y, graphic);
-#endif
+ DrawGraphicAnimation(x, y, graphic);
}
void AusgangstuerPruefen(int x, int y)
MovDelay[x][y]--;
tuer = MovDelay[x][y]/delay;
if (!(MovDelay[x][y]%delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_AUSGANG_AUF-tuer);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_EXIT_OPENING,
- 29 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_EXIT_OPENING,
+ 29 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_EXIT_OPENING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_EXIT_OPENING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_EXIT_OPEN;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
void AusgangstuerBlinken(int x, int y)
{
-#if 0
- DrawGraphicAnimation(x, y, GFX_AUSGANG_AUF, 4, 4, ANIM_PINGPONG);
-#else
- DrawNewGraphicAnimation(x, y, IMG_EXIT_OPEN);
-#endif
+ DrawGraphicAnimation(x, y, IMG_EXIT_OPEN);
}
void OpenSwitchgate(int x, int y)
if (MovDelay[x][y]) /* wait some time before next frame */
{
- int phase;
-
MovDelay[x][y]--;
- phase = MovDelay[x][y] / delay;
+
if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_SWITCHGATE_OPEN - phase);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_SWITCHGATE_OPENING,
- 29 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_SWITCHGATE_OPENING,
+ 29 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_SWITCHGATE_OPENING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_SWITCHGATE_OPENING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_SWITCHGATE_OPEN;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
if (MovDelay[x][y]) /* wait some time before next frame */
{
- int phase;
-
MovDelay[x][y]--;
- phase = MovDelay[x][y] / delay;
+
if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_SWITCHGATE_CLOSED + phase);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_SWITCHGATE_CLOSING,
- 29 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_SWITCHGATE_CLOSING,
+ 29 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_SWITCHGATE_CLOSING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_SWITCHGATE_CLOSING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_SWITCHGATE_CLOSED;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
if (MovDelay[x][y]) /* wait some time before next frame */
{
- int phase;
-
MovDelay[x][y]--;
- phase = MovDelay[x][y] / delay;
+
if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_TIMEGATE_OPEN - phase);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_TIMEGATE_OPENING,
- 29 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_TIMEGATE_OPENING,
+ 29 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_OPENING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_OPENING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_TIMEGATE_OPEN;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
if (MovDelay[x][y]) /* wait some time before next frame */
{
- int phase;
-
MovDelay[x][y]--;
- phase = MovDelay[x][y] / delay;
+
if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_TIMEGATE_CLOSED + phase);
-#else
{
- int frame = getNewGraphicAnimationFrame(IMG_TIMEGATE_CLOSING,
- 29 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(IMG_TIMEGATE_CLOSING,
+ 29 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_CLOSING, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_CLOSING, frame);
}
-#endif
if (!MovDelay[x][y])
{
Feld[x][y] = EL_TIMEGATE_CLOSED;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
return;
if (Feld[x][y] == EL_BD_DIAMOND)
-#if 0
- DrawGraphicAnimation(x, y, GFX_EDELSTEIN_BD, 4, 4, ANIM_REVERSE);
-#else
- DrawNewGraphicAnimation(x, y, IMG_BD_DIAMOND);
-#endif
+ DrawGraphicAnimation(x, y, IMG_BD_DIAMOND);
else
{
if (!MovDelay[x][y]) /* next animation frame */
if (setup.direct_draw && MovDelay[x][y])
SetDrawtoField(DRAW_BUFFERED);
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), el2gfx(Feld[x][y]));
-#else
- DrawNewGraphic(SCREENX(x), SCREENY(y), el2img(Feld[x][y]), 0);
-#endif
+ DrawGraphic(SCREENX(x), SCREENY(y), el2img(Feld[x][y]), 0);
if (MovDelay[x][y])
{
- int phase = (MovDelay[x][y]-1)/2;
+ int frame = getGraphicAnimationFrame(IMG_TWINKLE_WHITE,
+ 10 - MovDelay[x][y]);
- if (phase > 2)
- phase = 4-phase;
-
-#if 0
- DrawGraphicThruMask(SCREENX(x), SCREENY(y), GFX_FUNKELN_WEISS + phase);
-#else
- {
- int frame = getNewGraphicAnimationFrame(IMG_TWINKLE_WHITE,
- 10 - MovDelay[x][y]);
-
- DrawNewGraphicThruMask(SCREENX(x), SCREENY(y), IMG_TWINKLE_WHITE,
- frame);
- }
-#endif
+ DrawGraphicThruMask(SCREENX(x), SCREENY(y), IMG_TWINKLE_WHITE, frame);
if (setup.direct_draw)
{
if (MovDelay[x][y]) /* wait some time before next frame */
{
- int phase;
-
MovDelay[x][y]--;
- phase = 2 - MovDelay[x][y] / delay;
-#if 0
- if (!(MovDelay[x][y]%delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
- DrawGraphic(SCREENX(x), SCREENY(y),
- (MovDir[x][y] == MV_LEFT ? GFX_MAUER_LEFT :
- MovDir[x][y] == MV_RIGHT ? GFX_MAUER_RIGHT :
- MovDir[x][y] == MV_UP ? GFX_MAUER_UP :
- GFX_MAUER_DOWN ) + phase);
-#else
+
if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
{
int graphic = el_dir2img(Feld[x][y], MovDir[x][y]);
- int frame = getNewGraphicAnimationFrame(graphic, 17 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(graphic, 17 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x), SCREENY(y), graphic, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
}
-#endif
if (!MovDelay[x][y])
{
if (MovDir[x][y] == MV_LEFT)
{
if (IN_LEV_FIELD(x - 1, y) && IS_MAUER(Feld[x - 1][y]))
- DrawNewLevelField(x - 1, y);
+ DrawLevelField(x - 1, y);
}
else if (MovDir[x][y] == MV_RIGHT)
{
if (IN_LEV_FIELD(x + 1, y) && IS_MAUER(Feld[x + 1][y]))
- DrawNewLevelField(x + 1, y);
+ DrawLevelField(x + 1, y);
}
else if (MovDir[x][y] == MV_UP)
{
if (IN_LEV_FIELD(x, y - 1) && IS_MAUER(Feld[x][y - 1]))
- DrawNewLevelField(x, y - 1);
+ DrawLevelField(x, y - 1);
}
else
{
if (IN_LEV_FIELD(x, y + 1) && IS_MAUER(Feld[x][y + 1]))
- DrawNewLevelField(x, y + 1);
+ DrawLevelField(x, y + 1);
}
Feld[x][y] = Store[x][y];
Store[x][y] = 0;
MovDir[x][y] = MV_NO_MOVING;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
Store[ax][ay-1] = element;
MovDir[ax][ay-1] = MV_UP;
if (IN_SCR_FIELD(SCREENX(ax), SCREENY(ay-1)))
-#if 0
- DrawGraphic(SCREENX(ax), SCREENY(ay-1), GFX_MAUER_UP);
-#else
- DrawNewGraphic(SCREENX(ax), SCREENY(ay - 1),
- IMG_WALL_GROWING_ACTIVE_UP, 0);
-#endif
+ DrawGraphic(SCREENX(ax), SCREENY(ay - 1),
+ IMG_WALL_GROWING_ACTIVE_UP, 0);
new_wall = TRUE;
}
if (unten_frei)
Store[ax][ay+1] = element;
MovDir[ax][ay+1] = MV_DOWN;
if (IN_SCR_FIELD(SCREENX(ax), SCREENY(ay+1)))
-#if 0
- DrawGraphic(SCREENX(ax), SCREENY(ay+1), GFX_MAUER_DOWN);
-#else
- DrawNewGraphic(SCREENX(ax), SCREENY(ay + 1),
- IMG_WALL_GROWING_ACTIVE_DOWN, 0);
-#endif
+ DrawGraphic(SCREENX(ax), SCREENY(ay + 1),
+ IMG_WALL_GROWING_ACTIVE_DOWN, 0);
new_wall = TRUE;
}
}
Store[ax-1][ay] = element;
MovDir[ax-1][ay] = MV_LEFT;
if (IN_SCR_FIELD(SCREENX(ax-1), SCREENY(ay)))
-#if 0
- DrawGraphic(SCREENX(ax-1), SCREENY(ay), GFX_MAUER_LEFT);
-#else
- DrawNewGraphic(SCREENX(ax - 1), SCREENY(ay),
- IMG_WALL_GROWING_ACTIVE_LEFT, 0);
-#endif
+ DrawGraphic(SCREENX(ax - 1), SCREENY(ay),
+ IMG_WALL_GROWING_ACTIVE_LEFT, 0);
new_wall = TRUE;
}
Store[ax+1][ay] = element;
MovDir[ax+1][ay] = MV_RIGHT;
if (IN_SCR_FIELD(SCREENX(ax+1), SCREENY(ay)))
-#if 0
- DrawGraphic(SCREENX(ax+1), SCREENY(ay), GFX_MAUER_RIGHT);
-#else
- DrawNewGraphic(SCREENX(ax + 1), SCREENY(ay),
- IMG_WALL_GROWING_ACTIVE_RIGHT, 0);
-#endif
+ DrawGraphic(SCREENX(ax + 1), SCREENY(ay),
+ IMG_WALL_GROWING_ACTIVE_RIGHT, 0);
new_wall = TRUE;
}
}
if (element == EL_WALL_GROWING && (links_frei || rechts_frei))
- DrawNewLevelField(ax, ay);
+ DrawLevelField(ax, ay);
if (!IN_LEV_FIELD(ax, ay-1) || IS_MAUER(Feld[ax][ay-1]))
oben_massiv = TRUE;
if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_FLAMES)
{
Feld[xx][yy] = EL_EMPTY;
- DrawNewLevelField(xx, yy);
+ DrawLevelField(xx, yy);
}
else
break;
{
MovDelay[x][y]--;
if (MovDelay[x][y] < 5 && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x), SCREENY(y), GFX_SP_BUG_WARNING);
-#else
- DrawNewGraphic(SCREENX(x), SCREENY(y), IMG_SP_BUGGY_BASE, 0);
-#endif
+ DrawGraphic(SCREENX(x), SCREENY(y), IMG_SP_BUGGY_BASE, 0);
if (MovDelay[x][y])
return;
};
if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
-#if 0
- DrawGraphic(SCREENX(x),SCREENY(y), GFX_SP_BUG_ACTIVE + SimpleRND(4));
-#else
{
int graphic = IMG_SP_BUGGY_BASE_ACTIVE;
- int frame = getNewGraphicAnimationFrame(graphic, SimpleRND(100));
+ int frame = getGraphicAnimationFrame(graphic, SimpleRND(100));
- DrawNewGraphic(SCREENX(x), SCREENY(y), graphic, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
}
-#endif
for (i=0; i<4; i++)
{
}
Feld[x][y] = EL_SP_BUGGY_BASE;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
{
if (!(MovDelay[x][y] % delay))
{
- int phase = MovDelay[x][y]/delay;
-
- if (phase >= num_frames/2)
- phase = num_frames - phase;
-
if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
{
-#if 0
- DrawGraphic(SCREENX(x),SCREENY(y), GFX_TRAP_INACTIVE + phase - 1);
-#else
int graphic = IMG_TRAP_ACTIVE;
- int frame = getNewGraphicAnimationFrame(graphic,
- 31 - MovDelay[x][y]);
+ int frame = getGraphicAnimationFrame(graphic, 31 - MovDelay[x][y]);
- DrawNewGraphic(SCREENX(x),SCREENY(y), graphic, frame);
-#endif
+ DrawGraphic(SCREENX(x),SCREENY(y), graphic, frame);
DrawCrumbledSand(SCREENX(x), SCREENY(y));
}
}
}
Feld[x][y] = EL_TRAP;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
}
if (belt_dir != MV_NO_MOVING)
{
-#if 0
- int delay = 2;
- int mode = ANIM_LOOP | (belt_dir == MV_LEFT ? 0 : ANIM_REVERSE);
- int graphic = el2gfx(element) + (belt_dir == MV_LEFT ? 0 : 7);
-
- DrawGraphicAnimation(x, y, graphic, 8, delay, mode);
-#else
int graphic = el2img(element);
- DrawNewGraphicAnimation(x, y, graphic);
-#endif
+ DrawGraphicAnimation(x, y, graphic);
if (!(FrameCounter % 2))
PlaySoundLevel(x, y, SND_CONVEYOR_BELT_ACTIVE);
*/
#endif
+ /* if the player does not move for some time, reset animation to start */
if (++player->frame_reset_delay > player->move_delay_value)
player->Frame = 0;
}
else if (element == EL_TRAP || element == EL_TRAP_ACTIVE)
CheckTrap(x, y);
else if (element == EL_SP_TERMINAL)
-#if 0
- DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL, 7, 12, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_SP_TERMINAL);
-#endif
+ DrawGraphicAnimation(x, y, IMG_SP_TERMINAL);
else if (element == EL_SP_TERMINAL_ACTIVE)
{
-#if 0
- DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL_ACTIVE, 7, 4, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_SP_TERMINAL_ACTIVE);
-#endif
+ DrawGraphicAnimation(x, y, IMG_SP_TERMINAL_ACTIVE);
#if 0
if (!(FrameCounter % 4))
else if (element == EL_TIMEGATE_CLOSING)
CloseTimegate(x, y);
else if (element == EL_EXTRA_TIME)
-#if 0
- DrawGraphicAnimation(x, y, GFX_EXTRA_TIME, 6, 4, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_EXTRA_TIME);
-#endif
+ DrawGraphicAnimation(x, y, IMG_EXTRA_TIME);
else if (element == EL_SHIELD_NORMAL)
{
-#if 0
- DrawGraphicAnimation(x, y, GFX_SHIELD_PASSIVE, 6, 4, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_SHIELD_NORMAL);
-#endif
+ DrawGraphicAnimation(x, y, IMG_SHIELD_NORMAL);
#if 0
if (!(FrameCounter % 4))
}
else if (element == EL_SHIELD_DEADLY)
{
-#if 0
- DrawGraphicAnimation(x, y, GFX_SHIELD_ACTIVE, 6, 4, ANIM_LOOP);
-#else
- DrawNewGraphicAnimation(x, y, IMG_SHIELD_DEADLY);
-#endif
+ DrawGraphicAnimation(x, y, IMG_SHIELD_DEADLY);
#if 0
if (!(FrameCounter % 4))
element == EL_MAGIC_WALL_FULL)
{
Feld[x][y] = EL_MAGIC_WALL_DEAD;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
else if (element == EL_BD_MAGIC_WALL_ACTIVE ||
element == EL_BD_MAGIC_WALL_FULL)
{
Feld[x][y] = EL_BD_MAGIC_WALL_DEAD;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
}
}
{
x = (dx == 1 ? BX1 : BX2);
for (y=BY1; y<=BY2; y++)
- DrawNewScreenField(x, y);
+ DrawScreenField(x, y);
}
if (dy)
{
y = (dy == 1 ? BY1 : BY2);
for (x=BX1; x<=BX2; x++)
- DrawNewScreenField(x, y);
+ DrawScreenField(x, y);
}
redraw_mask |= REDRAW_FIELD;
if (!(moved & MF_MOVING) && !player->Pushing)
player->Frame = 0;
else
+#if 0
player->Frame = (player->Frame + 1) % 4;
+#else
+ player->Frame += 1 * 0;
+#endif
if (moved & MF_MOVING)
{
else if (old_jx == jx && old_jy != jy)
player->MovDir = (old_jy < jy ? MV_DOWN : MV_UP);
- DrawNewLevelField(jx, jy); /* for "DrawCrumbledSand()" */
+ DrawLevelField(jx, jy); /* for "DrawCrumbledSand()" */
player->last_move_dir = player->MovDir;
player->is_moving = TRUE;
{
player->actual_frame_counter = FrameCounter;
player->GfxPos = move_stepsize * (player->MovPos / move_stepsize);
+ if (player->Frame)
+ player->Frame += 1;
if (Feld[last_jx][last_jy] == EL_EMPTY)
Feld[last_jx][last_jy] = EL_PLAYER_IS_LEAVING;
player->MovPos += (player->MovPos > 0 ? -1 : 1) * move_stepsize;
player->GfxPos = move_stepsize * (player->MovPos / move_stepsize);
+ player->Frame += 1;
if (Feld[last_jx][last_jy] == EL_PLAYER_IS_LEAVING)
Feld[last_jx][last_jy] = EL_EMPTY;
RemoveField(x, y);
player->key[key_nr] = TRUE;
RaiseScoreElement(element);
- DrawNewMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+ DrawMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + key_nr);
- DrawNewMiniGraphicExt(window, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+ DrawMiniGraphicExt(window, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + key_nr);
PlaySoundLevel(x, y, SND_KEY_COLLECTING);
break;
RemoveField(x, y);
player->key[key_nr] = TRUE;
RaiseScoreElement(element);
- DrawNewMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+ DrawMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + key_nr);
- DrawNewMiniGraphicExt(window, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+ DrawMiniGraphicExt(window, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + key_nr);
PlaySoundLevel(x, y, SND_KEY_COLLECTING);
break;
Feld[x][y] = EL_ROBOT_WHEEL_ACTIVE;
ZX = x;
ZY = y;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
PlaySoundLevel(x, y, SND_ROBOT_WHEEL_ACTIVATING);
return MF_ACTION;
break;
player->push_delay_value = (element == EL_SPRING ? 0 : 2 + RND(8));
- DrawNewLevelField(x + dx, y + dy);
+ DrawLevelField(x + dx, y + dy);
PlaySoundLevelElementAction(x, y, element, SND_ACTION_PUSHING);
break;
case EL_LAMP:
Feld[x][y] = EL_LAMP_ACTIVE;
local_player->lights_still_needed--;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
PlaySoundLevel(x, y, SND_LAMP_ACTIVATING);
return MF_ACTION;
break;
Feld[x][y] = EL_TIME_ORB_EMPTY;
TimeLeft += 10;
DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW);
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
PlaySoundStereo(SND_TIME_ORB_FULL_COLLECTING, SOUND_MAX_RIGHT);
return MF_ACTION;
break;
player->push_delay_value = (element == EL_BALLOON ? 0 : 2);
- DrawNewLevelField(x, y);
- DrawNewLevelField(x + dx, y + dy);
+ DrawLevelField(x, y);
+ DrawLevelField(x + dx, y + dy);
if (IS_SB_ELEMENT(element) &&
local_player->sokobanfields_still_needed == 0 &&
return FALSE;
player->snapped = TRUE;
- DrawNewLevelField(x, y);
+ DrawLevelField(x, y);
BackToFront();
return TRUE;
FS_SMALL, FC_YELLOW);
if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy)))
{
-#if 0
if (game.emulation == EMU_SUPAPLEX)
- DrawGraphic(SCREENX(jx), SCREENY(jy), GFX_SP_DISK_RED);
+ DrawGraphic(SCREENX(jx), SCREENY(jy), IMG_SP_DISK_RED, 0);
else
- DrawGraphicThruMask(SCREENX(jx), SCREENY(jy), GFX_DYNAMIT);
-#else
- if (game.emulation == EMU_SUPAPLEX)
- DrawNewGraphic(SCREENX(jx), SCREENY(jy), IMG_SP_DISK_RED, 0);
- else
- DrawNewGraphicThruMask(SCREENX(jx), SCREENY(jy),
- IMG_DYNAMITE_ACTIVE, 0);
-#endif
+ DrawGraphicThruMask(SCREENX(jx), SCREENY(jy), IMG_DYNAMITE_ACTIVE, 0);
}
PlaySoundLevel(jx, jy, SND_DYNAMITE_DROPPING);
MovDelay[jx][jy] = 96;
player->dynabombs_left--;
if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy)))
-#if 0
- DrawGraphicThruMask(SCREENX(jx), SCREENY(jy), GFX_DYNABOMB);
-#else
- DrawNewGraphicThruMask(SCREENX(jx), SCREENY(jy),
- el2img(Feld[jx][jy]), 0);
-#endif
+ DrawGraphicThruMask(SCREENX(jx), SCREENY(jy), el2img(Feld[jx][jy]), 0);
PlaySoundLevel(jx, jy, SND_DYNABOMB_DROPPING);
}
if (parameter[GFX_ARG_MODE_REVERSE])
new_graphic_info[i].anim_mode |= ANIM_REVERSE;
+#if 1
+ /* set first frame of animation after determining animation mode */
+ new_graphic_info[i].anim_start_frame = parameter[GFX_ARG_START_FRAME];
+ if (new_graphic_info[i].anim_start_frame == -1)
+ new_graphic_info[i].anim_start_frame = 0;
+ else if (new_graphic_info[i].anim_mode & ANIM_REVERSE)
+ new_graphic_info[i].anim_start_frame =
+ new_graphic_info[i].anim_frames
+ - new_graphic_info[i].anim_start_frame - 1;
+#else
+ /* set first frame of animation after determining animation mode */
+ new_graphic_info[i].anim_start_frame = parameter[GFX_ARG_START_FRAME];
+ if (parameter[GFX_ARG_START_FRAME] == -1) /* default: start with ... */
+ {
+ if (parameter[GFX_ARG_MODE_REVERSE])
+ new_graphic_info[i].anim_start_frame =
+ new_graphic_info[i].anim_frames - 1; /* ... last frame */
+ else
+ new_graphic_info[i].anim_start_frame = 0; /* ... first frame */
+ }
+#endif
+
/* animation synchronized with global frame counter, not move position */
new_graphic_info[i].anim_global_sync = parameter[GFX_ARG_GLOBAL_SYNC];
}
{ ".offset", "32" },
{ ".vertical", "0" },
{ ".frames", "1" },
-#if 0
{ ".start_frame", "-1" },
-#endif
{ ".delay", "1" },
{ ".mode_loop", "0" },
{ ".mode_linear", "0" },
{ "bd_rock.moving_left.ypos", "2" },
{ "bd_rock.moving_left.frames", "4" },
{ "bd_rock.moving_left.delay", "2" },
+ { "bd_rock.moving_left.mode_reverse", "1" },
{ "bd_rock.moving_right", "RocksMore.pcx" },
{ "bd_rock.moving_right.xpos", "4" },
{ "bd_rock.moving_right.ypos", "2" },
{ "bd_rock.moving_right.frames", "4" },
+ { "bd_rock.moving_right.start_frame", "1" },
{ "bd_rock.moving_right.delay", "2" },
- { "bd_rock.moving_right.mode_reverse", "1" },
{ "bd_diamond", "RocksElements.pcx" },
{ "bd_diamond.xpos", "0" },
{ "sp_zonk.moving_left.ypos", "6" },
{ "sp_zonk.moving_left.frames", "4" },
{ "sp_zonk.moving_left.delay", "2" },
+ { "sp_zonk.moving_left.mode_reverse", "1" },
{ "sp_zonk.moving_right", "RocksSP.pcx" },
{ "sp_zonk.moving_right.xpos", "0" },
{ "sp_zonk.moving_right.ypos", "6" },
{ "sp_zonk.moving_right.frames", "4" },
+ { "sp_zonk.moving_right.start_frame", "1" },
{ "sp_zonk.moving_right.delay", "2" },
- { "sp_zonk.moving_right.mode_reverse", "1" },
{ "sp_base", "RocksSP.pcx" },
{ "sp_base.xpos", "2" },
{ "rock.moving_left.ypos", "0" },
{ "rock.moving_left.frames", "4" },
{ "rock.moving_left.delay", "2" },
+ { "rock.moving_left.mode_reverse", "1" },
{ "rock.moving_right", "RocksElements.pcx" },
{ "rock.moving_right.xpos", "12" },
{ "rock.moving_right.ypos", "0" },
{ "rock.moving_right.frames", "4" },
+ { "rock.moving_right.start_frame", "1" },
{ "rock.moving_right.delay", "2" },
- { "rock.moving_right.mode_reverse", "1" },
{ "emerald", "RocksElements.pcx" },
{ "emerald.xpos", "8" },
{ "player1_down.moving.xpos", "0" },
{ "player1_down.moving.ypos", "0" },
{ "player1_down.moving.frames", "4" },
+ { "player1_down.moving.start_frame", "1" },
+ { "player1_down.moving.delay", "4" },
{ "player1_down.digging", "RocksHeroes.pcx" },
{ "player1_down.digging.xpos", "0" },
{ "player1_down.digging.ypos", "0" },
{ "player1_down.digging.frames", "4" },
{ "player1_down.pushing", "RocksHeroes.pcx" },
{ "player1_down.pushing.xpos", "0" },
- { "player1_down.pushing.ypos", "2" },
+ { "player1_down.pushing.ypos", "0" },
{ "player1_down.pushing.frames", "4" },
+ { "player1_down.pushing.delay", "2" },
{ "player1_down.snapping", "RocksHeroes.pcx" },
{ "player1_down.snapping.xpos", "0" },
{ "player1_down.snapping.ypos", "0" },
{ "player1_up.moving.xpos", "4" },
{ "player1_up.moving.ypos", "0" },
{ "player1_up.moving.frames", "4" },
+ { "player1_up.moving.start_frame", "1" },
+ { "player1_up.moving.delay", "4" },
{ "player1_up.digging", "RocksHeroes.pcx" },
{ "player1_up.digging.xpos", "4" },
{ "player1_up.digging.ypos", "0" },
{ "player1_up.pushing.xpos", "4" },
{ "player1_up.pushing.ypos", "0" },
{ "player1_up.pushing.frames", "4" },
+ { "player1_up.pushing.delay", "2" },
{ "player1_up.snapping", "RocksHeroes.pcx" },
{ "player1_up.snapping.xpos", "4" },
{ "player1_up.snapping.ypos", "0" },
{ "player1_left.moving.xpos", "0" },
{ "player1_left.moving.ypos", "1" },
{ "player1_left.moving.frames", "4" },
+ { "player1_left.moving.start_frame", "1" },
+ { "player1_left.moving.delay", "4" },
{ "player1_left.digging", "RocksHeroes.pcx" },
{ "player1_left.digging.xpos", "0" },
{ "player1_left.digging.ypos", "1" },
{ "player1_left.pushing.xpos", "4" },
{ "player1_left.pushing.ypos", "2" },
{ "player1_left.pushing.frames", "4" },
+ { "player1_left.pushing.delay", "2" },
{ "player1_left.snapping", "RocksHeroes.pcx" },
{ "player1_left.snapping.xpos", "0" },
{ "player1_left.snapping.ypos", "1" },
{ "player1_right.moving.xpos", "4" },
{ "player1_right.moving.ypos", "1" },
{ "player1_right.moving.frames", "4" },
+ { "player1_right.moving.delay", "4" },
+ { "player1_right.moving.start_frame", "1" },
{ "player1_right.digging", "RocksHeroes.pcx" },
{ "player1_right.digging.xpos", "4" },
{ "player1_right.digging.ypos", "1" },
{ "player1_right.pushing.xpos", "0" },
{ "player1_right.pushing.ypos", "2" },
{ "player1_right.pushing.frames", "4" },
+ { "player1_right.pushing.delay", "2" },
{ "player1_right.snapping", "RocksHeroes.pcx" },
{ "player1_right.snapping.xpos", "4" },
{ "player1_right.snapping.ypos", "1" },
{ "player2_down.digging.frames", "4" },
{ "player2_down.pushing", "RocksHeroes.pcx" },
{ "player2_down.pushing.xpos", "0" },
- { "player2_down.pushing.ypos", "5" },
+ { "player2_down.pushing.ypos", "3" },
{ "player2_down.pushing.frames", "4" },
{ "player2_down.snapping", "RocksHeroes.pcx" },
{ "player2_down.snapping.xpos", "0" },
{ "player3_down.digging.frames", "4" },
{ "player3_down.pushing", "RocksHeroes.pcx" },
{ "player3_down.pushing.xpos", "0" },
- { "player3_down.pushing.ypos", "8" },
+ { "player3_down.pushing.ypos", "6" },
{ "player3_down.pushing.frames", "4" },
{ "player3_down.snapping", "RocksHeroes.pcx" },
{ "player3_down.snapping.xpos", "0" },
{ "player4_down.digging.frames", "4" },
{ "player4_down.pushing", "RocksHeroes.pcx" },
{ "player4_down.pushing.xpos", "0" },
- { "player4_down.pushing.ypos", "11" },
+ { "player4_down.pushing.ypos", "9" },
{ "player4_down.pushing.frames", "4" },
{ "player4_down.snapping", "RocksHeroes.pcx" },
{ "player4_down.snapping.xpos", "0" },
#define GFX_ARG_OFFSET 2
#define GFX_ARG_VERTICAL 3
#define GFX_ARG_FRAMES 4
-#define GFX_ARG_DELAY 5
-#define GFX_ARG_MODE_LOOP 6
-#define GFX_ARG_MODE_LINEAR 7
-#define GFX_ARG_MODE_PINGPONG 8
-#define GFX_ARG_MODE_PINGPONG2 9
-#define GFX_ARG_MODE_REVERSE 10
-#define GFX_ARG_GLOBAL_SYNC 11
+#define GFX_ARG_START_FRAME 5
+#define GFX_ARG_DELAY 6
+#define GFX_ARG_MODE_LOOP 7
+#define GFX_ARG_MODE_LINEAR 8
+#define GFX_ARG_MODE_PINGPONG 9
+#define GFX_ARG_MODE_PINGPONG2 10
+#define GFX_ARG_MODE_REVERSE 11
+#define GFX_ARG_GLOBAL_SYNC 12
/* values for sound configuration suffixes */
/* (currently none) */
int src_x, src_y; /* derived from (tile sized) .xpos/.ypos */
int offset_x, offset_y; /* x/y offset to next animation frame */
int anim_frames;
+ int anim_start_frame;
int anim_delay; /* important: delay of 1 means "no delay"! */
int anim_mode;
boolean anim_global_sync;
graphic == IMG_ARROW_BLUE_RIGHT ? IMG_ARROW_RED_RIGHT :
IMG_BALL_RED);
- DrawNewGraphic(0, MENU_SCREEN_START_YPOS + pos, graphic, 0);
+ DrawGraphic(0, MENU_SCREEN_START_YPOS + pos, graphic, 0);
}
static void initCursor(int pos, int graphic)
for(i=0; i<8; i++)
initCursor(i, (i == 1 || i == 6 ? IMG_ARROW_BLUE_RIGHT : IMG_BALL_BLUE));
- DrawNewGraphic(10, 3, IMG_ARROW_BLUE_LEFT, 0);
- DrawNewGraphic(14, 3, IMG_ARROW_BLUE_RIGHT, 0);
+ DrawGraphic(10, 3, IMG_ARROW_BLUE_LEFT, 0);
+ DrawGraphic(14, 3, IMG_ARROW_BLUE_RIGHT, 0);
DrawText(SX + 56, SY + 326, "A Game by Artsoft Entertainment",
FS_SMALL, FC_RED);
{
xpos = newxpos;
DrawText(SX + 6*32, SY + ypos*32, setup.player_name, FS_BIG, FC_YELLOW);
- DrawNewGraphic(xpos + 6, ypos, IMG_BALL_RED, 0);
+ DrawGraphic(xpos + 6, ypos, IMG_BALL_RED, 0);
return;
}
setup.player_name, FS_BIG, FC_YELLOW);
DrawTextExt(window, SX + 6*32, SY + ypos*32,
setup.player_name, FS_BIG, FC_YELLOW);
- DrawNewGraphic(xpos + 6, ypos, IMG_BALL_RED, 0);
+ DrawGraphic(xpos + 6, ypos, IMG_BALL_RED, 0);
}
else if ((key == KSYM_Delete || key == KSYM_BackSpace) && xpos > 0)
{
xpos--;
setup.player_name[xpos] = 0;
- DrawNewGraphic(xpos + 6, ypos, IMG_BALL_RED, 0);
- DrawNewGraphic(xpos + 7, ypos, IMG_EMPTY, 0);
+ DrawGraphic(xpos + 6, ypos, IMG_BALL_RED, 0);
+ DrawGraphic(xpos + 7, ypos, IMG_EMPTY, 0);
}
else if (key == KSYM_Return && xpos > 0)
{
DrawText(SX + 6*32, SY + ypos*32, setup.player_name, FS_BIG, FC_RED);
- DrawNewGraphic(xpos + 6, ypos, IMG_EMPTY, 0);
+ DrawGraphic(xpos + 6, ypos, IMG_EMPTY, 0);
SaveSetup();
game_status = MAINMENU;
}
if (first_entry > 0)
- DrawNewGraphic(0, 1, IMG_ARROW_BLUE_UP, 0);
+ DrawGraphic(0, 1, IMG_ARROW_BLUE_UP, 0);
if (first_entry + num_page_entries < num_entries)
- DrawNewGraphic(0, MAX_MENU_ENTRIES_ON_SCREEN + 1, IMG_ARROW_BLUE_DOWN, 0);
+ DrawGraphic(0, MAX_MENU_ENTRIES_ON_SCREEN + 1, IMG_ARROW_BLUE_DOWN, 0);
}
static void drawChooseTreeInfo(int entry_pos, TreeInfo *ti)
initCursor(2, IMG_ARROW_BLUE_RIGHT);
initCursor(13, IMG_ARROW_BLUE_LEFT);
- DrawNewGraphic(10, MENU_SCREEN_START_YPOS, IMG_ARROW_BLUE_LEFT, 0);
- DrawNewGraphic(12, MENU_SCREEN_START_YPOS, IMG_ARROW_BLUE_RIGHT, 0);
+ DrawGraphic(10, MENU_SCREEN_START_YPOS, IMG_ARROW_BLUE_LEFT, 0);
+ DrawGraphic(12, MENU_SCREEN_START_YPOS, IMG_ARROW_BLUE_RIGHT, 0);
DrawText(SX+32, SY+2*32, "Player:", FS_BIG, FC_GREEN);
DrawText(SX+32, SY+3*32, "Device:", FS_BIG, FC_GREEN);
custom_key = setup.input[player_nr].key;
DrawText(SX+11*32, SY+2*32, int2str(player_nr + 1, 1), FS_BIG, FC_RED);
- DrawNewGraphic(8, 2, PLAYER_NR_GFX(IMG_PLAYER1, player_nr), 0);
+ DrawGraphic(8, 2, PLAYER_NR_GFX(IMG_PLAYER1, player_nr), 0);
if (setup.input[player_nr].use_joystick)
{
}
DrawText(SX+32, SY+5*32, "Actual Settings:", FS_BIG, FC_GREEN);
- DrawNewGraphic(1, 6, IMG_ARROW_BLUE_LEFT, 0);
- DrawNewGraphic(1, 7, IMG_ARROW_BLUE_RIGHT, 0);
- DrawNewGraphic(1, 8, IMG_ARROW_BLUE_UP, 0);
- DrawNewGraphic(1, 9, IMG_ARROW_BLUE_DOWN, 0);
+ DrawGraphic(1, 6, IMG_ARROW_BLUE_LEFT, 0);
+ DrawGraphic(1, 7, IMG_ARROW_BLUE_RIGHT, 0);
+ DrawGraphic(1, 8, IMG_ARROW_BLUE_UP, 0);
+ DrawGraphic(1, 9, IMG_ARROW_BLUE_DOWN, 0);
DrawText(SX+2*32, SY+6*32, ":", FS_BIG, FC_BLUE);
DrawText(SX+2*32, SY+7*32, ":", FS_BIG, FC_BLUE);
DrawText(SX+2*32, SY+8*32, ":", FS_BIG, FC_BLUE);
for(x=0; x<3; x++)
{
check[x][y] = FALSE;
- DrawNewGraphic(xpos + x - 1, ypos + y - 1, IMG_BALL_BLUE, 0);
+ DrawGraphic(xpos + x - 1, ypos + y - 1, IMG_BALL_BLUE, 0);
}
}
new_joystick_xmiddle = joy_x;
new_joystick_ymiddle = joy_y;
- DrawNewGraphic(xpos + last_x, ypos + last_y, IMG_BALL_RED, 0);
+ DrawGraphic(xpos + last_x, ypos + last_y, IMG_BALL_RED, 0);
BackToFront();
while(Joystick(player_nr) & JOY_BUTTON); /* wait for released button */
if (x != last_x || y != last_y)
{
- DrawNewGraphic(xpos + last_x, ypos + last_y, IMG_BALL_YELLOW, 0);
- DrawNewGraphic(xpos + x, ypos + y, IMG_BALL_RED, 0);
+ DrawGraphic(xpos + last_x, ypos + last_y, IMG_BALL_YELLOW, 0);
+ DrawGraphic(xpos + x, ypos + y, IMG_BALL_RED, 0);
last_x = x;
last_y = y;
for(xx=BX1; xx<=BX2; xx++)
for(yy=BY1; yy<=BY2; yy++)
if (xx >= x1 && xx <= x2 && yy >= y1 && yy <= y2)
- DrawNewScreenField(xx, yy);
+ DrawScreenField(xx, yy);
DrawAllPlayers();
if (setup.direct_draw)
{
if (Store[last_jx][last_jy] && IS_DRAWABLE(last_element))
{
- DrawNewLevelElement(last_jx, last_jy, Store[last_jx][last_jy]);
+ DrawLevelElement(last_jx, last_jy, Store[last_jx][last_jy]);
if (last_element == EL_DYNAMITE_ACTIVE)
DrawDynamite(last_jx, last_jy);
else
- DrawNewLevelFieldThruMask(last_jx, last_jy);
+ DrawLevelFieldThruMask(last_jx, last_jy);
}
else if (last_element == EL_DYNAMITE_ACTIVE)
DrawDynamite(last_jx, last_jy);
else
- DrawNewLevelField(last_jx, last_jy);
+ DrawLevelField(last_jx, last_jy);
if (player->Pushing && IN_SCR_FIELD(SCREENX(next_jx), SCREENY(next_jy)))
{
if (player->GfxPos)
{
if (Feld[next_jx][next_jy] == EL_SOKOBAN_FIELD_FULL)
- DrawNewLevelElement(next_jx, next_jy, EL_SOKOBAN_FIELD_EMPTY);
+ DrawLevelElement(next_jx, next_jy, EL_SOKOBAN_FIELD_EMPTY);
else
- DrawNewLevelElement(next_jx, next_jy, EL_EMPTY);
+ DrawLevelElement(next_jx, next_jy, EL_EMPTY);
}
else
- DrawNewLevelField(next_jx, next_jy);
+ DrawLevelField(next_jx, next_jy);
}
}
/* draw things behind the player, if needed */
if (Store[jx][jy])
- DrawNewLevelElement(jx, jy, Store[jx][jy]);
+ DrawLevelElement(jx, jy, Store[jx][jy]);
else if (!IS_ACTIVE_BOMB(element))
- DrawNewLevelField(jx, jy);
+ DrawLevelField(jx, jy);
else
- DrawNewLevelElement(jx, jy, EL_EMPTY);
+ DrawLevelElement(jx, jy, EL_EMPTY);
/* draw player himself */
else
graphic = IMG_SP_MURPHY_LEFT_MOVING;
- frame = getNewGraphicAnimationFrame(graphic, -1);
+ frame = getGraphicAnimationFrame(graphic, -1);
}
if (player->MovDir == MV_LEFT || player->MovDir == MV_RIGHT)
{
if (player->MovDir == MV_LEFT)
graphic = (player->Pushing ? IMG_PLAYER1_LEFT_PUSHING :
- IMG_PLAYER1_LEFT_MOVING);
+ player->is_moving ? IMG_PLAYER1_LEFT_MOVING :
+ IMG_PLAYER1_LEFT);
else if (player->MovDir == MV_RIGHT)
graphic = (player->Pushing ? IMG_PLAYER1_RIGHT_PUSHING :
- IMG_PLAYER1_RIGHT_MOVING);
+ player->is_moving ? IMG_PLAYER1_RIGHT_MOVING :
+ IMG_PLAYER1_RIGHT);
else if (player->MovDir == MV_UP)
graphic = (player->Pushing ? IMG_PLAYER1_UP_PUSHING :
- IMG_PLAYER1_UP_MOVING);
+ player->is_moving ? IMG_PLAYER1_UP_MOVING :
+ IMG_PLAYER1_UP);
else /* MV_DOWN || MV_NO_MOVING */
graphic = (player->Pushing ? IMG_PLAYER1_DOWN_PUSHING :
- IMG_PLAYER1_DOWN_MOVING);
+ player->is_moving ? IMG_PLAYER1_DOWN_MOVING :
+ IMG_PLAYER1_DOWN);
graphic = PLAYER_NR_GFX(graphic, player->index_nr);
+#if 0
frame = player->Frame;
+#else
+ frame = getGraphicAnimationFrame(graphic, player->Frame);
+#endif
}
if (player->GfxPos)
if (!setup.soft_scrolling && ScreenMovPos)
sxx = syy = 0;
- DrawNewGraphicShiftedThruMask(sx, sy, sxx, syy, graphic, frame, NO_CUTTING);
+#if 0
+ if (player->Frame)
+ printf("-> %d\n", player->Frame);
+#endif
+
+ DrawGraphicShiftedThruMask(sx, sy, sxx, syy, graphic, frame, NO_CUTTING);
if (SHIELD_ON(player))
{
int graphic = (player->shield_deadly_time_left ? IMG_SHIELD_DEADLY_ACTIVE :
IMG_SHIELD_NORMAL_ACTIVE);
- int frame = getNewGraphicAnimationFrame(graphic, -1);
+ int frame = getGraphicAnimationFrame(graphic, -1);
- DrawNewGraphicShiftedThruMask(sx, sy, sxx, syy, graphic, frame, NO_CUTTING);
+ DrawGraphicShiftedThruMask(sx, sy, sxx, syy, graphic, frame, NO_CUTTING);
}
+#if 0
if (player->Pushing && player->GfxPos)
+#else
+ if (player->Pushing && player_is_moving)
+#endif
{
int px = SCREENX(next_jx), py = SCREENY(next_jy);
if (element == EL_SOKOBAN_FIELD_EMPTY ||
Feld[next_jx][next_jy] == EL_SOKOBAN_FIELD_FULL)
- DrawNewGraphicShiftedThruMask(px, py, sxx, syy, GFX_SOKOBAN_OBJEKT, 0,
+ DrawGraphicShiftedThruMask(px, py, sxx, syy, GFX_SOKOBAN_OBJEKT, 0,
NO_CUTTING);
else
{
int element = Feld[next_jx][next_jy];
int graphic = el2img(element);
+#if 1
int frame = 0;
+#endif
if ((element == EL_ROCK ||
- element == EL_SP_ZONK ||
- element == EL_BD_ROCK) && sxx)
+ element == EL_BD_ROCK ||
+ element == EL_SP_ZONK) && sxx)
{
- graphic = el_dir_act2img(element, player->MovDir, GFX_ACTION_PUSHING);
- frame = getNewGraphicAnimationFrame(graphic, player->GfxPos);
+ graphic = el_dir_act2img(element, player->MovDir, GFX_ACTION_MOVING);
+#if 1
+ frame = getGraphicAnimationFrame(graphic, player->GfxPos);
+
+ frame = getGraphicAnimationFrame(graphic, player->Frame);
+#endif
+
+#if 0
+ printf("-> %d [%d]\n", player->Frame, player->GfxPos);
+#endif
+#if 0
/* !!! FIX !!! */
if (player->MovDir == MV_LEFT)
frame = 3 - frame;
+#endif
#if 0
frame = (player->GfxPos / (TILEX / 4));
#endif
}
- DrawNewGraphicShifted(px, py, sxx, syy, graphic, frame,
- NO_CUTTING, NO_MASKING);
+ DrawGraphicShifted(px, py, sxx, syy, graphic, frame,
+ NO_CUTTING, NO_MASKING);
}
}
frame = 7 - frame;
}
#else
- frame = getNewGraphicAnimationFrame(graphic, 96 - MovDelay[jx][jy]);
+ frame = getGraphicAnimationFrame(graphic, 96 - MovDelay[jx][jy]);
#endif
if (game.emulation == EMU_SUPAPLEX)
- DrawNewGraphic(sx, sy, GFX_SP_DISK_RED, 0);
+ DrawGraphic(sx, sy, GFX_SP_DISK_RED, 0);
else
- DrawNewGraphicThruMask(sx, sy, graphic, frame);
+ DrawGraphicThruMask(sx, sy, graphic, frame);
}
if (player_is_moving && last_element == EL_EXPLOSION)
int delay = 2;
if (frame > 2)
- DrawNewGraphicThruMask(SCREENX(last_jx), SCREENY(last_jy),
- GFX_EXPLOSION, ((frame - 1) / delay - 1));
+ DrawGraphicThruMask(SCREENX(last_jx), SCREENY(last_jy), GFX_EXPLOSION,
+ ((frame - 1) / delay - 1));
}
/* draw elements that stay over the player */
/* handle the field the player is leaving ... */
if (player_is_moving && IS_OVER_PLAYER(last_element))
- DrawNewLevelField(last_jx, last_jy);
+ DrawLevelField(last_jx, last_jy);
/* ... and the field the player is entering */
if (IS_OVER_PLAYER(element))
- DrawNewLevelField(jx, jy);
+ DrawLevelField(jx, jy);
if (setup.direct_draw)
{
return phase;
}
-int getNewGraphicAnimationFrame(int graphic, int sync_frame)
+int getGraphicAnimationFrame(int graphic, int sync_frame)
{
int num_frames = new_graphic_info[graphic].anim_frames;
int delay = new_graphic_info[graphic].anim_delay;
if (new_graphic_info[graphic].anim_global_sync || sync_frame < 0)
sync_frame = FrameCounter;
+ sync_frame += new_graphic_info[graphic].anim_start_frame * delay;
+
if (mode & ANIM_LOOP) /* normal, looping animation */
{
frame = (sync_frame % (delay * num_frames)) / delay;
return frame;
}
-void DrawNewGraphicAnimationExt(int x, int y, int graphic, int mask_mode)
+void DrawGraphicAnimationExt(int x, int y, int graphic, int mask_mode)
{
#if 0
int delay = new_graphic_info[graphic].anim_delay;
if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
#endif
{
- int frame = getNewGraphicAnimationFrame(graphic, -1);
+ int frame = getGraphicAnimationFrame(graphic, -1);
if (mask_mode == USE_MASKING)
- DrawNewGraphicThruMask(SCREENX(x), SCREENY(y), graphic, frame);
+ DrawGraphicThruMask(SCREENX(x), SCREENY(y), graphic, frame);
else
- DrawNewGraphic(SCREENX(x), SCREENY(y), graphic, frame);
+ DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
}
}
}
#endif
-void DrawNewGraphicAnimation(int x, int y, int graphic)
+void DrawGraphicAnimation(int x, int y, int graphic)
{
- DrawNewGraphicAnimationExt(x, y, graphic, NO_MASKING);
+ DrawGraphicAnimationExt(x, y, graphic, NO_MASKING);
}
#if 1
}
#endif
-void DrawNewGraphic(int x, int y, int graphic, int frame)
+void DrawGraphic(int x, int y, int graphic, int frame)
{
#if DEBUG
if (!IN_SCR_FIELD(x, y))
{
- printf("DrawNewGraphic(): x = %d, y = %d, graphic = %d\n", x, y, graphic);
- printf("DrawNewGraphic(): This should never happen!\n");
+ printf("DrawGraphic(): x = %d, y = %d, graphic = %d\n", x, y, graphic);
+ printf("DrawGraphic(): This should never happen!\n");
return;
}
#endif
- DrawNewGraphicExt(drawto_field, FX + x * TILEX, FY + y * TILEY,
- graphic, frame);
+ DrawGraphicExt(drawto_field, FX + x * TILEX, FY + y * TILEY, graphic, frame);
MarkTileDirty(x, y);
}
BlitBitmap(src_bitmap, dst_bitmap, src_x, src_y, TILEX, TILEY, x, y);
}
-void DrawNewGraphicExt(DrawBuffer *dst_bitmap, int x, int y, int graphic,
- int frame)
+void DrawGraphicExt(DrawBuffer *dst_bitmap, int x, int y, int graphic,
+ int frame)
{
Bitmap *src_bitmap = new_graphic_info[graphic].bitmap;
int src_x = new_graphic_info[graphic].src_x;
BlitBitmap(src_bitmap, dst_bitmap, src_x, src_y, TILEX, TILEY, x, y);
}
-void DrawNewGraphicThruMask(int x, int y, int graphic, int frame)
+void DrawGraphicThruMask(int x, int y, int graphic, int frame)
{
#if DEBUG
if (!IN_SCR_FIELD(x, y))
}
#endif
- DrawNewGraphicThruMaskExt(drawto_field, FX + x * TILEX, FY + y *TILEY,
- graphic, frame);
+ DrawGraphicThruMaskExt(drawto_field, FX + x * TILEX, FY + y *TILEY, graphic,
+ frame);
MarkTileDirty(x, y);
}
-void DrawNewGraphicThruMaskExt(DrawBuffer *d, int dest_x, int dest_y,
- int graphic, int frame)
+void DrawGraphicThruMaskExt(DrawBuffer *d, int dest_x, int dest_y, int graphic,
+ int frame)
{
Bitmap *src_bitmap = new_graphic_info[graphic].bitmap;
GC drawing_gc = src_bitmap->stored_clip_gc;
BlitBitmapMasked(src_bitmap, d, src_x, src_y, TILEX, TILEY, dest_x, dest_y);
}
-void DrawNewMiniGraphic(int x, int y, int graphic)
+void DrawMiniGraphic(int x, int y, int graphic)
{
- DrawNewMiniGraphicExt(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);
}
-void getNewMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
+void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
{
Bitmap *src_bitmap = new_graphic_info[graphic].bitmap;
int mini_startx = 0;
*y = src_y;
}
-void DrawNewMiniGraphicExt(DrawBuffer *d, int x, int y, int graphic)
+void DrawMiniGraphicExt(DrawBuffer *d, int x, int y, int graphic)
{
Bitmap *src_bitmap;
int src_x, src_y;
- getNewMiniGraphicSource(graphic, &src_bitmap, &src_x, &src_y);
+ getMiniGraphicSource(graphic, &src_bitmap, &src_x, &src_y);
BlitBitmap(src_bitmap, d, src_x, src_y, MINI_TILEX, MINI_TILEY, x, y);
}
-void DrawNewGraphicShifted(int x,int y, int dx,int dy, int graphic, int frame,
+void DrawGraphicShifted(int x,int y, int dx,int dy, int graphic, int frame,
int cut_mode, int mask_mode)
{
Bitmap *src_bitmap;
if (graphic < 0)
{
- DrawNewGraphic(x, y, graphic, frame);
+ DrawGraphic(x, y, graphic, frame);
return;
}
MarkTileDirty(x,y);
}
-void DrawNewGraphicShiftedThruMask(int x,int y, int dx,int dy, int graphic,
- int frame, int cut_mode)
+void DrawGraphicShiftedThruMask(int x,int y, int dx,int dy, int graphic,
+ int frame, int cut_mode)
{
- DrawNewGraphicShifted(x,y, dx,dy, graphic, frame, cut_mode, USE_MASKING);
+ DrawGraphicShifted(x,y, dx,dy, graphic, frame, cut_mode, USE_MASKING);
}
#if 0
return gfx_action;
}
-void DrawNewScreenElementExt(int x, int y, int dx, int dy, int element,
- int cut_mode, int mask_mode)
+void DrawScreenElementExt(int x, int y, int dx, int dy, int element,
+ int cut_mode, int mask_mode)
{
int ux = LEVELX(x), uy = LEVELY(y);
int move_dir = MovDir[ux][uy];
int move_pos = getFramePosition(ux, uy);
int gfx_action = getGfxAction(ux, uy);
int graphic = el_dir_act2img(element, move_dir, gfx_action);
- int frame = getNewGraphicAnimationFrame(graphic, move_pos);
+ int frame = getGraphicAnimationFrame(graphic, move_pos);
if (element == EL_WALL_GROWING)
{
}
if (dx || dy)
- DrawNewGraphicShifted(x, y, dx, dy, graphic, frame, cut_mode, mask_mode);
+ DrawGraphicShifted(x, y, dx, dy, graphic, frame, cut_mode, mask_mode);
else if (mask_mode == USE_MASKING)
- DrawNewGraphicThruMask(x, y, graphic, frame);
+ DrawGraphicThruMask(x, y, graphic, frame);
else
- DrawNewGraphic(x, y, graphic, frame);
+ DrawGraphic(x, y, graphic, frame);
}
-void DrawNewLevelElementExt(int x, int y, int dx, int dy, int element,
+void DrawLevelElementExt(int x, int y, int dx, int dy, int element,
int cut_mode, int mask_mode)
{
if (IN_LEV_FIELD(x, y) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
- DrawNewScreenElementExt(SCREENX(x), SCREENY(y), dx, dy, element,
+ DrawScreenElementExt(SCREENX(x), SCREENY(y), dx, dy, element,
cut_mode, mask_mode);
}
-void DrawNewScreenElementShifted(int x, int y, int dx, int dy, int element,
+void DrawScreenElementShifted(int x, int y, int dx, int dy, int element,
int cut_mode)
{
- DrawNewScreenElementExt(x, y, dx, dy, element, cut_mode, NO_MASKING);
+ DrawScreenElementExt(x, y, dx, dy, element, cut_mode, NO_MASKING);
}
-void DrawNewLevelElementShifted(int x, int y, int dx, int dy, int element,
+void DrawLevelElementShifted(int x, int y, int dx, int dy, int element,
int cut_mode)
{
- DrawNewLevelElementExt(x, y, dx, dy, element, cut_mode, NO_MASKING);
+ DrawLevelElementExt(x, y, dx, dy, element, cut_mode, NO_MASKING);
}
#if 0
-void DrawScreenElementThruMask(int x, int y, int element)
+void DrawOldScreenElementThruMask(int x, int y, int element)
{
- DrawScreenElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
+ DrawOldScreenElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
}
-void DrawNewScreenElementThruMask(int x, int y, int element)
+void DrawScreenElementThruMask(int x, int y, int element)
{
- DrawNewScreenElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
+ DrawScreenElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
}
#endif
-void DrawNewLevelElementThruMask(int x, int y, int element)
+void DrawLevelElementThruMask(int x, int y, int element)
{
- DrawNewLevelElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
+ DrawLevelElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
}
-void DrawNewLevelFieldThruMask(int x, int y)
+void DrawLevelFieldThruMask(int x, int y)
{
- DrawNewLevelElementExt(x, y, 0, 0, Feld[x][y], NO_CUTTING, USE_MASKING);
+ DrawLevelElementExt(x, y, 0, 0, Feld[x][y], NO_CUTTING, USE_MASKING);
}
void DrawCrumbledSand(int x, int y)
}
}
-void DrawNewScreenElement(int x, int y, int element)
+void DrawScreenElement(int x, int y, int element)
{
- DrawNewScreenElementExt(x, y, 0, 0, element, NO_CUTTING, NO_MASKING);
+ DrawScreenElementExt(x, y, 0, 0, element, NO_CUTTING, NO_MASKING);
DrawCrumbledSand(x, y);
}
-void DrawNewLevelElement(int x, int y, int element)
+void DrawLevelElement(int x, int y, int element)
{
if (IN_LEV_FIELD(x, y) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
- DrawNewScreenElement(SCREENX(x), SCREENY(y), element);
+ DrawScreenElement(SCREENX(x), SCREENY(y), element);
}
-void DrawNewScreenField(int x, int y)
+void DrawScreenField(int x, int y)
{
int ux = LEVELX(x), uy = LEVELY(y);
int element, content;
else
element = BorderElement;
- DrawNewScreenElement(x, y, element);
+ DrawScreenElement(x, y, element);
return;
}
cut_mode = CUT_BELOW;
if (cut_mode == CUT_ABOVE)
- DrawNewScreenElementShifted(x, y, 0, 0, element, NO_CUTTING);
+ DrawScreenElementShifted(x, y, 0, 0, element, NO_CUTTING);
else
- DrawNewScreenElement(x, y, EL_EMPTY);
+ DrawScreenElement(x, y, EL_EMPTY);
if (horiz_move)
- DrawNewScreenElementShifted(x, y, MovPos[ux][uy], 0, element, NO_CUTTING);
+ DrawScreenElementShifted(x, y, MovPos[ux][uy], 0, element, NO_CUTTING);
else if (cut_mode == NO_CUTTING)
- DrawNewScreenElementShifted(x, y, 0, MovPos[ux][uy], element, cut_mode);
+ DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], element, cut_mode);
else
- DrawNewScreenElementShifted(x, y, 0, MovPos[ux][uy], content, cut_mode);
+ DrawScreenElementShifted(x, y, 0, MovPos[ux][uy], content, cut_mode);
if (content == EL_ACID)
- DrawNewLevelElementThruMask(ux, uy + 1, EL_ACID);
+ DrawLevelElementThruMask(ux, uy + 1, EL_ACID);
}
else if (IS_BLOCKED(ux, uy))
{
element_old == EL_AMOEBA_DRIPPING)
cut_mode = CUT_ABOVE;
- DrawNewScreenElement(x, y, EL_EMPTY);
+ DrawScreenElement(x, y, EL_EMPTY);
if (horiz_move)
- DrawNewScreenElementShifted(sx, sy, MovPos[oldx][oldy], 0, element_old,
+ DrawScreenElementShifted(sx, sy, MovPos[oldx][oldy], 0, element_old,
NO_CUTTING);
else if (cut_mode == NO_CUTTING)
- DrawNewScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], element_old,
+ DrawScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], element_old,
cut_mode);
else
- DrawNewScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], content_old,
+ DrawScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], content_old,
cut_mode);
}
else if (IS_DRAWABLE(element))
- DrawNewScreenElement(x, y, element);
+ DrawScreenElement(x, y, element);
else
- DrawNewScreenElement(x, y, EL_EMPTY);
+ DrawScreenElement(x, y, EL_EMPTY);
}
-void DrawNewLevelField(int x, int y)
+void DrawLevelField(int x, int y)
{
if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
- DrawNewScreenField(SCREENX(x), SCREENY(y));
+ DrawScreenField(SCREENX(x), SCREENY(y));
else if (IS_MOVING(x, y))
{
int newx,newy;
Moving2Blocked(x, y, &newx, &newy);
if (IN_SCR_FIELD(SCREENX(newx), SCREENY(newy)))
- DrawNewScreenField(SCREENX(newx), SCREENY(newy));
+ DrawScreenField(SCREENX(newx), SCREENY(newy));
}
else if (IS_BLOCKED(x, y))
{
Blocked2Moving(x, y, &oldx, &oldy);
if (IN_SCR_FIELD(SCREENX(oldx), SCREENY(oldy)))
- DrawNewScreenField(SCREENX(oldx), SCREENY(oldy));
+ DrawScreenField(SCREENX(oldx), SCREENY(oldy));
}
}
-void DrawNewMiniElement(int x, int y, int element)
+void DrawMiniElement(int x, int y, int element)
{
int graphic;
graphic = el2img(element);
- DrawNewMiniGraphic(x, y, graphic);
+ DrawMiniGraphic(x, y, graphic);
}
-void DrawNewMiniElementOrWall(int sx, int sy, int scroll_x, int scroll_y)
+void DrawMiniElementOrWall(int sx, int sy, int scroll_x, int scroll_y)
{
int x = sx + scroll_x, y = sy + scroll_y;
if (x < -1 || x > lev_fieldx || y < -1 || y > lev_fieldy)
- DrawNewMiniElement(sx, sy, EL_EMPTY);
+ DrawMiniElement(sx, sy, EL_EMPTY);
else if (x > -1 && x < lev_fieldx && y > -1 && y < lev_fieldy)
- DrawNewMiniElement(sx, sy, Feld[x][y]);
+ DrawMiniElement(sx, sy, Feld[x][y]);
else
{
int steel_type, steel_position;
y == -1 || y == lev_fieldy ? 5 : -1);
if (steel_position != -1)
- DrawNewMiniGraphic(sx, sy, border[steel_position][steel_type]);
+ DrawMiniGraphic(sx, sy, border[steel_position][steel_type]);
}
}
-void getNewMicroGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
+void getMicroGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
{
Bitmap *src_bitmap = new_graphic_info[graphic].bitmap;
int mini_startx = src_bitmap->width * 3 / 4;
*y = src_y;
}
-void DrawNewMicroElement(int xpos, int ypos, int element)
+void DrawMicroElement(int xpos, int ypos, int element)
{
Bitmap *src_bitmap;
int src_x, src_y;
graphic = el2img(element);
- getNewMicroGraphicSource(graphic, &src_bitmap, &src_x, &src_y);
+ getMicroGraphicSource(graphic, &src_bitmap, &src_x, &src_y);
BlitBitmap(src_bitmap, drawto, src_x, src_y, MICRO_TILEX, MICRO_TILEY,
xpos, ypos);
}
for(x=BX1; x<=BX2; x++)
for(y=BY1; y<=BY2; y++)
- DrawNewScreenField(x, y);
+ DrawScreenField(x, y);
redraw_mask |= REDRAW_FIELD;
}
-void DrawNewMiniLevel(int size_x, int size_y, int scroll_x, int scroll_y)
+void DrawMiniLevel(int size_x, int size_y, int scroll_x, int scroll_y)
{
int x,y;
for(x=0; x<size_x; x++)
for(y=0; y<size_y; y++)
- DrawNewMiniElementOrWall(x, y, scroll_x, scroll_y);
+ DrawMiniElementOrWall(x, y, scroll_x, scroll_y);
redraw_mask |= REDRAW_FIELD;
}
-static void DrawNewMicroLevelExt(int xpos, int ypos, int from_x, int from_y)
+static void DrawMicroLevelExt(int xpos, int ypos, int from_x, int from_y)
{
int x, y;
int lx = from_x + x, ly = from_y + y;
if (lx >= 0 && lx < lev_fieldx && ly >= 0 && ly < lev_fieldy)
- DrawNewMicroElement(xpos + x * MICRO_TILEX, ypos + y * MICRO_TILEY,
- Ur[lx][ly]);
+ DrawMicroElement(xpos + x * MICRO_TILEX, ypos + y * MICRO_TILEY,
+ Ur[lx][ly]);
else if (lx >= -1 && lx < lev_fieldx+1 && ly >= -1 && ly < lev_fieldy+1)
- DrawNewMicroElement(xpos + x * MICRO_TILEX, ypos + y * MICRO_TILEY,
- BorderElement);
+ DrawMicroElement(xpos + x * MICRO_TILEX, ypos + y * MICRO_TILEY,
+ BorderElement);
}
}
label_state = 1;
label_counter = 0;
- DrawNewMicroLevelExt(xpos, ypos, from_x, from_y);
+ DrawMicroLevelExt(xpos, ypos, from_x, from_y);
DrawMicroLevelLabelExt(label_state);
/* initialize delay counters */
break;
}
- DrawNewMicroLevelExt(xpos, ypos, from_x, from_y);
+ DrawMicroLevelExt(xpos, ypos, from_x, from_y);
}
/* redraw micro level label, if needed */
{
int player_nr = id - TOOL_CTRL_ID_PLAYER_1;
- getNewMiniGraphicSource(PLAYER_NR_GFX(IMG_PLAYER1, player_nr),
- &deco_bitmap, &deco_x, &deco_y);
+ getMiniGraphicSource(PLAYER_NR_GFX(IMG_PLAYER1, player_nr),
+ &deco_bitmap, &deco_x, &deco_y);
deco_xpos = (toolbutton_info[i].width - MINI_TILEX) / 2;
deco_ypos = (toolbutton_info[i].height - MINI_TILEY) / 2;
}
void DrawAllPlayers(void);
void DrawPlayerField(int, int);
void DrawPlayer(struct PlayerInfo *);
-int getNewGraphicAnimationFrame(int, int);
-void DrawNewGraphicAnimation(int, int, int);
-void DrawNewGraphic(int, int, int, int);
+int getGraphicAnimationFrame(int, int);
+void DrawGraphicAnimation(int, int, int);
+void DrawGraphic(int, int, int, int);
void DrawOldGraphicExt(DrawBuffer *, int, int, int);
-void DrawNewGraphicExt(DrawBuffer *, int, int, int, int);
-void DrawNewGraphicThruMask(int, int, int, int);
-void DrawNewGraphicThruMaskExt(DrawBuffer *, int, int, int, int);
-void DrawNewMiniGraphic(int, int, int);
-void getNewMiniGraphicSource(int, Bitmap **, int *, int *);
-void DrawNewMiniGraphicExt(DrawBuffer *, int, int, int);
-void DrawNewGraphicShifted(int, int, int, int, int, int, int, int);
-void DrawNewGraphicShiftedThruMask(int, int, int, int, int, int, int);
-void DrawNewScreenElementExt(int, int, int, int, int, int, int);
-void DrawNewLevelElementExt(int, int, int, int, int, int, int);
-void DrawNewScreenElementShifted(int, int, int, int, int, int);
-void DrawNewLevelElementShifted(int, int, int, int, int, int);
-void DrawNewScreenElementThruMask(int, int, int);
-void DrawNewLevelElementThruMask(int, int, int);
-void DrawNewLevelFieldThruMask(int, int);
+void DrawGraphicExt(DrawBuffer *, int, int, int, int);
+void DrawGraphicThruMask(int, int, int, int);
+void DrawGraphicThruMaskExt(DrawBuffer *, int, int, int, int);
+void DrawMiniGraphic(int, int, int);
+void getMiniGraphicSource(int, Bitmap **, int *, int *);
+void DrawMiniGraphicExt(DrawBuffer *, int, int, int);
+void DrawGraphicShifted(int, int, int, int, int, int, int, int);
+void DrawGraphicShiftedThruMask(int, int, int, int, int, int, int);
+void DrawScreenElementExt(int, int, int, int, int, int, int);
+void DrawLevelElementExt(int, int, int, int, int, int, int);
+void DrawScreenElementShifted(int, int, int, int, int, int);
+void DrawLevelElementShifted(int, int, int, int, int, int);
+void DrawScreenElementThruMask(int, int, int);
+void DrawLevelElementThruMask(int, int, int);
+void DrawLevelFieldThruMask(int, int);
void DrawCrumbledSand(int, int);
-void DrawNewScreenElement(int, int, int);
-void DrawNewLevelElement(int, int, int);
-void DrawNewScreenField(int, int);
-void DrawNewLevelField(int, int);
-void DrawNewMiniElement(int, int, int);
-void DrawNewMiniElementOrWall(int, int, int, int);
-void DrawNewMicroElement(int, int, int);
+void DrawScreenElement(int, int, int);
+void DrawLevelElement(int, int, int);
+void DrawScreenField(int, int);
+void DrawLevelField(int, int);
+void DrawMiniElement(int, int, int);
+void DrawMiniElementOrWall(int, int, int, int);
+void DrawMicroElement(int, int, int);
void DrawLevel(void);
-void DrawNewMiniLevel(int, int, int, int);
+void DrawMiniLevel(int, int, int, int);
void DrawMicroLevel(int, int, boolean);
boolean Request(char *, unsigned int);