enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src display.cc, 1.35.2.5, 1.35.2.6 d_engine.hh, 1.14


From: Daniel Heck <address@hidden>
Subject: [Enigma-cvs] enigma/src display.cc, 1.35.2.5, 1.35.2.6 d_engine.hh, 1.14, 1.14.2.1
Date: Sun, 05 Oct 2003 13:09:59 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv14798/src

Modified Files:
      Tag: enigma0_80_rc
        display.cc d_engine.hh 
Log Message:
Prevent new models from receiving the timer signal right after being created


Index: d_engine.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/d_engine.hh,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -C2 -d -r1.14 -r1.14.2.1
*** d_engine.hh 12 Jul 2003 10:04:47 -0000      1.14
--- d_engine.hh 5 Oct 2003 13:09:57 -0000       1.14.2.1
***************
*** 174,177 ****
--- 174,178 ----
          // Variables
          ModelList m_active_models;
+         ModelList m_active_models_new;
      };
  

Index: display.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/display.cc,v
retrieving revision 1.35.2.5
retrieving revision 1.35.2.6
diff -C2 -d -r1.35.2.5 -r1.35.2.6
*** display.cc  3 Oct 2003 18:50:44 -0000       1.35.2.5
--- display.cc  5 Oct 2003 13:09:57 -0000       1.35.2.6
***************
*** 307,323 ****
  ModelLayer::activate (Model *m)
  {
!     list<Model*> &am = m_active_models;
!     assert (find(am.begin(), am.end(), m) == am.end());
!     list<Model*>::iterator i = find(am.begin(), am.end(), (Model*) 0);
!     if (i == am.end())
!         am.push_back(m);
!     else
!         *i = m;
! }
! 
! void
! ModelLayer::new_world (int, int)
! {
!     m_active_models.clear();
  }
  
--- 307,318 ----
  ModelLayer::activate (Model *m)
  {
!     list<Model*> &am = m_active_models_new;
! //    assert (find(am.begin(), am.end(), m) == am.end());
! //     list<Model*>::iterator i = find(am.begin(), am.end(), (Model*) 0);
! //     if (i == am.end())
! //         am.push_back(m);
! //     else
! //         *i = m;
!     am.push_back(m);
  }
  
***************
*** 334,342 ****
--- 329,348 ----
  
  void
+ ModelLayer::new_world (int, int)
+ {
+     m_active_models.clear();
+     m_active_models_new.clear();
+ }
+ 
+ void
  ModelLayer::tick (double dtime)
  {
      ModelList &am = m_active_models;
+ 
      am.remove((Model*) 0);
      am.remove_if(mem_fun(&Model::is_garbage));
+ 
+     // Append new active models to list
+     am.splice (am.end(), m_active_models_new);
  
      /* for_each does not work; animation may remove itself during a





reply via email to

[Prev in Thread] Current Thread [Next in Thread]