예제 #1
0
void CGameManager::viewChange() {
	delete _movie;
	delete _movieSurface;

	_movie = nullptr;
	_movieSurface = CScreenManager::_screenManagerPtr->createSurface(600, 340);
	_trueTalkManager.clear();

	for (CTreeItem *treeItem = _project; treeItem; treeItem = treeItem->scan(_project))
		treeItem->viewChange();

	initBounds();
}
예제 #2
0
Bounds* parseBounds (xmlNodePtr cur) {
	Bounds *b;
	float minlat = 100;
	float minlon = 100;
	float maxlat = 100;
	float maxlon = 100;

	minlat = strtof((const char *)(xmlGetProp(cur, (const xmlChar *)"minlat")),NULL);
	minlon = strtof((const char *)(xmlGetProp(cur, (const xmlChar *)"minlon")),NULL);
	maxlat = strtof((const char *)(xmlGetProp(cur, (const xmlChar *)"maxlat")),NULL);
	maxlon = strtof((const char *)(xmlGetProp(cur, (const xmlChar *)"maxlon")),NULL);
	b = initBounds(minlat,maxlat,minlon,maxlon);
	return b;
}
unsigned int CSwordBibleModuleInfo::bookNumber(const QString &book) {
	unsigned int bookNumber = 0;

	//find out if we have ot and nt, only ot or only nt
	initBounds();

	boost::scoped_ptr<sword::VerseKey> key((sword::VerseKey *)module()->CreateKey());
	(*key) = sword::TOP;

	key->setBookName(book.toUtf8().constData());

	bookNumber = ((key->Testament() > 1) ? key->BMAX[0] : 0) + key->Book();

	return bookNumber;
}
/** Returns the books available in this module */
QStringList* CSwordBibleModuleInfo::books() {
	if (m_cachedLocale != backend()->booknameLanguage()) { //if the locale has changed
		delete m_bookList;
		m_bookList = 0;
	}

	if (!m_bookList) {
		m_bookList = new QStringList();

		initBounds();
		int min = 0;
		int max = 1;

		//find out if we have ot and nt, only ot or only nt

		if (m_hasOT>0 && m_hasNT>0) { //both
			min = 0;
			max = 1;
		}
		else if (m_hasOT>0 && !m_hasNT) { //only OT
			min = 0;
			max = 0;
		}
		else if (!m_hasOT && m_hasNT>0) { //only NT
			min = 1;
			max = 1;
		}
		else if (!m_hasOT && !m_hasNT) { //somethings wrong here! - no OT and no NT
			qWarning("CSwordBibleModuleInfo (%s) no OT and not NT! Check your config!", module()->Name());
			min = 0;
			max = -1;
		}

		boost::scoped_ptr<sword::VerseKey> key((sword::VerseKey *)module()->CreateKey());
		(*key) = sword::TOP;

		for (key->Testament(min+1); !key->Error() && (key->Testament()-1) <= max; key->Book(key->Book()+1)) {
			m_bookList->append( QString::fromUtf8(key->getBookName()) );
		}

		m_cachedLocale = backend()->booknameLanguage();
	}

	return m_bookList;
}
예제 #5
0
Chess::Board::Board() {
    initBounds();
    this->reset();
}