[Scummvm-cvs-logs] scummvm master -> 28cb3e82d14a872d8b55bb192211c03af2dac7ed

sev- sev at scummvm.org
Fri May 2 11:47:27 CEST 2014


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:
e714dea7c7 FULLPIPE: Implement Statics::init()
28cb3e82d1 FULLPIPE: Implement StaticANIObject::~StaticANIObject()


Commit: e714dea7c773645cbb0e2aeaf1dd260888391806
    https://github.com/scummvm/scummvm/commit/e714dea7c773645cbb0e2aeaf1dd260888391806
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-02T12:40:06+03:00

Commit Message:
FULLPIPE: Implement Statics::init()

Changed paths:
    engines/fullpipe/gfx.h
    engines/fullpipe/statics.cpp
    engines/fullpipe/statics.h



diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h
index 714247e..191df77 100644
--- a/engines/fullpipe/gfx.h
+++ b/engines/fullpipe/gfx.h
@@ -92,7 +92,7 @@ class Picture : public MemoryObject {
 
 	virtual bool load(MfcArchive &file);
 	void setAOIDs();
-	void init();
+	virtual void init();
 	void getDibInfo();
 	Bitmap *getPixelData();
 	virtual void draw(int x, int y, int style, int angle);
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 03cbc8e..e31267f 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -1440,6 +1440,19 @@ bool Statics::load(MfcArchive &file) {
 	return true;
 }
 
+void Statics::init() {
+	Picture::init();
+
+	if (_staticsId & 0x4000) {
+		Bitmap *bmp = _bitmap->reverseImage();
+
+		freePixelData();
+
+		_bitmap = bmp;
+		_data = bmp->_pixels;
+	}
+}
+
 Common::Point *Statics::getSomeXY(Common::Point &p) {
 	p.x = _someX;
 	p.y = _someY;
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index be88b4e..6366115 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -98,6 +98,7 @@ class Statics : public DynamicPhase {
 	virtual ~Statics();
 
 	virtual bool load(MfcArchive &file);
+	virtual void init();
 	Statics *getStaticsById(int itemId);
 
 	Common::Point *getSomeXY(Common::Point &p);


Commit: 28cb3e82d14a872d8b55bb192211c03af2dac7ed
    https://github.com/scummvm/scummvm/commit/28cb3e82d14a872d8b55bb192211c03af2dac7ed
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-02T12:45:42+03:00

Commit Message:
FULLPIPE: Implement StaticANIObject::~StaticANIObject()

Changed paths:
    engines/fullpipe/statics.cpp



diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index e31267f..d15da94 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -141,7 +141,17 @@ StaticANIObject::StaticANIObject() {
 }
 
 StaticANIObject::~StaticANIObject() {
-	warning("STUB: StaticANIObject::~StaticANIObject()");
+	for (uint i = 0; i < _staticsList.size(); i++)
+		delete _staticsList[i];
+
+	_staticsList.clear();
+
+	for (uint i = 0; i < _movements.size(); i++)
+		delete _movements[i];
+
+	_movements.clear();
+
+	g_fp->_mgm->clear();
 }
 
 StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) {






More information about the Scummvm-git-logs mailing list