pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src fonts.cxx, 1.6, 1.7 menu_background.c


From: Ingo Ruhnke
Subject: [Pingus-CVS] CVS: Games/Pingus/src fonts.cxx, 1.6, 1.7 menu_background.cxx, 1.10, 1.11 pingus_main.cxx, 1.102, 1.103 pingus_resource.cxx, 1.34, 1.35
Date: Sat, 13 Dec 2003 16:10:47 +0100

Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv26294/src

Modified Files:
        fonts.cxx menu_background.cxx pingus_main.cxx 
        pingus_resource.cxx 
Log Message:
- pingus now fully  compilable with clanlib0.7, but only the menu is working at 
the moment

Index: fonts.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fonts.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- fonts.cxx   20 Oct 2003 19:28:54 -0000      1.6
+++ fonts.cxx   13 Dec 2003 15:10:44 -0000      1.7
@@ -41,24 +41,24 @@
 void
 init ()
 {
-#ifdef WORDS_BIGENDIAN
+#ifndef CLANLIB_0_6
   // FIXME: Just a workaround, no fix
-  xterm        = PingusResource::load_font("Fonts/xterm","fonts");
+  pingus_small = PingusResource::load_font("Fonts/pingus_small","fonts");
+  xterm        = pingus_small;
 
-  pingus_small = xterm;
-  pingus_small_fix_num = xterm;
-  pingus_large = xterm;
+  pingus_small_fix_num = pingus_small;
+  pingus_large = pingus_small;
 
-  chalk_large  = xterm;
-  chalk_normal = xterm;
-  chalk_small  = xterm;
+  chalk_large  = pingus_small;
+  chalk_normal = pingus_small;
+  chalk_small  = pingus_small;
 
-  courier_small = xterm;
+  courier_small = pingus_small;
 
-  smallfont    = xterm;
-  smallfont_h  = xterm;
+  smallfont    = pingus_small;
+  smallfont_h  = pingus_small;
 
-  lcd          = xterm;
+  lcd          = pingus_small;
 #else 
   pingus_small = PingusResource::load_font("Fonts/pingus_small", "fonts");
   pingus_small_fix_num = 
PingusResource::load_font("Fonts/pingus_small_fix_num", "fonts");

Index: menu_background.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_background.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- menu_background.cxx 18 Oct 2003 23:17:27 -0000      1.10
+++ menu_background.cxx 13 Dec 2003 15:10:44 -0000      1.11
@@ -25,8 +25,8 @@
 
 MenuBackground::MenuBackground ()
 {
-  layer_manager.add_layer (PingusResource::load_surface ("menu/layer1", 
"core"),  0, 0, 12, 0);
-  layer_manager.add_layer (PingusResource::load_surface ("menu/layer2", 
"core"),  0, 150, 25, 0);
+  layer_manager.add_layer (PingusResource::load_surface("menu/layer1", 
"core"),  0, 0, 12, 0);
+  layer_manager.add_layer (PingusResource::load_surface("menu/layer2", 
"core"),  0, 150, 25, 0);
   layer_manager.add_layer (PingusResource::load_surface ("menu/layer3", 
"core"), 0, 200, 50, 0);
   layer_manager.add_layer (PingusResource::load_surface ("menu/layer4", 
"core"), 0, 600 - 171, 100, 0);
   layer_manager.add_layer (PingusResource::load_surface ("menu/layer5", 
"core"), 0, 500, 200, 0);

Index: pingus_main.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- pingus_main.cxx     21 Oct 2003 21:37:06 -0000      1.102
+++ pingus_main.cxx     13 Dec 2003 15:10:44 -0000      1.103
@@ -224,9 +224,8 @@
       {"cheat",             required_argument, 0, 156},
       {"controller",        required_argument, 0, 160},
       {"render-preview",    required_argument, 0, 161},
-#ifdef HAVE_LIBCLANGL
       {"use-opengl",        no_argument,       0, 'G'},
-#endif
+
       // FIXME: is the number stuff correct?
       {"fast",            no_argument,       0, 132},
       {"fast-mode",       no_argument,       0, 132},
@@ -281,11 +280,9 @@
       //std::cout << "PingusMain: Starting Editor" << std::endl;
       break;
 
-#ifdef HAVE_LIBCLANGL
     case 'G':
       use_opengl = true;
       break;
-#endif
 
     case 's': // -s, --disable-sound
       sound_enabled = false;
@@ -497,9 +494,7 @@
         << "\n                            " << _("Set the resolution for 
pingus (default: 800x600)")
         << "\n   -h, --help               " << _("Displays this help")
         << "\n   --disable-intro          " << _("Disable intro");
-#ifdef HAVE_LIBCLANGL
       std::cout << "   -G, --use-opengl         " << _("Use OpenGL");
-#endif
       std::cout
        << "\n   -w, --window             " << _("Start in Window Mode")
         << "\n   -f, --fullscreen         " << _("Start in Fullscreen")

Index: pingus_resource.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_resource.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- pingus_resource.cxx 13 Dec 2003 11:21:23 -0000      1.34
+++ pingus_resource.cxx 13 Dec 2003 15:10:44 -0000      1.35
@@ -64,7 +64,7 @@
 CL_ResourceManager*
 PingusResource::get(const std::string& arg_filename)
 {
-  std::string filename = arg_filename + ".scr";
+  std::string filename = arg_filename + ".xml";
 
   CL_ResourceManager* res_manager;
 
@@ -81,8 +81,8 @@
       res_filename = "data/" + filename;
 
       // FIXME: Memory hole...
-      res_manager = new CL_ResourceManager(path_manager.complete 
(res_filename.c_str()),
-                                          /* is_datafile = */false);
+      res_manager = new 
CL_ResourceManager(path_manager.complete(res_filename));
+                                       
 
       resource_map[filename] = res_manager;
       return res_manager;
@@ -131,7 +131,6 @@
 CL_Surface
 PingusResource::load_surface(const ResDescriptor& res_desc)
 {
-
   // try to load from cache
   CL_Surface surf = load_from_cache(res_desc);
 
@@ -289,12 +288,19 @@
        {
        case ResDescriptor::RD_RESOURCE:
          try {
-           font = CL_Font(res_desc.res_name.c_str(),
+           font = CL_Font(res_desc.res_name,
                            get(res_desc.datafile));
          } catch (CL_Error err) {
-           pout << "PingusResource: " << err.message << std::endl
+            std::list<std::string> lst = 
get(res_desc.datafile)->get_all_resources();
+            for(std::list<std::string>::iterator i = lst.begin(); i != 
lst.end(); ++i)
+              {
+                std::cout << "Res: " << *i << std::endl;
+              }
+            
+            std::cout << "DatafileRes: " << get(res_desc.datafile) << 
std::endl;
+           pout << "PingusResource: CL_Error: " << err.message << std::endl
                 << "PingusResource: Couldn't load font: " << res_desc << 
std::endl;
-           assert (!"PingusResource: Fatal error can't continue!");
+            assert (!"PingusResource: Fatal error can't continue!");
          }
          font_map[res_desc] = font;
          return font;





reply via email to

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