[Scummvm-cvs-logs] SF.net SVN: scummvm: [26200] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Mar 18 11:25:46 CET 2007
Revision: 26200
http://scummvm.svn.sourceforge.net/scummvm/?rev=26200&view=rev
Author: peres001
Date: 2007-03-18 03:25:46 -0700 (Sun, 18 Mar 2007)
Log Message:
-----------
Made loadHead return a new Cnv instead of accepting a parameter.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/disk.cpp
scummvm/trunk/engines/parallaction/disk.h
scummvm/trunk/engines/parallaction/parallaction.cpp
scummvm/trunk/engines/parallaction/parallaction.h
scummvm/trunk/engines/parallaction/zone.cpp
Modified: scummvm/trunk/engines/parallaction/disk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk.cpp 2007-03-18 10:20:38 UTC (rev 26199)
+++ scummvm/trunk/engines/parallaction/disk.cpp 2007-03-18 10:25:46 UTC (rev 26200)
@@ -284,7 +284,7 @@
return new Script(buf, true);
}
-void Disk::loadHead(const char* name, StaticCnv* cnv) {
+StaticCnv* Disk::loadHead(const char* name) {
char path[PATH_LEN];
/*
@@ -300,7 +300,9 @@
snprintf(path, 8, "%shead", name);
path[8] = '\0';
+ StaticCnv *cnv = new StaticCnv;
loadExternalStaticCnv(path, cnv);
+ return cnv;
}
Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h 2007-03-18 10:20:38 UTC (rev 26199)
+++ scummvm/trunk/engines/parallaction/disk.h 2007-03-18 10:25:46 UTC (rev 26200)
@@ -108,7 +108,7 @@
Cnv* loadTalk(const char *name);
void loadObjects(const char *name, Cnv *cnv);
void loadPointer(StaticCnv* cnv);
- void loadHead(const char* name, StaticCnv* cnv);
+ StaticCnv* loadHead(const char* name);
void loadFont(const char* name, Cnv* cnv);
void loadStatic(const char* name, StaticCnv* cnv);
void loadFrames(const char* name, Cnv* cnv);
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2007-03-18 10:20:38 UTC (rev 26199)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2007-03-18 10:25:46 UTC (rev 26200)
@@ -725,10 +725,13 @@
if (!IS_DUMMY_CHARACTER(_vm->_characterName)) {
_vm->_gfx->freeCnv(&_vm->_char._miniFrames);
_vm->freeTable(_objectsNames);
+
_vm->_gfx->freeCnv(_vm->_char._talk);
if (_vm->_char._talk) delete _vm->_char._talk;
- _vm->_gfx->freeStaticCnv(&_vm->_char._head);
+ _vm->_gfx->freeStaticCnv(_vm->_char._head);
+ if (_vm->_char._head) delete _vm->_char._head;
+
_vm->_gfx->freeCnv(&_vm->_char._objs);
}
@@ -806,7 +809,7 @@
_disk->loadFrames(path, &_vm->_char._normalFrames);
if (!IS_DUMMY_CHARACTER(name)) {
- _disk->loadHead(path, &_vm->_char._head);
+ _vm->_char._head = _disk->loadHead(path);
_vm->_char._talk = _disk->loadTalk(path);
_disk->loadObjects(name, &_vm->_char._objs);
Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h 2007-03-18 10:20:38 UTC (rev 26199)
+++ scummvm/trunk/engines/parallaction/parallaction.h 2007-03-18 10:25:46 UTC (rev 26200)
@@ -236,7 +236,7 @@
struct Character {
Animation _ani;
- StaticCnv _head;
+ StaticCnv *_head;
Cnv *_talk;
Cnv _normalFrames;
Cnv _miniFrames;
@@ -249,10 +249,11 @@
// _talk._count = 0;
// _talk._array = NULL;
- _head._width = 0;
- _head._height = 0;
- _head._data0 = NULL;
- _head._data1 = NULL;
+ _head = NULL;
+// _head._width = 0;
+// _head._height = 0;
+// _head._data0 = NULL;
+// _head._data1 = NULL;
_objs._count = 0;
Modified: scummvm/trunk/engines/parallaction/zone.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/zone.cpp 2007-03-18 10:20:38 UTC (rev 26199)
+++ scummvm/trunk/engines/parallaction/zone.cpp 2007-03-18 10:25:46 UTC (rev 26200)
@@ -414,7 +414,7 @@
Common::Rect r(v6C, v6A);
r.moveTo(0, 90);
_vm->_gfx->drawBalloon(r, 0);
- _vm->_gfx->flatBlitCnv(&_vm->_char._head, 100, 152, Gfx::kBitFront);
+ _vm->_gfx->flatBlitCnv(_vm->_char._head, 100, 152, Gfx::kBitFront);
_vm->_gfx->displayWrappedString(data->_description, 0, 90, 130, 0);
jobEraseAnimations((void*)1, NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list