X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FDDSpriteBuffer.c;h=bcaaa9841cbd750b6fb029332febf6c173e74ecd;hb=a312d80612bb9a448cdc1abbde690b296fa92b17;hp=00e49d7ac02f62aaaac59c05e3445c853382f57a;hpb=ed873d89bc59f4e641134f9019ce216234b9f38f;p=rocksndiamonds.git diff --git a/src/game_sp/DDSpriteBuffer.c b/src/game_sp/DDSpriteBuffer.c index 00e49d7a..bcaaa984 100644 --- a/src/game_sp/DDSpriteBuffer.c +++ b/src/game_sp/DDSpriteBuffer.c @@ -132,6 +132,8 @@ boolean DDSpriteBuffer_CreateFromFile(char *Path, long xSprites, long ySprites) return CreateFromFile; } +#if 0 + boolean DDSpriteBuffer_CreateAtSize(long Width, long Height, long xSprites, long ySprites) { boolean CreateAtSize; @@ -163,6 +165,10 @@ boolean DDSpriteBuffer_CreateAtSize(long Width, long Height, long xSprites, long return CreateAtSize; } +#endif + +#if 0 + void DDSpriteBuffer_Cls(int BackColor) { RECT EmptyRect; @@ -170,19 +176,23 @@ void DDSpriteBuffer_Cls(int BackColor) Buffer.BltColorFill(EmptyRect, BackColor); } +#endif + static void Blt(int pX, int pY, int SpriteX, int SpriteY) { - RECT DR, SR; + MyRECT DR, SR; #if 0 long Tmp; #endif #if 1 - int sx1 = mScrollX_last - 2 * TILEX; - int sy1 = mScrollY_last - 2 * TILEY; - int sx2 = mScrollX_last + SXSIZE + 1 * TILEX; - int sy2 = mScrollY_last + SYSIZE + 1 * TILEY; + int scx = (mScrollX_last < 0 ? 0 : mScrollX_last); + 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 sx = pX - sx1; int sy = pY - sy1;