Esempio n. 1
0
void DeliciousTest::initTestCase() {
  Tellico::DataFileRegistry::self()->addDataLocation(QFINDTESTDATA("../../xslt/delicious2tellico.xsl"));
  // need to register the collection type
  Tellico::RegisterCollection<Tellico::Data::BookCollection> registerBook(Tellico::Data::Collection::Book, "book");
  Tellico::RegisterCollection<Tellico::Data::VideoCollection> registerVideo(Tellico::Data::Collection::Video, "video");
  Tellico::RegisterCollection<Tellico::Data::MusicCollection> registerMusic(Tellico::Data::Collection::Album, "album");
  Tellico::RegisterCollection<Tellico::Data::GameCollection> registerGame(Tellico::Data::Collection::Game, "game");
}
Esempio n. 2
0
bool GamePackageManager::loadGame( char const* path )
{
	HINSTANCE hInstance = ::LoadLibrary( path );
	if ( hInstance == NULL )
		return false;

	CREATEGAMEFUN createFun = (CREATEGAMEFUN)GetProcAddress( hInstance , GAME_CREATE_FUN_NAME );

	if ( !createFun )
		return false;

	IGamePackage* game = (*createFun)();
	if ( !game )
		return false;

	if ( !registerGame( game ) )
	{
		game->deleteThis();
		return false;
	}

	return true;
}