projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19990108-1
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index 1c27d8cae76cd2c3a4f5a45ed10c6bb14ef02a85..972d7c23c071984ecfd9dd21cd38d7f357d5722d 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-1205,7
+1205,12
@@
void DrawScreenField(int x, int y)
if (!IN_LEV_FIELD(ux, uy))
{
if (!IN_LEV_FIELD(ux, uy))
{
- DrawScreenElement(x, y, EL_BETON);
+ if (ux < -1 || ux > lev_fieldx || uy < -1 || uy > lev_fieldy)
+ element = EL_LEERRAUM;
+ else
+ element = BorderElement;
+
+ DrawScreenElement(x, y, element);
return;
}
return;
}
@@
-1365,10
+1370,8
@@
void DrawMiniLevel(int scroll_x, int scroll_y)
{
int x,y;
{
int x,y;
- ClearWindow();
-
- for(x=0; x<2*SCR_FIELDX; x++)
- for(y=0; y<2*SCR_FIELDY; y++)
+ for(x=0; x<ED_FIELDX; x++)
+ for(y=0; y<ED_FIELDY; y++)
DrawMiniElementOrWall(x, y, scroll_x, scroll_y);
redraw_mask |= REDRAW_FIELD;
DrawMiniElementOrWall(x, y, scroll_x, scroll_y);
redraw_mask |= REDRAW_FIELD;
@@
-1378,6
+1381,9
@@
void DrawMicroLevel(int xpos, int ypos)
{
int x,y;
{
int x,y;
+ /* determine border element for this level */
+ SetBorderElement();
+
XFillRectangle(display, drawto, gc,
xpos - MICRO_TILEX, ypos - MICRO_TILEY,
MICRO_TILEX * (STD_LEV_FIELDX + 2),
XFillRectangle(display, drawto, gc,
xpos - MICRO_TILEX, ypos - MICRO_TILEY,
MICRO_TILEX * (STD_LEV_FIELDX + 2),
@@
-1394,7
+1400,7
@@
void DrawMicroLevel(int xpos, int ypos)
Ur[x][y]);
else if (x >= -1 && x < lev_fieldx+1 && y >= -1 && y < lev_fieldy+1)
DrawMicroElement(xpos + x * MICRO_TILEX, ypos + y * MICRO_TILEY,
Ur[x][y]);
else if (x >= -1 && x < lev_fieldx+1 && y >= -1 && y < lev_fieldy+1)
DrawMicroElement(xpos + x * MICRO_TILEX, ypos + y * MICRO_TILEY,
-
EL_BETON
);
+
BorderElement
);
XFillRectangle(display, drawto,gc, SX, MICROLABEL_YPOS, SXSIZE, FONT4_YSIZE);
XFillRectangle(display, drawto,gc, SX, MICROLABEL_YPOS, SXSIZE, FONT4_YSIZE);