X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FDDSpriteBuffer.c;h=ca54d8bc6e5513c548aeaed9597f84479dc23600;hb=bc739f556617ab3e83f1beb7e0a446b9d074b8ee;hp=5ab338fb26cd020f0610c6dce128ec00802979d7;hpb=8d3d7d213a9691455a49544624bf380e85f43461;p=rocksndiamonds.git diff --git a/src/game_sp/DDSpriteBuffer.c b/src/game_sp/DDSpriteBuffer.c index 5ab338fb..ca54d8bc 100644 --- a/src/game_sp/DDSpriteBuffer.c +++ b/src/game_sp/DDSpriteBuffer.c @@ -106,14 +106,23 @@ boolean DDSpriteBuffer_CreateFromFile(char *Path, long xSprites, long ySprites) } // --- On Error GoTo CreateFromFileEH +#if 1 + SD.LWidth = 16 * TILEX; + SD.LHeight = 16 * TILEY; +#else Buffer = DDraw.CreateSurfaceFromFile(Path, SD); +#endif // --- On Error GoTo 0 +#if 0 Buffer.GetSurfaceDesc(SD); +#endif + mSpriteWidth = SD.LWidth / xSprites; mSpriteHeight = SD.LHeight / ySprites; mXSpriteCount = xSprites; mYSpriteCount = ySprites; + CreateFromFile = True; return CreateFromFile; @@ -164,7 +173,13 @@ void DDSpriteBuffer_Cls(int BackColor) static void Blt(int pX, int pY, int SpriteX, int SpriteY) { RECT DR, SR; +#if 0 long Tmp; +#endif + +#if 0 + printf("::: DDSpriteBuffer.c: Blt(): %d, %d\n", pX, pY); +#endif if (NoDisplayFlag) return; @@ -181,7 +196,19 @@ static void Blt(int pX, int pY, int SpriteX, int SpriteY) SR.right = SR.left + mSpriteWidth; SR.bottom = SR.top + mSpriteHeight; } + +#if 0 + printf("::: DDSpriteBuffer.c: Blt(): %d, %d\n", DR.left, DR.top); +#endif + +#if 1 + BlitBitmap(sp_objects, screenBitmap, + SR.left, SR.top, + mSpriteWidth, mSpriteHeight, + DR.left, DR.top); +#else Tmp = mDest.Blt(DR, &Buffer, SR, DDBLT_WAIT); +#endif } void DDSpriteBuffer_BltEx(int pX, int pY, int SpritePos)