pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src html_browser.cxx,NONE,1.1 html_browse


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src html_browser.cxx,NONE,1.1 html_browser.hxx,NONE,1.1 Makefile.am,1.78,1.79 pingus_resource.cxx,1.5,1.6 system.cxx,1.3,1.4
Date: 22 Jun 2002 17:40:58 -0000

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

Modified Files:
        Makefile.am pingus_resource.cxx system.cxx 
Added Files:
        html_browser.cxx html_browser.hxx 
Log Message:
- added super-primitv HTMLBrowser support

--- NEW FILE: html_browser.cxx ---
//  $Id: html_browser.cxx,v 1.1 2002/06/22 17:40:55 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 <stdlib.h>
#include <iostream>
#include "html_browser.hxx"

void
HTMLBrowser::launch (const std::string& url)
{
  std::cout << "HTMLBrowser: Trying to launch: " << url << std::endl;
#ifndef WIN32
  int ret = system (("galeon --existing " + url + " &").c_str ());
  std::cout << "System return value: " << ret << std::endl;
#else
  std::cout << "HTMLBrowser not implemented" << std::endl;
#endif
}

/* EOF */

--- NEW FILE: html_browser.hxx ---
//  $Id: html_browser.hxx,v 1.1 2002/06/22 17:40:55 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 PINGUS_HTML_BROWSER_HXX
#define PINGUS_HTML_BROWSER_HXX

#include <string>

/** Class for launching a HTMLBrowser */
class HTMLBrowser
{
private:

public:
  /** Launch a webbrowser with the given url */
  static void launch (const std::string& url);
};

#endif

/* EOF */

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/Makefile.am,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- Makefile.am 20 Jun 2002 16:48:11 -0000      1.78
+++ Makefile.am 22 Jun 2002 17:40:55 -0000      1.79
@@ -201,6 +201,7 @@
 multiplayer_client_child.cxx  worldobj_group_data.cxx \
 multiplayer_config.cxx       xml_helper.cxx \
 multiplayer_game.cxx         xml_plf.cxx \
-math.hxx
+math.hxx \
+html_browser.hxx              html_browser.cxx
 
 ## EOF ##

Index: pingus_resource.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_resource.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingus_resource.cxx 22 Jun 2002 14:29:17 -0000      1.5
+++ pingus_resource.cxx 22 Jun 2002 17:40:55 -0000      1.6
@@ -257,20 +257,29 @@
   try 
     {
       CL_ResourceManager* res_man = PingusResource::get(datafile);
-      CL_Resource& res = res_man->get_resource(res_name);
+      
+      if (!res_man->is_from_source ())
+       {
+         // FIXME: not implemented
+         return 0;
+       }
+      else
+       {
+         CL_Resource& res = res_man->get_resource(res_name);
   
-      std::string filename = res.get_full_location();
+         std::string filename = res.get_full_location();
 
 #ifndef WIN32
-      struct stat stat_buf;
-      if (stat(filename.c_str(), &stat_buf) == 0)
-       return stat_buf.st_mtime;
-      else
-       return 0;
+         struct stat stat_buf;
+         if (stat(filename.c_str(), &stat_buf) == 0)
+           return stat_buf.st_mtime;
+         else
+           return 0;
 #else
-      // FIXME: Win32 mtime getter not implemented
-      return 0;
+         // FIXME: Win32 mtime getter not implemented
+         return 0;
 #endif
+       }
     } 
   catch (CL_Error& err) 
     {

Index: system.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/system.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- system.cxx  20 Jun 2002 11:23:53 -0000      1.3
+++ system.cxx  22 Jun 2002 17:40:55 -0000      1.4
@@ -225,14 +225,30 @@
   std::string vardir   = get_vardir();
   
   create_dir(statdir);
+
+  // FIXME: We need a better seperation between user created levels,
+  // FIXME: third party levels and levels from the base distri
   create_dir(statdir + "levels/");
   create_dir(statdir + "levels/dist");
+  create_dir(statdir + "themes/");
+
+  // Savegames (FIXME: rename to savegames/?)
   create_dir(statdir + "stat/");
+
+  // Backups of edited levels in the level editor
+  create_dir(statdir + "backup/");
+  
+  // User created images 
+  create_dir(statdir + "images/");
+
+  // Thumbnail cache
   create_dir(statdir + "cache/");
+
+  // Recorded demos will per default be writen in this directory
   create_dir(statdir + "demos/");
-  create_dir(statdir + "screenshots/");
-  create_dir(statdir + "themes/");
 
+  // Screenshots will be dumped to that directory:
+  create_dir(statdir + "screenshots/");
   // create_dir(vardir);
 }
  




reply via email to

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