pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.6,1.7 client.cxx,


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.6,1.7 client.cxx,1.12,1.13 client.hxx,1.10,1.11 game_session.cxx,1.4,1.5 true_server.cxx,1.3,1.4
Date: 3 Aug 2002 11:37:47 -0000

Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv4214

Modified Files:
        action_button.cxx client.cxx client.hxx game_session.cxx 
        true_server.cxx 
Log Message:
fixed fast forward

Index: action_button.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/action_button.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- action_button.cxx   2 Aug 2002 22:55:19 -0000       1.6
+++ action_button.cxx   3 Aug 2002 11:37:45 -0000       1.7
@@ -238,10 +238,14 @@
 ForwardButton::draw()
 {
   if (server->get_fast_forward())
-    backgroundhl.put_screen (x_pos, y_pos);
+    {
+      backgroundhl.put_screen (x_pos, y_pos);
+    }
   else
-    background.put_screen (x_pos, y_pos);
-  
+    {
+      background.put_screen (x_pos, y_pos);
+    }
+
   surface.put_screen(x_pos, y_pos);
 }
 
@@ -260,7 +264,7 @@
 void
 ForwardButton::on_primary_button_click (int x, int y)
 {
-  server->set_fast_forward(server->get_fast_forward());
+  server->set_fast_forward(!server->get_fast_forward());
 }
 
 PauseButton::PauseButton(Server* s, int x, int y) 

Index: client.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/client.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- client.cxx  3 Aug 2002 09:59:23 -0000       1.12
+++ client.cxx  3 Aug 2002 11:37:45 -0000       1.13
@@ -27,7 +27,6 @@
 #include "playfield.hxx"
 #include "timer.hxx"
 #include "pingus_resource.hxx"
-#include "level_result.hxx"
 #include "sound.hxx"
 #include "option_menu.hxx"
 #include "time_display.hxx"
@@ -47,8 +46,6 @@
 
 Client::Client(Server * s)
   : server       (s),
-    fast_forward (false),
-    pause        (false),
     skip_frame   (0),
     do_replay    (false),
     is_finished  (false),
@@ -281,38 +278,7 @@
 {
 }
 #endif
-void
-Client::set_fast_forward(bool value)
-{
-  fast_forward = value;
-  skip_frame = 0;
-  server->set_fast_forward(value);
-}
-
-bool
-Client::get_fast_forward()
-{
-  return fast_forward;
-}
-
-void
-Client::set_pause(bool value)
-{
-  pause = value;
-  server->set_pause(value);
-}
-
-bool
-Client::get_pause()
-{
-  return pause;
-}
 
-Result
-Client::get_result()
-{
-  return result;
-}
 
 bool
 Client::replay()
@@ -460,13 +426,13 @@
 void
 Client:: on_pause_press ()
 {
-  set_pause (!get_pause ());
+  server->set_pause (!server->get_pause ());
 }
 
 void 
 Client::on_fast_forward_press ()
 {
-  set_fast_forward(!get_fast_forward());
+  server->set_fast_forward(!server->get_fast_forward());
 }
 
 void 
@@ -491,8 +457,6 @@
   // FIXME: using this twice will crash with an X Error
   //CL_MouseCursor::hide ();
 
-  fast_forward = false;
-  pause = false;
   do_replay = false;
   is_finished = false;
   skip_frame = 0;

Index: client.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/client.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- client.hxx  3 Aug 2002 09:59:23 -0000       1.10
+++ client.hxx  3 Aug 2002 11:37:45 -0000       1.11
@@ -59,8 +59,6 @@
   Result result;
   Server* server;
 
-  bool fast_forward;
-  bool pause;
   int  skip_frame;
   bool do_replay;
   bool is_finished;
@@ -86,17 +84,10 @@
   Server* get_server() { return server; }
   Playfield* get_playfield() { return playfield; }
 
-  void set_fast_forward(bool value);
-  bool get_fast_forward();
-
-  bool get_pause();
-  void set_pause(bool value);
-
   bool replay();
   void do_restart();
   bool finished();
   void set_finished();
-  Result get_result();
 
   /** Update all parts of the world */
   void update (float delta);

Index: game_session.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_session.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- game_session.cxx    2 Aug 2002 13:17:42 -0000       1.4
+++ game_session.cxx    3 Aug 2002 11:37:45 -0000       1.5
@@ -62,12 +62,27 @@
 }
 
 void
-PingusGameSession::on_pause_press () { client->on_pause_press (); }
+PingusGameSession::on_pause_press ()
+{
+  client->on_pause_press (); 
+}
+
 void
-PingusGameSession::on_fast_forward_press () {client->on_fast_forward_press (); 
}
+PingusGameSession::on_fast_forward_press ()
+{
+  client->on_fast_forward_press (); 
+}
+
 void
-PingusGameSession::on_armageddon_press () {client->on_armageddon_press (); }
+PingusGameSession::on_armageddon_press () 
+{
+  client->on_armageddon_press (); 
+}
+
 void
-PingusGameSession::on_escape_press () { client->on_escape_press (); }
+PingusGameSession::on_escape_press () 
+{ 
+  client->on_escape_press (); 
+}
 
 /* EOF */

Index: true_server.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/true_server.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- true_server.cxx     28 Jun 2002 09:51:46 -0000      1.3
+++ true_server.cxx     3 Aug 2002 11:37:45 -0000       1.4
@@ -31,7 +31,6 @@
     plf (arg_plf)
 {
   filename = plf->get_filename();
-  local_game_speed = game_speed;
   world = 0;
   finished = false;
   client_needs_redraw = true;
@@ -71,6 +70,8 @@
 
       if (fast_forward)
        {
+         
+
          // To let the game run faster we just update it multiple
          // times
          for (int i = 0; i < 4; ++i)
@@ -114,10 +115,12 @@
 TrueServer::set_fast_forward(bool value)
 {
   fast_forward = value;
-  if (fast_forward)
-    local_game_speed = 5;
-  else 
-    local_game_speed = game_speed;
+}
+
+bool
+TrueServer::get_fast_forward()
+{
+  return fast_forward;
 }
 
 void 
@@ -130,12 +133,6 @@
 TrueServer::get_pause()
 {
   return pause;
-}
-
-bool
-TrueServer::get_fast_forward()
-{
-  return fast_forward;
 }
 
 bool




reply via email to

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