/[adonthell]/adonthell/src/event/date.cc
ViewVC logotype

Diff of /adonthell/src/event/date.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by ksterker, Thu May 13 06:44:00 2004 UTC revision 1.6 by ksterker, Mon Oct 18 07:40:23 2004 UTC
# Line 29  Line 29 
29  #include <ctype.h>  #include <ctype.h>
30  #include <stdio.h>  #include <stdio.h>
31  #include <stdlib.h>  #include <stdlib.h>
32  #include "base/timer.h"  #include "base/base.h"
33  #include "event/date.h"  #include "event/date.h"
34  #include "event/manager.h"  #include "event/manager.h"
35  #include "event/time_event.h"  #include "event/time_event.h"
# Line 40  using event::date; Line 40  using event::date;
40  u_int32 date::Time = 0;  u_int32 date::Time = 0;
41    
42  // how many game cycles make one second of game time  // how many game cycles make one second of game time
43  float date::Scale = 10.0;  float date::Scale = 5.0;
44    
45  // number of game time seconds before a time event will be raised  // number of game time seconds before a time event will be raised
46  u_int16 date::Resolution = 1;  u_int16 date::Resolution = 1;
# Line 52  double date::Ticks = 0.0; Line 52  double date::Ticks = 0.0;
52  // Increase gametime  // Increase gametime
53  void date::update ()  void date::update ()
54  {  {
55      // fts contains the number of cycles that passed since the last      // frames_missed contains the number of cycles that have been
56      // call to date::update      // skipped during the last call to date::update
57      Ticks += 1; // + timer::frames_missed ();      Ticks += 1 + base::Timer.frames_missed ();
58    
59      // check whether to trigger time events      // check whether to trigger time events
60      while (Ticks >= Scale)      while (Ticks >= Scale)

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26