-#if 0
- if (pX == 0 * StretchWidth && pY == 0 * StretchWidth)
- printf("::: TEST: drawing topleft corner ...\n");
- if (pX == 59 * StretchWidth && pY == 23 * StretchWidth)
- printf("::: TEST: drawing bottomright corner ...\n");
-#endif
-
-#if 1
-
-#if 1
- BlitBitmap(bitmap, screenBitmap,
- SR.left, SR.top,
- mSpriteWidth, mSpriteHeight,
- sx, sy);
-#else
- BlitBitmap(sp_objects, screenBitmap,
- SR.left, SR.top,
- mSpriteWidth, mSpriteHeight,
- DR.left, DR.top);
-#endif
-
-#else
- Tmp = mDest.Blt(DR, &Buffer, SR, DDBLT_WAIT);
-#endif
-}
-
-#if 0
-
-static void OLD_Blt(int pX, int pY, int SpriteX, int SpriteY)
-{
- RECT DR, SR;
-#if 0
- long Tmp;
-#endif
-
-#if 1
- int left = mScrollX;
- int top = mScrollY;
-#else
- int left = mScrollX / TILEX;
- int top = mScrollY / TILEY;
-#endif
-
- int sx = pX % (MAX_BUF_XSIZE * TILEX);
- int sy = pY % (MAX_BUF_YSIZE * TILEY);
-
-#if 0
- printf("::: DDSpriteBuffer.c: Blt(): %d, %d [%ld, %ld] [%d, %d]\n",
- pX, pY, mScrollX, mScrollY, left, top);
-#endif
-
- if (NoDisplayFlag)
- return;
-
- /* do not draw fields that are outside the visible screen area */
- if (pX < left || pX >= left + MAX_BUF_XSIZE * TILEX ||
- pY < top || pY >= top + MAX_BUF_YSIZE * TILEY)
- return;
-
- {
- DR.left = pX + mDestXOff;
- DR.top = pY + mDestYOff;
- DR.right = pX + mSpriteWidth + mDestXOff;
- DR.bottom = pY + mSpriteHeight + mDestYOff;
- }
- {
- SR.left = mSpriteWidth * (SpriteX - 1);
- SR.top = mSpriteHeight * (SpriteY - 1);
- 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 0
- if (pX == 0 * StretchWidth && pY == 0 * StretchWidth)
- printf("::: TEST: drawing topleft corner ...\n");
- if (pX == 59 * StretchWidth && pY == 23 * StretchWidth)
- printf("::: TEST: drawing bottomright corner ...\n");
-#endif
-
-#if 1
-
-#if 1
- BlitBitmap(sp_objects, screenBitmap,
- SR.left, SR.top,
- mSpriteWidth, mSpriteHeight,
- sx, sy);
-#else
- BlitBitmap(sp_objects, screenBitmap,
- SR.left, SR.top,
- mSpriteWidth, mSpriteHeight,
- DR.left, DR.top);
-#endif
-
-#else
- Tmp = mDest.Blt(DR, &Buffer, SR, DDBLT_WAIT);
-#endif
-}
-
-#endif
-
-void DDSpriteBuffer_BltEx(int pX, int pY, int SpritePos)
-{
- int XPos, YPos;
-
- if (NoDisplayFlag)
- return;
-
-#if 1
- XPos = mSpriteWidth * (SpritePos % mXSpriteCount);
- YPos = mSpriteHeight * (SpritePos / mXSpriteCount);
-#else
- XPos = (SpritePos % mXSpriteCount) + 1;
- YPos = (SpritePos / mXSpriteCount) + 1;
-#endif
-
-#if 0
- printf("::: BltEx: %d, %d, %d, %d\n", pX, pY, XPos, YPos);
-#endif
-
-#if 0
- if (TEST_flag)
- printf("::: DDSpriteBuffer_BltEx(): %d, %d [%d]\n",
- pX, pY, SpritePos);
-#endif
-
- Blt(pX, pY, sp_objects, XPos, YPos);