X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FDDSpriteBuffer.c;h=863aac39f4a8e9f2516ea96f8082fc565e365058;hb=35b995abd3183999201d9581f7674de1475dc169;hp=39f04e76011c4101cfeb8821e0181b28446ae9e6;hpb=d45b35552f4ca1ada1266fb7e8b6968d878019a6;p=rocksndiamonds.git diff --git a/src/game_sp/DDSpriteBuffer.c b/src/game_sp/DDSpriteBuffer.c index 39f04e76..863aac39 100644 --- a/src/game_sp/DDSpriteBuffer.c +++ b/src/game_sp/DDSpriteBuffer.c @@ -5,22 +5,8 @@ #include "DDSpriteBuffer.h" -long mXSpriteCount, mYSpriteCount; -long mSpriteWidth, mSpriteHeight; -long mDestXOff, mDestYOff; - -void DDSpriteBuffer_Init() -{ - mSpriteWidth = TILEX; - mSpriteHeight = TILEY; - mXSpriteCount = 16; - mYSpriteCount = 16; -} - static void Blt(int pX, int pY, Bitmap *bitmap, int SpriteX, int SpriteY) { - MyRECT DR, SR; - int scx = (mScrollX_last < 0 ? 0 : mScrollX_last); int scy = (mScrollY_last < 0 ? 0 : mScrollY_last); int sx1 = scx - 2 * TILEX; @@ -38,20 +24,8 @@ static void Blt(int pX, int pY, Bitmap *bitmap, int SpriteX, int SpriteY) if (pX < sx1 || pX > sx2 || pY < sy1 || pY > sy2) return; - DR.left = pX + mDestXOff; - DR.top = pY + mDestYOff; - DR.right = pX + mSpriteWidth + mDestXOff; - DR.bottom = pY + mSpriteHeight + mDestYOff; - - SR.left = SpriteX; - SR.top = SpriteY; - SR.right = SR.left + mSpriteWidth; - SR.bottom = SR.top + mSpriteHeight; - - BlitBitmap(bitmap, screenBitmap, - SR.left, SR.top, - mSpriteWidth, mSpriteHeight, - sx, sy); + BlitBitmap(bitmap, screenBitmap, SpriteX, SpriteY, + TILEX, TILEY, sx, sy); } void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame)