[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2521 - trunk/src
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r2521 - trunk/src |
Date: |
Thu, 1 Dec 2005 22:15:34 +0100 |
Author: grumbel
Date: 2005-12-01 22:15:33 +0100 (Thu, 01 Dec 2005)
New Revision: 2521
Removed:
trunk/src/gui_obj.cxx
trunk/src/gui_obj.hxx
trunk/src/pingus_counter_bar.cxx
trunk/src/pingus_counter_bar.hxx
Modified:
trunk/src/SConscript
trunk/src/ground_map.hxx
Log:
- removed some unused code
Modified: trunk/src/SConscript
===================================================================
--- trunk/src/SConscript 2005-12-01 20:55:34 UTC (rev 2520)
+++ trunk/src/SConscript 2005-12-01 21:15:33 UTC (rev 2521)
@@ -135,7 +135,6 @@
'gui/screen_manager.cxx',
'gui/screen_ptr.cxx',
'gui/surface_button.cxx',
-'gui_obj.cxx',
'html_browser.cxx',
'input/axes/button_axis.cxx',
'input/axes/inverted_axis.cxx',
@@ -182,7 +181,6 @@
'pingu_action_factory.cxx',
'pingu_enums.cxx',
'pingu_holder.cxx',
-'pingus_counter_bar.cxx',
'pingus_error.cxx',
'pingus_level.cxx',
'pingus_main.cxx',
Modified: trunk/src/ground_map.hxx
===================================================================
--- trunk/src/ground_map.hxx 2005-12-01 20:55:34 UTC (rev 2520)
+++ trunk/src/ground_map.hxx 2005-12-01 21:15:33 UTC (rev 2521)
@@ -73,6 +73,7 @@
int tile_width;
int tile_height;
+
public:
GroundMap(const PingusLevel& arg_plf);
virtual ~GroundMap();
Deleted: trunk/src/gui_obj.cxx
===================================================================
--- trunk/src/gui_obj.cxx 2005-12-01 20:55:34 UTC (rev 2520)
+++ trunk/src/gui_obj.cxx 2005-12-01 21:15:33 UTC (rev 2521)
@@ -1,67 +0,0 @@
-// $Id: gui_obj.cxx,v 1.4 2003/10/21 21:37:06 grumbel Exp $
-//
-// 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 <ClanLib/Display/display.h>
-#include "gui_obj.hxx"
-
-namespace Pingus {
-
-GuiObj::GuiObj()
-{
- // These variables are used for default clipping
- x1 = 0;
- y1 = 0;
- x2 = CL_Display::get_width();
- y2 = CL_Display::get_height();
-}
-
-GuiObj::~GuiObj()
-{
-}
-
-void
-GuiObj::set_clip_rect(int ax1, int ay1, int ax2, int ay2)
-{
- x1 = ax1;
- y1 = ay1;
- x2 = ax2;
- y2 = ay2;
-}
-
-void
-GuiObj::draw_clipped()
-{
- CL_Display::push_cliprect(CL_Rect(x1, y1, x2, y2));
- draw();
- CL_Display::pop_cliprect();
-}
-
-void
-GuiObj::update(float /*delta*/)
-{
-}
-
-void
-GuiObj::updateX()
-{
-}
-
-} // namespace Pingus
-
-/* EOF */
Deleted: trunk/src/gui_obj.hxx
===================================================================
--- trunk/src/gui_obj.hxx 2005-12-01 20:55:34 UTC (rev 2520)
+++ trunk/src/gui_obj.hxx 2005-12-01 21:15:33 UTC (rev 2521)
@@ -1,80 +0,0 @@
-// $Id: gui_obj.hxx,v 1.9 2003/10/18 23:17:27 grumbel Exp $
-//
-// 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_GUI_OBJ_HXX
-#define HEADER_PINGUS_GUI_OBJ_HXX
-
-#include "pingus.hxx"
-
-namespace Pingus {
-
-/** A GuiObj is an abstract interface for seperate parts of the
- screen, the complete screen is representated by a window obtect. A
- GuiObj must provide a methode to react on input, update the screen
- and redraw it. */
-class GuiObj
-{
-protected:
- // FIXME: Do we need that here?! (its used for clipping)
- int x1;
- int y1;
- int x2;
- int y2;
-
-public:
- GuiObj();
- virtual ~GuiObj();
-
- void set_clip_rect(int, int, int, int);
-
- /// Draw the gui element and do the clipping.
- virtual void draw_clipped();
-
- /** Return true if the mouse is over this GUI component */
- virtual bool mouse_over (int x, int y) { UNUSED_ARG(x); UNUSED_ARG(y);
return false; }
-
- /// Draw the gui element
- virtual void draw() = 0;
-
- /// Move the world one step further
- virtual void update (float delta);
-
- /** Update all elements, which are indepented of the world speed
- (for example scrolling). */
- virtual void updateX();
-
- // Events
-
- // Called when
- virtual void on_mouse_enter () {}
- virtual void on_mouse_leave () {}
- virtual void on_mouse_click () {}
- virtual void on_mouse_press () {}
- virtual void on_mouse_release () {}
-
-private:
- GuiObj (const GuiObj&);
- GuiObj& operator= (const GuiObj&);
-};
-
-} // namespace Pingus
-
-#endif
-
-/* EOF */
Deleted: trunk/src/pingus_counter_bar.cxx
===================================================================
--- trunk/src/pingus_counter_bar.cxx 2005-12-01 20:55:34 UTC (rev 2520)
+++ trunk/src/pingus_counter_bar.cxx 2005-12-01 21:15:33 UTC (rev 2521)
@@ -1,74 +0,0 @@
-// $Id: pingus_counter_bar.cxx,v 1.11 2003/10/21 21:37:06 grumbel Exp $
-//
-// Pingus - A free Lemmings clone
-// Copyright (C) 2000 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 <ClanLib/Display/display.h>
-#include "pingus_counter_bar.hxx"
-#include "pingu_holder.hxx"
-#include "server.hxx"
-#include "gui/display.hxx"
-#include "world.hxx"
-
-namespace Pingus {
-
-PingusCounterBar::PingusCounterBar (Server * s, Orientation o, const CL_Rect&
arg_rect)
- : server (s),
- orientation (o),
- rect (arg_rect.left + 2, arg_rect.top + 2, arg_rect.right - 2,
arg_rect.bottom - 2)
-{
-}
-
-PingusCounterBar::~PingusCounterBar ()
-{
-}
-
-void
-PingusCounterBar::update(float /*delta*/)
-{
-}
-
-void
-PingusCounterBar::draw ()
-{
- int length = rect.bottom - rect.top;
-
- int complete = server->get_world
()->get_pingus()->get_number_of_allowed();
- int current_out = server->get_world
()->get_pingus()->get_number_of_released();
- int current_saved = server->get_world
()->get_pingus()->get_number_of_exited();
-
- //std::cout << "Drawing Counterbar: " << rect << std::endl;
- CL_Display::fill_rect(CL_Rect(rect.left, rect.top, rect.right, rect.bottom),
- CL_Color(0, 0, 255, 128));
-
- int y_pos = rect.bottom;
- int tmp_y_pos = y_pos;
-
- y_pos -= (current_saved * length) / complete;
- CL_Display::fill_rect(CL_Rect(rect.left, tmp_y_pos, rect.right, y_pos),
- CL_Color(0, 255, 0, 200));
- tmp_y_pos = y_pos;
-
- y_pos -= ((current_out - current_saved) * length) / complete;
- CL_Display::fill_rect(CL_Rect(rect.left, tmp_y_pos, rect.right, y_pos),
- CL_Color(255, 0, 0, 200));
- tmp_y_pos = y_pos;
-}
-
-} // namespace Pingus
-
-/* EOF */
Deleted: trunk/src/pingus_counter_bar.hxx
===================================================================
--- trunk/src/pingus_counter_bar.hxx 2005-12-01 20:55:34 UTC (rev 2520)
+++ trunk/src/pingus_counter_bar.hxx 2005-12-01 21:15:33 UTC (rev 2521)
@@ -1,54 +0,0 @@
-// $Id: pingus_counter_bar.hxx,v 1.6 2003/10/18 23:17:27 grumbel Exp $
-//
-// Pingus - A free Lemmings clone
-// Copyright (C) 2000 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_PINGUS_COUNTER_BAR_HXX
-#define HEADER_PINGUS_PINGUS_COUNTER_BAR_HXX
-
-#include <ClanLib/Core/Math/rect.h>
-#include "gui_obj.hxx"
-
-namespace Pingus {
-
-class Server;
-
-class PingusCounterBar : public GuiObj
-{
-public:
- enum Orientation { VERTICAL, HORIZONTAL };
-private:
- Server * server;
- Orientation orientation;
- CL_Rect rect;
-public:
- PingusCounterBar (Server * s, Orientation o, const CL_Rect& arg_rect);
- virtual ~PingusCounterBar ();
-
- void update(float delta);
- void draw ();
-
-private:
- PingusCounterBar (const PingusCounterBar&);
- PingusCounterBar& operator= (const PingusCounterBar&);
-};
-
-} // namespace Pingus
-
-#endif
-
-/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2521 - trunk/src,
grumbel at BerliOS <=