From: <bal...@us...> - 2003-11-18 23:00:14
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/BAMImporter In directory sc8-pr-cvs1:/tmp/cvs-serv29526/gemrb/plugins/BAMImporter Modified Files: BAMImp.h BAMImp.cpp Log Message: Bug Fixed: Fixed Many File Pointer Leaks Index: BAMImp.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/BAMImporter/BAMImp.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BAMImp.h 13 Nov 2003 19:55:57 -0000 1.2 --- BAMImp.h 18 Nov 2003 23:00:08 -0000 1.3 *************** *** 27,31 **** BAMImp(void); ~BAMImp(void); ! bool Open(DataStream * stream, bool autoFree = false); Sprite2D * GetFrameFromCycle(unsigned char Cycle, unsigned short frame); Animation * GetAnimation(unsigned char Cycle, int x, int y, unsigned char mode = IE_NORMAL); --- 27,31 ---- BAMImp(void); ~BAMImp(void); ! bool Open(DataStream * stream, bool autoFree = true); Sprite2D * GetFrameFromCycle(unsigned char Cycle, unsigned short frame); Animation * GetAnimation(unsigned char Cycle, int x, int y, unsigned char mode = IE_NORMAL); Index: BAMImp.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/BAMImporter/BAMImp.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BAMImp.cpp 13 Nov 2003 19:55:57 -0000 1.6 --- BAMImp.cpp 18 Nov 2003 23:00:09 -0000 1.7 *************** *** 276,281 **** } //printf("[maxW = %d, maxH = %d]\n", w, h); ! Font * fnt = new Font(w*255, h, Palette, true, 0); ! for(int i = 0; i < 255; i++) { if(cycles[i].FirstFrame >= frames.size()) { fnt->AddChar(NULL, 0, 0, 0, 0); --- 276,281 ---- } //printf("[maxW = %d, maxH = %d]\n", w, h); ! Font * fnt = new Font(w*cycles.size(), h, Palette, true, 0); ! for(int i = 0; i < cycles.size(); i++) { if(cycles[i].FirstFrame >= frames.size()) { fnt->AddChar(NULL, 0, 0, 0, 0); |