projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed two bugs with broken sniksnak graphics in SP engine after warp mode
[rocksndiamonds.git]
/
src
/
game_sp
/
MainForm.c
diff --git
a/src/game_sp/MainForm.c
b/src/game_sp/MainForm.c
index d612a6c6a8ab4576181fc9b771191f3cf6014837..b6d7952cc14d99a515a17ccfcd2d521156caf3ef 100644
(file)
--- a/
src/game_sp/MainForm.c
+++ b/
src/game_sp/MainForm.c
@@
-17,10
+17,8
@@
void DrawFrameIfNeeded()
DrawFrame(0);
/* !!! CHECK THIS !!! */
DrawFrame(0);
/* !!! CHECK THIS !!! */
-#if 1
if (! menBorder)
DrawFrame(1);
if (! menBorder)
DrawFrame(1);
-#endif
}
void DisplayLevel()
}
void DisplayLevel()
@@
-31,16
+29,9
@@
void DisplayLevel()
return;
ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
return;
ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
-#if 1
ClearRectangle(bitmap_db_field_sp, 0, 0, FXSIZE, FYSIZE);
ClearRectangle(bitmap_db_field_sp, 0, 0, FXSIZE, FYSIZE);
-#else
- ClearRectangle(bitmap_db_field_sp, 0, 0,
- MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY);
-#endif
-#if 1
SetDisplayRegion();
SetDisplayRegion();
-#endif
DrawFrameIfNeeded();
DrawFrameIfNeeded();
@@
-78,21
+69,27
@@
static void DrawFrame(int Delta)
RX = FieldWidth - Delta;
BY = FieldHeight - Delta;
RX = FieldWidth - Delta;
BY = FieldHeight - Delta;
- DrawImage(LX, tY,
imgFrameCorner
);
- DrawImage(LX, BY,
imgFrameCorner
);
- DrawImage(RX, tY,
imgFrameCorner
);
- DrawImage(RX, BY,
imgFrameCorner
);
+ DrawImage(LX, tY,
(Delta > 0 ? imgFrameCorner : aniSpace)
);
+ DrawImage(LX, BY,
(Delta > 0 ? imgFrameCorner : aniSpace)
);
+ DrawImage(RX, tY,
(Delta > 0 ? imgFrameCorner : aniSpace)
);
+ DrawImage(RX, BY,
(Delta > 0 ? imgFrameCorner : aniSpace)
);
for (i = LX + 1; i <= RX - 1; i++)
{
for (i = LX + 1; i <= RX - 1; i++)
{
- DrawImage(i, tY,
imgFrameHorizontal
);
- DrawImage(i, BY,
imgFrameHorizontal
);
+ DrawImage(i, tY,
(Delta > 0 ? imgFrameHorizontal : aniSpace)
);
+ DrawImage(i, BY,
(Delta > 0 ? imgFrameHorizontal : aniSpace)
);
}
for (i = tY + 1; i <= BY - 1; i++)
{
}
for (i = tY + 1; i <= BY - 1; i++)
{
- DrawImage(LX, i, imgFrameVertical);
- DrawImage(RX, i, imgFrameVertical);
+ DrawImage(LX, i, (Delta > 0 ? imgFrameVertical : aniSpace));
+ DrawImage(RX, i, (Delta > 0 ? imgFrameVertical : aniSpace));
+ }
+
+ if (Delta > 0)
+ {
+ // ...
+ // ClearRectangle(bitmap_db_field_sp,
}
}
}
}
@@
-151,14
+148,6
@@
void menPlay_Click()
ReStretch();
subMainGameLoop_Init();
ReStretch();
subMainGameLoop_Init();
-
-#if 1
- return;
-#endif
-
- bPlaying = False;
-
- subFetchAndInitLevel();
}
static void ReStretch()
}
static void ReStretch()
@@
-187,8
+176,8
@@
void SetScrollEdges()
/* scroll correction for border frame (1 tile) or border element (2 tiles) */
ScrollMinX = 0;
ScrollMinY = 0;
/* scroll correction for border frame (1 tile) or border element (2 tiles) */
ScrollMinX = 0;
ScrollMinY = 0;
- ScrollMaxX = (DisplayMaxX + border1_offset
) * TILEX - SXSIZE
;
- ScrollMaxY = (DisplayMaxY + border1_offset
) * TILEY - SYSIZE
;
+ ScrollMaxX = (DisplayMaxX + border1_offset
- SCR_FIELDX) * TILEX
;
+ ScrollMaxY = (DisplayMaxY + border1_offset
- SCR_FIELDY) * TILEY
;
/* scroll correction for border element (half tile on left and right side) */
ScrollMinX += border2_offset;
/* scroll correction for border element (half tile on left and right side) */
ScrollMinX += border2_offset;
@@
-201,12
+190,6
@@
void SetScrollEdges()
ScrollMaxX -= game_sp.scroll_xoffset;
ScrollMinY -= game_sp.scroll_yoffset;
ScrollMaxY -= game_sp.scroll_yoffset;
ScrollMaxX -= game_sp.scroll_xoffset;
ScrollMinY -= game_sp.scroll_yoffset;
ScrollMaxY -= game_sp.scroll_yoffset;
-
-#if 0
- printf("::: (%ld, %ld), (%ld, %ld) -> (%d, %d), (%d, %d)\n",
- DisplayMinX, DisplayMinY, DisplayMaxX, DisplayMaxY,
- ScrollMinX, ScrollMinY, ScrollMaxX, ScrollMaxY);
-#endif
}
void DrawField(int X, int Y)
}
void DrawField(int X, int Y)
@@
-267,25
+250,7
@@
void DrawFieldNoAnimated(int X, int Y)
break;
default:
break;
default:
-#if 1
DrawField(X, Y);
DrawField(X, Y);
-#else
- if (Tmp < fiFirst || Tmp > fiLast)
- Tmp = fiSpace;
-
- if (Tmp == fiRAM ||
- Tmp == fiHardWare ||
- Tmp == fiBug ||
- Tmp == fiWallSpace)
- Tmp = DisPlayField[tsi];
-
- subCopyImageToScreen(tsi, fiGraphic[Tmp]);
-
- if (Tmp != fiSpace &&
- Tmp != fiSnikSnak &&
- Tmp != fiElectron)
- GfxGraphic[X][Y] = fiGraphic[Tmp];
-#endif
break;
}
}
break;
}
}