pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src story.cxx,1.7,1.8 story.hxx,1.7,1.8


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src story.cxx,1.7,1.8 story.hxx,1.7,1.8
Date: 7 Sep 2002 23:33:49 -0000

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

Modified Files:
        story.cxx story.hxx 
Log Message:
- some fun with namespaces and a bit of cleanup
- we probally need to change to something like NS_blabla, everything else just 
leads easily to conflicts (at least in the worldmap/)

Index: story.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/story.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- story.cxx   6 Sep 2002 17:33:29 -0000       1.7
+++ story.cxx   7 Sep 2002 23:33:47 -0000       1.8
@@ -19,11 +19,15 @@
 
 #include <ClanLib/Display/Display/display.h>
 #include <ClanLib/Display/Font/font.h>
+#include "fonts.hxx"
 #include "pingus_resource.hxx"
 #include "pingus_menu_manager.hxx"
 #include "screen_manager.hxx"
 #include "worldmap/manager.hxx"
 
+// using NS_Pingus::NS_WorldMap::WorldMapManager;
+using pingus::worldmap::WorldMapManager;
+
 Story::Story(PingusMenuManager* manager)
   : PingusSubMenu (manager)
 {
@@ -38,8 +42,6 @@
 void
 Story::init()
 {
-  small_font = PingusResource::load_font("Fonts/pingus_small", "fonts");
-  large_font = PingusResource::load_font("Fonts/pingus", "fonts");
   background = PingusResource::load_surface("Textures/stones", "textures");  
   story = PingusResource::load_surface("Story/story1", "story");
 
@@ -67,14 +69,12 @@
                        CL_Display::get_height() - 25,
                        0.0, 0.0, 0.0, 0.5);
 
-  small_font->print_left(125, 80 + story.get_height() + 25 + (1 * 
small_font->get_height()), "Insert extremly interesting story here...");
-  small_font->print_left(125, 80 + story.get_height() + 25 + (2 * 
small_font->get_height()), "...");
-  small_font->print_left(125, 80 + story.get_height() + 25 + (3 * 
small_font->get_height()), "...");
-  small_font->print_left(125, 80 + story.get_height() + 25 + (4 * 
small_font->get_height()), "...");
-  small_font->print_left(125, 80 + story.get_height() + 25 + (5 * 
small_font->get_height()), "...");
-  small_font->print_left(125, 80 + story.get_height() + 25 + (6 * 
small_font->get_height()), "...");
-
-  UNUSED_ARG(gc);
+  gc.print_left(Fonts::pingus_small, 125, 80 + story.get_height() + 25 + (1 * 
15), "Insert extremly interesting story here...");
+  gc.print_left(Fonts::pingus_small, 125, 80 + story.get_height() + 25 + (2 * 
15), "...");
+  gc.print_left(Fonts::pingus_small, 125, 80 + story.get_height() + 25 + (3 * 
15), "...");
+  gc.print_left(Fonts::pingus_small, 125, 80 + story.get_height() + 25 + (4 * 
15), "...");
+  gc.print_left(Fonts::pingus_small, 125, 80 + story.get_height() + 25 + (5 * 
15), "...");
+  gc.print_left(Fonts::pingus_small, 125, 80 + story.get_height() + 25 + (6 * 
15), "...");
 }
 
 void
@@ -140,7 +140,7 @@
   // press
 
   // FIXME: This looks ugly... 
-  ScreenManager::instance()->push_screen(Pingus::WorldMapManager::instance ());
+  ScreenManager::instance()->push_screen(WorldMapManager::instance ());
   //worldmap_manager.display();
   //manager->enable_events ();
   manager->set_menu (&manager->mainmenu);

Index: story.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/story.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- story.hxx   5 Sep 2002 12:24:02 -0000       1.7
+++ story.hxx   7 Sep 2002 23:33:47 -0000       1.8
@@ -33,8 +33,6 @@
   bool   is_init;
   CL_Surface background;
   CL_Surface story;
-  CL_Font*  large_font;
-  CL_Font*  small_font;
 
 public:
   Story (PingusMenuManager* manager);





reply via email to

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