[Scummvm-cvs-logs] scummvm master -> 6e9fe4e365d05d9c3776c266aac3dc35a537f875
eriktorbjorn
eriktorbjorn at telia.com
Sun Nov 27 08:41:31 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
da626f786d CGE: Remove unused functions, moveVmap() and moveShapes().
6e9fe4e365 CGE: Fix mismatched free() / delete / delete [] Valgrind warning.
Commit: da626f786d30c59002cbd4348f01a759ae55d75c
https://github.com/scummvm/scummvm/commit/da626f786d30c59002cbd4348f01a759ae55d75c
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2011-11-26T23:34:47-08:00
Commit Message:
CGE: Remove unused functions, moveVmap() and moveShapes().
Changed paths:
engines/cge/bitmap.cpp
engines/cge/bitmap.h
engines/cge/vga13h.cpp
engines/cge/vga13h.h
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index 39bafc5..0e599cc 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -154,20 +154,6 @@ char *Bitmap::forceExt(char *buf, const char *name, const char *ext) {
return buf;
}
-uint16 Bitmap::moveVmap(uint8 *buf) {
- debugC(1, kCGEDebugBitmap, "Bitmap::moveVmap(buf)");
-
- if (!_v)
- return 0;
-
- uint16 vsiz = (uint8 *)_b - (uint8 *)_v;
- uint16 siz = vsiz + _h * sizeof(HideDesc);
- memcpy(buf, _v, siz);
- delete[] _v;
- _b = (HideDesc *)((_v = buf) + vsiz);
- return siz;
-}
-
BitmapPtr Bitmap::code() {
debugC(1, kCGEDebugBitmap, "Bitmap::code()");
diff --git a/engines/cge/bitmap.h b/engines/cge/bitmap.h
index aa62827..e7179f3 100644
--- a/engines/cge/bitmap.h
+++ b/engines/cge/bitmap.h
@@ -77,7 +77,6 @@ public:
void show(int16 x, int16 y);
void xShow(int16 x, int16 y);
bool solidAt(int16 x, int16 y);
- uint16 moveVmap(uint8 *buf);
};
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 47b7768..e271895 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -115,13 +115,6 @@ BitmapPtr *Sprite::setShapeList(BitmapPtr *shpP) {
return r;
}
-void Sprite::moveShapes(uint8 *buf) {
- BitmapPtr *p;
- for (p = _ext->_shpList; *p; p++) {
- buf += (*p)->moveVmap(buf);
- }
-}
-
bool Sprite::works(Sprite *spr) {
if (!spr || !spr->_ext)
return false;
diff --git a/engines/cge/vga13h.h b/engines/cge/vga13h.h
index 559fa78..50cf5de 100644
--- a/engines/cge/vga13h.h
+++ b/engines/cge/vga13h.h
@@ -128,7 +128,6 @@ public:
virtual ~Sprite();
BitmapPtr shp();
BitmapPtr *setShapeList(BitmapPtr *shp);
- void moveShapes(uint8 *buf);
Sprite *expand();
Sprite *contract();
Sprite *backShow(bool fast = false);
Commit: 6e9fe4e365d05d9c3776c266aac3dc35a537f875
https://github.com/scummvm/scummvm/commit/6e9fe4e365d05d9c3776c266aac3dc35a537f875
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2011-11-26T23:40:12-08:00
Commit Message:
CGE: Fix mismatched free() / delete / delete [] Valgrind warning.
Changed paths:
engines/cge/bitmap.cpp
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index 0e599cc..4b50347 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -136,7 +136,7 @@ Bitmap &Bitmap::operator=(const Bitmap &bmp) {
} else {
uint16 vsiz = (uint8 *)bmp._b - (uint8 *)v0;
uint16 siz = vsiz + _h * sizeof(HideDesc);
- uint8 *v1 = (uint8 *)malloc(sizeof(uint8) * siz);
+ uint8 *v1 = new uint8[siz];
assert(v1 != NULL);
memcpy(v1, v0, siz);
_b = (HideDesc *)((_v = v1) + vsiz);
More information about the Scummvm-git-logs
mailing list