|
|
|
@ -17,7 +17,7 @@
|
|
|
|
|
|
|
|
|
|
#include "kspritecache.h"
|
|
|
|
|
|
|
|
|
|
#include <kconfig.h>
|
|
|
|
|
#include <tdeconfig.h>
|
|
|
|
|
#include <tqbitmap.h>
|
|
|
|
|
#include <tqimage.h>
|
|
|
|
|
#include <tqwmatrix.h>
|
|
|
|
@ -221,7 +221,7 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(TDEConfig *config,TQString
|
|
|
|
|
//kdDebug(11002) << " Reading " << number << " frames " << endl;
|
|
|
|
|
|
|
|
|
|
TQString pixfile=config->readPathEntry(name+"file");
|
|
|
|
|
TQString maskfile=config->readPathEntry(name+"mask");
|
|
|
|
|
TQString mastdefile=config->readPathEntry(name+"mask");
|
|
|
|
|
|
|
|
|
|
// Load a given set of images or replace a %d by a sequence if there are
|
|
|
|
|
// less image names than number given
|
|
|
|
@ -232,7 +232,7 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(TDEConfig *config,TQString
|
|
|
|
|
{
|
|
|
|
|
TQString tmpfile,tmpmask;
|
|
|
|
|
tmpfile.sprintf(pixfile.latin1(),i);
|
|
|
|
|
tmpmask.sprintf(maskfile.latin1(),i);
|
|
|
|
|
tmpmask.sprintf(mastdefile.latin1(),i);
|
|
|
|
|
|
|
|
|
|
pixmap=loadPixmap(tmpfile,tmpmask);
|
|
|
|
|
if (!pixmap) kdError() << "Could not create pixmap="<<tmpfile << " with mask " << tmpmask << endl;
|
|
|
|
@ -255,9 +255,9 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(TDEConfig *config,TQString
|
|
|
|
|
double step;
|
|
|
|
|
if (number>1) step=(100.0-finalscale)/100.0/(double)(number-1);
|
|
|
|
|
else step=1.0;
|
|
|
|
|
//kdDebug(11002) << " Scaling " << number << " pics axis="<<axis<<" final="<<finalscale<<" file="<<pixfile<< " mask="<<maskfile<<endl;
|
|
|
|
|
//kdDebug(11002) << " Scaling " << number << " pics axis="<<axis<<" final="<<finalscale<<" file="<<pixfile<< " mask="<<mastdefile<<endl;
|
|
|
|
|
|
|
|
|
|
pixmap=loadPixmap(pixfile,maskfile);
|
|
|
|
|
pixmap=loadPixmap(pixfile,mastdefile);
|
|
|
|
|
for (unsigned int j=0;j<(unsigned int)number;j++)
|
|
|
|
|
{
|
|
|
|
|
TQWMatrix matrix;
|
|
|
|
|