Exemple #1
0
void Purity::Scene::initializePhysics(b2World * world)
{
    mMutex.lock();

    initializeTiles(world);
    mObjectManager = std::unique_ptr<EntityManager>(new EntityManager(mTmxMap.get(), world));

    mMutex.unlock();
}
//Begins Text Input
void getText(char *buffer)
{
	setRegister();
	setupInterrupts();
	initializeTiles();
	initializeSprites();
	drawKeyboard();
	playBG = TRUE;	
	while(1)
	{
		if(playBG && !BGplaying)
        {
            // play the bg music
            DMA[2].cnt |= DMA_ON;
            REG_TM1CNT |= TM_ON;
            startBG = vblankcount;
            BGplaying = TRUE;
            DMA[2].src = flute;
        }
		checkMovement();
		if(!endInput)
		{
			checkSelection(buffer);
		}
		else
		{
			DMA[2].cnt &= ~DMA_ON;
            REG_TM1CNT &= ~TM_ON;
			playBG = FALSE;
			waitForVblank();
		}
		copyShadow();
		waitForVblank();
		moveSpriteToMem();
	}
}