adonthell-commits
[Top][All Lists]
Advanced

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

[Adonthell-commits] CVS: adonthell/src/tools/dlgedit cfg_io.cc,NONE,1.1


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src/tools/dlgedit cfg_io.cc,NONE,1.1 cfg_io.h,NONE,1.1 loadcfg.l,NONE,1.1 Makefile.am,1.47,1.48 dlg_circle.cc,1.4,1.5 dlg_circle.h,1.4,1.5 dlg_types.h,1.4,1.5 gui_graph.cc,1.5,1.6 kb_traverse.cc,1.1,1.2 main.cc,1.58,1.59
Date: Thu, 17 Oct 2002 06:09:10 -0400

Update of /cvsroot/adonthell/adonthell/src/tools/dlgedit
In directory subversions:/tmp/cvs-serv31973

Modified Files:
        Makefile.am dlg_circle.cc dlg_circle.h dlg_types.h 
        gui_graph.cc kb_traverse.cc main.cc 
Added Files:
        cfg_io.cc cfg_io.h loadcfg.l 
Log Message:
FIXED small bug in keyboard graph traversal
REMOVED some obsolete code
ADDED dlgedit config file stuff (not complete yet)


***** Error reading new file: [Errno 2] No such file or directory: 'cfg_io.cc'
***** Error reading new file: [Errno 2] No such file or directory: 'cfg_io.h'
***** Error reading new file: [Errno 2] No such file or directory: 'loadcfg.l'
Index: Makefile.am
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/Makefile.am,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** Makefile.am 14 Oct 2002 17:34:32 -0000      1.47
--- Makefile.am 17 Oct 2002 10:08:42 -0000      1.48
***************
*** 10,13 ****
--- 10,14 ----
  
  dlgedit_SOURCES = \
+     cfg_io.cc \
      dlg_arrow.cc \
      dlg_circle.cc \
***************
*** 38,43 ****
--- 39,46 ----
      gui_tooltip.cc \
      kb_traverse.cc \
+     lex.loadcfg.cc \
      lex.loadlg.cc \
      main.cc \
+     cfg_io.h \
      dlg_arrow.h \
      dlg_circle.h \
***************
*** 84,87 ****
--- 87,93 ----
  lex.loadlg.cc: loadlg.l
        flex -olex.loadlg.cc loadlg.l
+ 
+ lex.loadcfg.cc: loadcfg.l
+       flex -olex.loadcfg.cc loadcfg.l
  
  # py_character_wrap.cc : py_character.i ../../character.h 
../../character_base.h

Index: dlg_circle.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_circle.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** dlg_circle.cc       1 Jul 2002 13:53:59 -0000       1.4
--- dlg_circle.cc       17 Oct 2002 10:08:42 -0000      1.5
***************
*** 29,33 ****
      type_ = t;
      entry_ = (e ? e : new DlgCircleEntry);
-     last_parent = NULL;
      
      // Align Circle to the (imaginary) grid
--- 29,32 ----
***************
*** 45,56 ****
  DlgCircle *DlgCircle::parent (query_type pos, int offset)
  {
-     // go back the way we came
-     if (pos == CURRENT && last_parent != NULL) 
-     {
-         DlgCircle *parent = last_parent;
-         last_parent = NULL;
-         return parent;
-     }
-     
      DlgNode *arrow = prev (pos, offset);
      if (arrow != NULL) return (DlgCircle *) arrow->prev (FIRST);
--- 44,47 ----
***************
*** 66,102 ****
      DlgCircle *child = (DlgCircle *) arrow->next (FIRST);
  
-     // set the parent
-     child->setLastParent (this);
-     
      return child;
- }
- 
- // get a certain sibling-circle of this circle
- DlgCircle *DlgCircle::sibling (query_type pos, int offset)
- {
-     DlgCircle *myParent, *mySibling = NULL;
-     
-     // first, get the right parent circle
-     if (pos == FIRST || pos == LAST) myParent = parent (pos, offset);
-     else myParent = parent (CURRENT);
-     
-     if (myParent != NULL)
-     {
-         // first, locate this circle
-         for (mySibling = myParent->child (FIRST);
-              mySibling != this; mySibling = myParent->child (NEXT));
-              
-         // see if we can get a sibling in the direction we are searching
-         mySibling = myParent->child (pos, offset);
-         
-         // if not, see if there is another parent in that direction
-         /*if (mySibling == NULL && (pos == NEXT || pos == PREV))
-         {
-             prev (pos, 1);
-             mySibling = sibling (pos, offset);
-         }*/
-     }
-     
-     return mySibling;
  }
  
--- 57,61 ----

Index: dlg_circle.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_circle.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** dlg_circle.h        1 Jul 2002 13:53:59 -0000       1.4
--- dlg_circle.h        17 Oct 2002 10:08:42 -0000      1.5
***************
*** 38,42 ****
  {
  public:
!     DlgCircle () { mode_ = IDLE; last_parent = NULL; entry_ = NULL; }
      DlgCircle (DlgPoint &p, node_type t, DlgCircleEntry *e = NULL);
      ~DlgCircle ();
--- 38,42 ----
  {
  public:
!     DlgCircle () { mode_ = IDLE; entry_ = NULL; }
      DlgCircle (DlgPoint &p, node_type t, DlgCircleEntry *e = NULL);
      ~DlgCircle ();
***************
*** 48,60 ****
      /**
       * This method retrieves a %DlgCircle preceeding this node, i.e.
!      * (one of) it's parent(s). 
       * @param pos Defines from what position to start retrieving the parent.
       * @param offset Get the parent found at the specified offset from the
       *        position given above.
!      * @return The %DlgCircle found at the specified offset from the 
       *        given position.
       * @see query_type
       */
!     DlgCircle* parent (query_type pos, int offset = 1);  
      /**
       * This method retrieves a %DlgCircle following this node, i.e.
--- 48,60 ----
      /**
       * This method retrieves a %DlgCircle preceeding this node, i.e.
!      * (one of) it's parent(s).
       * @param pos Defines from what position to start retrieving the parent.
       * @param offset Get the parent found at the specified offset from the
       *        position given above.
!      * @return The %DlgCircle found at the specified offset from the
       *        given position.
       * @see query_type
       */
!     DlgCircle* parent (query_type pos, int offset = 1);
      /**
       * This method retrieves a %DlgCircle following this node, i.e.
***************
*** 68,82 ****
       */
      DlgCircle* child (query_type pos, int offset = 1);  
-     /**
-      * This method retrieves %DlgCircle's that are the children of
-      * this node's parent(s), i.e. it's sibling(s).  
-      * @param pos Defines from what position to start retrieving the sibling.
-      * @param offset Get the sibling found at the specified offset from the
-      *        position given above.
-      * @return The %DlgCircle found at the specified offset from the 
-      *        given position.
-      * @see query_type
-      */
-     DlgCircle* sibling (query_type pos, int offset = 1);  
      //@}
  
--- 68,71 ----
***************
*** 133,140 ****
      bool hasChild (DlgNode *child);
      
-     DlgCircle *lastParent ()            { return last_parent; }
-     void setLastParent (DlgCircle *p)   { last_parent = p; }
  private:
-     DlgCircle *last_parent;
      DlgCircleEntry *entry_;
  };
--- 122,126 ----

Index: dlg_types.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_types.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** dlg_types.h 12 Oct 2002 18:51:33 -0000      1.4
--- dlg_types.h 17 Oct 2002 10:08:42 -0000      1.5
***************
*** 134,138 ****
      LOAD_PROJECT    = 24,
      LOAD_LOOP       = 25,
!     LOAD_UNKNOWN    = 26
  };
  
--- 134,140 ----
      LOAD_PROJECT    = 24,
      LOAD_LOOP       = 25,
!     LOAD_FILE       = 26,
!     LOAD_BASE_DIR   = 27,
!     LOAD_UNKNOWN    = 28
  };
  

Index: gui_graph.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** gui_graph.cc        14 Oct 2002 17:34:32 -0000      1.5
--- gui_graph.cc        17 Oct 2002 10:08:42 -0000      1.6
***************
*** 270,277 ****
      if (selected)
      {
-         // see if selected is arrow
-         if (selected->type () == LINK)
-             selected = selected->prev (FIRST);
-             
          // ... try to retrieve it's parent
          DlgNode *parent = module->traverse ()->up ();
--- 270,273 ----
***************
*** 303,310 ****
      if (selected)
      {
-         // see if selected is arrow
-         if (selected->type () == LINK)
-             selected = selected->prev (FIRST);
-         
          // ... try to retrieve it's child
          DlgNode *child = module->traverse ()->down ();
--- 299,302 ----

Index: kb_traverse.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/kb_traverse.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** kb_traverse.cc      14 Oct 2002 17:34:32 -0000      1.1
--- kb_traverse.cc      17 Oct 2002 10:08:42 -0000      1.2
***************
*** 146,150 ****
  bool KBTraverse::select (DlgNode *node)
  {
!     if (node == NULL || node->prev (FIRST) == NULL) return false;
      
      DlgNode *prev;
--- 146,160 ----
  bool KBTraverse::select (DlgNode *node)
  {
!     if (node == NULL) return false;
! 
!     // root node
!     if (node->prev (FIRST) == NULL)
!     {
!         clear ();
!         Siblings.push_back (node);
!         Current = Siblings.begin ();
! 
!         return true;   
!     }
      
      DlgNode *prev;

Index: main.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/main.cc,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** main.cc     12 Oct 2002 18:51:34 -0000      1.58
--- main.cc     17 Oct 2002 10:08:42 -0000      1.59
***************
*** 29,32 ****
--- 29,33 ----
  #include "gettext.h"
  #include "game.h"
+ #include "cfg_io.h"
  #include "dlg_cmdline.h"
  #include "dlg_compiler.h"
***************
*** 35,38 ****
--- 36,42 ----
  int main (int argc, char *argv[])
  {
+     // dlgedit configuration
+     CfgIO config;
+     
      // Init GTK+
      gtk_init (&argc, &argv);





reply via email to

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