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