[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3481 - in trunk/pingus/src: . components
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3481 - in trunk/pingus/src: . components |
Date: |
Sun, 4 Nov 2007 05:17:33 +0100 |
Author: grumbel
Date: 2007-11-04 05:17:31 +0100 (Sun, 04 Nov 2007)
New Revision: 3481
Removed:
trunk/pingus/src/components/hurry_up.cpp
trunk/pingus/src/components/hurry_up.hpp
Modified:
trunk/pingus/src/client.cpp
trunk/pingus/src/components/playfield.hpp
trunk/pingus/src/config.cpp
trunk/pingus/src/game_session.cpp
Log:
- removed HurryUp
Modified: trunk/pingus/src/client.cpp
===================================================================
--- trunk/pingus/src/client.cpp 2007-11-03 20:29:07 UTC (rev 3480)
+++ trunk/pingus/src/client.cpp 2007-11-04 04:17:31 UTC (rev 3481)
@@ -26,7 +26,6 @@
#include "components/time_display.hpp"
#include "components/pingus_counter.hpp"
#include "components/smallmap.hpp"
-#include "components/hurry_up.hpp"
#include "display/cursor.hpp"
#include "display/display.hpp"
#include "true_server.hpp"
@@ -60,14 +59,12 @@
Size(Math::min(Display::get_width(),
world_width),
Math::min(Display::get_height(), world_height))));
- hurry_up = new HurryUp(this);
pcounter = new PingusCounter(get_server());
small_map = new SmallMap(this);
time_display = new TimeDisplay(this);
gui_manager->add(playfield, true);
gui_manager->add(button_panel, true);
- gui_manager->add(hurry_up, true);
gui_manager->add(pcounter, true);
gui_manager->add(small_map, true);
gui_manager->add(time_display, true);
@@ -110,7 +107,7 @@
void
Client::update (const GameDelta& delta)
{
- GUIScreen::update (delta);
+ GUIScreen::update(delta);
process_events(delta);
}
Deleted: trunk/pingus/src/components/hurry_up.cpp
===================================================================
--- trunk/pingus/src/components/hurry_up.cpp 2007-11-03 20:29:07 UTC (rev
3480)
+++ trunk/pingus/src/components/hurry_up.cpp 2007-11-04 04:17:31 UTC (rev
3481)
@@ -1,105 +0,0 @@
-// $Id$
-//
-// Pingus - A free Lemmings clone
-// Copyright (C) 1999 Ingo Ruhnke <address@hidden>
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#include "../resource.hpp"
-#include "../fonts.hpp"
-#include "display/display.hpp"
-#include "hurry_up.hpp"
-
-HurryUp::HurryUp (Client* c)
- : font(Fonts::pingus_large),
- is_running(false),
- is_finished(false),
- center_reached(false),
- client(c),
- wait_counter(0),
- x_pos(-200.0),
- speed(3.0f)
-{
-}
-
-HurryUp::~HurryUp()
-{
-}
-
-
-void
-HurryUp::draw(DrawingContext& gc)
-{
-#ifdef CLANLIB_0_6
- if (is_finished) return;
-
- if (is_running)
- {
- font.print_right(CL_Display::get_width() - static_cast<int>(x_pos),
- CL_Display::get_height()/2 - font->get_height(),
- "Hurry");
- font.print_left(static_cast<int>(x_pos),
- CL_Display::get_height()/2 - font->get_height(),
- "Up");
- }
- UNUSED_ARG(gc);
-#endif
-}
-
-void
-HurryUp::update(float /*delta*/)
-{
- if (is_finished) return;
-
- if (is_running)
- {
- if (center_reached)
- {
- // Wait some secs
- if (static_cast<unsigned int>(wait_counter) < SDL_GetTicks())
- {
- speed *= 1.2f;
- x_pos += speed;
-
- if (x_pos > Display::get_width() + 200)
- is_finished = true;
- }
- }
- else
- {
- x_pos += speed;
- speed *= 1.2f;
-
- if (static_cast<int>(x_pos) > Display::get_width()/2)
- {
- x_pos = (float)Display::get_width()/2;
- center_reached = true;
- wait_counter = SDL_GetTicks() + 2000;
- }
- }
- }
- else if (!is_finished)
- {
- // FIXME: broken
-#if 0
- if ( client->get_server()->get_world()->get_time_left() != -1
- && client->get_server()->get_world()->get_time_left() < 10 * 15)
- is_running = true;
-#endif
- }
-}
-
-
-/* EOF */
Deleted: trunk/pingus/src/components/hurry_up.hpp
===================================================================
--- trunk/pingus/src/components/hurry_up.hpp 2007-11-03 20:29:07 UTC (rev
3480)
+++ trunk/pingus/src/components/hurry_up.hpp 2007-11-04 04:17:31 UTC (rev
3481)
@@ -1,59 +0,0 @@
-// $Id$
-//
-// Pingus - A free Lemmings clone
-// Copyright (C) 1999 Ingo Ruhnke <address@hidden>
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#ifndef HEADER_PINGUS_HURRY_UP_HXX
-#define HEADER_PINGUS_HURRY_UP_HXX
-
-#include "../gui/component.hpp"
-
-#include "../font.hpp"
-
-class DrawingContext;
-class Client;
-
-/** Hurry up if the time goes over... */
-class HurryUp : public GUI::Component
-{
-private:
- Font font;
- bool is_running;
- bool is_finished;
- bool center_reached;
- Client* client;
-
- int wait_counter;
- float x_pos;
-
- float speed;
-
-public:
- HurryUp(Client*);
- virtual ~HurryUp();
-
- void draw(DrawingContext& gc);
- void update(float delta);
- void set_client(Client*);
-
-private:
- HurryUp (const HurryUp&);
- HurryUp& operator= (const HurryUp&);
-};
-
-
-#endif
Modified: trunk/pingus/src/components/playfield.hpp
===================================================================
--- trunk/pingus/src/components/playfield.hpp 2007-11-03 20:29:07 UTC (rev
3480)
+++ trunk/pingus/src/components/playfield.hpp 2007-11-04 04:17:31 UTC (rev
3481)
@@ -38,7 +38,6 @@
private:
friend class Client;
- ////CL_Surface buffer;
Server* server;
Client* client;
Modified: trunk/pingus/src/config.cpp
===================================================================
--- trunk/pingus/src/config.cpp 2007-11-03 20:29:07 UTC (rev 3480)
+++ trunk/pingus/src/config.cpp 2007-11-04 04:17:31 UTC (rev 3481)
@@ -404,6 +404,5 @@
return ret_val;
}
-
/* EOF */
Modified: trunk/pingus/src/game_session.cpp
===================================================================
--- trunk/pingus/src/game_session.cpp 2007-11-03 20:29:07 UTC (rev 3480)
+++ trunk/pingus/src/game_session.cpp 2007-11-04 04:17:31 UTC (rev 3481)
@@ -159,7 +159,7 @@
}
// Client is independend of the update limit, well, not completly...
- client->update (delta);
+ client->update(delta);
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3481 - in trunk/pingus/src: . components,
grumbel at BerliOS <=