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
/
DDSpriteBuffer.c
diff --git
a/src/game_sp/DDSpriteBuffer.c
b/src/game_sp/DDSpriteBuffer.c
index e2f47eee2195a554e31a49720aea0642bf89e06f..5d5fc38f14a72fdb5f6724da022fc379a194bad5 100644
(file)
--- a/
src/game_sp/DDSpriteBuffer.c
+++ b/
src/game_sp/DDSpriteBuffer.c
@@
-15,15
+15,11
@@
static void Blt(int pX, int pY, Bitmap *bitmap, int SpriteX, int SpriteY)
int sy2 = scy + (SCR_FIELDY + 1) * TILEY;
int sx = pX - sx1;
int sy = pY - sy1;
int sy2 = scy + (SCR_FIELDY + 1) * TILEY;
int sx = pX - sx1;
int sy = pY - sy1;
- int tile_x = sx / TILESIZE;
- int tile_y = sy / TILESIZE;
- int move_x = (sx + TILESIZE - 1) / TILESIZE;
- int move_y = (sy + TILESIZE - 1) / TILESIZE;
if (NoDisplayFlag)
return;
if (NoDisplayFlag)
return;
- /
* do not draw fields that are outside the visible screen area */
+ /
/ do not draw fields that are outside the visible screen area
if (pX < sx1 || pX > sx2 || pY < sy1 || pY > sy2)
return;
if (pX < sx1 || pX > sx2 || pY < sy1 || pY > sy2)
return;
@@
-32,20
+28,6
@@
static void Blt(int pX, int pY, Bitmap *bitmap, int SpriteX, int SpriteY)
BlitBitmap(bitmap, bitmap_db_field_sp, SpriteX, SpriteY,
TILEX_VAR, TILEY_VAR, sx, sy);
BlitBitmap(bitmap, bitmap_db_field_sp, SpriteX, SpriteY,
TILEX_VAR, TILEY_VAR, sx, sy);
-
- redraw[tile_x][tile_y] = TRUE;
- redraw_tiles++;
-
- if (move_x != tile_x)
- {
- redraw[move_x][tile_y] = TRUE;
- redraw_tiles++;
- }
- else if (move_y != tile_y)
- {
- redraw[tile_x][move_y] = TRUE;
- redraw_tiles++;
- }
}
void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame)
}
void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame)
@@
-55,7
+37,10
@@
void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame)
if (NoDisplayFlag)
return;
if (NoDisplayFlag)
return;
- getGraphicSource_SP(&g, graphic, sync_frame, -1, -1);
+ if (graphic < 0)
+ return;
+
+ getGraphicSource_SP(&g, graphic, sync_frame);
Blt(pX, pY, g.bitmap, g.src_x, g.src_y);
}
Blt(pX, pY, g.bitmap, g.src_x, g.src_y);
}