pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2947 - in branches/pingus_sdl: . src


From: jsalmon3
Subject: [Pingus-CVS] r2947 - in branches/pingus_sdl: . src
Date: Thu, 16 Aug 2007 04:08:57 +0200

Author: jsalmon3
Date: 2007-08-16 04:08:50 +0200 (Thu, 16 Aug 2007)
New Revision: 2947

Removed:
   branches/pingus_sdl/src/multiline_text.cpp
   branches/pingus_sdl/src/multiline_text.hpp
Modified:
   branches/pingus_sdl/pingus.vcproj
   branches/pingus_sdl/src/SConscript
Log:
Removed unused multiline_text



Modified: branches/pingus_sdl/pingus.vcproj
===================================================================
--- branches/pingus_sdl/pingus.vcproj   2007-08-16 01:48:13 UTC (rev 2946)
+++ branches/pingus_sdl/pingus.vcproj   2007-08-16 02:08:50 UTC (rev 2947)
@@ -551,14 +551,6 @@
                                >
                        </File>
                        <File
-                               RelativePath=".\src\multiline_text.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\multiline_text.hpp"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\src\path_manager.cpp"
                                >
                        </File>

Modified: branches/pingus_sdl/src/SConscript
===================================================================
--- branches/pingus_sdl/src/SConscript  2007-08-16 01:48:13 UTC (rev 2946)
+++ branches/pingus_sdl/src/SConscript  2007-08-16 02:08:50 UTC (rev 2947)
@@ -200,7 +200,6 @@
 'components/menu_button.cpp', 
 'mover.cpp', 
 'movers/linear_mover.cpp', 
-'multiline_text.cpp', 
 'particles/explosive_particle.cpp', 
 'particles/ground_particle.cpp', 
 'particles/pingu_particle_holder.cpp', 

Deleted: branches/pingus_sdl/src/multiline_text.cpp
===================================================================
--- branches/pingus_sdl/src/multiline_text.cpp  2007-08-16 01:48:13 UTC (rev 
2946)
+++ branches/pingus_sdl/src/multiline_text.cpp  2007-08-16 02:08:50 UTC (rev 
2947)
@@ -1,143 +0,0 @@
-//  $Id: multiline_text.cxx,v 1.10 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 <assert.h>
-#include "font.hpp"
-#include "multiline_text.hpp"
-#include "math.hpp"
-
-
-MultiLineText::MultiLineText()
-{
-  width = -1;
-  height = -1;
-}
-
-void
-MultiLineText::set_font(Font f)
-{
-  font = f;
-}
-
-void
-MultiLineText::set_text(const std::string& str, int text_width)
-{
-  size_t last_pos;
-
-  for(size_t j=0; j < str.length(); )
-    {
-      last_pos = str.length();
-
-      for(size_t i=j; /* i < (text_width + j) */
-         font.get_size(str.substr(j, i-j).c_str()).width < text_width;
-         ++i)
-       {
-         if (i >= str.length())
-           {
-             last_pos = str.length();
-             break;
-           }
-         else if (str[i] == ' ')
-           {
-             last_pos = i;
-           }
-         else if (str[i] == '\n')
-           {
-             last_pos = i;
-             break;
-           }
-       }
-      text.push_back(str.substr(j, last_pos - j));
-      j = last_pos + 1;
-    }
-
-  //cout << "MultiLineText: " << str << endl;
-  /*
-  cout << "MultiLineText: " << endl;
-  for(std::vector<std::string>::iterator i = text.begin(); i != text.end(); 
++i)
-    cout << "  " << *i << endl;
-  */
-  width = 0;
-  for(std::vector<std::string>::iterator i = text.begin(); i != text.end(); 
++i)
-         width = Math::max(width, font.get_size(i->c_str()).width);
-
-  height = (int)text.size() * font.get_height();
-}
-
-void
-MultiLineText::print_left(int x_pos, int y_pos)
-{
-  int y_inc = 0;
-
-  for(std::vector<std::string>::iterator i = text.begin();
-      i != text.end();
-      ++i)
-    {
-      font.draw(x_pos, y_pos + y_inc, i->c_str());
-      y_inc += font.get_height();
-    }
-}
-
-void
-MultiLineText::print_right(int x_pos, int y_pos)
-{
-#ifdef CLANLIB_0_6
-  int y_inc = 0;
-
-  for(std::vector<std::string>::iterator i = text.begin();
-      i != text.end();
-      ++i)
-    {
-      font->print_right(x_pos, y_pos + y_inc, i->c_str());
-      y_inc += font->get_height();
-    }
-#endif
-}
-
-void
-MultiLineText::print_center(int x_pos, int y_pos)
-{
-  int y_inc = 0;
-
-  Font myfont = font;
-
-  for(std::vector<std::string>::iterator i = text.begin();
-      i != text.end();
-      ++i)
-    {
-      myfont.draw(x_pos, y_pos + y_inc, i->c_str());
-      y_inc += font.get_height();
-    }
-}
-
-int
-MultiLineText::get_width()
-{
-  return width;
-}
-
-int
-MultiLineText::get_height()
-{
-  return height;
-}
-
-
-/* EOF */
-

Deleted: branches/pingus_sdl/src/multiline_text.hpp
===================================================================
--- branches/pingus_sdl/src/multiline_text.hpp  2007-08-16 01:48:13 UTC (rev 
2946)
+++ branches/pingus_sdl/src/multiline_text.hpp  2007-08-16 02:08:50 UTC (rev 
2947)
@@ -1,55 +0,0 @@
-//  $Id: multiline_text.hxx,v 1.9 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.
-
-#ifndef HEADER_PINGUS_MULTILINE_TEXT_HXX
-#define HEADER_PINGUS_MULTILINE_TEXT_HXX
-
-#include "pingus.hpp"
-#include "font.hpp"
-#include <string>
-#include <vector>
-
-
-class MultiLineText
-{
-private:
-  Font font;
-  std::vector<std::string> text;
-  int width, height;
-
-public:
-  MultiLineText();
-
-  void set_font(Font font);
-  void set_text(const std::string&, int width);
-  void print_left(int, int);
-  void print_right(int, int);
-  void print_center(int, int);
-  int  get_width();
-  int  get_height();
-
-private:
-  MultiLineText (const MultiLineText&);
-  MultiLineText& operator= (const MultiLineText&);
-};
-
-
-#endif
-
-/* EOF */





reply via email to

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