Пример #1
0
void ActionRotateZ :: make(BaseElement* Object, BaseElement* Camera, int Index)
{
    BaseCreator* ChangeType = new CreatorRotationZ(this->Angle,this->Center);

    if (!ChangeType)
    {
        throw CreatorMemoryError();
    }

    if (Index >= 0 )
    {
       int i = 0;
       cIterator<BaseElement*> IndexObject(((cComposite*)Object)->Objects);
       while (!IndexObject.IsNullIter() && i < Index)
       {
           IndexObject.go_to_next();
           i++;
       }
       Object = IndexObject.get_value();
    }

    Object->change(ChangeType->get_change());
}
Пример #2
0
/* set visited cell */
void Kingdom::SetVisited(const s32 index, const MP2::object_t object)
{
    if(!isVisited(index, object) && object != MP2::OBJ_ZERO) visit_object.push_front(IndexObject(index, object));
}