adonthell-commits
[Top][All Lists]
Advanced

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

[Adonthell-commits] CVS: adonthell/src item_base.cc,NONE,1.1 item_base.


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src item_base.cc,NONE,1.1 item_base.h,NONE,1.1 Makefile.am,1.97,1.98 event_list.h,1.4,1.5 gamedata.cc,1.28,1.29 main.cc,1.56,1.57 py_adonthell.i,1.33,1.34 py_object.h,1.8,1.9
Date: Sun, 12 Jan 2003 18:24:32 -0500

Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv17348/src

Modified Files:
        Makefile.am event_list.h gamedata.cc main.cc py_adonthell.i 
        py_object.h 
Added Files:
        item_base.cc item_base.h 
Log Message:
ADDED first bits of the new item implementation
FIXED pydonthell to work again
ADDED fix for Windows/BeOS versions: it's no longer required to set the working 
directory of the adonthell exe, as it'll chdir there automatically. (Thanks 
Shard!)


***** Error reading new file: [Errno 2] No such file or directory: 
'item_base.cc'
***** Error reading new file: [Errno 2] No such file or directory: 'item_base.h'
Index: Makefile.am
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Makefile.am,v
retrieving revision 1.97
retrieving revision 1.98
diff -C2 -r1.97 -r1.98
*** Makefile.am 2 Sep 2002 10:57:41 -0000       1.97
--- Makefile.am 12 Jan 2003 23:24:29 -0000      1.98
***************
*** 22,26 ****
  drawing_area.h event.h event_handler.h event_handler_base.h event_list.h \
  fileops.h game.h gamedate.h gametime.h gettext.h getopt.h image.h input.h \
! inventory.h item.h landmap.h map_event.h map_event_handler.h mapsquare.h \
  mapsquare_walkable.h nls.h mapcharacter.h mapobject.h mapview.h path.h \
  pnm.h prefs.h python_class.h py_object.h quest.h screen.h surface.h storage.h 
\
--- 22,26 ----
  drawing_area.h event.h event_handler.h event_handler_base.h event_list.h \
  fileops.h game.h gamedate.h gametime.h gettext.h getopt.h image.h input.h \
! inventory.h item_base.h landmap.h map_event.h map_event_handler.h mapsquare.h 
\
  mapsquare_walkable.h nls.h mapcharacter.h mapobject.h mapview.h path.h \
  pnm.h prefs.h python_class.h py_object.h quest.h screen.h surface.h storage.h 
\
***************
*** 35,39 ****
  drawable.cc drawing_area.cc event.cc event_handler.cc event_list.cc \
  fileops.cc game.cc gamedata.cc gamedate.cc gametime.cc image.cc input.cc \
! label.cc label_input.cc landmap.cc lex.prefs.cc map_event.cc \
  map_event_handler.cc mapsquare_walkable.cc mapcharacter.cc mapsquare.cc \
  mapobject.cc mapview.cc nls.cc path.cc pnm.cc prefs.cc py_callback.cc \
--- 35,39 ----
  drawable.cc drawing_area.cc event.cc event_handler.cc event_list.cc \
  fileops.cc game.cc gamedata.cc gamedate.cc gametime.cc image.cc input.cc \
! item_base.cc label.cc label_input.cc landmap.cc lex.prefs.cc map_event.cc \
  map_event_handler.cc mapsquare_walkable.cc mapcharacter.cc mapsquare.cc \
  mapobject.cc mapview.cc nls.cc path.cc pnm.cc prefs.cc py_callback.cc \

Index: event_list.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/event_list.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** event_list.h        21 Aug 2002 15:25:45 -0000      1.4
--- event_list.h        12 Jan 2003 23:24:29 -0000      1.5
***************
*** 2,6 ****
     $Id$
  
!    Copyright (C) 2000/2001/2002 Kai Sterker <address@hidden>
     Part of the Adonthell Project http://adonthell.linuxgames.com
  
--- 2,6 ----
     $Id$
  
!    Copyright (C) 2000/2001/2002/2003 Kai Sterker <address@hidden>
     Part of the Adonthell Project http://adonthell.linuxgames.com
  
***************
*** 105,109 ****
       *      given type.
       *
!      * @sa load ()
       */
      static void register_event (u_int8 type, new_event e);
--- 105,109 ----
       *      given type.
       *
!      * @sa get_state ()
       */
      static void register_event (u_int8 type, new_event e);

Index: gamedata.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gamedata.cc,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** gamedata.cc 22 Aug 2002 19:52:41 -0000      1.28
--- gamedata.cc 12 Jan 2003 23:24:29 -0000      1.29
***************
*** 501,505 ****
  
      // Read the user's saved games (if any) - they'll be located in
!     // $HOME/.adonthell/ and called adonthell-save-xxx
      if ((dir = opendir (user_data_dir ().c_str ())) != NULL)
      {
--- 501,505 ----
  
      // Read the user's saved games (if any) - they'll be located in
!     // $HOME/.adonthell/ and called <game_name>-save-<xxx>
      if ((dir = opendir (user_data_dir ().c_str ())) != NULL)
      {

Index: main.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/main.cc,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** main.cc     16 Dec 2002 19:09:54 -0000      1.56
--- main.cc     12 Jan 2003 23:24:29 -0000      1.57
***************
*** 104,118 ****
      // init game environment
  #if !defined (WIN32) 
!     game::init(DATA_DIR);
  #else
!     char b[500];
!     getcwd(b, sizeof(b));
!     int ti = 0;
!     while (b[ti])
      {
!         if (b[ti] == '\\') b[ti] = '/';
!         ti++;
      }
!     game::init(b);
  #endif
  
--- 104,131 ----
      // init game environment
  #if !defined (WIN32) 
!     game::init (DATA_DIR);
  #else
!     // change working directory to the application's location.
!     if (argc && argv[0])
      {
!         char *str = argv[0];
!         do if (*str == '\\') *str = '/'; 
!         while (*(str++));
!         
!         str = strrchr (argv[0], '/');
!         *(str + 1) = 0;
!         chdir (argv[0]);
!         *(str + 1) = '/';
      }
!     
!     // get absolute path to current working directory
!     char buf[500];
!     getcwd (buf, sizeof (buf));
!     
!     char *str = buf;
!     do if (*str == '\\') *str = '/'; 
!     while (*(str++));
!     
!     game::init (buf);
  #endif
  

Index: py_adonthell.i
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/py_adonthell.i,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** py_adonthell.i      9 Aug 2002 20:01:26 -0000       1.33
--- py_adonthell.i      12 Jan 2003 23:24:29 -0000      1.34
***************
*** 16,19 ****
--- 16,20 ----
  #include "audio.h"
  #include "character_base.h"
+ #include "item_base.h"
  #include "quest.h"
  #include "drawing_area.h"
***************
*** 145,148 ****
--- 146,150 ----
  %include "audio.h"
  %include "character_base.h"
+ %include "item_base.h"
  %include "drawing_area.h"
  %include "quest.h"

Index: py_object.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/py_object.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** py_object.h 10 Aug 2002 22:02:01 -0000      1.8
--- py_object.h 12 Jan 2003 23:24:29 -0000      1.9
***************
*** 158,161 ****
--- 158,167 ----
      bool has_attribute (const std::string & name);
  
+ protected:
+     /**
+      * The python class instance wrapped by %py_object
+      */    
+     PyObject *instance;
+ 
  private:
      /**
***************
*** 166,171 ****
  
      string script_file_;
- 
-     PyObject *instance;
  };
  
--- 172,175 ----





reply via email to

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