adonthell-commits
[Top][All Lists]
Advanced

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

[Adonthell-commits] CVS: adonthell/src audio.h,1.28,1.29 character_base


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src audio.h,1.28,1.29 character_base.h,1.12,1.13 data_screen.cc,1.24,1.25 dialog_screen.cc,1.10,1.11 input.cc,1.6,1.7 inventory.cc,1.6,1.7 inventory.h,1.10,1.11 item_base.cc,1.8,1.9 item_base.h,1.10,1.11 main.cc,1.59,1.60 prefs.cc,1.33,1.34
Date: Mon, 05 May 2003 14:52:52 -0400

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

Modified Files:
        audio.h character_base.h data_screen.cc dialog_screen.cc 
        input.cc inventory.cc inventory.h item_base.cc item_base.h 
        main.cc prefs.cc 
Log Message:
FIXES to get dlgedit compiling again + probably less important changes


Index: audio.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/audio.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** audio.h     15 Jan 2002 20:51:58 -0000      1.28
--- audio.h     5 May 2003 18:52:48 -0000       1.29
***************
*** 16,24 ****
  #define __AUDIO_H__
  
- #include "types.h"
  #include "SDL_mixer.h"
  #include "prefs.h"
  #include "py_object.h"
- #include <string>
  // #include "audio_loop.h"
  
--- 16,22 ----

Index: character_base.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/character_base.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** character_base.h    2 Nov 2001 13:19:34 -0000       1.12
--- character_base.h    5 May 2003 18:52:48 -0000       1.13
***************
*** 82,86 ****
       * 
       */ 
!     character_base();
  
      /**
--- 82,86 ----
       * 
       */ 
!     character_base ();
  
      /**
***************
*** 88,92 ****
       * 
       */ 
!     ~character_base();
  
      /** 
--- 88,92 ----
       * 
       */ 
!     ~character_base ();
  
      /** 

Index: data_screen.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/data_screen.cc,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** data_screen.cc      22 Aug 2002 19:52:41 -0000      1.24
--- data_screen.cc      5 May 2003 18:52:48 -0000       1.25
***************
*** 26,30 ****
  #include <string.h>
  
- #include "types.h"
  #include "pnm.h"
  #include "gamedata.h"
--- 26,29 ----

Index: dialog_screen.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/dialog_screen.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** dialog_screen.cc    13 Dec 2002 21:20:56 -0000      1.10
--- dialog_screen.cc    5 May 2003 18:52:48 -0000       1.11
***************
*** 25,29 ****
  
  #include <iostream>
! #include <string>
  #include "gamedata.h"
  #include "input.h"
--- 25,29 ----
  
  #include <iostream>
! 
  #include "gamedata.h"
  #include "input.h"

Index: input.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/input.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** input.cc    28 Jun 2002 12:15:20 -0000      1.6
--- input.cc    5 May 2003 18:52:48 -0000       1.7
***************
*** 29,33 ****
  #include <string.h>
  #include "input.h"
- #include "SDL.h"
  
  u_int8 * input::keystate=NULL;
--- 29,32 ----

Index: inventory.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/inventory.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** inventory.cc        17 Feb 2003 19:31:21 -0000      1.6
--- inventory.cc        5 May 2003 18:52:48 -0000       1.7
***************
*** 25,29 ****
  
  // ctor
! inventory::inventory (const bool & limited, const u_int16 & size)
  {
      QueryType = 0;
--- 25,29 ----
  
  // ctor
! inventory::inventory (const u_int16 & size, const bool & limited)
  {
      QueryType = 0;

Index: inventory.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/inventory.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** inventory.h 17 Feb 2003 19:31:21 -0000      1.10
--- inventory.h 5 May 2003 18:52:48 -0000       1.11
***************
*** 40,47 ****
      /**
       * Create an %inventory with 'count' anonymous slots.
-      * @param limited Whether %inventory has fixed size or not.
       * @param size Initial size of the %inventory.
       */
!     inventory (const bool & limited = true, const u_int16 & size = 0);
          
      /**
--- 40,47 ----
      /**
       * Create an %inventory with 'count' anonymous slots.
       * @param size Initial size of the %inventory.
+      * @param limited Whether %inventory has fixed size or not.
       */
!     inventory (const u_int16 & size = 0, const bool & limited = true);
          
      /**

Index: item_base.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/item_base.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** item_base.cc        17 Feb 2003 19:31:21 -0000      1.8
--- item_base.cc        5 May 2003 18:52:48 -0000       1.9
***************
*** 56,59 ****
--- 56,93 ----
  }
  
+ // apply item effects
+ void item_base::equip (character_base *character)
+ {
+     // no effect
+     if (!has_attribute ("equip")) return;
+     
+     // pass character
+     PyObject *args = PyTuple_New (1);
+     PyTuple_SetItem (args, 0, python::pass_instance (character, 
"character_base"));
+     
+     // call method
+     call_method ("equip", args);
+     
+     // cleanzp
+     Py_DECREF (args);
+ }
+ 
+ // remove item effects
+ void item_base::unequip (character_base *character)
+ {
+     // no effect
+     if (!has_attribute ("unequip")) return;
+     
+     // pass character
+     PyObject *args = PyTuple_New (1);
+     PyTuple_SetItem (args, 0, python::pass_instance (character, 
"character_base"));
+     
+     // call method
+     call_method ("unequip", args);
+     
+     // cleanzp
+     Py_DECREF (args);
+ }
+ 
  // trigger item's main functionality
  bool item_base::use (character_base *character)
***************
*** 187,191 ****
      
      // instanciate
!     if (!create_instance (tmpl, tmpl)) return false;
  
      // pass file
--- 221,225 ----
      
      // instanciate
!     if (!create_instance (ITEM_PACKAGE + tmpl, tmpl)) return false;
  
      // pass file

Index: item_base.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/item_base.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** item_base.h 23 Feb 2003 23:14:34 -0000      1.10
--- item_base.h 5 May 2003 18:52:48 -0000       1.11
***************
*** 33,36 ****
--- 33,43 ----
  
  /**
+  * The Python package containing %item scripts.
+  */
+ #ifndef SWIG
+ #   define ITEM_PACKAGE "item."
+ #endif
+ 
+ /**
   * It is a wrapper for item.py, which is the actual item superclass.
   * For flexibility, items are implemented on python side. But since they
***************
*** 99,102 ****
--- 106,123 ----
       */
      //@{
+     /**
+      * This method is invoked when the given character equips this item.
+      * It can be used to apply item effects to the character if desired.
+      * @param character The character equipping this item.
+      */
+     void equip (character_base *character);
+     
+     /**
+      * This method is invoked when the given character unequips this item.
+      * It can be used to remove item effects from the character if neccessary.
+      * @param character The character equipping this item.
+      */
+     void unequip (character_base *character);
+     
      /**
       * Use an item. Triggers its main functionality if it can be used at all.

Index: main.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/main.cc,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -r1.59 -r1.60
*** main.cc     23 Feb 2003 23:14:34 -0000      1.59
--- main.cc     5 May 2003 18:52:48 -0000       1.60
***************
*** 34,38 ****
  #include "yarg.h"
  #include "win_manager.h"
- #include "win_theme.h"
  
  #ifdef MEMORY_LEAKS
--- 34,37 ----

Index: prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.cc,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** prefs.cc    20 Feb 2003 21:03:11 -0000      1.33
--- prefs.cc    5 May 2003 18:52:48 -0000       1.34
***************
*** 25,31 ****
  #include <stdio.h>
  #include <iostream> 
- #include <fstream> 
  #include <sys/stat.h>
- #include <sys/types.h>
  #include <dirent.h>
  #include <unistd.h>
--- 25,29 ----





reply via email to

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