|
|
@ -159,16 +159,16 @@ void GameWidget::loadSprites()
|
|
|
|
void GameWidget::loadSprite(Sprite spr, const TQString & path)
|
|
|
|
void GameWidget::loadSprite(Sprite spr, const TQString & path)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!sprites[spr].load(locate("appdata", TQString("data/") + path)))
|
|
|
|
if (!sprites[spr].load(locate("appdata", TQString("data/") + path)))
|
|
|
|
qFatal("Cannot open data files.\nHave you correctly installed KSmiletris?");
|
|
|
|
tqFatal("Cannot open data files.\nHave you correctly installed KSmiletris?");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GameWidget::loadMaskedSprite(Sprite spr, const TQString & path1, const TQString & path2)
|
|
|
|
void GameWidget::loadMaskedSprite(Sprite spr, const TQString & path1, const TQString & path2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQBitmap bmp;
|
|
|
|
TQBitmap bmp;
|
|
|
|
if (!sprites[spr].load(locate("appdata", TQString("data/") + path1)))
|
|
|
|
if (!sprites[spr].load(locate("appdata", TQString("data/") + path1)))
|
|
|
|
qFatal("Cannot open data files.\nHave you correctly installed KSmiletris?");
|
|
|
|
tqFatal("Cannot open data files.\nHave you correctly installed KSmiletris?");
|
|
|
|
if (!bmp.load(locate("appdata", TQString("data/") + path2)))
|
|
|
|
if (!bmp.load(locate("appdata", TQString("data/") + path2)))
|
|
|
|
qFatal("Cannot open data files.\nHave you correctly installed KSmiletris?");
|
|
|
|
tqFatal("Cannot open data files.\nHave you correctly installed KSmiletris?");
|
|
|
|
sprites[spr].setMask(bmp);
|
|
|
|
sprites[spr].setMask(bmp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|