[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_circle.h,1.2,1.
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_circle.h,1.2,1.3 dlg_compiler.cc,1.5,1.6 dlg_compiler.h,1.2,1.3 |
Date: |
Sun, 28 Apr 2002 11:31:58 -0400 |
Update of /cvsroot/adonthell/adonthell/src/tools/dlgedit
In directory subversions:/tmp/cvs-serv27292
Modified Files:
dlg_circle.h dlg_compiler.cc dlg_compiler.h
Log Message:
FIXED dlg compiler couldn't detect wrong if-elif-else statements at the very
beginning of a dialogue
Index: dlg_circle.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_circle.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dlg_circle.h 7 Apr 2002 09:51:28 -0000 1.2
--- dlg_circle.h 28 Apr 2002 15:31:55 -0000 1.3
***************
*** 38,42 ****
{
public:
! DlgCircle () { mode_ = IDLE; last_parent = NULL; }
DlgCircle (DlgPoint &p, node_type t, DlgCircleEntry *e = NULL);
~DlgCircle ();
--- 38,42 ----
{
public:
! DlgCircle () { mode_ = IDLE; last_parent = NULL; entry_ = NULL; }
DlgCircle (DlgPoint &p, node_type t, DlgCircleEntry *e = NULL);
~DlgCircle ();
Index: dlg_compiler.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_compiler.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dlg_compiler.cc 12 Apr 2002 20:02:51 -0000 1.5
--- dlg_compiler.cc 28 Apr 2002 15:31:55 -0000 1.6
***************
*** 25,28 ****
--- 25,29 ----
#include "dlg_compiler.h"
#include "dlg_types.h"
+ #include "dlg_arrow.h"
#include "gui_error.h"
***************
*** 40,43 ****
--- 41,45 ----
DlgCompiler::DlgCompiler (DlgModule *module)
{
+ start.type () = PLAYER;
dialogue = module;
errors = 0;
***************
*** 62,65 ****
--- 64,70 ----
delete[] conditionTable;
delete[] operationTable;
+
+ for (DlgNode *next = start.next (FIRST); next != NULL; next = start.next
(FIRST))
+ delete (DlgArrow *) next;
}
***************
*** 137,140 ****
--- 142,146 ----
std::vector<DlgNode*>::iterator i;
DlgCircleEntry *entry;
+ DlgArrow *arrow;
unsigned int j = 0;
***************
*** 152,156 ****
// see whether this is a start-node
if ((*i)->prev (FIRST) == NULL)
! addStart (*i);
// set index of this node for later use
--- 158,162 ----
// see whether this is a start-node
if ((*i)->prev (FIRST) == NULL)
! arrow = new DlgArrow (&start, *i);
// set index of this node for later use
***************
*** 432,435 ****
--- 438,444 ----
void DlgCompiler::writeStart ()
{
+ // check the conditions of the circle's children
+ checkConditions (&start);
+
// begin dialogue array
file << "\t# -- (speaker, code, ((text, operation, condition), ...))"
***************
*** 438,448 ****
// write the "followers" (in this case the start nodes)
! if (!start.empty ())
! {
! std::vector<DlgNode*>::iterator i;
!
! for (i = start.begin (); i != start.end (); i++)
! writeFollower (*i);
! }
}
--- 447,452 ----
// write the "followers" (in this case the start nodes)
! for (DlgCircle *child = start.child (FIRST); child != NULL; child =
start.child (NEXT))
! writeFollower (child);
}
***************
*** 510,513 ****
--- 514,518 ----
void DlgCompiler::addStart (DlgNode *node)
{
+ /*
std::vector<DlgNode*>::iterator i = start.begin ();
***************
*** 521,524 ****
--- 526,530 ----
// insert
start.insert (i, node);
+ */
}
Index: dlg_compiler.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_compiler.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dlg_compiler.h 7 Apr 2002 09:51:28 -0000 1.2
--- dlg_compiler.h 28 Apr 2002 15:31:55 -0000 1.3
***************
*** 135,139 ****
DlgModule *dialogue; // The dialogue to be compiled
! std::vector<DlgNode*> start; // Start nodes of the dialogue
std::vector<std::string> code; // Temporary storage for all code
std::vector<std::string> conditions; // Temporary storage for all
conditions
--- 135,139 ----
DlgModule *dialogue; // The dialogue to be compiled
! DlgCircle start; // Start node of the dialogue
std::vector<std::string> code; // Temporary storage for all code
std::vector<std::string> conditions; // Temporary storage for all
conditions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_circle.h,1.2,1.3 dlg_compiler.cc,1.5,1.6 dlg_compiler.h,1.2,1.3,
Kai Sterker <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/src getopt.h,NONE,1.1 mapcharacter.cc,1.38,1.39 main.cc,1.45,1.46
- Next by Date:
[Adonthell-commits] CVS: adonthell/src/modules Makefile.am,1.1,1.2
- Previous by thread:
[Adonthell-commits] CVS: adonthell/src getopt.h,NONE,1.1 mapcharacter.cc,1.38,1.39 main.cc,1.45,1.46
- Next by thread:
[Adonthell-commits] CVS: adonthell/src/modules Makefile.am,1.1,1.2
- Index(es):