[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3601 - trunk/pingus/src
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3601 - trunk/pingus/src |
Date: |
Tue, 1 Jul 2008 01:03:56 +0200 |
Author: grumbel
Date: 2008-07-01 01:03:54 +0200 (Tue, 01 Jul 2008)
New Revision: 3601
Modified:
trunk/pingus/src/client.cpp
trunk/pingus/src/client.hpp
trunk/pingus/src/game_session.cpp
trunk/pingus/src/game_session.hpp
Log:
Removed some old junk
Modified: trunk/pingus/src/client.cpp
===================================================================
--- trunk/pingus/src/client.cpp 2008-06-30 22:46:03 UTC (rev 3600)
+++ trunk/pingus/src/client.cpp 2008-06-30 23:03:54 UTC (rev 3601)
@@ -35,10 +35,8 @@
#include "gui/gui_manager.hpp"
#include "client.hpp"
-Client::Client(Server * s)
+Client::Client(Server* s)
: server (s),
- skip_frame (0),
- do_replay (false),
is_finished (false),
button_panel (0),
pcounter (0),
@@ -184,16 +182,9 @@
UNUSED_ARG(event);
}
-bool
-Client::replay()
-{
- return do_replay;
-}
-
void
Client::do_restart()
{
- do_replay = true;
server->send_finish_event();
}
@@ -246,9 +237,7 @@
void
Client::on_startup ()
{
- do_replay = false;
is_finished = false;
- skip_frame = 0;
if (maintainer_mode)
std::cout << "Starting Music: " << server->get_plf().get_music() <<
std::endl;
Modified: trunk/pingus/src/client.hpp
===================================================================
--- trunk/pingus/src/client.hpp 2008-06-30 22:46:03 UTC (rev 3600)
+++ trunk/pingus/src/client.hpp 2008-06-30 23:03:54 UTC (rev 3601)
@@ -38,7 +38,6 @@
class Vector;
class ButtonPanel;
class Cursor;
-class HurryUp;
class PingusCounter;
class Playfield;
class Server;
@@ -51,8 +50,6 @@
private:
Server* server;
- int skip_frame;
- bool do_replay;
bool is_finished;
ButtonPanel* button_panel;
@@ -69,7 +66,6 @@
Server* get_server() { return server; }
Playfield* get_playfield() { return playfield; }
- bool replay();
void do_restart();
bool finished();
void set_finished();
@@ -91,6 +87,7 @@
void on_action_axis_move (float);
Actions::ActionName get_action_name() const;
+
private:
void process_events (const GameDelta& events);
void process_scroll_event (const Input::ScrollEvent&);
Modified: trunk/pingus/src/game_session.cpp
===================================================================
--- trunk/pingus/src/game_session.cpp 2008-06-30 22:46:03 UTC (rev 3600)
+++ trunk/pingus/src/game_session.cpp 2008-06-30 23:03:54 UTC (rev 3601)
@@ -23,7 +23,6 @@
#include "server.hpp"
#include "game_session.hpp"
#include "game_session_result.hpp"
-#include "timer.hpp"
#include "resource.hpp"
#include "pingu_holder.hpp"
#include "world.hpp"
@@ -36,21 +35,9 @@
: plf(arg_plf),
show_result_screen(arg_show_result_screen)
{
- Timer plf_timer("GameSession plf creation");
-
- plf_timer.stop();
-
- Timer server_timer("GameSession server creation");
server = std::auto_ptr<Server>(new Server(plf));
- server_timer.stop();
-
- Timer client_timer("GameSession client creation");
client = std::auto_ptr<Client>(new Client(server.get()));
- client_timer.stop();
- number_of_redraws = 0;
- number_of_updates = 0;
-
// the world is initially on time
world_delay = 0;
@@ -60,12 +47,6 @@
GameSession::~GameSession ()
{
- if (maintainer_mode)
- std::cout << "XXXXXXXX"
- << " Redraws: " << number_of_redraws
- << " Updates: " << number_of_updates
- << " FrameSkip: " << number_of_updates - number_of_redraws
- << std::endl;
}
void
@@ -89,7 +70,6 @@
bool
GameSession::draw(DrawingContext& gc)
{
- ++number_of_redraws;
client->draw (gc);
return true;
}
@@ -146,7 +126,6 @@
{
// This updates the world and all objects
server->update ();
- ++number_of_updates;
}
}
@@ -159,7 +138,6 @@
while ((world_updates+1)*update_time <= time_passed) {
server->update ();
- ++number_of_updates;
world_updates++;
}
// save how far behind is the world compared to the actual time
Modified: trunk/pingus/src/game_session.hpp
===================================================================
--- trunk/pingus/src/game_session.hpp 2008-06-30 22:46:03 UTC (rev 3600)
+++ trunk/pingus/src/game_session.hpp 2008-06-30 23:03:54 UTC (rev 3601)
@@ -52,12 +52,6 @@
int world_delay; ///< how many milliseconds is the world behind the actual
time
- /** Number of updates */
- unsigned int number_of_updates;
-
- /** Number of redraws (frameskip == number_of_updates - number_of_redraws) */
- unsigned int number_of_redraws;
-
public:
GameSession(const PingusLevel& arg_plf, bool arg_show_result_screen);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3601 - trunk/pingus/src,
grumbel at BerliOS <=