aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/vga.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2015-12-02 11:54:42 +0100
committerWillem Jan Palenstijn2015-12-23 21:33:47 +0100
commit17d6e5e8608dfbf70fb08507da1ac196e04c0654 (patch)
tree1b7f335f67cf446d71bc719c515fcf8976c0ef93 /engines/lab/vga.cpp
parent88ede5d2d5865f88db1f77f127089574ec2a5e1c (diff)
downloadscummvm-rg350-17d6e5e8608dfbf70fb08507da1ac196e04c0654.tar.gz
scummvm-rg350-17d6e5e8608dfbf70fb08507da1ac196e04c0654.tar.bz2
scummvm-rg350-17d6e5e8608dfbf70fb08507da1ac196e04c0654.zip
LAB: Moved bltBitMap to Image class
Diffstat (limited to 'engines/lab/vga.cpp')
-rw-r--r--engines/lab/vga.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/engines/lab/vga.cpp b/engines/lab/vga.cpp
index 9ccb5f5c54..959218e98c 100644
--- a/engines/lab/vga.cpp
+++ b/engines/lab/vga.cpp
@@ -143,51 +143,6 @@ byte *LabEngine::getCurrentDrawingBuffer() {
}
/*****************************************************************************/
-/* Blits a piece of one image to another. */
-/* NOTE: for our purposes, assumes that ImDest is to be in VGA memory. */
-/*****************************************************************************/
-void LabEngine::bltBitMap(Image *imSource, uint16 xs, uint16 ys, Image *imDest,
- uint16 xd, uint16 yd, uint16 width, uint16 height) {
- // I think the old code assumed that the source image data was valid for the given box.
- // I will proceed on that assumption.
- int sx = xs;
- int sy = ys;
- int dx = xd;
- int dy = yd;
- int w = width;
- int h = height;
-
- if (dx < 0) {
- sx -= dx;
- w += dx;
- dx = 0;
- }
-
- if (dy < 0) {
- sy -= dy;
- w += dy;
- dy = 0;
- }
-
- if (dx + w > imDest->_width)
- w = imDest->_width - dx;
-
- if (dy + h > imDest->_height)
- h = imDest->_height - dy;
-
- if (w > 0 && h > 0) {
- byte *s = imSource->_imageData + sy * imSource->_width + sx;
- byte *d = imDest->_imageData + dy * imDest->_width + dx;
-
- while (h-- > 0) {
- memcpy(d, s, w);
- s += imSource->_width;
- d += imDest->_width;
- }
- }
-}
-
-/*****************************************************************************/
/* Scrolls the display in the x direction by blitting. */
/* The _tempScrollData variable must be initialized to some memory, or this */
/* function will fail. */