projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added description for BD style explosion
[rocksndiamonds.git]
/
src
/
game_sp
/
DDScrollBuffer.c
diff --git
a/src/game_sp/DDScrollBuffer.c
b/src/game_sp/DDScrollBuffer.c
index f580d3991dc1e5273f32eb49bfb3f99b406b6a60..6976f939b875f2fda62338796de4e22e17c3ef5a 100644
(file)
--- a/
src/game_sp/DDScrollBuffer.c
+++ b/
src/game_sp/DDScrollBuffer.c
@@
-13,11
+13,11
@@
int mScrollX_last, mScrollY_last;
int ScreenBuffer[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2];
int ScreenBuffer[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2];
-int getFieldbufferOffsetX_SP()
+int getFieldbufferOffsetX_SP(
void
)
{
int px = 2 * TILEX + (mScrollX - mScrollX_last) % TILEX;
{
int px = 2 * TILEX + (mScrollX - mScrollX_last) % TILEX;
- /
* scroll correction for even number of visible tiles (half tile shifted) */
+ /
/ scroll correction for even number of visible tiles (half tile shifted)
px += game_sp.scroll_xoffset;
if (ExplosionShakeMurphy != 0)
px += game_sp.scroll_xoffset;
if (ExplosionShakeMurphy != 0)
@@
-28,11
+28,11
@@
int getFieldbufferOffsetX_SP()
return px;
}
return px;
}
-int getFieldbufferOffsetY_SP()
+int getFieldbufferOffsetY_SP(
void
)
{
int py = 2 * TILEY + (mScrollY - mScrollY_last) % TILEY;
{
int py = 2 * TILEY + (mScrollY - mScrollY_last) % TILEY;
- /
* scroll correction for even number of visible tiles (half tile shifted) */
+ /
/ scroll correction for even number of visible tiles (half tile shifted)
py += game_sp.scroll_yoffset;
if (ExplosionShakeMurphy != 0)
py += game_sp.scroll_yoffset;
if (ExplosionShakeMurphy != 0)
@@
-43,7
+43,7
@@
int getFieldbufferOffsetY_SP()
return py;
}
return py;
}
-void RestorePlayfield()
+void RestorePlayfield(
void
)
{
int x1 = mScrollX / TILEX - 2;
int y1 = mScrollY / TILEY - 2;
{
int x1 = mScrollX / TILEX - 2;
int y1 = mScrollY / TILEY - 2;
@@
-130,7
+130,7
@@
static void ScrollPlayfieldIfNeededExt(boolean reset)
return;
}
return;
}
- /
* check if scrolling the playfield requires redrawing the viewport bitmap */
+ /
/ check if scrolling the playfield requires redrawing the viewport bitmap
if ((mScrollX != mScrollX_last ||
mScrollY != mScrollY_last) &&
(ABS(mScrollX - mScrollX_last) >= TILEX ||
if ((mScrollX != mScrollX_last ||
mScrollY != mScrollY_last) &&
(ABS(mScrollX - mScrollX_last) >= TILEX ||
@@
-148,12
+148,12
@@
static void ScrollPlayfieldIfNeededExt(boolean reset)
}
}
}
}
-static void ScrollPlayfieldIfNeeded()
+static void ScrollPlayfieldIfNeeded(
void
)
{
ScrollPlayfieldIfNeededExt(FALSE);
}
{
ScrollPlayfieldIfNeededExt(FALSE);
}
-void InitScrollPlayfield()
+void InitScrollPlayfield(
void
)
{
ScrollPlayfieldIfNeededExt(TRUE);
}
{
ScrollPlayfieldIfNeededExt(TRUE);
}
@@
-185,7
+185,7
@@
void UpdatePlayfield(boolean force_redraw)
{
int element = LowByte(PlayField16[GetSI(x, y)]);
int graphic = GfxGraphic[x][y];
{
int element = LowByte(PlayField16[GetSI(x, y)]);
int graphic = GfxGraphic[x][y];
- int sync_frame = GfxFrame[x][y];
+ int sync_frame = GfxFrame
SP
[x][y];
boolean redraw = force_redraw;
if (graphic < 0)
boolean redraw = force_redraw;
if (graphic < 0)
@@
-198,7
+198,7
@@
void UpdatePlayfield(boolean force_redraw)
if (element != GfxElementLast[x][y] &&
graphic == GfxGraphicLast[x][y])
{
if (element != GfxElementLast[x][y] &&
graphic == GfxGraphicLast[x][y])
{
- /
* element changed, but not graphic => disable updating graphic */
+ /
/ element changed, but not graphic => disable updating graphic
GfxElementLast[x][y] = element;
GfxGraphicLast[x][y] = GfxGraphic[x][y] = -1;
GfxElementLast[x][y] = element;
GfxGraphicLast[x][y] = GfxGraphic[x][y] = -1;
@@
-212,7
+212,7
@@
void UpdatePlayfield(boolean force_redraw)
GfxElementLast[x][y] = element;
GfxGraphicLast[x][y] = GfxGraphic[x][y];
GfxElementLast[x][y] = element;
GfxGraphicLast[x][y] = GfxGraphic[x][y];
- sync_frame = GfxFrame[x][y] = 0;
+ sync_frame = GfxFrame
SP
[x][y] = 0;
}
else if (isNextAnimationFrame_SP(graphic, sync_frame)) // new frame
{
}
else if (isNextAnimationFrame_SP(graphic, sync_frame)) // new frame
{
@@
-234,13
+234,13
@@
void UpdatePlayfield(boolean force_redraw)
}
#if DEBUG_REDRAW
}
#if DEBUG_REDRAW
-
printf("::: FRAME %d: %d redrawn\
n", FrameCounter, num_redrawn);
+
Debug("game:playing:SP", "FRAME %d: %d redraw
n", FrameCounter, num_redrawn);
#endif
}
void BlitScreenToBitmap_SP(Bitmap *target_bitmap)
{
#endif
}
void BlitScreenToBitmap_SP(Bitmap *target_bitmap)
{
- /
* copy playfield buffer to target bitmap at scroll position */
+ /
/ copy playfield buffer to target bitmap at scroll position
int px = getFieldbufferOffsetX_SP();
int py = getFieldbufferOffsetY_SP();
int px = getFieldbufferOffsetX_SP();
int py = getFieldbufferOffsetY_SP();