void CD3DGUIWndRect::TopTo(IUIBaseRect** pRects,UINT RectCount,IUIBaseRect* pBeforeRect)
{
	CEasyArray<CD3DObject *> ObjectList(64,64);
	for(UINT i=0;i<RectCount;i++)
	{
		ObjectList.Add(dynamic_cast<CD3DObject *>(pRects[i]));
	}
	((CD3DUIRender *)GetRender())->MoveToTop(ObjectList.GetBuffer(),RectCount,dynamic_cast<CD3DObject *>(pBeforeRect));
}
void AutoReleasePool::purge()
{
    std::for_each(_objs.begin(), _objs.end(), [](Ref* obj)
    {
        if (obj)
        {
            obj->release();
        }
    });
    _objs.clear();
    ObjectList().swap(_objs);
}
Example #3
0
int PartyManager::startUp(){

	party = ObjectList(MAXPARTYSIZE);
	treasure =0;

	//Create the adventurers and put them in a rad party.
	party.add(new Adventurer("Paladin", 100, 100, 100, "A mighty paladin"));
	party.add(new Adventurer("Cleric", 150, 50, 100, "A worldly cleric"));
	party.add(new Adventurer("Wizard", 50, 100, 150, "A wise wizard"));
	party.add(new Adventurer("Rogue", 100, 50, 150, "A sneaky rogue"));
	//Adventurers are ready to take on the world

	return 1;
}