Beispiel #1
0
    void AddFlare(const Point& point, float duration)
    {
        m_list.PushFront();

        m_list.GetFront().m_point     = point;
        m_list.GetFront().m_time      = GetTime()->GetValue() + duration;
        m_list.GetFront().m_bRendered = false;
    }
Beispiel #2
0
    void AddPoster(Image* pimage, const Vector& vec, float scale)
    {
        m_list.PushFront();

        m_list.GetFront().m_pimage   = pimage;
        m_list.GetFront().m_vec      = vec;
        m_list.GetFront().m_scale    = scale;

        m_list.GetFront().m_mat.SetScale(scale);
        m_list.GetFront().m_mat.LookAtFrom(Vector(0, 0, 0), vec * 400.0f, Vector(0, 1, 0));
    }
Beispiel #3
0
 bool OnMainTopic(const ZString& str)
 {
     if (m_listHistory.GetFront()   != str) {
         m_listHistory.PushFront(str);
         DoSetTopic();
     }
     return true;
 }
Beispiel #4
0
    void DoSetTopic()
    {
        const ZString& str = m_listHistory.GetFront();

        m_pnavPane->SetTopic(str);
        m_ppageMain->SetTopic(m_pns, str);
        m_ppageSecondary->SetTopic(m_pns, m_pnavPane->GetSecondary(str));
        m_pscrollMain->SetPos(0);
        m_pscrollSecondary->SetPos(0);
    }
    void AddExplosion(
        const Vector&                 position,
        const Vector&                 forward,
        const Vector&                 right,
        const Vector&                 dposition,
		float                         radiusExplosion,
        float                         radiusShockWave,
        const Color&                  color,
        int                           countDecals,
        TVector<TRef<AnimatedImage> > vpimage,
        Image*                        pimageShockwave
    ) {
        //
        // Add the shockwave
        //

		if (pimageShockwave != NULL) {
			m_listShockwave.PushFront();
			ShockwaveData& sdata = m_listShockwave.GetFront();

			sdata.m_timeStart       = GetTime()->GetValue();
			sdata.m_pimageShockwave = pimageShockwave;
			sdata.m_color           = color;
			sdata.m_position        = position;
			sdata.m_dposition       = dposition;
			sdata.m_scale           = radiusShockWave;
			sdata.m_forward         = forward;
			sdata.m_right           = right;
		}

        //
        // Add the little explosions
        //

        int countImage = vpimage.GetCount();
        int indexImage = 0;

        for (int index = 0; index < countDecals; index++) {
            ExplosionDataList& list  = m_vlistExplosion.Get(index);
            list.PushFront();
            ExplosionData&     edata = list.GetFront();

            edata.m_timeStart = GetTime()->GetValue() + index * 0.25f;
            edata.m_pimage    = vpimage[indexImage];
            edata.m_position  = position + Vector::RandomPosition(radiusExplosion * 0.5f);
            edata.m_dposition = dposition;
            edata.m_angle     = random(0, 2 * pi);
            edata.m_scale     = radiusExplosion;

            indexImage++;
            if (indexImage >= countImage) {
                indexImage = 0;
            }
        }
    }