projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved gravity compatibility settings to gravity switch properties page
[rocksndiamonds.git]
/
src
/
game_sp
/
DDSpriteBuffer.c
diff --git
a/src/game_sp/DDSpriteBuffer.c
b/src/game_sp/DDSpriteBuffer.c
index 863aac39f4a8e9f2516ea96f8082fc565e365058..5d5fc38f14a72fdb5f6724da022fc379a194bad5 100644
(file)
--- a/
src/game_sp/DDSpriteBuffer.c
+++ b/
src/game_sp/DDSpriteBuffer.c
@@
-11,21
+11,23
@@
static void Blt(int pX, int pY, Bitmap *bitmap, int SpriteX, int SpriteY)
int scy = (mScrollY_last < 0 ? 0 : mScrollY_last);
int sx1 = scx - 2 * TILEX;
int sy1 = scy - 2 * TILEY;
int scy = (mScrollY_last < 0 ? 0 : mScrollY_last);
int sx1 = scx - 2 * TILEX;
int sy1 = scy - 2 * TILEY;
- int sx2 = scx + SXSIZE + 1 * TILEX;
- int sy2 = scy + SYSIZE + 1 * TILEY;
-
+ int sx2 = scx + (SCR_FIELDX + 1) * TILEX;
+ int sy2 = scy + (SCR_FIELDY + 1) * TILEY;
int sx = pX - sx1;
int sy = pY - sy1;
if (NoDisplayFlag)
return;
int sx = pX - sx1;
int sy = pY - sy1;
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;
- BlitBitmap(bitmap, screenBitmap, SpriteX, SpriteY,
- TILEX, TILEY, sx, sy);
+ sx = sx * TILESIZE_VAR / TILESIZE;
+ sy = sy * TILESIZE_VAR / TILESIZE;
+
+ BlitBitmap(bitmap, bitmap_db_field_sp, SpriteX, SpriteY,
+ TILEX_VAR, TILEY_VAR, sx, sy);
}
void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame)
}
void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame)
@@
-35,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);
}