{ "char_underscore.frames", "1" },
{ "char_empty", "RocksFontEM.pcx" },
- { "char_empty.xpos", "16" },
- { "char_empty.ypos", "0" },
+ { "char_empty.xpos", "0" },
+ { "char_empty.ypos", "4" },
{ "char_empty.frames", "1" },
{ "char_degree", "RocksFontEM.pcx" },
- { "char_degree.xpos", "16" },
- { "char_degree.ypos", "1" },
+ { "char_degree.xpos", "1" },
+ { "char_degree.ypos", "4" },
{ "char_degree.frames", "1" },
{ "char_tm", "RocksFontEM.pcx" },
- { "char_tm.xpos", "16" },
- { "char_tm.ypos", "2" },
+ { "char_tm.xpos", "2" },
+ { "char_tm.ypos", "4" },
{ "char_tm.frames", "1" },
{ "char_cursor", "RocksFontEM.pcx" },
- { "char_cursor.xpos", "16" },
- { "char_cursor.ypos", "3" },
+ { "char_cursor.xpos", "3" },
+ { "char_cursor.ypos", "4" },
{ "char_cursor.frames", "1" },
-#define COMPILE_DATE_STRING "[2002-10-06 04:07]"
+#define COMPILE_DATE_STRING "[2002-10-19 20:38]"
{
x = (dx == 1 ? 0 : ed_fieldx - 1);
for(y=0; y<ed_fieldy; y++)
- DrawMiniElementOrWall(x, y, from_x, from_y);
+ DrawNewMiniElementOrWall(x, y, from_x, from_y);
}
else if (dy)
{
y = (dy == 1 ? 0 : ed_fieldy - 1);
for(x=0; x<ed_fieldx; x++)
- DrawMiniElementOrWall(x, y, from_x, from_y);
+ DrawNewMiniElementOrWall(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;
- getMiniGraphicSource(el2gfx(editor_element[i]),
- &deco_bitmap, &deco_x, &deco_y);
+ getNewMiniGraphicSource(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 */
- DrawMiniGraphicExt(drawto,
+ DrawNewMiniGraphicExt(drawto,
DX + ED_WIN_MB_LEFT_XPOS, DY + ED_WIN_MB_LEFT_YPOS,
- el2gfx(new_element1));
- DrawMiniGraphicExt(drawto,
+ el2img(new_element1));
+ DrawNewMiniGraphicExt(drawto,
DX + ED_WIN_MB_MIDDLE_XPOS, DY + ED_WIN_MB_MIDDLE_YPOS,
- el2gfx(new_element2));
- DrawMiniGraphicExt(drawto,
+ el2img(new_element2));
+ DrawNewMiniGraphicExt(drawto,
DX + ED_WIN_MB_RIGHT_XPOS, DY + ED_WIN_MB_RIGHT_YPOS,
- el2gfx(new_element3));
+ el2img(new_element3));
/* draw bigger door */
DrawSpecialEditorDoor();
if (button == 1)
{
new_element1 = element;
- DrawMiniGraphicExt(drawto,
+ DrawNewMiniGraphicExt(drawto,
DX + ED_WIN_MB_LEFT_XPOS, DY + ED_WIN_MB_LEFT_YPOS,
- el2gfx(new_element1));
+ el2img(new_element1));
}
else if (button == 2)
{
new_element2 = element;
- DrawMiniGraphicExt(drawto,
+ DrawNewMiniGraphicExt(drawto,
DX + ED_WIN_MB_MIDDLE_XPOS, DY + ED_WIN_MB_MIDDLE_YPOS,
- el2gfx(new_element2));
+ el2img(new_element2));
}
else
{
new_element3 = element;
- DrawMiniGraphicExt(drawto,
+ DrawNewMiniGraphicExt(drawto,
DX + ED_WIN_MB_RIGHT_XPOS, DY + ED_WIN_MB_RIGHT_YPOS,
- el2gfx(new_element3));
+ el2img(new_element3));
}
redraw_mask |= REDRAW_DOOR_1;
AdjustLevelScrollPosition();
AdjustEditorScrollbar(GADGET_ID_SCROLL_HORIZONTAL);
AdjustEditorScrollbar(GADGET_ID_SCROLL_VERTICAL);
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(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++)
- DrawMiniElement(area_x + x, area_y + y, EL_SAND);
+ DrawNewMiniElement(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);
- DrawMiniElement(area_x, area_y, ElementContent[0][0][0]);
+ DrawNewMiniElement(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++)
- DrawMiniElement(area_x + x, area_y + y, EL_SAND);
+ DrawNewMiniElement(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);
- DrawMiniElement(area_x, area_y, ElementContent[0][0][0]);
+ DrawNewMiniElement(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++)
- DrawMiniElement(area_x + 5 * (i % 4) + x, area_y + 6 * (i / 4) + y,
+ DrawNewMiniElement(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++)
- DrawMiniElement(area_x + 5 * (i % 4) + x, area_y + 6 * (i / 4) + y,
+ DrawNewMiniElement(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++)
- DrawMiniElement(xstart + x , ystart + y, EL_SAND);
+ DrawNewMiniElement(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);
- DrawGraphic(xstart/2, ystart/2, el2gfx(properties_element));
+ DrawNewGraphic(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;
- DrawMiniElement(sx, sy, (element < 0 ? Feld[lx][ly] : element));
+ DrawNewMiniElement(sx, sy, (element < 0 ? Feld[lx][ly] : element));
if (change_level)
Feld[lx][ly] = element;
break;
case TEXT_SETCURSOR:
- DrawMiniElement(last_sx, last_sy, Feld[lx][ly]);
+ DrawNewMiniElement(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];
- DrawMiniElement(sx - 1, sy, Feld[lx - 1][ly]);
+ DrawNewMiniElement(sx - 1, sy, Feld[lx - 1][ly]);
DrawLevelText(sx - 1, sy, 0, TEXT_SETCURSOR);
}
break;
case TEXT_END:
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
- DrawMiniElement(sx, sy, Feld[lx][ly]);
+ DrawNewMiniElement(sx, sy, Feld[lx][ly]);
typing = FALSE;
break;
int ly = sy + level_ypos;
if (element == -1)
- DrawMiniElement(sx, sy, Feld[lx][ly]);
+ DrawNewMiniElement(sx, sy, Feld[lx][ly]);
else
DrawAreaBorder(sx, sy, sx, sy);
}
last_border_element = BorderElement;
SetBorderElement();
if (BorderElement != last_border_element)
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
#if 0
#ifdef DEBUG
for (y=0; y<lev_fieldy; y++)
Feld[x][y] = new_element;
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
return;
}
}
}
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(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];
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(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)
- DrawMiniElement(x - level_xpos, y - level_ypos,
+ DrawNewMiniElement(x - level_xpos, y - level_ypos,
EL_EMPTY);
}
}
}
Feld[lx][ly] = new_element;
- DrawMiniElement(sx, sy, new_element);
+ DrawNewMiniElement(sx, sy, new_element);
}
}
else
{
- DrawMiniGraphicExt(drawto,
+ DrawNewMiniGraphicExt(drawto,
gi->x + sx * MINI_TILEX,
gi->y + sy * MINI_TILEY,
- el2gfx(new_element));
- DrawMiniGraphicExt(window,
+ el2img(new_element));
+ DrawNewMiniGraphicExt(window,
gi->x + sx * MINI_TILEX,
gi->y + sy * MINI_TILEY,
- el2gfx(new_element));
+ el2img(new_element));
if (id == GADGET_ID_AMOEBA_CONTENT)
level.amoeba_content = new_element;
if (button_press_event && Feld[lx][ly] != new_element)
{
FloodFill(lx, ly, new_element);
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
}
break;
if (button == 1)
ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_RIGHT);
else
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(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
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(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
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(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
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(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;
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
break;
case GADGET_ID_SCROLL_VERTICAL:
level_ypos = gi->event.item_position - 1;
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
break;
case GADGET_ID_SCROLL_LIST_UP:
int element = editor_element[element_shift + i];
UnmapGadget(gi);
- getMiniGraphicSource(el2gfx(element), &gd->bitmap, &gd->x, &gd->y);
+ getNewMiniGraphicSource(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];
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos,level_ypos);
+ DrawNewMiniLevel(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);
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+ DrawNewMiniLevel(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])
- DrawMiniGraphicExt(drawto, DX_KEYS + j * MINI_TILEX, DY_KEYS,
+ DrawNewMiniGraphicExt(drawto, DX_KEYS + j * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + j);
DrawText(DX + XX_EMERALDS, DY + YY_EMERALDS,
RemoveField(x, y);
player->key[key_nr] = TRUE;
RaiseScoreElement(element);
- DrawMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+ DrawNewMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + key_nr);
- DrawMiniGraphicExt(window, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+ DrawNewMiniGraphicExt(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);
- DrawMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+ DrawNewMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + key_nr);
- DrawMiniGraphicExt(window, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+ DrawNewMiniGraphicExt(window, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
GFX_SCHLUESSEL1 + key_nr);
PlaySoundLevel(x, y, SND_KEY_COLLECTING);
break;
InitLevelInfo();
InitLevelArtworkInfo();
- InitGadgets(); /* needs to know number of level series */
InitImages(); /* needs to know current level directory */
InitSound(); /* needs to know current level directory */
+ InitGadgets(); /* needs images + number of level series */
InitGfxBackground();
InitToons();
char *text, int font_size, int font_type)
{
Bitmap *font_bitmap;
- int font_width, font_height, font_start;
+ int font_width, font_height, font_starty;
boolean print_inverse = FALSE;
if (font_size != FS_SMALL && font_size != FS_BIG && font_size != FS_MEDIUM)
font.bitmap_small);
if (font_type == FC_SPECIAL2)
- font_start = (font_size == FS_BIG ? 0 : FONT1_YSIZE) * FONT_LINES_PER_FONT;
+ font_starty = (font_size == FS_BIG ? 0 : FONT1_YSIZE) * 5;
else
- font_start = (font_type * (font_size == FS_BIG ? FONT1_YSIZE :
- font_size == FS_MEDIUM ? FONT6_YSIZE :
- FONT2_YSIZE) *
- FONT_LINES_PER_FONT);
+ font_starty = (font_type * (font_size == FS_BIG ? FONT1_YSIZE :
+ font_size == FS_MEDIUM ? FONT6_YSIZE :
+ FONT2_YSIZE) *
+ FONT_LINES_PER_FONT);
if (font_type == FC_SPECIAL3)
- font_start -= FONT2_YSIZE * FONT_LINES_PER_FONT;
+ font_starty -= FONT2_YSIZE * FONT_LINES_PER_FONT;
while (*text)
{
if ((c >= 32 && c <= 95) || c == '°' || c == '´')
{
int src_x = ((c - 32) % FONT_CHARS_PER_LINE) * font_width;
- int src_y = ((c - 32) / FONT_CHARS_PER_LINE) * font_height + font_start;
+ int src_y = ((c - 32) / FONT_CHARS_PER_LINE) * font_height + font_starty;
int dest_x = x, dest_y = y;
if (c == '°' || c == '´') /* map '°' and 'TM' signs */
{
- src_x = FONT_CHARS_PER_LINE * font_width;
- src_y = (c == '°' ? 1 : 2) * font_height + font_start;
+ if (font_type == FC_SPECIAL2)
+ {
+ src_x = (c == '°' ? 1 : 2) * font_width;
+ src_y = 4 * font_height;
+ }
+ else
+ {
+ src_x = FONT_CHARS_PER_LINE * font_width;
+ src_y = (c == '°' ? 1 : 2) * font_height + font_starty;
+ }
}
if (print_inverse)
{
BlitBitmap(font_bitmap, bitmap,
FONT_CHARS_PER_LINE * font_width,
- 3 * font_height + font_start,
+ 3 * font_height + font_starty,
font_width, font_height, x, y);
SetClipOrigin(font_bitmap, font_bitmap->stored_clip_gc,
#define MICRO_GFX_PER_LINE 16
#define MINI_FONT_STARTX 0
-#define MINI_FONT_STARTY 128
-#define MICRO_FONT_STARTX 408
-#define MICRO_FONT_STARTY 128
+#define MINI_FONT_STARTY 160
+#define MICRO_FONT_STARTX 384
+#define MICRO_FONT_STARTY 160
#define HEROES_PER_LINE 16
void DrawMiniGraphic(int x, int y, int graphic)
{
- DrawMiniGraphicExt(drawto, SX + x*MINI_TILEX, SY + y*MINI_TILEY, graphic);
- MarkTileDirty(x/2, y/2);
+ DrawMiniGraphicExt(drawto,
+ SX + x * MINI_TILEX, SY + y * MINI_TILEY, graphic);
+ MarkTileDirty(x / 2, y / 2);
+}
+
+void DrawNewMiniGraphic(int x, int y, int graphic)
+{
+ DrawNewMiniGraphicExt(drawto,
+ SX + x * MINI_TILEX, SY + y * MINI_TILEY, graphic);
+ MarkTileDirty(x / 2, y / 2);
}
void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
}
}
+void getNewMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
+{
+ Bitmap *src_bitmap = new_graphic_info[graphic].bitmap;
+ int mini_startx = 0;
+ int mini_starty = src_bitmap->height * 2 / 3;
+ int src_x = mini_startx + new_graphic_info[graphic].src_x / 2;
+ int src_y = mini_starty + new_graphic_info[graphic].src_y / 2;
+
+ *bitmap = src_bitmap;
+ *x = src_x;
+ *y = src_y;
+}
+
void DrawMiniGraphicExt(DrawBuffer *d, int x, int y, int graphic)
{
Bitmap *bitmap;
BlitBitmap(bitmap, d, src_x, src_y, MINI_TILEX, MINI_TILEY, x, y);
}
+void DrawNewMiniGraphicExt(DrawBuffer *d, int x, int y, int graphic)
+{
+#if 1
+ Bitmap *src_bitmap;
+ int src_x, src_y;
+
+ getNewMiniGraphicSource(graphic, &src_bitmap, &src_x, &src_y);
+#else
+ Bitmap *src_bitmap = new_graphic_info[graphic].bitmap;
+ int mini_startx = src_bitmap->width * 2 / 3;
+ int mini_starty = src_bitmap->height * 2 / 3;
+ int src_x = mini_startx + new_graphic_info[graphic].src_x / 2;
+ int src_y = mini_starty + new_graphic_info[graphic].src_y / 2;
+#endif
+
+ BlitBitmap(src_bitmap, d, src_x, src_y, MINI_TILEX, MINI_TILEY, x, y);
+}
+
void DrawGraphicShifted(int x,int y, int dx,int dy, int graphic,
int cut_mode, int mask_mode)
{
DrawMiniGraphic(x, y, graphic);
}
+void DrawNewMiniElement(int x, int y, int element)
+{
+ int graphic;
+
+#if 0
+ if (!element)
+ {
+ DrawNewMiniGraphic(x, y, -1);
+ return;
+ }
+#endif
+
+ graphic = el2img(element);
+ DrawNewMiniGraphic(x, y, graphic);
+}
+
void DrawMiniElementOrWall(int sx, int sy, int scroll_x, int scroll_y)
{
int x = sx + scroll_x, y = sy + scroll_y;
}
}
+void DrawNewMiniElementOrWall(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);
+ else if (x > -1 && x < lev_fieldx && y > -1 && y < lev_fieldy)
+ DrawNewMiniElement(sx, sy, Feld[x][y]);
+ else
+ {
+ int steel_type, steel_position;
+ int border[6][2] =
+ {
+ { IMG_STEELWALL_TOPLEFT, IMG_INVISIBLE_STEELWALL_TOPLEFT },
+ { IMG_STEELWALL_TOPRIGHT, IMG_INVISIBLE_STEELWALL_TOPRIGHT },
+ { IMG_STEELWALL_BOTTOMLEFT, IMG_INVISIBLE_STEELWALL_BOTTOMLEFT },
+ { IMG_STEELWALL_BOTTOMRIGHT, IMG_INVISIBLE_STEELWALL_BOTTOMRIGHT },
+ { IMG_STEELWALL_VERTICAL, IMG_INVISIBLE_STEELWALL_VERTICAL },
+ { IMG_STEELWALL_HORIZONTAL, IMG_INVISIBLE_STEELWALL_HORIZONTAL }
+ };
+
+ steel_type = (BorderElement == EL_STEELWALL ? 0 : 1);
+ steel_position = (x == -1 && y == -1 ? 0 :
+ x == lev_fieldx && y == -1 ? 1 :
+ x == -1 && y == lev_fieldy ? 2 :
+ x == lev_fieldx && y == lev_fieldy ? 3 :
+ x == -1 || x == lev_fieldx ? 4 :
+ y == -1 || y == lev_fieldy ? 5 : -1);
+
+ if (steel_position != -1)
+ DrawNewMiniGraphic(sx, sy, border[steel_position][steel_type]);
+ }
+}
+
void DrawMicroElement(int xpos, int ypos, int element)
{
int graphic;
redraw_mask |= REDRAW_FIELD;
}
+void DrawNewMiniLevel(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);
+
+ redraw_mask |= REDRAW_FIELD;
+}
+
static void DrawMicroLevelExt(int xpos, int ypos, int from_x, int from_y)
{
int x, y;
#if 1
int graphic_NEW = element_info[element].graphic[GFX_ACTION_DEFAULT];
+#if DEBUG
+ if (graphic_NEW < 0)
+ Error(ERR_WARN, "element %d -> graphic %d -- probably crashing now...",
+ element, graphic_NEW);
+#endif
+
return graphic_NEW;
#else
void DrawGraphicThruMaskExt(DrawBuffer *, int, int, int);
void DrawNewGraphicThruMaskExt(DrawBuffer *, int, int, int, int);
void DrawMiniGraphic(int, int, int);
+void DrawNewMiniGraphic(int, int, int);
void getMiniGraphicSource(int, Bitmap **, int *, int *);
+void getNewMiniGraphicSource(int, Bitmap **, int *, int *);
void DrawMiniGraphicExt(DrawBuffer *, int, int, int);
+void DrawNewMiniGraphicExt(DrawBuffer *, int, int, int);
void DrawGraphicShifted(int, int, int, int, int, int, int);
void DrawNewGraphicShifted(int, int, int, int, int, int, int, int);
void DrawGraphicShiftedThruMask(int, int, int, int, int, int);
void DrawLevelField(int, int);
void DrawNewLevelField(int, int);
void DrawMiniElement(int, int, int);
+void DrawNewMiniElement(int, int, int);
void DrawMiniElementOrWall(int, int, int, int);
+void DrawNewMiniElementOrWall(int, int, int, int);
void DrawMicroElement(int, int, int);
void DrawLevel(void);
void DrawMiniLevel(int, int, int, int);
+void DrawNewMiniLevel(int, int, int, int);
void DrawMicroLevel(int, int, boolean);
boolean Request(char *, unsigned int);
unsigned int OpenDoor(unsigned int);