adonthell-commits
[Top][All Lists]
Advanced

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

[Adonthell-commits] CVS: adonthell/src pytest.cc,NONE,1.1.2.1 py_wrapper


From: Alexandre Courbot <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src pytest.cc,NONE,1.1.2.1 py_wrappers_base.i,NONE,1.1.2.1 py_input.i,NONE,1.2.2.1 py_gfx.i,NONE,1.1.2.1 py_base.i,NONE,1.1.2.1 surface.cc,1.9.2.3,1.9.2.4 storage.h,1.23,1.23.2.1 screen.h,1.22.2.1,1.22.2.2 python_class.cc,1.5.2.1,1.5.2.2 py_object.h,1.6,1.6.2.1 py_callback.cc,1.7,1.7.2.1 py_adonthell.i,1.31,1.31.2.1 prefs.h,1.11,1.11.4.1 pnm.cc,1.4,1.4.4.1 path.h,1.6,1.6.2.1 mouse_event.h,1.1.2.3,1.1.2.4 map_placeable_model.h,1.1.2.6,1.1.2.7 map_placeable_area.h,1.1.2.6,1.1.2.7 map_moving.cc,1.1.2.14,1.1.2.15 main.cc,1.39.2.23,1.39.2.24 landmap.cc,1.18.2.13,1.18.2.14 keyboard_event.h,1.1.2.5,1.1.2.6 joystick_event.h,1.1.2.3,1.1.2.4 input_manager_SDL.cc,1.1.2.2,1.1.2.3 input_manager.h,1.1.2.5,1.1.2.6 input_event.h,1.1.2.5,1.1.2.6 image.cc,1.8.2.3,1.8.2.4 game.cc,1.24.2.2,1.24.2.3 fileops.h,1.14,1.14.4.1 fileops.cc,1.4,1.4.4.1 drawing_area.cc,1.2.4.1,1.2.4.2 drawable.cc,1.4,1.4.4.1 dialog.h,1.47,1.47.2.1 callback.h,1.4.4.3,1.4.4.4 animation.h,1.44,1.44.4.1 animation.cc,1.9,1.9.4.1 Makefile.am,1.80.2.23,1.80.2.24 .cvsignore,1.7,1.7.2.1
Date: Thu, 11 Apr 2002 10:08:46 -0400

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

Modified Files:
      Tag: Branch_road_to_0-4
        surface.cc storage.h screen.h python_class.cc py_object.h 
        py_callback.cc py_adonthell.i prefs.h pnm.cc path.h 
        mouse_event.h map_placeable_model.h map_placeable_area.h 
        map_moving.cc main.cc landmap.cc keyboard_event.h 
        joystick_event.h input_manager_SDL.cc input_manager.h 
        input_event.h image.cc game.cc fileops.h fileops.cc 
        drawing_area.cc drawable.cc dialog.h callback.h animation.h 
        animation.cc Makefile.am .cvsignore 
Added Files:
      Tag: Branch_road_to_0-4
        pytest.cc py_wrappers_base.i py_input.i py_gfx.i py_base.i 
Log Message:
FIXED code so it compiles with gcc-3.0 with -ansi enabled.
Starting separating Python modules.


--- NEW FILE ---
#include "python_class.h"

extern "C" {
extern int Py_Main(int, char **);
}

extern "C"
{
    /** 
     * SWIG init prototype.
     * 
     */
    void initbasec (void);
    void initgfxc (void);
    void initinputc (void);
}

int main(int argc, char * argv[])
{    
    // add the working directory to python's path (otherwise, scripts
    // without absolute path cannot be executed)
//     string path = dirname (argv[0]);
//     if (path[0] != '/') 
//     {
//         string tmp = getcwd (NULL, 0);
//         path = tmp + path;
//     }

    python::init();
    initbasec();
    initgfxc();
    initinputc();
    Py_Main (argc, argv);
    python::cleanup();
}

--- NEW FILE ---
%typemap(python,in) string
{
    if (PyString_Check ($input))
    {
        $1 = string (PyString_AsString($input));
    }
    else
    {
        PyErr_SetString (PyExc_TypeError, "not a String");
        return NULL;
    }
}
%typemap(python,in) const string = string;

%typemap(python,in) string &
{
    if (PyString_Check ($input))
    {
        $1 = new string (PyString_AsString($input));
    }
    else
    {
        PyErr_SetString (PyExc_TypeError, "not a String");
        return NULL;
    }
}
%typemap(python,in) const string & = string &;

%typemap(python,out) string
{
    $result = PyString_FromString((const char *)$1.c_str()); 
}
%typemap(python,out) const string = string;

%typemap(python,out) string &
{
    $result = PyString_FromString((const char *)$1->c_str());
    delete $1; 
}
%typemap(python,out) const string & = string &;

%typemap (python, freearg) string &
{
    if ($1 != NULL)
    {
        delete $1;
    }
}
%typemap (python, freearg) const string & = string &;

%typemap (python,in) PyObject *pyfunc 
{ 
    if (!PyCallable_Check($input)) 
    { 
        PyErr_SetString (PyExc_TypeError, "Need a callable object!");
        return NULL;
    }
    $1 = $input; 
}

%typemap (python,in) PyObject*
{ 
    $1 = $input; 
}

%include "types.h"

--- NEW FILE ---
%module input
%{

#include <string>
#include "types.h"
#include "input_event.h"
#include "input_listener.h"
#include "input_manager.h"

%}

%include "py_wrappers_base.i"

%include "input_event.h"
%include "keyboard_event.h"
%include "mouse_event.h"
%include "joystick_event.h"
%include "control_event.h"
%include "input_listener.h"
%include "input_manager.h"

--- NEW FILE ---
%module gfx
%{

#include <string>
#include "types.h"
#include "animation.h"

%}

%include "py_wrappers_base.i"

%include "drawable.h"
%include "surface.h"
%include "screen.h"
%include "image.h"
%include "animation.h"

--- NEW FILE ---
%module base
%{

#include <string>
#include "types.h"
#include "game.h"
#include "fileops.h"
#include "gametime.h"

%}

%include "py_wrappers_base.i"

%include "game.h"
%include "fileops.h"
%include "gametime.h"

Index: surface.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/surface.cc,v
retrieving revision 1.9.2.3
retrieving revision 1.9.2.4
diff -C2 -r1.9.2.3 -r1.9.2.4
*** surface.cc  5 Apr 2002 19:19:57 -0000       1.9.2.3
--- surface.cc  11 Apr 2002 14:08:42 -0000      1.9.2.4
***************
*** 24,29 ****
  #include <iostream>
  
- using namespace std; 
- 
  
  SDL_Rect surface::srcrect; 
--- 24,27 ----

Index: storage.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/storage.h,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -C2 -r1.23 -r1.23.2.1
*** storage.h   31 Jan 2002 08:56:07 -0000      1.23
--- storage.h   11 Apr 2002 14:08:42 -0000      1.23.2.1
***************
*** 39,46 ****
  #include "types.h"
  
! #ifndef SWIG
! using namespace std; 
! #endif
! 
  
  /** 
--- 39,47 ----
  #include "types.h"
  
! using std::hash_map; 
! using std::map; 
! using std::vector;
! using std::string;
! using std::pair;
  
  /** 

Index: screen.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/screen.h,v
retrieving revision 1.22.2.1
retrieving revision 1.22.2.2
diff -C2 -r1.22.2.1 -r1.22.2.2
*** screen.h    19 Feb 2002 19:40:09 -0000      1.22.2.1
--- screen.h    11 Apr 2002 14:08:42 -0000      1.22.2.2
***************
*** 29,35 ****
  
  
! #ifndef SWIG
! using namespace std; 
! #endif
  
  
--- 29,33 ----
  
  
! using std::string; 
  
  

Index: python_class.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/python_class.cc,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -C2 -r1.5.2.1 -r1.5.2.2
*** python_class.cc     16 Mar 2002 17:26:52 -0000      1.5.2.1
--- python_class.cc     11 Apr 2002 14:08:42 -0000      1.5.2.2
***************
*** 26,32 ****
  #include <iostream> 
  
  PyObject * data::globals;
  
! using namespace std;
  
  /*
--- 26,35 ----
  #include <iostream> 
  
+ using std::cerr;
+ using std::endl;
+ 
  PyObject * data::globals;
  
! using std::string;
  
  /*

Index: py_object.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/py_object.h,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** py_object.h 22 Sep 2001 20:22:13 -0000      1.6
--- py_object.h 11 Apr 2002 14:08:42 -0000      1.6.2.1
***************
*** 33,37 ****
  #include "python_class.h"
  
! using namespace std; 
  
  
--- 33,37 ----
  #include "python_class.h"
  
! using std::string;
  
  

Index: py_callback.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/py_callback.cc,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** py_callback.cc      23 Sep 2001 14:05:45 -0000      1.7
--- py_callback.cc      11 Apr 2002 14:08:42 -0000      1.7.2.1
***************
*** 86,88 ****
  
      return val;
! }
\ No newline at end of file
--- 86,88 ----
  
      return val;
! }

Index: py_adonthell.i
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/py_adonthell.i,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -C2 -r1.31 -r1.31.2.1
*** py_adonthell.i      27 Jan 2002 12:51:14 -0000      1.31
--- py_adonthell.i      11 Apr 2002 14:08:42 -0000      1.31.2.1
***************
*** 19,30 ****
  #include "image.h"
  #include "animation.h"
- #include "mapsquare_walkable.h"
- #include "mapsquare.h"
- #include "mapobject.h"
- #include "mapcharacter.h"
- #include "path.h"
- #include "landmap.h"
- #include "mapview.h"
- #include "character.h"
  #include "label_input.h"
  #include "win_types.h"
--- 19,22 ----
***************
*** 32,36 ****
  #include "win_image.h"
  #include "win_write.h"
- #include "win_mapview.h"
  #include "win_font.h"
  #include "win_theme.h"
--- 24,27 ----
***************
*** 41,47 ****
  #include "win_select.h"
  #include "win_manager.h"
- #include "dialog_screen.h"
  #include "data_screen.h"
- #include "gamedata.h"
  #include "game.h"
  
--- 32,36 ----
***************
*** 142,159 ****
  %include "image.h"
  %include "animation.h"
- %include "mapsquare_walkable.h"
- %include "mapsquare.h"
- %include "mapobject.h"
- %include "mapcharacter.h"
- %include "path.h"
- %include "character.h"
- %include "landmap.h"
- %include "mapview.h"
- %include "adonthell.h"
  %include "win_types.h"
- %include "win_wrappers.h"
  %include "text_bubble.h"
- %include "dialog_screen.h"
  %include "data_screen.h"
- %include "gamedata.h"
  %include "game.h"
--- 131,136 ----

Index: prefs.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.h,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -C2 -r1.11 -r1.11.4.1
*** prefs.h     26 Jul 2001 20:27:49 -0000      1.11
--- prefs.h     11 Apr 2002 14:08:42 -0000      1.11.4.1
***************
*** 22,28 ****
  
  
! #ifndef SWIG
! using namespace std; 
! #endif
  
  
--- 22,26 ----
  
  
! using std::string; 
  
  

Index: pnm.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/pnm.cc,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -C2 -r1.4 -r1.4.4.1
*** pnm.cc      29 Jun 2001 20:40:18 -0000      1.4
--- pnm.cc      11 Apr 2002 14:08:42 -0000      1.4.4.1
***************
*** 28,34 ****
  #include <string.h>
  
- using namespace std; 
  
-  
  void *pnm::get (SDL_RWops * file, u_int16 * length, u_int16 * height)
  {
--- 28,32 ----

Index: path.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/path.h,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** path.h      22 Sep 2001 13:26:04 -0000      1.6
--- path.h      11 Apr 2002 14:08:42 -0000      1.6.2.1
***************
*** 30,36 ****
  #include "mapsquare.h"
  
! #ifndef SWIG
! using namespace std; 
! #endif
  
  class landmap; 
--- 30,34 ----
  #include "mapsquare.h"
  
! using std::vector; 
  
  class landmap; 

Index: mouse_event.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/mouse_event.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** mouse_event.h       28 Feb 2002 18:53:51 -0000      1.1.2.3
--- mouse_event.h       11 Apr 2002 14:08:42 -0000      1.1.2.4
***************
*** 27,31 ****
  
  #include "input_event.h"
- #include <string>
  
  /**
--- 27,30 ----

Index: map_placeable_model.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/map_placeable_model.h,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -r1.1.2.6 -r1.1.2.7
*** map_placeable_model.h       2 Apr 2002 20:04:17 -0000       1.1.2.6
--- map_placeable_model.h       11 Apr 2002 14:08:42 -0000      1.1.2.7
***************
*** 31,34 ****
--- 31,38 ----
  #include <string>
  
+ using std::map;
+ using std::string;
+ using std::pair;
+ 
  /**
   * Represents a placeable, i.e. something (character, object, ...)

Index: map_placeable_area.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/map_placeable_area.h,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -r1.1.2.6 -r1.1.2.7
*** map_placeable_area.h        9 Apr 2002 12:29:55 -0000       1.1.2.6
--- map_placeable_area.h        11 Apr 2002 14:08:42 -0000      1.1.2.7
***************
*** 30,33 ****
--- 30,35 ----
  #include "fileops.h"
  
+ using std::vector;
+ 
  const int mapsquare_size = 40;
  

Index: map_moving.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/map_moving.cc,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -C2 -r1.1.2.14 -r1.1.2.15
*** map_moving.cc       9 Apr 2002 12:29:55 -0000       1.1.2.14
--- map_moving.cc       11 Apr 2002 14:08:42 -0000      1.1.2.15
***************
*** 222,232 ****
                              .is_walkable()) continue;
  
!                         if (objz >= nzground) nzground = objz;
                          if (objz < z()) continue;
                          
!                         set_altitude(objz);
!                         Is_falling = false;
!                         set_vertical_velocity(0.0);
!                         break;
                      }
                      
--- 222,235 ----
                              .is_walkable()) continue;
  
!                         if (objz > nzground) nzground = objz;
                          if (objz < z()) continue;
                          
!                         if (vz() <= 0)
!                         {
!                             set_altitude(objz);
!                             Is_falling = false;
!                             set_vertical_velocity(0.0);
!                             break;
!                         }
                      }
                      
***************
*** 237,240 ****
--- 240,244 ----
                  {
                      mapsquare * msqr = Mymap.get(px + k, py + l);
+ 
                      for (mapsquare::iterator it = msqr->begin(); it != 
msqr->end(); ++it)
                      {

Index: main.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/main.cc,v
retrieving revision 1.39.2.23
retrieving revision 1.39.2.24
diff -C2 -r1.39.2.23 -r1.39.2.24
*** main.cc     9 Apr 2002 12:29:55 -0000       1.39.2.23
--- main.cc     11 Apr 2002 14:08:42 -0000      1.39.2.24
***************
*** 319,323 ****
                  }
              }
- //                 }
  //                 for (mapsquare::iterator it = sq->begin ();
  //                      it != sq->end (); it++)
--- 319,322 ----

Index: landmap.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/landmap.cc,v
retrieving revision 1.18.2.13
retrieving revision 1.18.2.14
diff -C2 -r1.18.2.13 -r1.18.2.14
*** landmap.cc  9 Apr 2002 12:29:55 -0000       1.18.2.13
--- landmap.cc  11 Apr 2002 14:08:42 -0000      1.18.2.14
***************
*** 16,19 ****
--- 16,20 ----
  #include "landmap.h"
  #include <algorithm>
+ #include <iostream>
  
  mapsquare_info::mapsquare_info (map_coordinates & pos)
***************
*** 262,268 ****
              for (mapsquare::iterator it = msqr->begin(); it != msqr->end(); 
it++)
                  nb++;
!             cout << nb << " ";
          }
!         cout << endl;
      }
  }
--- 263,269 ----
              for (mapsquare::iterator it = msqr->begin(); it != msqr->end(); 
it++)
                  nb++;
!             std::cout << nb << " ";
          }
!         std::cout << std::endl;
      }
  }

Index: keyboard_event.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/keyboard_event.h,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** keyboard_event.h    28 Feb 2002 18:53:51 -0000      1.1.2.5
--- keyboard_event.h    11 Apr 2002 14:08:42 -0000      1.1.2.6
***************
*** 27,31 ****
  
  #include "input_event.h"
- #include <string>
  
  /**
--- 27,30 ----

Index: joystick_event.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/joystick_event.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** joystick_event.h    28 Feb 2002 18:53:51 -0000      1.1.2.3
--- joystick_event.h    11 Apr 2002 14:08:42 -0000      1.1.2.4
***************
*** 27,31 ****
  
  #include "input_event.h"
- #include <string>
  
  /**
--- 27,30 ----

Index: input_manager_SDL.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/input_manager_SDL.cc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** input_manager_SDL.cc        16 Mar 2002 17:26:52 -0000      1.1.2.2
--- input_manager_SDL.cc        11 Apr 2002 14:08:42 -0000      1.1.2.3
***************
*** 29,32 ****
--- 29,34 ----
  #include "SDL.h"
  
+ using std::vector;
+ 
  list <input_listener *> input_manager::listeners;
  

Index: input_manager.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/input_manager.h,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** input_manager.h     28 Feb 2002 14:51:13 -0000      1.1.2.5
--- input_manager.h     11 Apr 2002 14:08:42 -0000      1.1.2.6
***************
*** 34,37 ****
--- 34,39 ----
  #include <list> 
  
+ using std::list;
+ 
  /**
   * This class is responsible for handling all input events and

Index: input_event.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/input_event.h,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** input_event.h       28 Feb 2002 18:53:51 -0000      1.1.2.5
--- input_event.h       11 Apr 2002 14:08:42 -0000      1.1.2.6
***************
*** 28,31 ****
--- 28,34 ----
  
  #include "types.h"
+ #include <string>
+ 
+ using std::string;
  
  /**

Index: image.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/image.cc,v
retrieving revision 1.8.2.3
retrieving revision 1.8.2.4
diff -C2 -r1.8.2.3 -r1.8.2.4
*** image.cc    14 Mar 2002 17:21:52 -0000      1.8.2.3
--- image.cc    11 Apr 2002 14:08:42 -0000      1.8.2.4
***************
*** 27,31 ****
  
  
! using namespace std; 
  
  image::image () : surface ()
--- 27,31 ----
  
  
! using std::string; 
  
  image::image () : surface ()

Index: game.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/game.cc,v
retrieving revision 1.24.2.2
retrieving revision 1.24.2.3
diff -C2 -r1.24.2.2 -r1.24.2.3
*** game.cc     19 Feb 2002 19:40:09 -0000      1.24.2.2
--- game.cc     11 Apr 2002 14:08:42 -0000      1.24.2.3
***************
*** 36,40 ****
  
  
! void game::init (string game_dir = "") 
  {
      Global_data_dir = DATA_DIR;
--- 36,40 ----
  
  
! void game::init (string game_dir) 
  {
      Global_data_dir = DATA_DIR;

Index: fileops.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/fileops.h,v
retrieving revision 1.14
retrieving revision 1.14.4.1
diff -C2 -r1.14 -r1.14.4.1
*** fileops.h   24 Jul 2001 20:12:43 -0000      1.14
--- fileops.h   11 Apr 2002 14:08:42 -0000      1.14.4.1
***************
*** 33,41 ****
  #include "types.h"
  
! 
! #ifndef SWIG
! using namespace std; 
! #endif
! 
  
  /**
--- 33,37 ----
  #include "types.h"
  
! using std::string; 
  
  /**

Index: fileops.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/fileops.cc,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -C2 -r1.4 -r1.4.4.1
*** fileops.cc  29 Jun 2001 20:40:18 -0000      1.4
--- fileops.cc  11 Apr 2002 14:08:42 -0000      1.4.4.1
***************
*** 28,34 ****
  #include "fileops.h"
  
! 
! using namespace std; 
! 
  
  gz_file::gz_file ()
--- 28,33 ----
  #include "fileops.h"
  
! using std::cerr;
! using std::endl;
  
  gz_file::gz_file ()

Index: drawing_area.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/drawing_area.cc,v
retrieving revision 1.2.4.1
retrieving revision 1.2.4.2
diff -C2 -r1.2.4.1 -r1.2.4.2
*** drawing_area.cc     20 Feb 2002 12:57:46 -0000      1.2.4.1
--- drawing_area.cc     11 Apr 2002 14:08:42 -0000      1.2.4.2
***************
*** 24,31 ****
  #include "drawing_area.h"
  
- 
- using namespace std;
- 
- 
  drawing_area::drawing_area ()
  {
--- 24,27 ----

Index: drawable.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/drawable.cc,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -C2 -r1.4 -r1.4.4.1
*** drawable.cc 28 Jul 2001 20:34:49 -0000      1.4
--- drawable.cc 11 Apr 2002 14:08:42 -0000      1.4.4.1
***************
*** 23,28 ****
  #include "drawable.h"
   
- using namespace std; 
- 
  // Public methods.
  
--- 23,26 ----

Index: dialog.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/dialog.h,v
retrieving revision 1.47
retrieving revision 1.47.2.1
diff -C2 -r1.47 -r1.47.2.1
*** dialog.h    15 Oct 2001 21:26:52 -0000      1.47
--- dialog.h    11 Apr 2002 14:08:42 -0000      1.47.2.1
***************
*** 33,37 ****
   
  
! using namespace std; 
  
  
--- 33,37 ----
   
  
! using std::vector; 
  
  

Index: callback.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/callback.h,v
retrieving revision 1.4.4.3
retrieving revision 1.4.4.4
diff -C2 -r1.4.4.3 -r1.4.4.4
*** callback.h  5 Apr 2002 19:59:19 -0000       1.4.4.3
--- callback.h  11 Apr 2002 14:08:42 -0000      1.4.4.4
***************
*** 197,201 ****
  class FunctionTranslator0wRet:public Functor0wRet<RT>{
  public:
!       FunctionTranslator0wRet(Func f):Functor0wRet<RT>(thunk,0,(PFunc)f,0,0){}
        static RT thunk(const FunctorBase &ftor)
                {
--- 197,201 ----
  class FunctionTranslator0wRet:public Functor0wRet<RT>{
  public:
!       FunctionTranslator0wRet(Func 
f):Functor0wRet<RT>(thunk,0,(FunctorBase::PFunc)f,0,0){}
        static RT thunk(const FunctorBase &ftor)
                {
***************
*** 370,374 ****
  public:
        FunctionTranslator1wRet(Func f):
!               Functor1wRet<P1,RT>(thunk,0,(PFunc)f,0,0){}
        static RT thunk(const FunctorBase &ftor,P1 p1)
                {
--- 370,374 ----
  public:
        FunctionTranslator1wRet(Func f):
!               Functor1wRet<P1,RT>(thunk,0,(FunctorBase::PFunc)f,0,0){}
        static RT thunk(const FunctorBase &ftor,P1 p1)
                {
***************
*** 479,483 ****
  public:
        FunctionTranslator2wRet(Func f):
!               Functor2wRet<P1,P2,RT>(thunk,0,(PFunc)f,0,0){}
        static RT thunk(const FunctorBase &ftor,P1 p1,P2 p2)
                {
--- 479,483 ----
  public:
        FunctionTranslator2wRet(Func f):
!               Functor2wRet<P1,P2,RT>(thunk,0,(FunctorBase::PFunc)f,0,0){}
        static RT thunk(const FunctorBase &ftor,P1 p1,P2 p2)
                {
***************
*** 589,593 ****
  public:
        FunctionTranslator3wRet(Func f):
!               Functor3wRet<P1,P2,P3,RT>(thunk,0,(PFunc)f,0,0){}
        static RT thunk(const FunctorBase &ftor,P1 p1,P2 p2,P3 p3)
                {
--- 589,593 ----
  public:
        FunctionTranslator3wRet(Func f):
!               Functor3wRet<P1,P2,P3,RT>(thunk,0,(FunctorBase::PFunc)f,0,0){}
        static RT thunk(const FunctorBase &ftor,P1 p1,P2 p2,P3 p3)
                {

Index: animation.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/animation.h,v
retrieving revision 1.44
retrieving revision 1.44.4.1
diff -C2 -r1.44 -r1.44.4.1
*** animation.h 29 Jul 2001 16:25:04 -0000      1.44
--- animation.h 11 Apr 2002 14:08:42 -0000      1.44.4.1
***************
*** 31,34 ****
--- 31,35 ----
  #include <vector>
  
+ using std::vector;
  
  /**

Index: animation.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/animation.cc,v
retrieving revision 1.9
retrieving revision 1.9.4.1
diff -C2 -r1.9 -r1.9.4.1
*** animation.cc        31 Aug 2001 19:11:16 -0000      1.9
--- animation.cc        11 Apr 2002 14:08:42 -0000      1.9.4.1
***************
*** 28,36 ****
  #include "animation.h"
  
- 
- using namespace std; 
- 
- 
- 
  // animationframe class.
  
--- 28,31 ----

Index: Makefile.am
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Makefile.am,v
retrieving revision 1.80.2.23
retrieving revision 1.80.2.24
diff -C2 -r1.80.2.23 -r1.80.2.24
*** Makefile.am 9 Apr 2002 20:34:37 -0000       1.80.2.23
--- Makefile.am 11 Apr 2002 14:08:42 -0000      1.80.2.24
***************
*** 9,13 ****
  #moddata_DATA = adonthell.pyc
  
! bin_PROGRAMS = alextest joltest
  
  EXTRA_DIST = .indent.pro prefs.l # py_adonthell.i adonthell.py
--- 9,13 ----
  #moddata_DATA = adonthell.pyc
  
! bin_PROGRAMS = alextest joltest pytest
  
  EXTRA_DIST = .indent.pro prefs.l # py_adonthell.i adonthell.py
***************
*** 19,51 ****
  CLEANFILES = $(moddata_SCRIPTS)
  
- #libadonthell_a_SOURCES = adonthell.cc animation.cc audio.cc \
- #character_base.cc character.cc gamedata.cc data_screen.cc dialog.cc \
- #dialog_screen.cc drawable.cc drawing_area.cc event.cc fileops.cc game.cc \
- #gametime.cc image.cc input.cc landmap.cc lex.prefs.cc \
- #mapsquare_walkable.cc mapcharacter.cc \
- #mapsquare.cc mapobject.cc mapview.cc path.cc pnm.cc prefs.cc \
- #py_callback.cc python_class.cc py_adonthell_wrap.cc py_object.cc quest.cc \
- #screen.cc surface.cc storage.cc text_bubble.cc win_background.cc win_base.cc 
win_border.cc \
- #win_container.cc win_font.cc win_keys.cc\
- #win_manager.cc win_scrollbar.cc win_scroll.cc win_select.cc win_theme.cc \
- #label.cc  label_input.cc win_event.cc yarg.cc \
- #adonthell.h animation.h audio.h callback.h py_callback.h \
- #character_base.h character.h gamedata.h data_screen.h dialog.h 
dialog_screen.h \
- #drawable.h drawing_area.h event.h fileops.h game.h gametime.h image.h 
input.h inventory.h \
- #item.h landmap.h mapsquare.h mapsquare_walkable.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 \
- #types.h text_bubble.h win_background.h win_base.h win_border.h 
win_container.h \
- #str_hash.h win_font.h win_image.h win_label.h win_mapview.h label.h 
label_input.h \
- #win_scrollbar.h win_scroll.h win_select.h win_theme.h win_keys.h win_event.h 
win_types.h \
- #win_write.h win_manager.h win_object.h window.h win_wrappers.h yarg.h \
- #mixer.c music.c music_cmd.c music_cmd.h music_ogg.c music_ogg.h wave.h \
- #wavestream.c wavestream.h SDL_mixer.h
- 
- #libadonthell_LDADD = $(SDL_LIBS) $(OGG_LIBS) $(PY_LIBS)
- 
- #adonthell_LDADD = libadonthell.a $(libadonthell_LDADD)
- 
- #adonthell_SOURCES = main.cc
- 
  libbase_a_SOURCES = \
          character_base.cc \
--- 19,22 ----
***************
*** 55,58 ****
--- 26,30 ----
          quest.cc \
          storage.cc \
+       py_base_wrap.cc \
          callback.h \
          character_base.h \
***************
*** 70,78 ****
        keyboard_event.cc control_event.cc input_listener.cc input_manager.cc \
        input_manager_SDL.cc \
        input_event.h joystick_event.h mouse_event.h keyboard_event.h \
        control_event.h input_listener.h input_manager.h
  
  libgfx_a_SOURCES = drawable.cc drawing_area.cc screen.cc surface.cc pnm.cc \
!       image.cc animation.cc \
        drawable.h drawing_area.h screen.h surface.h pnm.h image.h \
        animation.h
--- 42,51 ----
        keyboard_event.cc control_event.cc input_listener.cc input_manager.cc \
        input_manager_SDL.cc \
+       py_input_wrap.cc \
        input_event.h joystick_event.h mouse_event.h keyboard_event.h \
        control_event.h input_listener.h input_manager.h
  
  libgfx_a_SOURCES = drawable.cc drawing_area.cc screen.cc surface.cc pnm.cc \
!       image.cc animation.cc py_gfx_wrap.cc \
        drawable.h drawing_area.h screen.h surface.h pnm.h image.h \
        animation.h
***************
*** 85,89 ****
        python_class.h py_object.h py_callback.h
  
! #libpython_LDADD = $(PY_LIBS)
  
  libmap_a_SOURCES = map_coordinates.cc map_placeable_area.cc \
--- 58,62 ----
        python_class.h py_object.h py_callback.h
  
! libpython_LDADD = $(PY_LIBS)
  
  libmap_a_SOURCES = map_coordinates.cc map_placeable_area.cc \
***************
*** 126,137 ****
  joltest_SOURCES = joltest.cc
  
  joltest_LDADD = libgui.a libgfx.a libinput.a libbase.a $(libbase_LDADD) 
$(libgui_LDADD)
  
  alextest_LDADD = libmap.a libgfx.a libinput.a libbase.a $(libbase_LDADD)
  
! # Note: adonthell.py is also built by this target. 
! py_adonthell_wrap.cc : py_adonthell.i *.h
        @if test "${P_SWIG}"; then \
!          ${P_SWIG} -python -shadow ${SDL_CFLAGS} -I./ -I../ -c++ 
-make_default -o $*.cc py_adonthell.i; \
        else \
           echo "You need swig >= 1.3.10 in order to re-build this file."; \
--- 99,114 ----
  joltest_SOURCES = joltest.cc
  
+ pytest_SOURCES = pytest.cc
+ 
  joltest_LDADD = libgui.a libgfx.a libinput.a libbase.a $(libbase_LDADD) 
$(libgui_LDADD)
  
  alextest_LDADD = libmap.a libgfx.a libinput.a libbase.a $(libbase_LDADD)
  
! pytest_LDADD = libpython.a libgfx.a libinput.a libbase.a $(libbase_LDADD) 
$(libpython_LDADD)
! 
! # Note: .py files are also built by this target.
! py_%_wrap.cc : py_%.i *.h
        @if test "${P_SWIG}"; then \
!          ${P_SWIG} -python -shadow ${SDL_CFLAGS} -I./ -I../ -c++ 
-make_default -o py_$*_wrap.cc $<; \
        else \
           echo "You need swig >= 1.3.10 in order to re-build this file."; \
***************
*** 139,145 ****
        fi;
  
! lex.prefs.cc : prefs.l
!       flex -olex.prefs.cc $<
! 
! adonthell.pyc : adonthell.py adonthell
!       ./adonthell -c
--- 116,119 ----
        fi;
  
! # adonthell.pyc : adonthell.py adonthell
! #     ./adonthell -c

Index: .cvsignore
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** .cvsignore  16 Oct 2001 13:04:24 -0000      1.7
--- .cvsignore  11 Apr 2002 14:08:42 -0000      1.7.2.1
***************
*** 4,9 ****
  Makefile.in
  adonthell
! adonthell.py
! py_adonthell_wrap.cc
! py_adonthell_wrap.doc
  TAGS
--- 4,9 ----
  Makefile.in
  adonthell
! *.py
! *.pyc
! *_wrap.cc
  TAGS




reply via email to

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