adonthell-commits
[Top][All Lists]
Advanced

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

[Adonthell-commits] CVS: adonthell/src gamedate.cc,1.7,1.8 gamedate.h,1.


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src gamedate.cc,1.7,1.8 gamedate.h,1.3,1.4 gametime.cc,1.11,1.12 gametime.h,1.12,1.13 image.cc,1.14,1.15 nls.cc,1.6,1.7 prefs.cc,1.27,1.28 screen.cc,1.19,1.20
Date: Wed, 04 Dec 2002 12:09:50 -0500

Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv4062/src

Modified Files:
        gamedate.cc gamedate.h gametime.cc gametime.h image.cc nls.cc 
        prefs.cc screen.cc 
Log Message:
FIXED compilation for BeOS (still crashing during initial dialogue though)
FIXED the business with libtool and sed on Debian/Unstable (I hope!)
REPLACED float with double for whatever good that does


Index: gamedate.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gamedate.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** gamedate.cc 2 Dec 2002 15:16:05 -0000       1.7
--- gamedate.cc 4 Dec 2002 17:09:48 -0000       1.8
***************
*** 31,40 ****
  
  // number of game cycles since the last gametime minute passed
! float gamedate::Ticks = 0.0;
  
  // Increase gametime 
  void gamedate::update ()
  {
!     static float tenth_minute = gametime::minute () / 10.0;
      
      // fts contains the number of cycles that passed since the last
--- 31,40 ----
  
  // number of game cycles since the last gametime minute passed
! double gamedate::Ticks = 0.0;
  
  // Increase gametime 
  void gamedate::update ()
  {
!     static double tenth_minute = gametime::minute () / 10.0;
      
      // fts contains the number of cycles that passed since the last

Index: gamedate.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gamedate.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** gamedate.h  10 Aug 2002 12:18:21 -0000      1.3
--- gamedate.h  4 Dec 2002 17:09:48 -0000       1.4
***************
*** 112,116 ****
  
      // number of game cycles since the last 1/10 gametime minute passed
!     static float Ticks;
  #endif // SWIG
  };
--- 112,116 ----
  
      // number of game cycles since the last 1/10 gametime minute passed
!     static double Ticks;
  #endif // SWIG
  };

Index: gametime.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gametime.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** gametime.cc 9 Aug 2002 20:01:26 -0000       1.11
--- gametime.cc 4 Dec 2002 17:09:48 -0000       1.12
***************
*** 23,27 ****
  #include <SDL/SDL.h>
  
! float gametime::Minute;
  u_int32 gametime::timer1;
  u_int32 gametime::timer2;
--- 23,27 ----
  #include <SDL/SDL.h>
  
! double gametime::Minute;
  u_int32 gametime::timer1;
  u_int32 gametime::timer2;
***************
*** 39,43 ****
      
      // Number of game cycles during rt_minutes realtime minutes
!     float cycles = (60000 * rt_minutes) / (float) CYCLE_LENGTH;
      
      // Calculate how many game cycles make one gametime minute,
--- 39,43 ----
      
      // Number of game cycles during rt_minutes realtime minutes
!     double cycles = (60000 * rt_minutes) / (double) CYCLE_LENGTH;
      
      // Calculate how many game cycles make one gametime minute,

Index: gametime.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gametime.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** gametime.h  9 Aug 2002 20:01:26 -0000       1.12
--- gametime.h  4 Dec 2002 17:09:48 -0000       1.13
***************
*** 76,80 ****
       * @return %gametime in minutes.
       */
!     static float minute ()
      {
          return Minute;
--- 76,80 ----
       * @return %gametime in minutes.
       */
!     static double minute ()
      {
          return Minute;
***************
*** 134,138 ****
  #ifndef SWIG
      // One minute of gametime in game cycles
!     static float Minute;
  
      static bool running; 
--- 134,138 ----
  #ifndef SWIG
      // One minute of gametime in game cycles
!     static double Minute;
  
      static bool running; 

Index: image.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/image.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** image.cc    28 Jun 2002 12:15:20 -0000      1.14
--- image.cc    4 Dec 2002 17:09:48 -0000       1.15
***************
*** 295,300 ****
      // pixel we proceed (we can replace the divides with shift, much much
      // faster.
!     u_int32 xstep = (u_int32) (((float) src.length () / (float) l) * 65535); 
!     u_int32 ystep = (u_int32) (((float) src.height () / (float) h) * 65535); 
      u_int32 xcur;
      u_int32 ycur;
--- 295,300 ----
      // pixel we proceed (we can replace the divides with shift, much much
      // faster.
!     u_int32 xstep = (u_int32) (((double) src.length () / (double) l) * 
65535); 
!     u_int32 ystep = (u_int32) (((double) src.height () / (double) h) * 
65535); 
      u_int32 xcur;
      u_int32 ycur;

Index: nls.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/nls.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** nls.cc      28 Sep 2002 10:14:47 -0000      1.6
--- nls.cc      4 Dec 2002 17:09:48 -0000       1.7
***************
*** 51,55 ****
  {    
  #if ENABLE_NLS
! #ifndef WIN32
      setenv ("LANGUAGE", language.c_str (), 1);
  #endif
--- 51,55 ----
  {    
  #if ENABLE_NLS
! #if !defined (WIN32) && !defined (__BEOS__)
      setenv ("LANGUAGE", language.c_str (), 1);
  #endif

Index: prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.cc,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** prefs.cc    28 Sep 2002 17:21:50 -0000      1.27
--- prefs.cc    4 Dec 2002 17:09:48 -0000       1.28
***************
*** 46,50 ****
  #ifdef WIN32
      screen_mode = 1;                // Fullscreen
!  #else
      screen_mode = 0;                // Fullscreen
  #endif
--- 46,50 ----
  #ifdef WIN32
      screen_mode = 1;                // Fullscreen
! #else
      screen_mode = 0;                // Fullscreen
  #endif

Index: screen.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/screen.cc,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** screen.cc   13 Sep 2002 21:39:39 -0000      1.19
--- screen.cc   4 Dec 2002 17:09:48 -0000       1.20
***************
*** 24,29 ****
  #include "screen.h"
  #include <iostream>
  #include <sstream> 
! 
  
  using namespace std; 
--- 24,30 ----
  #include "screen.h"
  #include <iostream>
+ #ifndef __BEOS__
  #include <sstream> 
! #endif
  
  using namespace std; 
***************
*** 113,116 ****
--- 114,118 ----
  string screen::info ()
  {
+ #ifndef __BEOS__
      const SDL_VideoInfo * vi = SDL_GetVideoInfo ();
      ostringstream temp; 
***************
*** 137,140 ****
--- 139,145 ----
  
      string ret = temp.str ();
+ #else
+     string ret = "Sorry, not available under BeOS\n";
+ #endif // __BEOS__
  
      return ret; 





reply via email to

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