[Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.42,1.43 animation.h,1.21,1.22
Andrew Kurushin
h00ligan at users.sourceforge.net
Wed Jun 8 12:02:13 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga game.cpp,1.70,1.71 interface.cpp,1.103,1.104 resnames.h,1.29,1.30
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga gfx.cpp,1.46,1.47 gfx.h,1.24,1.25
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6563
Modified Files:
animation.cpp animation.h
Log Message:
fix animation free bug
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- animation.cpp 8 May 2005 16:27:16 -0000 1.42
+++ animation.cpp 8 Jun 2005 19:01:18 -0000 1.43
@@ -333,12 +333,9 @@
uint16 i;
for (i = 0; i < MAX_ANIMATIONS; i++) {
-
freeId(i);
}
- _anim_count = 0;
-
return SUCCESS;
}
@@ -402,28 +399,21 @@
return _anim_tbl[animId]->current_frame;
}
-int Anim::freeId(uint16 anim_id) {
+void Anim::freeId(uint16 animId) {
ANIMATION *anim;
- if (anim_id > _anim_count) {
- return FAILURE;
- }
-
- anim = _anim_tbl[anim_id];
+ anim = _anim_tbl[animId];
if (anim == NULL) {
- return FAILURE;
+ return;
}
if (_vm->getGameType() == GType_ITE) {
free(anim->frame_offsets);
- anim->frame_offsets = NULL;
}
free(anim);
- _anim_tbl[anim_id] = NULL;
+ _anim_tbl[animId] = NULL;
_anim_count--;
-
- return SUCCESS;
}
void Anim::readAnimHeader(MemoryReadStreamEndian &readS, ANIMATION_HEADER &ah) {
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- animation.h 16 Apr 2005 20:59:24 -0000 1.21
+++ animation.h 8 Jun 2005 19:01:19 -0000 1.22
@@ -108,7 +108,7 @@
~Anim(void);
int load(const byte *anim_resdata, size_t anim_resdata_len, uint16 *anim_id_p);
- int freeId(uint16 anim_id);
+ void freeId(uint16 animId);
int play(uint16 anim_id, int vector_time, bool playing = true);
int link(int16 anim_id1, int16 anim_id2);
int setFlag(uint16 anim_id, uint16 flag);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga game.cpp,1.70,1.71 interface.cpp,1.103,1.104 resnames.h,1.29,1.30
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga gfx.cpp,1.46,1.47 gfx.h,1.24,1.25
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list