You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(18) |
Oct
(33) |
Nov
(27) |
Dec
(26) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(22) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(46) |
Sep
|
Oct
|
Nov
|
Dec
|
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(13) |
May
(7) |
Jun
(9) |
Jul
(23) |
Aug
(5) |
Sep
(4) |
Oct
(6) |
Nov
(1) |
Dec
|
2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Darryl L. <py...@us...> - 2000-10-17 06:04:43
|
Update of /cvsroot/pythianproject/PythianProject/Source/Units In directory slayer.i.sourceforge.net:/tmp/cvs-serv25079 Modified Files: NetDataExch.pas Log Message: Added a missing unit in uses clause for latest version of Indy Index: NetDataExch.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Units/NetDataExch.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** NetDataExch.pas 2000/08/17 15:51:11 1.4 --- NetDataExch.pas 2000/10/17 06:04:40 1.5 *************** *** 36,40 **** uses Windows, Classes, Points, IdTCPConnection, IdUDPBase, IdComponent, IdGlobal, ! PythColl; const --- 36,40 ---- uses Windows, Classes, Points, IdTCPConnection, IdUDPBase, IdComponent, IdGlobal, ! PythColl, IdException; const |
From: Darryl L. <py...@us...> - 2000-10-17 06:03:38
|
Update of /cvsroot/pythianproject/PythianProject/Source/GameEngine In directory slayer.i.sourceforge.net:/tmp/cvs-serv24975 Modified Files: Commands.pas Log Message: Didn't change anything Index: Commands.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/Commands.pas,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** Commands.pas 2000/10/14 19:41:23 1.17 --- Commands.pas 2000/10/17 06:03:36 1.18 *************** *** 16,20 **** CommandType :integer; // what command is it? Data :Pointer; // points to attached data ! // TTL:integer; // Time to live: when -1, lives forever, until manually removed. // Equivalent to DeleteOnHandle := false. When 0, will be removed at the end of the game cycle --- 16,20 ---- CommandType :integer; // what command is it? Data :Pointer; // points to attached data ! TTL:integer; // Time to live: when -1, lives forever, until manually removed. // Equivalent to DeleteOnHandle := false. When 0, will be removed at the end of the game cycle |
From: Darryl L. <py...@us...> - 2000-10-17 06:03:15
|
Update of /cvsroot/pythianproject/PythianProject/Source/GameEngine In directory slayer.i.sourceforge.net:/tmp/cvs-serv24932 Modified Files: GrEngState.pas GameGrEngState.pas Log Message: Fixed the colour issue on the text, moved some of the text code around, and changed what is displayed Index: GrEngState.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/GrEngState.pas,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** GrEngState.pas 2000/10/14 19:39:16 1.7 --- GrEngState.pas 2000/10/17 06:03:12 1.8 *************** *** 10,14 **** --- 10,17 ---- FBitDepth: TBitDepth; FFilterMode: Single; + FFPS: Single; FFrames: Integer; + FtxtFont :integer; + procedure SetWindow(const Value: TOpenGLWindow); procedure SetBitDepth(const Value: TBitDepth); *************** *** 29,33 **** implementation ! uses OpenGL, SysUtils, Windows; { TGraphicsEngine } --- 32,37 ---- implementation ! uses ! glfd, OpenGL, SysUtils, Windows; { TGraphicsEngine } *************** *** 49,52 **** --- 53,67 ---- Camera.ViewWidth := OpenGLWindow.Width; Camera.ViewHeight := OpenGLWIndow.Height; + + // put code to init tests here + glfInit; + Ftxtfont := glfLoadFont(DataPath+'fonts\arial1.glf'); + glfSetAnchorPoint(GLF_LEFT_UP); + { glfSetContourColor(0, 0, 0, 0); + glfEnable(GLF_CONTOURING);} + + glfConsoleClear; + glfPrintString('Test Line 1'); + glfPrintString('Test Line 2'); end; end; *************** *** 54,58 **** procedure TGraphicsEngine.Paint; begin ! // end; --- 69,113 ---- procedure TGraphicsEngine.Paint; begin ! // Disable texturing so we can see our colours ! glDisable(GL_TEXTURE_2D); ! glColor3f(1, 1, 1); ! ! // glClear(GL_DEPTH_BUFFER_BIT); // don't know why we need this, but we do ! // well, turns out we don't :) ! ! // reinit the matrices ! glMatrixMode(GL_PROJECTION); ! glPushMatrix; ! glLoadIdentity; ! ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity; ! ! // change co-ordinate system to 1:1 pixel mapping ! glScalef(2.0 / Window.Width, -2.0 / Window.Height, 1.0); ! glTranslatef(-(Window.Width / 2), -(Window.Height / 2), 0); ! ! // need this: scale it - otherwise text will be 1x1 pixels! ! glScalef(10, 10, 1); ! ! // offset it from the top by Y/2 text rows to make it look nicer ! glTranslatef(0, 2, 0); ! ! // need this: flip matrix because GLF is expecting OpenGL default ! // co-ordinates and we have changed them. Otherwise text will be ! // upside down ! glScalef(1, -1, 1); ! ! // finally draw the text ! glfDrawSolidString(Format('FPS: %f',[FFPS])); ! ! // and restore to default ! glMatrixMode(GL_PROJECTION); ! glPopMatrix; ! ! // restore the colour to white because this affects everything else in the ! // game, and put texturing back on ! glColor3f(1, 1, 1); ! glEnable(GL_TEXTURE_2D); end; *************** *** 63,67 **** if (CurrentTime > 1000) then begin ! FWindow.AuxCaption := Format('FPS: %f',[FFrames * 1000 / (CurrentTime)]); FFrames := 0; Result := inherited Process; --- 118,123 ---- if (CurrentTime > 1000) then begin ! FFPS := FFrames * 1000 / CurrentTime; ! // FWindow.AuxCaption := Format('FPS: %f',[FFPS]); FFrames := 0; Result := inherited Process; Index: GameGrEngState.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/GameGrEngState.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** GameGrEngState.pas 2000/10/15 16:17:31 1.10 --- GameGrEngState.pas 2000/10/17 06:03:12 1.11 *************** *** 18,32 **** procedure SetFogStartMultiplier(const Value: Single); protected - txtFont :integer; - txtBaseList :integer; - procedure InitFog; procedure LoadSkyBox; procedure Paint; override; - - // test code - procedure InitTest; virtual; - procedure PaintTest; virtual; - procedure FinalizeTest; virtual; public procedure Finalize; override; --- 18,24 ---- *************** *** 42,46 **** uses ModelInstances, OpenGL, Points, Geometry, StdInit, TerrainEng, SysUtils, ! Trace, Windows, glfd; { TGameGrEngSate } --- 34,38 ---- uses ModelInstances, OpenGL, Points, Geometry, StdInit, TerrainEng, SysUtils, ! Trace, Windows; { TGameGrEngSate } *************** *** 52,64 **** FSkybox.Free; - FinalizeTest; - inherited; end; - procedure TGameGraphicsEngine.FinalizeTest; - begin - end; - procedure TGameGraphicsEngine.InitFog; begin --- 44,50 ---- *************** *** 111,129 **** LoadSkyBox; - InitTest; end; end; - procedure TGameGraphicsEngine.InitTest; - begin - // put code to init tests here - glfInit; - txtfont := glfLoadFont(DataPath+'fonts\arial1.glf'); - glfSetAnchorPoint(GLF_LEFT_UP); - glfConsoleClear; - glfPrintString('Test Line 1'); - glfPrintString('Test Line 2'); - end; - procedure TGameGraphicsEngine.LoadSkyBox; begin --- 97,103 ---- *************** *** 137,144 **** i: Integer; { P: TPoint3D; ! MousePt: TSingle2D;} ModelView, Projection :TMatrix4D; Viewport: TVector4i; ! x,y,z :TGLDouble; begin FSkyBox.Render(Camera.Angle); --- 111,118 ---- i: Integer; { P: TPoint3D; ! MousePt: TSingle2D; ModelView, Projection :TMatrix4D; Viewport: TVector4i; ! x,y,z: TGLDouble;} begin FSkyBox.Render(Camera.Angle); *************** *** 174,212 **** teFinishFrame; - - PaintTest; - end; ! procedure TGameGraphicsEngine.PaintTest; ! begin ! // put paint code here for tests ! ! // reinit the matrices ! glClear(GL_DEPTH_BUFFER_BIT); // don't know why we need this, but we do ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity; ! glMatrixMode(GL_PROJECTION); ! glPushMatrix; ! glLoadIdentity; ! ! glColor3f(1.0,1.0,1.0); // has no effect :( ! ! ! // change co-ordinate system to 1:1 pixel mapping ! glScalef(2.0 / Window.Width, -2.0 / Window.Height, 1.0); ! glTranslatef(-(window.width / 2), -(window.height/2), 0); ! ! // offset it from the top by 10px to make it look nicer ! glTranslatef(0,10,0); ! // need this: scale it - otherwise text will be 1x1 pixels! ! glScalef(20,20,0); ! // need this: flip matrix because GLF is expecting OpenGL default ! // co-ordinates and we have changed them. Otherwise text will be ! // upside down ! glScalef(1,-1,1); ! // finally draw the text ! glfDrawSolidString('Pythian Project 2000'); ! // and restore to default ! glPopMatrix; end; --- 148,153 ---- teFinishFrame; ! inherited; end; |
From: Darryl L. <py...@us...> - 2000-10-17 06:02:26
|
Update of /cvsroot/pythianproject/PythianProject/Source/GameEngine In directory slayer.i.sourceforge.net:/tmp/cvs-serv24879 Modified Files: StateMain.pas Log Message: Didn't really change anything Index: StateMain.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/StateMain.pas,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** StateMain.pas 2000/09/10 16:47:17 1.12 --- StateMain.pas 2000/10/17 06:02:23 1.13 *************** *** 58,62 **** StateMachine.Add(InputEngine); - { MultiPlayerEngine := TMultiPlayerEngine.Create('Multiplayer Engine'); StateMachine.Add(MultiPlayerEngine); } --- 58,61 ---- |
From: Michael H. <mh...@us...> - 2000-10-15 16:17:35
|
Update of /cvsroot/pythianproject/PythianProject/Source/GameEngine In directory slayer.i.sourceforge.net:/tmp/cvs-serv26661 Modified Files: GameGrEngState.pas Log Message: changed font path -mike Index: GameGrEngState.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/GameGrEngState.pas,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** GameGrEngState.pas 2000/10/14 19:39:16 1.9 --- GameGrEngState.pas 2000/10/15 16:17:31 1.10 *************** *** 119,123 **** // put code to init tests here glfInit; ! txtfont := glfLoadFont('arial1.glf'); glfSetAnchorPoint(GLF_LEFT_UP); glfConsoleClear; --- 119,123 ---- // put code to init tests here glfInit; ! txtfont := glfLoadFont(DataPath+'fonts\arial1.glf'); glfSetAnchorPoint(GLF_LEFT_UP); glfConsoleClear; |
From: Michael H. <mh...@us...> - 2000-10-15 10:51:41
|
Update of /cvsroot/pythianproject/PythianProject/Bin/DATA/fonts In directory slayer.i.sourceforge.net:/tmp/cvs-serv6513/fonts Log Message: Directory /cvsroot/pythianproject/PythianProject/Bin/DATA/fonts added to the repository |
From: Michael H. <mh...@us...> - 2000-10-14 19:41:26
|
Update of /cvsroot/pythianproject/PythianProject/Source/GameEngine In directory slayer.i.sourceforge.net:/tmp/cvs-serv20015 Modified Files: Commands.pas DynObjsState.pas Log Message: -mike Index: Commands.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/Commands.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** Commands.pas 2000/09/20 18:08:50 1.16 --- Commands.pas 2000/10/14 19:41:23 1.17 *************** *** 16,21 **** CommandType :integer; // what command is it? Data :Pointer; // points to attached data ! //DeleteOnHandle :boolean; // should this command be deallocated once it has been executed? ! TTL:integer; // Time to live: when -1, lives forever, until manually removed. // Equivalent to DeleteOnHandle := false. When 0, will be removed at the end of the game cycle --- 16,20 ---- CommandType :integer; // what command is it? Data :Pointer; // points to attached data ! // TTL:integer; // Time to live: when -1, lives forever, until manually removed. // Equivalent to DeleteOnHandle := false. When 0, will be removed at the end of the game cycle *************** *** 178,183 **** begin // removes from list, then frees ! RemoveCommand(c); ! Dispose(c); end; --- 177,185 ---- begin // removes from list, then frees ! if assigned(c) then ! begin ! RemoveCommand(c); ! Dispose(c); ! end; end; *************** *** 254,258 **** CommandType := -1; Data := nil; ! TTL := 1; OriginatingState := StateMachine.CurrentState; end; --- 256,260 ---- CommandType := -1; Data := nil; ! //@@TTL := 1; OriginatingState := StateMachine.CurrentState; end; Index: DynObjsState.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/DynObjsState.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** DynObjsState.pas 2000/09/20 18:08:50 1.16 --- DynObjsState.pas 2000/10/14 19:41:23 1.17 *************** *** 120,125 **** end; // now check if it is to be thrown away ! if TTL>0 then // mike, is this correct here ??? ! dec(TTl); end; end; --- 120,129 ---- end; // now check if it is to be thrown away ! ! // no stefan, the TTL system is obsolete. commands stay in ! // the system for exactly 1 cycle, but if this causes problems ! // we can change it. ! { if TTL>0 then // mike, is this correct here ??? ! dec(TTl); } end; end; |
From: Michael H. <mh...@us...> - 2000-10-14 19:40:35
|
Update of /cvsroot/pythianproject/PythianProject/Source/GameEngine In directory slayer.i.sourceforge.net:/tmp/cvs-serv19226 Modified Files: InEngState.pas Log Message: no message Index: InEngState.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/InEngState.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** InEngState.pas 2000/08/31 17:17:52 1.16 --- InEngState.pas 2000/10/14 19:40:30 1.17 *************** *** 282,286 **** if Assigned(Cmd) then if (Cmd^.CommandType = cmdType) and (Cmd^.Target = ActiveTarget) then ! Cmd^.TTL := 0; end; end; --- 282,286 ---- if Assigned(Cmd) then if (Cmd^.CommandType = cmdType) and (Cmd^.Target = ActiveTarget) then ! Commands.DeleteCommand(Cmd); end; end; |
From: Michael H. <mh...@us...> - 2000-10-14 19:39:19
|
Update of /cvsroot/pythianproject/PythianProject/Source/GameEngine In directory slayer.i.sourceforge.net:/tmp/cvs-serv17897 Modified Files: GameGrEngState.pas GrEngState.pas Log Message: text demo Index: GameGrEngState.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/GameGrEngState.pas,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** GameGrEngState.pas 2000/09/04 17:51:55 1.8 --- GameGrEngState.pas 2000/10/14 19:39:16 1.9 *************** *** 3,7 **** interface ! uses GrEngState, Sky; type --- 3,7 ---- interface ! uses GrEngState, Sky, Graphics; type *************** *** 18,24 **** --- 18,32 ---- procedure SetFogStartMultiplier(const Value: Single); protected + txtFont :integer; + txtBaseList :integer; + procedure InitFog; procedure LoadSkyBox; procedure Paint; override; + + // test code + procedure InitTest; virtual; + procedure PaintTest; virtual; + procedure FinalizeTest; virtual; public procedure Finalize; override; *************** *** 34,38 **** uses ModelInstances, OpenGL, Points, Geometry, StdInit, TerrainEng, SysUtils, ! Windows, Trace; { TGameGrEngSate } --- 42,46 ---- uses ModelInstances, OpenGL, Points, Geometry, StdInit, TerrainEng, SysUtils, ! Trace, Windows, glfd; { TGameGrEngSate } *************** *** 44,50 **** --- 52,64 ---- FSkybox.Free; + FinalizeTest; + inherited; end; + procedure TGameGraphicsEngine.FinalizeTest; + begin + end; + procedure TGameGraphicsEngine.InitFog; begin *************** *** 97,103 **** --- 111,129 ---- LoadSkyBox; + InitTest; end; end; + procedure TGameGraphicsEngine.InitTest; + begin + // put code to init tests here + glfInit; + txtfont := glfLoadFont('arial1.glf'); + glfSetAnchorPoint(GLF_LEFT_UP); + glfConsoleClear; + glfPrintString('Test Line 1'); + glfPrintString('Test Line 2'); + end; + procedure TGameGraphicsEngine.LoadSkyBox; begin *************** *** 148,151 **** --- 174,212 ---- teFinishFrame; + + PaintTest; + end; + + procedure TGameGraphicsEngine.PaintTest; + begin + // put paint code here for tests + + // reinit the matrices + glClear(GL_DEPTH_BUFFER_BIT); // don't know why we need this, but we do + glMatrixMode(GL_MODELVIEW); + glLoadIdentity; + glMatrixMode(GL_PROJECTION); + glPushMatrix; + glLoadIdentity; + + glColor3f(1.0,1.0,1.0); // has no effect :( + + + // change co-ordinate system to 1:1 pixel mapping + glScalef(2.0 / Window.Width, -2.0 / Window.Height, 1.0); + glTranslatef(-(window.width / 2), -(window.height/2), 0); + + // offset it from the top by 10px to make it look nicer + glTranslatef(0,10,0); + // need this: scale it - otherwise text will be 1x1 pixels! + glScalef(20,20,0); + // need this: flip matrix because GLF is expecting OpenGL default + // co-ordinates and we have changed them. Otherwise text will be + // upside down + glScalef(1,-1,1); + // finally draw the text + glfDrawSolidString('Pythian Project 2000'); + // and restore to default + glPopMatrix; end; Index: GrEngState.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/GrEngState.pas,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** GrEngState.pas 2000/09/04 17:51:55 1.6 --- GrEngState.pas 2000/10/14 19:39:16 1.7 *************** *** 43,47 **** if Result then begin ! FFilterMode := GL_NEAREST; FFrames := 0; --- 43,47 ---- if Result then begin ! FFilterMode := GL_LINEAR; FFrames := 0; |
From: Michael H. <mh...@us...> - 2000-10-14 19:37:28
|
Update of /cvsroot/pythianproject/PythianProject/Source/Units In directory slayer.i.sourceforge.net:/tmp/cvs-serv16116 Modified Files: glfd.pas Log Message: bug fixes Index: glfd.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Units/glfd.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** glfd.pas 2000/10/13 19:28:28 1.1 --- glfd.pas 2000/10/14 19:37:24 1.2 *************** *** 3,6 **** --- 3,31 ---- interface + { + ============================================================================== + | GLF Library + | Version 1.0 (Release) + | + | Author: Roman Podobedov + | Email: ro...@ut... + | WEB: www.ut.ee/~romka + | Date: 17 August 2000 + | + | Copyright (C) 2000, Romka Graphics + | This library is freely distributable without any license or permissions. + | You can use this library in any program (commercial, educational + | or individual), but in each program, where You use this library, You + | should to keep this header (author name and coordinates)! + ============================================================================== + + Translation to Delphi: + - Kamil Krauspe (main guy) + - Michael Hearn (minor changes) + + For the Pythian Project + } + + uses Windows, SysUtils, OpenGL; *************** *** 43,47 **** procedure glfDrawWiredString(s: string); //* Draw wired string */ procedure glfDrawSolidSymbol(s: Char); //* Draw solid symbol */ ! procedure glfDrawSolidString(s: string); //* Draw wired string */ procedure glfDraw3DWiredSymbol(s: Char); //* Draw 3D wired symbol */ procedure glfDraw3DWiredString(s: string); //* Draw 3D wired string */ --- 68,72 ---- procedure glfDrawWiredString(s: string); //* Draw wired string */ procedure glfDrawSolidSymbol(s: Char); //* Draw solid symbol */ ! procedure glfDrawSolidString(s: string); //* Draw solid string */ procedure glfDraw3DWiredSymbol(s: Char); //* Draw 3D wired symbol */ procedure glfDraw3DWiredString(s: string); //* Draw 3D wired string */ *************** *** 163,173 **** conCursorCount: Integer; //* Console cursor blink counter */ // is OK??? procedure anchor_proc(var x, y: Single; aap: Integer); begin case aap of ! GLF_LEFT_UP: begin x := x + 1; y := y - 1; end; GLF_LEFT_CENTER: x := x + 1; ! GLF_LEFT_DOWN: begin x := x + 1; y := y + 1; end; GLF_CENTER_UP: y := y - 1; GLF_CENTER_DOWN: y := y + 1; --- 188,200 ---- conCursorCount: Integer; //* Console cursor blink counter */ + // is OK??? + // @@mike - GLF_LEFT_UP: changed 1 to 2. Probably should do the same for GLF_LEFT_DOWN procedure anchor_proc(var x, y: Single; aap: Integer); begin case aap of ! GLF_LEFT_UP: begin x := x + 1; y := y - 2; end; GLF_LEFT_CENTER: x := x + 1; ! GLF_LEFT_DOWN: begin x := x + 1; y := y + 2; end; GLF_CENTER_UP: y := y - 1; GLF_CENTER_DOWN: y := y + 1; *************** *** 190,193 **** --- 217,224 ---- FillChar(contouring_color, SizeOf(TRGBAColor), 0); SetLength(conData, 0); + // @@mike - added to set to GLF defaults + glfSetSymbolSpace(0.2); + glfSetSpaceSize(2.0); + glfSetSymbolDepth(0.2); glfSetConsoleParam(40, 20); glfConsoleClear; *************** *** 360,364 **** if fonts[i] <> nil then begin ! FreeAndNil(fonts[i]); end; end; --- 391,397 ---- if fonts[i] <> nil then begin ! // @@mike - FreeAndNil? Don't know about that one. ! //FreeAndNil(fonts[i]); ! Dispose(fonts[i]); fonts[i] := nil; end; end; *************** *** 379,389 **** if fonts[curfont]^.symbols[i] <> nil then begin ! FreeAndNil(fonts[curfont]^.symbols[i]^.vdata); ! FreeAndNil(fonts[curfont]^.symbols[i]^.fdata); ! FreeAndNil(fonts[curfont]^.symbols[i]^.ldata); ! FreeAndNil(fonts[curfont]^.symbols[i]); end; ! FreeAndNil(fonts[curfont]); curfont := -1; Result := GLF_OK; --- 412,426 ---- if fonts[curfont]^.symbols[i] <> nil then begin ! //FreeAndNil(fonts[curfont]^.symbols[i]^.vdata); ! fonts[curfont]^.symbols[i]^.vdata := nil; ! //FreeAndNil(fonts[curfont]^.symbols[i]^.fdata); ! fonts[curfont]^.symbols[i]^.fdata := nil; ! //FreeAndNil(fonts[curfont]^.symbols[i]^.ldata); ! fonts[curfont]^.symbols[i]^.ldata := nil; ! //FreeAndNil(fonts[curfont]^.symbols[i]); ! Dispose(fonts[curfont]^.symbols[i]); fonts[curfont]^.symbols[i] := nil; end; ! Dispose(fonts[curfont]); fonts[curfont] := nil; curfont := -1; Result := GLF_OK; |
From: Kamil K. <kkr...@us...> - 2000-10-13 19:28:52
|
Update of /cvsroot/pythianproject/PythianProject/Source/Units In directory slayer.i.sourceforge.net:/tmp/cvs-serv2207 Added Files: glfd.pas Log Message: -k --- NEW FILE --- unit glfd; interface uses Windows, SysUtils, OpenGL; const //* CONSTANTS */ GLF_ERROR = -1; GLF_OK = 0; GLF_YES = 1; GLF_NO = 2; GLF_CONSOLE_MESSAGES = 10; GLF_TEXTURING = 11; GLF_CONTOURING = 12; GLF_LEFT_UP = 20; [...1026 lines suppressed...] s[j + 1] := #0; Break; end; end; glfDrawSolidStringF(conFont, s); glTranslatef(0, -2, 0); end; end; procedure glfSetCursorBlinkRate(Rate: Integer); begin if Rate > 0 then begin conCursorBlink := Rate; conCursorCount := Rate; conCursorMode := GLF_YES; end; end; end. |
From: Michael H. <mh...@us...> - 2000-09-23 12:29:07
|
Update of /cvsroot/pythianproject/PythianProject/Bin In directory slayer.i.sourceforge.net:/tmp/cvs-serv22655 Modified Files: data.cml Log Message: no message Index: data.cml =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Bin/data.cml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** data.cml 2000/09/17 10:46:13 1.3 --- data.cml 2000/09/23 12:29:03 1.4 *************** *** 8,12 **** <jump id="261" to="138" enabled="TRUE"></jump></playeroption><playeroption id="38" enabled="TRUE">That's rubbish. <jump id="262" to="138" enabled="TRUE"></jump></playeroption><playeroption id="39" enabled="TRUE">That's ****. ! <jump id="263" to="138" enabled="TRUE"></jump></playeroption><group name="Joke end group" id="137" enabled="FALSE"><disable id="138" target="1" enabled="TRUE"></disable><disable id="139" target="3" enabled="TRUE"></disable><enable id="144" target="135" enabled="TRUE"></enable><jump id="142" to="265" enabled="TRUE"></jump></group></playeroption></playeroption></group><group name="Greetings Group" id="265" enabled="TRUE"><playeroption id="1" enabled="TRUE">Hi there! How are you doing? <npcspeech id="4" enabled="TRUE">Fine thanks. You? </npcspeech><playeroption id="5" enabled="TRUE">Oh not bad thanks. --- 8,12 ---- <jump id="261" to="138" enabled="TRUE"></jump></playeroption><playeroption id="38" enabled="TRUE">That's rubbish. <jump id="262" to="138" enabled="TRUE"></jump></playeroption><playeroption id="39" enabled="TRUE">That's ****. ! <jump id="263" to="138" enabled="TRUE"></jump></playeroption><group name="Joke end group" id="137" enabled="FALSE"><disable id="138" target="1" enabled="TRUE"></disable><disable id="139" target="3" enabled="TRUE"></disable><enable id="123" target="135" enabled="TRUE"></enable><jump id="124" to="265" enabled="TRUE"></jump></group></playeroption></playeroption></group><group name="Greetings Group" id="265" enabled="TRUE"><playeroption id="1" enabled="TRUE">Hi there! How are you doing? <npcspeech id="4" enabled="TRUE">Fine thanks. You? </npcspeech><playeroption id="5" enabled="TRUE">Oh not bad thanks. *************** *** 54,58 **** player must say all three things before he can go back. However, if none of them have force-select then the player can only choose 1 of them. However, the rest of the options will then be impossible to select. Force select is currently not editable. ! <enable id="134" target="68" enabled="TRUE"></enable><npcspeech id="76" enabled="TRUE">If the player sees this npc speech then the group has been enabled. That means that if the player selects option (b) then (c), they get extra options. </npcspeech></playeroption><npcspeech id="57" enabled="TRUE">This node will be run immediately after the player chooses (b). However, after this node execution will stop, until a player option has been selected. </npcspeech></playeroption><playeroption id="51" enabled="TRUE">This is option (c) --- 54,58 ---- player must say all three things before he can go back. However, if none of them have force-select then the player can only choose 1 of them. However, the rest of the options will then be impossible to select. Force select is currently not editable. ! <enable id="122" target="68" enabled="TRUE"></enable><npcspeech id="76" enabled="TRUE">If the player sees this npc speech then the group has been enabled. That means that if the player selects option (b) then (c), they get extra options. </npcspeech></playeroption><npcspeech id="57" enabled="TRUE">This node will be run immediately after the player chooses (b). However, after this node execution will stop, until a player option has been selected. </npcspeech></playeroption><playeroption id="51" enabled="TRUE">This is option (c) |
From: Stefan G. <sgl...@us...> - 2000-09-20 18:08:53
|
Update of /cvsroot/pythianproject/PythianProject/Source/GameEngine In directory slayer.i.sourceforge.net:/tmp/cvs-serv27804 Modified Files: Commands.pas DynObjsState.pas Log Message: Movement commands due to pathfinding have now data New stop command added Index: Commands.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/Commands.pas,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** Commands.pas 2000/09/10 16:47:17 1.15 --- Commands.pas 2000/09/20 18:08:50 1.16 *************** *** 6,9 **** --- 6,15 ---- type + TMotionData= record (* for turn and move commands *) + Speed:integer; (* speed of turn/movement *) + MaxMotion:single; (* max turn or movement *) + end; + PMotionData=^TMotionData; + TCommandData = record Target :TObject; // can be used to point to the object to enact the command on *************** *** 64,72 **** // define ranges here for optimization purposes ! cmdRANGE_MovementLow = 1; cmdRANGE_MovementHigh = 11; cmdMoveForward = 1; cmdMoveBackward = 2; cmdMoveUp = 3; cmdMoveDown = 4; cmdTurnLeft = 5; cmdTurnRight = 6; cmdLookUp = 7; cmdLookDown = 8; ! cmdStrafeRight = 9; cmdStrafeLeft = 10; cmdMoveTo = 11; --- 70,78 ---- // define ranges here for optimization purposes ! cmdRANGE_MovementLow = 1; cmdRANGE_MovementHigh = 12; cmdMoveForward = 1; cmdMoveBackward = 2; cmdMoveUp = 3; cmdMoveDown = 4; cmdTurnLeft = 5; cmdTurnRight = 6; cmdLookUp = 7; cmdLookDown = 8; ! cmdStrafeRight = 9; cmdStrafeLeft = 10; cmdMoveTo = 11; cmdStop = 12; Index: DynObjsState.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/GameEngine/DynObjsState.pas,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** DynObjsState.pas 2000/09/10 16:47:17 1.15 --- DynObjsState.pas 2000/09/20 18:08:50 1.16 *************** *** 38,45 **** VA: TAngle3D; MoveData: PPoint3D; ! Step, Turn: Single; Command: PCommandData; Ind :integer; ! BaseTurn :integer; begin for ind := 0 to Commands.Count-1 do --- 38,45 ---- VA: TAngle3D; MoveData: PPoint3D; ! Step, Turn, Move, MaxTurn, MaxMove : Single; Command: PCommandData; Ind :integer; ! BaseTurn, BaseMove :integer; begin for ind := 0 to Commands.Count-1 do *************** *** 57,76 **** VA := AngleVector; BaseTurn := 20; // default // check if baseTurn is overridden if (CommandType = cmdTurnLeft) or (CommandType = cmdTurnRight) then if assigned(data) then begin ! BaseTurn := Integer(Data^); Dispose(Data); end; ! // Normalize the step time to 33 ms ! Step := BaseStep * CurrentTime; Turn := BaseTurn * Step; case CommandType of ! cmdMoveForward: MoveA(+VA.X * Step, 0, +VA.Z * Step); ! cmdMoveBackward: MoveA(-VA.X * Step, 0, -VA.Z * Step); cmdStrafeLeft: MoveA(+VA.Z * Step, 0, -VA.X * Step); cmdStrafeRight: MoveA(-VA.Z * Step, 0, +VA.X * Step); --- 57,101 ---- VA := AngleVector; BaseTurn := 20; // default + BaseMove := 1; // default + MaxTurn := 360; + MaxMove := 20; + // Normalize the step time to 33 ms + Step := BaseStep * CurrentTime; + // check if baseTurn is overridden if (CommandType = cmdTurnLeft) or (CommandType = cmdTurnRight) then if assigned(data) then begin ! BaseTurn := TMotionData(Data^).Speed; ! MaxTurn := TMotionData(Data^).MaxMotion; ! tracestring('Angle to target '+IntToStr(round(MaxTurn))+ ! ', intended turn '+IntToStr(round(BaseTurn*Step))); Dispose(Data); + Data:=nil; end; ! // check if baseStep is overridden ! if (CommandType = cmdMoveForward) or (CommandType = cmdMoveBackward) then ! if assigned(data) then ! begin ! BaseMove := TMotionData(Data^).Speed; ! MaxMove := TMotionData(Data^).MaxMotion; ! tracestring('Distance to target '+IntToStr(round(MaxMove))+ ! ', intended motion '+IntToStr(round(BaseMove*Step))); ! Dispose(Data); ! Data:=nil; ! end; + Move := BaseMove * Step; + if Move>MaxMove then + Move:=MaxMove; Turn := BaseTurn * Step; + if Turn>MaxTurn then + Turn:=MaxTurn; + case CommandType of ! cmdMoveForward: MoveA(+VA.X * Move, 0, +VA.Z * Move); ! cmdMoveBackward: MoveA(-VA.X * Move, 0, -VA.Z * Move); cmdStrafeLeft: MoveA(+VA.Z * Step, 0, -VA.X * Step); cmdStrafeRight: MoveA(-VA.Z * Step, 0, +VA.X * Step); *************** *** 82,85 **** --- 107,111 ---- MoveTo(MoveData^); end; + cmdStop: Animation:=0; end; end; *************** *** 94,97 **** --- 120,125 ---- end; // now check if it is to be thrown away + if TTL>0 then // mike, is this correct here ??? + dec(TTl); end; end; *************** *** 103,106 **** --- 131,135 ---- Obj: TMovingItem; tmpPtEqual :boolean; + C:PCommandData; begin FMovementAI.Map := Map; *************** *** 121,126 **** tmpPtEqual := (Abs(Obj.FinalTarget.X - Obj.Position.X) <= 1) and (Abs(Obj.FinalTarget.Z - Obj.Position.Z) <= 1); ! if (Obj.FullPath.Count = 0) ! and not tmpPtEqual then begin FMovementAI.Destination := Obj.FinalTarget; --- 150,154 ---- tmpPtEqual := (Abs(Obj.FinalTarget.X - Obj.Position.X) <= 1) and (Abs(Obj.FinalTarget.Z - Obj.Position.Z) <= 1); ! if (Obj.FullPath.Count = 0) and not tmpPtEqual then begin FMovementAI.Destination := Obj.FinalTarget; *************** *** 128,131 **** --- 156,163 ---- TraceString('Fullpath at zero and position '+Point3DToString(Obj.Position)+' not equal to final target = '+Point3DToString(Obj.FinalTarget)); if not FMovementAI.FindPath(Obj.FullPath, 2.0) then begin end; + C := Commands.MakeNewCommand; + C.Target := Obj; + C.CommandType := cmdStop; + Commands.AddCommand(C); end; if (Obj.FullPath.Count = 0) and (tmpPtEqual) then *************** *** 133,136 **** --- 165,172 ---- Obj.NeedsPath := false; TraceString('needspath := false'); + C := Commands.MakeNewCommand; + C.Target := Obj; + C.CommandType := cmdStop; + Commands.AddCommand(C); end; end; *************** *** 198,201 **** --- 234,238 ---- ActiveTarget := Player; + (* remove this again !!! *) Hueteutl := TNPC.Create; with Hueteutl do *************** *** 215,218 **** --- 252,256 ---- Cmd := Commands.MakeNewCommand; Cmd^.CommandType := cmdAddAI; Cmd^.Data := HueyAI; Commands.AddCommand(Cmd); + (**) // this guy has no brain to start out with. he's used for testing *************** *** 249,262 **** BaseStep = 0.1 / 33;} var ! {## VA: TAngle3D; ! Step: Single; } C:PCommandData; begin ! // todo: replace with commands system - mike C := Commands.MakeNewCommand; - C.CommandType := cmdMoveForward; C.Target := Obj; - Commands.AddCommand(C); { VA := Obj.AngleVector; --- 287,319 ---- BaseStep = 0.1 / 33;} var ! D: Single; ! P: TPoint3D; ! {## Step: Single; } ! MoveData :PMotionData; C:PCommandData; begin ! P:=SubPoint(Obj.Target, Obj.Position); ! P.Y:=0; ! D:=VectorLength(P); // distance to target ! ! C := Commands.MakeNewCommand; C.Target := Obj; + if D<0.1 then + C.CommandType := cmdStop + else begin + C.CommandType := cmdMoveForward; + new(MoveData); + MoveData^.Speed:=1; // default + {if D>1 then + MoveData^.Speed:=round(sqrt(D)) + else + MoveData^.Speed:=round(D);} + MoveData^.MaxMotion:=D; + C.Data:=MoveData; + end; + + Commands.AddCommand(C); { VA := Obj.AngleVector; *************** *** 291,295 **** DA: TSingle3D; C:PCommandData; ! TurnData :PInteger; begin VA := SubPoint(Obj.Target, Obj.Position); --- 348,352 ---- DA: TSingle3D; C:PCommandData; ! TurnData :PMotionData; begin VA := SubPoint(Obj.Target, Obj.Position); *************** *** 303,306 **** --- 360,366 ---- if DP<-180 then DP:=DP+360; + C := Commands.MakeNewCommand; + C.Target := Obj; + if (Abs(DP) > 5) then begin *************** *** 315,320 **** Obj.RotateA(0, Step, 0);} - C := Commands.MakeNewCommand; - C.Target := Obj; if Dir = 1 then C.CommandType := cmdTurnRight --- 375,378 ---- *************** *** 322,336 **** C.CommandType := cmdTurnLeft; New(TurnData); ! // hi stefan, here's the mod we need :) you can assign an integer ! // to the data field of a command to change the turn rate. ! // the integer will be freed when the command is executed -mike ! TurnData^ := 20; // 20 is the default turn rate, see above for ! // calculations ! Commands.AddCommand(C); Result := False; end ! else Result := True; end; --- 380,398 ---- C.CommandType := cmdTurnLeft; New(TurnData); ! // hi mike, the turn data / move data have now a record. ! TurnData^.Speed := 20; // 20 is the default turn rate, see above for ! // calculations ! TurnData^.Speed := round(arctan(abs(DP)/180*pi)*180/pi/5); ! TurnData^.MaxMotion := abs(DP); + C.Data:=TurnData; + Result := False; end ! else begin ! C.CommandType := cmdStop; Result := True; + end; + Commands.AddCommand(C); end; |
From: Stefan G. <sgl...@us...> - 2000-09-20 18:07:12
|
Update of /cvsroot/pythianproject/PythianProject/Source/Units In directory slayer.i.sourceforge.net:/tmp/cvs-serv27188 Modified Files: BaseAIs.pas Log Message: change related to the movement command data Index: BaseAIs.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Units/BaseAIs.pas,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** BaseAIs.pas 2000/09/10 16:47:17 1.11 --- BaseAIs.pas 2000/09/20 18:07:08 1.12 *************** *** 131,140 **** procedure TBaseAI.TurnLeft; type PInteger = ^integer; ! var turn:PInteger; begin New(turn); // example of specifing turn - 20 is default. // refer to Dynamic Objects unit for calculations ! Turn^ := 40; MakeAndAddAICommand(cmdTurnLeft,Turn); end; --- 131,141 ---- procedure TBaseAI.TurnLeft; type PInteger = ^integer; ! var turn:PMotionData; begin New(turn); // example of specifing turn - 20 is default. // refer to Dynamic Objects unit for calculations ! Turn^.speed := 40; ! Turn^.MaxMotion := 360; MakeAndAddAICommand(cmdTurnLeft,Turn); end; *************** *** 142,149 **** procedure TBaseAI.TurnRight; type PInteger = ^integer; ! var turn:PInteger; begin New(turn); ! Turn^ := 40; MakeAndAddAICommand(cmdTurnRight,Turn); end; --- 143,151 ---- procedure TBaseAI.TurnRight; type PInteger = ^integer; ! var turn:PMotionData; begin New(turn); ! Turn^.speed := 40; ! Turn^.MaxMotion := 360; MakeAndAddAICommand(cmdTurnRight,Turn); end; |
From: Michael H. <mh...@us...> - 2000-09-19 20:59:50
|
Update of /cvsroot/pythianproject/PythianProject/Source/Conversation/Editor In directory slayer.i.sourceforge.net:/tmp/cvs-serv15888/Conversation/Editor Modified Files: mainWin.pas Log Message: no message Index: mainWin.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Editor/mainWin.pas,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** mainWin.pas 2000/09/17 10:46:17 1.6 --- mainWin.pas 2000/09/19 20:59:46 1.7 *************** *** 168,173 **** procedure AddCommandScript; virtual ; procedure AddCommandJump; virtual ; ! procedure AddCommandGroupEnable; virtual ; ! procedure AddCommandGroupDisable; virtual ; procedure OnJumpSelect(newNode:TTreeNode); virtual ; --- 168,173 ---- procedure AddCommandScript; virtual ; procedure AddCommandJump; virtual ; ! procedure AddCommandEnable; virtual ; ! procedure AddCommandDisable; virtual ; procedure OnJumpSelect(newNode:TTreeNode); virtual ; *************** *** 703,707 **** end; ! procedure TMainForm.AddCommandGroupEnable; var e:TConversationEnable; n:TTreeNode; --- 703,707 ---- end; ! procedure TMainForm.AddCommandEnable; var e:TConversationEnable; n:TTreeNode; *************** *** 717,729 **** procedure TMainForm.Enable1Click(Sender: TObject); begin ! AddCommandGroupEnable; end; procedure TMainForm.Disable1Click(Sender: TObject); begin ! AddCommandGroupDisable; end; ! procedure TMainForm.AddCommandGroupDisable; var d:TConversationDisable; n:TTreeNode; --- 717,729 ---- procedure TMainForm.Enable1Click(Sender: TObject); begin ! AddCommandEnable; end; procedure TMainForm.Disable1Click(Sender: TObject); begin ! AddCommandDisable; end; ! procedure TMainForm.AddCommandDisable; var d:TConversationDisable; n:TTreeNode; *************** *** 969,976 **** if i = TConversationObject(n.Data).Parent.Children.Count then begin ! TConversationObject(n.Data).Parent.Children.Add(co); TreeView1.Selected.MoveTo(n,naInsert); end else begin TConversationObject(n.Data).Parent.Children.Insert(i,co); TreeView1.Selected.MoveTo(n,naInsert); end; --- 969,977 ---- if i = TConversationObject(n.Data).Parent.Children.Count then begin ! TConversationObject(n.Data).Parent.AddChild(co); TreeView1.Selected.MoveTo(n,naInsert); end else begin TConversationObject(n.Data).Parent.Children.Insert(i,co); + co.Parent := TConversationObject(n.Data).Parent; TreeView1.Selected.MoveTo(n,naInsert); end; *************** *** 982,989 **** if i = TConversationObject(n.Data).Parent.Children.Count then begin ! TConversationObject(n.Data).Parent.Children.Add(co); TreeView1.Selected.MoveTo(n,naInsert); end else begin TConversationObject(n.Data).Parent.Children.Insert(i,co); TreeView1.Selected.MoveTo(n,naInsert); end; --- 983,991 ---- if i = TConversationObject(n.Data).Parent.Children.Count then begin ! TConversationObject(n.Data).Parent.AddChild(co); TreeView1.Selected.MoveTo(n,naInsert); end else begin TConversationObject(n.Data).Parent.Children.Insert(i,co); + co.Parent := TConversationObject(n.Data).Parent; TreeView1.Selected.MoveTo(n,naInsert); end; |
From: Kamil K. <kkr...@us...> - 2000-09-18 19:38:30
|
Update of /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second In directory slayer.i.sourceforge.net:/tmp/cvs-serv4043 Modified Files: frmMain.dfm frmMain.pas Log Message: kk now the NPC speech in the output memo is bold and blue and you can choose what conversation you want to play (if more than 1 are available) Index: frmMain.dfm =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/frmMain.dfm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Binary files /tmp/cvsAerdBX and /tmp/cvsWoG7QK differ Index: frmMain.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/frmMain.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** frmMain.pas 2000/09/17 11:37:07 1.2 --- frmMain.pas 2000/09/18 19:38:26 1.3 *************** *** 6,10 **** Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, XDOM, conversationObjectsUnit, OleCtrls, HTTSLib_TLB, ! Spin; type --- 6,10 ---- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, XDOM, conversationObjectsUnit, OleCtrls, HTTSLib_TLB, ! Spin, ComCtrls; type *************** *** 14,18 **** pnlBottom: TPanel; Label2: TLabel; - OutMemo: TMemo; pnlControl: TPanel; btnStart: TButton; --- 14,17 ---- *************** *** 31,34 **** --- 30,35 ---- CheckBox1: TCheckBox; SpellTimer: TTimer; + OutMemo: TRichEdit; + Shape1: TShape; procedure btnStartClick(Sender: TObject); procedure FormCreate(Sender: TObject); *************** *** 107,110 **** --- 108,114 ---- procedure Tfrm_Main.LoadXML; + var + i: Integer; + s: string; begin try *************** *** 120,124 **** // turn currentXMLDoc into conversation objects TranslateDOMToConvTree(currentXMLDoc); ! curConv := ConversationEngine.Conversations[0]; end; --- 124,147 ---- // turn currentXMLDoc into conversation objects TranslateDOMToConvTree(currentXMLDoc); ! i := 0; ! if ConversationEngine.Conversations.Count > 1 then ! begin ! i := ConversationEngine.Conversations.Count; ! s := InputBox('Conversation', 'Which conv. should be runned (0..' + ! IntToStr(i-1) + '): ', '0'); ! try ! i := StrToInt(s); ! if (i < 0) or (i > ConversationEngine.Conversations.Count - 1) then ! raise Exception.Create('Integer value not in range!'); ! except ! on E:Exception do ! begin ! i := 0; ! ShowMessage('Bad value (choosing conversation number 0)'+#13#10+E.Message); ! end; ! end; ! end; ! ! curConv := ConversationEngine.Conversations[i]; end; *************** *** 154,159 **** procedure Tfrm_Main.DisplayThis; begin ! OutMemo.Lines.Append(LogLine); end; --- 177,199 ---- procedure Tfrm_Main.DisplayThis; + var + s: string; begin ! OutMemo.SelLength := 0; ! if curObj is TNPCSpeech then ! begin ! OutMemo.SelAttributes.Color := clNavy; ! OutMemo.SelAttributes.Style := [fsBold, fsUnderline] ! end else ! if curObj is TPlayerOption then ! begin ! OutMemo.SelAttributes.Style := [fsBold]; ! end; ! s := LogLine; ! if Trim(s) <> '' then ! OutMemo.Lines.Add(s); ! ! OutMemo.SelAttributes.Style := []; ! OutMemo.SelAttributes.Color := clBlack; end; *************** *** 161,165 **** begin Result := curObj.ReturnStrRepr; ! if curObj is TConversation then Result := 'System: Conversation Data' --- 201,205 ---- begin Result := curObj.ReturnStrRepr; ! if curObj is TConversation then Result := 'System: Conversation Data' |
From: Kamil K. <kkr...@us...> - 2000-09-18 19:35:23
|
Update of /cvsroot/pythianproject/PythianProject/Source/Units In directory slayer.i.sourceforge.net:/tmp/cvs-serv1976 Modified Files: conversationObjectsUnit.pas Log Message: kk: corrected - freechildren bug - freeconversations bug corrected - parent = nil bug by Disable/Enable commands. and more... Index: conversationObjectsUnit.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Units/conversationObjectsUnit.pas,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** conversationObjectsUnit.pas 2000/09/17 10:46:17 1.6 --- conversationObjectsUnit.pas 2000/09/18 19:35:16 1.7 *************** *** 329,340 **** procedure TConversationGroup.FreeChildren; ! var a:integer; begin ! a := FChildren.Count; ! if a > 0 then repeat ! TObject(FChildren.Items[a-1]).Free; ! a := FChildren.Count; ! until a = 0; end; --- 329,343 ---- procedure TConversationGroup.FreeChildren; ! var ! o: TObject; begin ! FChildren.Pack; ! if FChildren.Count > 0 then repeat ! o := FChildren.Items[0]; ! FChildren.Delete(0); ! o.Free; ! until FChildren.Count = 0; ! FChildren.Clear; end; *************** *** 348,353 **** begin Result := TConversationGroup(Children.Items[a]); ! if result.enabled then ! break; end; // 1st child (item) [that is enabled] --- 351,356 ---- begin Result := TConversationGroup(Children.Items[a]); ! if Result.Enabled then ! Break; end; // 1st child (item) [that is enabled] *************** *** 517,526 **** procedure TConversationEngine.FreeConversations; begin ! if Conversations.Count = 0 then exit; ! repeat ! TConversation(Conversations.Items[0]).Free; ! Conversations.Delete(0); ! until Conversations.Count = 0; end; --- 520,533 ---- procedure TConversationEngine.FreeConversations; + var + o: TObject; begin ! // @kk 18/9/00 - found a bug - changed ! if Conversations.Count > 0 then ! repeat ! o := Conversations.Items[0]; ! Conversations.Delete(0); ! o.Free; ! until Conversations.Count = 0; end; *************** *** 670,676 **** else begin if Length(FTarget.ReturnStrRepr) > 20 then ! inherited Create('Enable "'+Copy(FTarget.ReturnStrRepr,0,20)+'..."') else ! inherited Create('Enable "'+FTarget.ReturnStrRepr+'"'); end; end; --- 677,683 ---- else begin if Length(FTarget.ReturnStrRepr) > 20 then ! Name := ('Enable "'+Copy(FTarget.ReturnStrRepr,0,20)+'..."') else ! Name := ('Enable "'+FTarget.ReturnStrRepr+'"'); end; end; *************** *** 682,691 **** FTarget := ATarget; if FTarget = nil then ! inherited Create('Disable (untargeted)') else begin if Length(FTarget.ReturnStrRepr) > 20 then ! inherited Create('Disable "'+Copy(FTarget.ReturnStrRepr,0,20)+'..."') else ! inherited Create('Disable "'+FTarget.ReturnStrRepr+'"'); end; end; --- 689,698 ---- FTarget := ATarget; if FTarget = nil then ! Name := ('Disable (untargeted)') else begin if Length(FTarget.ReturnStrRepr) > 20 then ! Name := ('Disable "'+Copy(FTarget.ReturnStrRepr,0,20)+'..."') else ! Name := ('Disable "'+FTarget.ReturnStrRepr+'"'); end; end; |
From: Michael H. <mh...@us...> - 2000-09-17 11:37:13
|
Update of /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second In directory slayer.i.sourceforge.net:/tmp/cvs-serv21437 Modified Files: HTTSLib_TLB.pas convInterpreter.cfg convInterpreter.dof frmMain.dfm frmMain.pas Log Message: changed to support latest convobjectsunit.pas -mike Index: HTTSLib_TLB.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/HTTSLib_TLB.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** HTTSLib_TLB.pas 2000/09/16 07:37:00 1.1 --- HTTSLib_TLB.pas 2000/09/17 11:37:06 1.2 *************** *** 26,30 **** interface ! uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL; // *********************************************************************// --- 26,30 ---- interface ! uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL; // *********************************************************************// Index: convInterpreter.cfg =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/convInterpreter.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** convInterpreter.cfg 2000/09/16 07:37:00 1.1 --- convInterpreter.cfg 2000/09/17 11:37:07 1.2 *************** *** 32,35 **** -$M16384,1048576 -K$00400000 ! -LE"d:\program files\borland\delphi5\Projects\Bpl" ! -LN"d:\program files\borland\delphi5\Projects\Bpl" --- 32,38 ---- -$M16384,1048576 -K$00400000 ! -E"..\..\..\..\Bin" ! -U"..\..\..\Units" ! -O"..\..\..\Units" ! -I"..\..\..\Units" ! -R"..\..\..\Units" Index: convInterpreter.dof =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/convInterpreter.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** convInterpreter.dof 2000/09/16 07:37:00 1.1 --- convInterpreter.dof 2000/09/17 11:37:07 1.2 *************** *** 42,50 **** [Directories] ! OutputDir= UnitOutputDir= PackageDLLOutputDir= PackageDCPOutputDir= ! SearchPath= Packages=VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;Python_d4;PythonVCL_d4;NtfyIcon;glPanelPkg Conditionals= --- 42,50 ---- [Directories] ! OutputDir=..\..\..\..\Bin UnitOutputDir= PackageDLLOutputDir= PackageDCPOutputDir= ! SearchPath=..\..\..\Units Packages=VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;Python_d4;PythonVCL_d4;NtfyIcon;glPanelPkg Conditionals= *************** *** 56,64 **** HostApplication= - [Language] - ActiveLang= - ProjectLang=$0000041B - RootDir= - [Version Info] IncludeVerInfo=0 --- 56,59 ---- *************** *** 93,96 **** [HistoryLists\hlSearchPath] ! Count=1 ! Item0=e:\cvsroot\pythianproject\source\units\ --- 88,98 ---- [HistoryLists\hlSearchPath] ! Count=3 ! Item0=..\..\..\Units ! Item1=..\..\Units ! Item2=e:\cvsroot\pythianproject\source\units\ ! ! [HistoryLists\hlOutputDirectorry] ! Count=2 ! Item0=..\..\..\..\Bin ! Item1=..\..\..\Bin Index: frmMain.dfm =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/frmMain.dfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 Binary files /tmp/cvslUp5J4 and /tmp/cvskCpbmZ differ Index: frmMain.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/frmMain.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** frmMain.pas 2000/09/16 07:37:00 1.1 --- frmMain.pas 2000/09/17 11:37:07 1.2 *************** *** 170,177 **** else if curObj is TConversationScript then Result := 'Script: ' + Result ! else if curObj is TConversationGroupEnable then ! Result := 'GROUP ENABLER: ' + Result ! else if curObj is TConversationGroupDisable then ! Result := 'GROUP DISABLER: ' + Result else if curObj is TConvGroup then Result := 'GROUP: ' + Result; --- 170,177 ---- else if curObj is TConversationScript then Result := 'Script: ' + Result ! else if curObj is TConversationEnable then ! Result := 'ENABLER: ' + Result ! else if curObj is TConversationDisable then ! Result := 'DISABLER: ' + Result else if curObj is TConvGroup then Result := 'GROUP: ' + Result; |
From: Michael H. <mh...@us...> - 2000-09-17 10:46:21
|
Update of /cvsroot/pythianproject/PythianProject/Source/Units In directory slayer.i.sourceforge.net:/tmp/cvs-serv5988/Source/Units Modified Files: VoterAICore.pas convFileIO.pas conversationObjectsUnit.pas Log Message: renamed AI designer form file. Conversation editor mods. -mike Index: VoterAICore.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Units/VoterAICore.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** VoterAICore.pas 2000/09/04 17:51:55 1.4 --- VoterAICore.pas 2000/09/17 10:46:17 1.5 *************** *** 35,43 **** FName :string; FAuthor :string; ! FNotes :string; public property Name :string read FName write FName; property Author :String read FAuthor write FAuthor; ! property Notes :string read FNotes write FNotes; property Goals :TList read FGoals; property Ideas :TDataContainerManager read FIdeas; --- 35,45 ---- FName :string; FAuthor :string; ! FNotes :TStringList; ! function GetNotes: string; ! procedure SetNotes(const Value: string); public property Name :string read FName write FName; property Author :String read FAuthor write FAuthor; ! property Notes :string read GetNotes write SetNotes; property Goals :TList read FGoals; property Ideas :TDataContainerManager read FIdeas; *************** *** 127,130 **** --- 129,150 ---- end; + // stimulus and idea objects come here + // they are a little odd because other objects do not reference them + // directly. Instead, they have unique names that are used in + // data keys and interaction goes through a key manager. + + TStimulusShell = class(TStimulus) + end; + + TStimulus = class(TStimulusShell) + end; + + TIdeaShell = class(TDataKey) + + end; + + TIdea = class(TIdeaShell) + end; + var DomImpl :TDomImplementation; *************** *** 141,145 **** FGoals := TList.Create; FName := newName; ! FScript := TScript.Create; end; --- 161,166 ---- FGoals := TList.Create; FName := newName; ! FScript := TScript.Create; ! FNotes := TStringList.Create; end; *************** *** 163,166 **** --- 184,197 ---- end; + function TAIShell.GetNotes: string; + begin + Result := FNotes.Text; + end; + + procedure TAIShell.SetNotes(const Value: string); + begin + FNotes.Text := Value; + end; + { TKeySetShell } *************** *** 255,259 **** E1,SE, E2,E3,E4 :TdomElement; T1: TdomText; ! a,b,c,d,e:integer; AI:TAIShell; G:TGoalShell; --- 286,290 ---- E1,SE, E2,E3,E4 :TdomElement; T1: TdomText; ! a,b,c,d:integer; AI:TAIShell; G:TGoalShell; Index: convFileIO.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Units/convFileIO.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** convFileIO.pas 2000/09/10 16:47:17 1.2 --- convFileIO.pas 2000/09/17 10:46:17 1.3 *************** *** 108,129 **** newpos.AppendChild(element); end else ! if child is TConversationGroupEnable then begin // @@mike 16/7/00 ! element := d.CreateElement('groupenable'); element.SetAttribute('id',IntToStr(child.ID)); ! if Assigned(TConversationGroupEnable(child).TargetGroup) then ! element.SetAttribute('target',IntToStr(TConversationGroupEnable(child).TargetGroup.ID)) else element.SetAttribute('target',''); SetEnabled(child,element); newpos.AppendChild(element); end else ! if child is TConversationGroupDisable then begin // @@mike 16/7/00 ! element := d.CreateElement('groupdisable'); element.SetAttribute('id',IntToStr(child.ID)); ! if assigned(TConversationGroupDisable(child).TargetGroup) then ! element.SetAttribute('target',IntToStr(TConversationGroupDisable(child).TargetGroup.ID)) else element.SetAttribute('target',''); SetEnabled(child,element); --- 108,129 ---- newpos.AppendChild(element); end else ! if child is TConversationEnable then begin // @@mike 16/7/00 ! element := d.CreateElement('enable'); element.SetAttribute('id',IntToStr(child.ID)); ! if Assigned(TConversationEnable(child).Target) then ! element.SetAttribute('target',IntToStr(TConversationEnable(child).Target.ID)) else element.SetAttribute('target',''); SetEnabled(child,element); newpos.AppendChild(element); end else ! if child is TConversationDisable then begin // @@mike 16/7/00 ! element := d.CreateElement('disable'); element.SetAttribute('id',IntToStr(child.ID)); ! if assigned(TConversationDisable(child).Target) then ! element.SetAttribute('target',IntToStr(TConversationDisable(child).Target.ID)) else element.SetAttribute('target',''); SetEnabled(child,element); *************** *** 303,309 **** TConversationGroup(LastParent).AddChild(obj); end else ! if TdomElement(node).GetTagName = 'groupenable' then begin ! obj := TConversationGroupEnable.Create(nil); if not TdomElement(node).hasAttribute('id') then raise Exception.Create('Internal Exception 0: Element does not have ID: TranslateDOMToConvTree'); obj.ID := StrToInt(TdomElement(node).GetAttribute('id')); --- 303,309 ---- TConversationGroup(LastParent).AddChild(obj); end else ! if TdomElement(node).GetTagName = 'enable' then begin ! obj := TConversationEnable.Create(nil); if not TdomElement(node).hasAttribute('id') then raise Exception.Create('Internal Exception 0: Element does not have ID: TranslateDOMToConvTree'); obj.ID := StrToInt(TdomElement(node).GetAttribute('id')); *************** *** 315,325 **** target := StrToInt(TdomElement(node).getAttribute('target')); LinkList.Add(TLinkLoaderObj.Create(obj,target,CurConv)); ! end else TConversationGroupEnable(obj).TargetGroup := nil; if not (LastParent is TConversationGroup) then raise Exception.Create('Internal Exception 7: TranslateDOMToConvTree'); TConversationGroup(LastParent).AddChild(obj); end else ! if TdomElement(node).GetTagName = 'groupdisable' then begin ! obj := TConversationGroupDisable.Create(nil); if not TdomElement(node).hasAttribute('id') then raise Exception.Create('Internal Exception 0: Element does not have ID: TranslateDOMToConvTree'); obj.ID := StrToInt(TdomElement(node).GetAttribute('id')); --- 315,325 ---- target := StrToInt(TdomElement(node).getAttribute('target')); LinkList.Add(TLinkLoaderObj.Create(obj,target,CurConv)); ! end else TConversationEnable(obj).Target := nil; if not (LastParent is TConversationGroup) then raise Exception.Create('Internal Exception 7: TranslateDOMToConvTree'); TConversationGroup(LastParent).AddChild(obj); end else ! if TdomElement(node).GetTagName = 'disable' then begin ! obj := TConversationDisable.Create(nil); if not TdomElement(node).hasAttribute('id') then raise Exception.Create('Internal Exception 0: Element does not have ID: TranslateDOMToConvTree'); obj.ID := StrToInt(TdomElement(node).GetAttribute('id')); *************** *** 331,335 **** LinkList.Add(TLinkLoaderObj.Create(obj,target,Curconv)); end else ! TConversationGroupDisable(obj).TargetGroup := nil; if not (LastParent is TConversationGroup) then raise Exception.Create('Internal Exception 10: TranslateDOMToConvTree'); GetEnabled(obj,node); --- 331,335 ---- LinkList.Add(TLinkLoaderObj.Create(obj,target,Curconv)); end else ! TConversationDisable(obj).Target := nil; if not (LastParent is TConversationGroup) then raise Exception.Create('Internal Exception 10: TranslateDOMToConvTree'); GetEnabled(obj,node); *************** *** 346,353 **** if llo.obj is TConversationJump then TConversationJump(llo.obj).WhereTo := llo.LinkConv.GetObjOfID(llo.LinkId) ! else if llo.obj is TConversationGroupEnable then ! TConversationGroupEnable(llo.obj).TargetGroup := TConvGroup(llo.LinkConv.GetObjOfID(llo.LinkID)) ! else if llo.obj is TConversationGroupDisable then ! TConversationGroupDisable(llo.obj).TargetGroup := TConvGroup(llo.LinkConv.GetObjOfID(llo.LinkId)); end; while linklist.count > 0 do --- 346,353 ---- if llo.obj is TConversationJump then TConversationJump(llo.obj).WhereTo := llo.LinkConv.GetObjOfID(llo.LinkId) ! else if llo.obj is TConversationEnable then ! TConversationEnable(llo.obj).Target := TConvGroup(llo.LinkConv.GetObjOfID(llo.LinkID)) ! else if llo.obj is TConversationDisable then ! TConversationDisable(llo.obj).Target := TConvGroup(llo.LinkConv.GetObjOfID(llo.LinkId)); end; while linklist.count > 0 do Index: conversationObjectsUnit.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Units/conversationObjectsUnit.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** conversationObjectsUnit.pas 2000/09/15 17:33:44 1.5 --- conversationObjectsUnit.pas 2000/09/17 10:46:17 1.6 *************** *** 126,147 **** end; ! TConversationGroupEnable = class(TConversationCommand) private ! FTargetGroup:TConvGroup; ! procedure SetTargetGroup(newTarget:TConvGroup); public ! property TargetGroup :TConvGroup read FTargetGroup write SetTargetGroup; ! constructor Create(ATarget:TConvgroup); procedure RemoveLinks(obj:TConversationObject); override ; procedure Run; override; end; ! TConversationGroupDisable = class(TConversationCommand) private ! FTargetGroup:TConvGroup; ! procedure SetTargetGroup(newTarget:TConvGroup); public ! property TargetGroup :TConvGroup read FTargetGroup write SetTargetGroup; ! constructor Create(ATarget:TConvgroup); procedure RemoveLinks(obj:TConversationObject); override ; procedure Run; override; --- 126,147 ---- end; ! TConversationEnable = class(TConversationCommand) private ! FTarget:TConversationObject; ! procedure SetTarget(newTarget:TConversationObject); public ! property Target :TConversationObject read FTarget write SetTarget; ! constructor Create(ATarget:TConversationObject); procedure RemoveLinks(obj:TConversationObject); override ; procedure Run; override; end; ! TConversationDisable = class(TConversationCommand) private ! FTarget:TConversationObject; ! procedure SetTarget(newTarget:TConversationObject); public ! property Target :TConversationObject read FTarget write SetTarget; ! constructor Create(ATarget:TConversationObject); procedure RemoveLinks(obj:TConversationObject); override ; procedure Run; override; *************** *** 271,278 **** function TNPCSpeech.ReturnStrRepr: string; begin ! if Text.Count > 0 then Result := Text.Strings[0] else if Text.Count > 1 then ! Result := Text.Strings[0] + '...' else Result := 'NPC Speech: empty'; --- 271,278 ---- function TNPCSpeech.ReturnStrRepr: string; begin ! if Text.Count = 1 then Result := Text.Strings[0] else if Text.Count > 1 then ! Result := Text.Strings[0] + ' ...' else Result := 'NPC Speech: empty'; *************** *** 340,348 **** function TConversationGroup.InternalNext: TConversationObject; begin Result := inherited InternalNext; if Children.Count > 0 then ! Result := TConversationGroup(Children.Items[0]); ! // 1st child (item) end; --- 340,355 ---- function TConversationGroup.InternalNext: TConversationObject; + var a:integer; begin Result := inherited InternalNext; if Children.Count > 0 then ! // @@mike - 16/9/2000, fixed bug so first enabled item is selected ! for a := 0 to Children.Count-1 do ! begin ! Result := TConversationGroup(Children.Items[a]); ! if result.enabled then ! break; ! end; ! // 1st child (item) [that is enabled] end; *************** *** 392,395 **** --- 399,407 ---- l:TList; begin + if id = Self.ID then + begin + result := self; + exit; + end; l := tlist.create; FillList(l); *************** *** 457,461 **** function TConvGroup.ReturnStrRepr: string; begin ! Result := name; end; --- 469,475 ---- function TConvGroup.ReturnStrRepr: string; begin ! if name <> '' then ! Result := name ! else Result := 'Unnamed Group'; end; *************** *** 507,510 **** --- 521,525 ---- repeat TConversation(Conversations.Items[0]).Free; + Conversations.Delete(0); until Conversations.Count = 0; end; *************** *** 619,692 **** end; ! { TConversationGroupEnable } ! constructor TConversationGroupEnable.Create(ATarget:TConvgroup); begin ! FTargetGroup := ATarget; ! if FTargetGroup = nil then ! inherited Create('Enable Group (untargeted)') else begin ! inherited Create('Enable Group "'+FTargetGroup.Name+'"'); end; end; ! procedure TConversationGroupEnable.RemoveLinks(obj: TConversationObject); begin ! if TargetGroup = obj then ! TargetGroup := nil; end; ! procedure TConversationGroupEnable.Run; begin inherited; ! if Assigned(FTargetGroup) then ! FTargetGroup.Enabled := True; end; ! procedure TConversationGroupEnable.SetTargetGroup(newTarget: TConvGroup); begin ! FTargetGroup := newTarget; ! if FTargetGroup = nil then ! Name := 'Enable group (untargeted)' else begin ! Name := 'Enable group "'+FTargetGroup.Name+'"'; end; end; ! { TConversationGroupDisable } ! constructor TConversationGroupDisable.Create(ATarget: TConvgroup); begin ! FTargetGroup := ATarget; ! if FTargetGroup = nil then ! inherited Create('Disable Group (untargeted)') ! else ! begin ! inherited Create('Disable Group "'+FTargetGroup.Name+'"'); ! end; end; ! procedure TConversationGroupDisable.RemoveLinks(obj: TConversationObject); begin ! if TargetGroup = obj then ! TargetGroup := nil; end; ! procedure TConversationGroupDisable.Run; begin inherited; ! if Assigned(FTargetGroup) then ! FTargetGroup.Enabled := False; end; ! procedure TConversationGroupDisable.SetTargetGroup(newTarget: TConvGroup); begin ! FTargetGroup := newTarget; ! if FTargetGroup = nil then ! Name := 'Disable group (untargeted)' else begin ! Name := 'Disable group "'+FTargetGroup.Name+'"'; end; end; --- 634,717 ---- end; ! { TConversationEnable } ! constructor TConversationEnable.Create(ATarget:TConversationObject); begin ! FTarget := ATarget; ! if FTarget = nil then ! inherited Create('Enable (untargeted)') else begin ! if Length(FTarget.ReturnStrRepr) > 20 then ! inherited Create('Enable "'+Copy(FTarget.ReturnStrRepr,0,20)+'..."') ! else ! inherited Create('Enable "'+FTarget.ReturnStrRepr+'"'); end; end; ! procedure TConversationEnable.RemoveLinks(obj: TConversationObject); begin ! if Target = obj then ! Target := nil; end; ! procedure TConversationEnable.Run; begin inherited; ! if Assigned(FTarget) then ! FTarget.Enabled := True; end; ! procedure TConversationEnable.SetTarget(newTarget: TConversationObject); begin ! FTarget := newTarget; ! if FTarget = nil then ! Name := 'Enable (untargeted)' else begin ! if Length(FTarget.ReturnStrRepr) > 20 then ! inherited Create('Enable "'+Copy(FTarget.ReturnStrRepr,0,20)+'..."') ! else ! inherited Create('Enable "'+FTarget.ReturnStrRepr+'"'); end; end; ! { TConversationDisable } ! constructor TConversationDisable.Create(ATarget: TConversationObject); begin ! FTarget := ATarget; ! if FTarget = nil then ! inherited Create('Disable (untargeted)') ! else begin ! if Length(FTarget.ReturnStrRepr) > 20 then ! inherited Create('Disable "'+Copy(FTarget.ReturnStrRepr,0,20)+'..."') ! else ! inherited Create('Disable "'+FTarget.ReturnStrRepr+'"'); end; end; ! procedure TConversationDisable.RemoveLinks(obj: TConversationObject); begin ! if Target = obj then ! Target := nil; end; ! procedure TConversationDisable.Run; begin inherited; ! if Assigned(FTarget) then ! FTarget.Enabled := False; end; ! procedure TConversationDisable.SetTarget(newTarget: TConversationObject); begin ! FTarget := newTarget; ! if FTarget = nil then ! Name := 'Disable (untargeted)' else begin ! if Length(FTarget.ReturnStrRepr) > 20 then ! Name := 'Disable "'+Copy(FTarget.ReturnStrRepr,0,20)+'..."' ! else ! Name := 'Disable "'+FTarget.ReturnStrRepr+'"'; end; end; |
From: Michael H. <mh...@us...> - 2000-09-17 10:46:21
|
Update of /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter In directory slayer.i.sourceforge.net:/tmp/cvs-serv5988/Source/Conversation/Interpreter Modified Files: Interprt.cfg Interprt.dof Interprt.res Log Message: renamed AI designer form file. Conversation editor mods. -mike Index: Interprt.cfg =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/Interprt.cfg,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Interprt.cfg 2000/09/11 19:29:01 1.4 --- Interprt.cfg 2000/09/17 10:46:17 1.5 *************** *** 32,35 **** --- 32,36 ---- -$M16384,1048576 -K$00400000 + -E"..\..\..\Bin" -U"..\..\units" -O"..\..\units" Index: Interprt.dof =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/Interprt.dof,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Interprt.dof 2000/09/11 19:29:01 1.4 --- Interprt.dof 2000/09/17 10:46:17 1.5 *************** *** 42,46 **** [Directories] ! OutputDir= UnitOutputDir= PackageDLLOutputDir= --- 42,46 ---- [Directories] ! OutputDir=..\..\..\Bin UnitOutputDir= PackageDLLOutputDir= *************** *** 96,99 **** [HistoryLists\hlOutputDirectorry] ! Count=1 ! Item0=..\..\..\bin --- 96,100 ---- [HistoryLists\hlOutputDirectorry] ! Count=2 ! Item0=..\..\..\Bin ! Item1=..\..\..\..\Bin Index: Interprt.res =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/Interprt.res,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 Binary files /tmp/cvs4p5BaC and /tmp/cvscRWYd4 differ |
From: Michael H. <mh...@us...> - 2000-09-17 10:46:21
|
Update of /cvsroot/pythianproject/PythianProject/Source/Conversation/Editor In directory slayer.i.sourceforge.net:/tmp/cvs-serv5988/Source/Conversation/Editor Modified Files: mainWin.dfm mainWin.pas Log Message: renamed AI designer form file. Conversation editor mods. -mike Index: mainWin.dfm =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Editor/mainWin.dfm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 Binary files /tmp/cvsuyg2nL and /tmp/cvsOcfAvm differ Index: mainWin.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Editor/mainWin.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** mainWin.pas 2000/09/15 17:06:17 1.5 --- mainWin.pas 2000/09/17 10:46:17 1.6 *************** *** 51,57 **** CommandScriptSheet: TTabSheet; CommandScriptMemo: TMemo; ! CommandEnableGroupSheet: TTabSheet; Label8: TLabel; ! CommandDisableGroupSheet: TTabSheet; Label9: TLabel; CommandJumpSheet: TTabSheet; --- 51,57 ---- CommandScriptSheet: TTabSheet; CommandScriptMemo: TMemo; ! CommandEnableSheet: TTabSheet; Label8: TLabel; ! CommandDisableSheet: TTabSheet; Label9: TLabel; CommandJumpSheet: TTabSheet; *************** *** 70,78 **** ConfirmDelete1: TMenuItem; Script1: TMenuItem; ! EnableGroup1: TMenuItem; ! DisableGroup1: TMenuItem; Jumptopoint1: TMenuItem; CommandJumpTargetBut: TButton; ! GroupEnableTargetBut: TButton; GroupDisableTargetBut: TButton; DomImplementation1: TDomImplementation; --- 70,78 ---- ConfirmDelete1: TMenuItem; Script1: TMenuItem; ! Enable1: TMenuItem; ! Disable1: TMenuItem; Jumptopoint1: TMenuItem; CommandJumpTargetBut: TButton; ! EnableTargetBut: TButton; GroupDisableTargetBut: TButton; DomImplementation1: TDomImplementation; *************** *** 121,127 **** procedure Jumptopoint1Click(Sender: TObject); procedure CommandJumpTargetButClick(Sender: TObject); ! procedure GroupEnableTargetButClick(Sender: TObject); ! procedure EnableGroup1Click(Sender: TObject); ! procedure DisableGroup1Click(Sender: TObject); procedure GroupDisableTargetButClick(Sender: TObject); procedure GenXMLButClick(Sender: TObject); --- 121,127 ---- procedure Jumptopoint1Click(Sender: TObject); procedure CommandJumpTargetButClick(Sender: TObject); ! procedure EnableTargetButClick(Sender: TObject); ! procedure Enable1Click(Sender: TObject); ! procedure Disable1Click(Sender: TObject); procedure GroupDisableTargetButClick(Sender: TObject); procedure GenXMLButClick(Sender: TObject); *************** *** 147,152 **** LastNode :TTreeNode; jumpSelect:boolean; ! groupTargetEnable:boolean; ! groupTargetDisable:boolean; tmpLastNode :TTreeNode; currentXMLDoc :TdomDocument; --- 147,152 ---- LastNode :TTreeNode; jumpSelect:boolean; ! TargetEnable:boolean; ! TargetDisable:boolean; tmpLastNode :TTreeNode; currentXMLDoc :TdomDocument; *************** *** 172,176 **** procedure OnJumpSelect(newNode:TTreeNode); virtual ; ! procedure OnGroupSelect(newNode:TTreeNode); virtual ; procedure LoadXML(filename:string); virtual ; --- 172,176 ---- procedure OnJumpSelect(newNode:TTreeNode); virtual ; ! procedure OnObjectSelect(newNode:TTreeNode); virtual ; procedure LoadXML(filename:string); virtual ; *************** *** 352,368 **** CommandTypeRadios.ItemIndex := 0; end else ! if ConvObj is TConversationGroupEnable then begin CommandTypeRadios.ItemIndex := 1; ! if TConversationGroupEnable(convObj).TargetGroup <> nil then ! GroupEnableTargetBut.Caption := TConversationGroupEnable(convObj).TargetGroup.Name else ! GroupEnableTargetBut.Caption := 'no target'; end ! else if ConvObj is TConversationGroupDisable then begin CommandTypeRadios.ItemIndex := 2; ! if TConversationGroupDisable(convObj).TargetGroup <> nil then ! GroupDisableTargetBut.Caption := TConversationGroupDisable(convObj).TargetGroup.Name else GroupDisableTargetBut.Caption := 'no target'; --- 352,368 ---- CommandTypeRadios.ItemIndex := 0; end else ! if ConvObj is TConversationEnable then begin CommandTypeRadios.ItemIndex := 1; ! if TConversationEnable(convObj).Target <> nil then ! EnableTargetBut.Caption := TConversationEnable(convObj).Target.ReturnStrRepr else ! EnableTargetBut.Caption := 'no target'; end ! else if ConvObj is TConversationDisable then begin CommandTypeRadios.ItemIndex := 2; ! if TConversationDisable(convObj).Target <> nil then ! GroupDisableTargetBut.Caption := TConversationDisable(convObj).Target.ReturnStrRepr else GroupDisableTargetBut.Caption := 'no target'; *************** *** 408,421 **** TreeView1.Selected := tmpLastNode; end else ! if groupTargetEnable then begin ! OnGroupSelect(Node); ! groupTargetEnable := false; TreeView1.Selected := tmpLastnode; end else ! if groupTargetDisable then begin ! OnGroupSelect(Node); ! groupTargetDisable := false; TreeView1.Selected := tmpLastNode; end else --- 408,421 ---- TreeView1.Selected := tmpLastNode; end else ! if TargetEnable then begin ! OnObjectSelect(Node); ! TargetEnable := false; TreeView1.Selected := tmpLastnode; end else ! if TargetDisable then begin ! OnObjectSelect(Node); ! TargetDisable := false; TreeView1.Selected := tmpLastNode; end else *************** *** 464,468 **** TNPCSpeech(LastObj).Text.Assign(NPCSpeechMemo.Lines); LastNode.Text := TNPCSpeech(LastObj).ReturnStrRepr; ! RefreshNames; end; end; --- 464,468 ---- TNPCSpeech(LastObj).Text.Assign(NPCSpeechMemo.Lines); LastNode.Text := TNPCSpeech(LastObj).ReturnStrRepr; ! //@@ RefreshNames; end; end; *************** *** 485,490 **** -1: CommandPages.ActivePage := CommandBlankSheet; 0: CommandPages.ActivePage := CommandScriptSheet; ! 1: CommandPages.ActivePage := CommandEnableGroupSheet; ! 2: CommandPages.ActivePage := CommandDisableGroupSheet; 3: CommandPages.ActivePage := CommandJumpSheet; end; --- 485,490 ---- -1: CommandPages.ActivePage := CommandBlankSheet; 0: CommandPages.ActivePage := CommandScriptSheet; ! 1: CommandPages.ActivePage := CommandEnableSheet; ! 2: CommandPages.ActivePage := CommandDisableSheet; 3: CommandPages.ActivePage := CommandJumpSheet; end; *************** *** 664,714 **** end; ! procedure TMainForm.OnGroupSelect(newNode: TTreeNode); begin ! if groupTargetEnable then begin ! if not (LastObj is TConversationGroupEnable) then ! raise Exception.Create('LastObj not GroupEnable!!!'); ! if not (TObject(newNode.Data) is TConvGroup) then begin - ShowMessage('Must select a group!'); Screen.Cursor := crDefault; end else begin ! TConversationGroupEnable(LastObj).TargetGroup := newNode.Data; ! CommandNameEdit.Text := TConversationGroupEnable(LastObj).ReturnStrRepr; Screen.Cursor := crDefault; ! GroupEnableTargetBut.Caption := TConversationGroupEnable(LastObj).TargetGroup.Name; end; end else ! if groupTargetDisable then begin ! if not (LastObj is TConversationGroupDisable) then ! raise Exception.Create('LastObj not GroupDisable!!!'); ! if not (TObject(newNode.Data) is TConvGroup) then ! ShowMessage('Must select a group!') ! else begin - TConversationGroupDisable(LastObj).TargetGroup := newNode.Data; - CommandNameEdit.Text := TConversationGroupDisable(LastObj).ReturnStrRepr; Screen.Cursor := crDefault; ! GroupDisableTargetBut.Caption := TConversationGroupDisable(LastObj).TargetGroup.Name; end; end; end; ! procedure TMainForm.GroupEnableTargetButClick(Sender: TObject); begin ! groupTargetEnable := true; TmpLastNode := TreeView1.Selected; ! GroupEnableTargetBut.Caption := 'please select target from tree...'; Screen.Cursor := crCross; end; procedure TMainForm.AddCommandGroupEnable; ! var e:TConversationGroupEnable; n:TTreeNode; begin ! e := TConversationGroupEnable.Create(nil); TConversationGroup(LastObj).AddChild(e); n := TreeView1.Items.AddChildObject(LastNode,e.ReturnStrRepr,e); --- 664,711 ---- end; ! procedure TMainForm.OnObjectSelect(newNode: TTreeNode); begin ! if TargetEnable then begin ! if not (LastObj is TConversationEnable) then begin Screen.Cursor := crDefault; + raise Exception.Create('LastObj not Enable!!!'); end else begin ! TConversationEnable(LastObj).Target := newNode.Data; ! CommandNameEdit.Text := TConversationEnable(LastObj).ReturnStrRepr; Screen.Cursor := crDefault; ! EnableTargetBut.Caption := TConversationEnable(LastObj).Target.ReturnStrRepr; end; end else ! if TargetDisable then begin ! if not (LastObj is TConversationDisable) then begin Screen.Cursor := crDefault; ! raise Exception.Create('LastObj not Disable!!!'); ! end else begin ! TConversationDisable(LastObj).Target := newNode.Data; ! CommandNameEdit.Text := TConversationDisable(LastObj).ReturnStrRepr; ! Screen.Cursor := crDefault; ! GroupDisableTargetBut.Caption := TConversationDisable(LastObj).Target.ReturnStrRepr; end; end; end; ! procedure TMainForm.EnableTargetButClick(Sender: TObject); begin ! TargetEnable := true; TmpLastNode := TreeView1.Selected; ! EnableTargetBut.Caption := 'please select target from tree...'; Screen.Cursor := crCross; end; procedure TMainForm.AddCommandGroupEnable; ! var e:TConversationEnable; n:TTreeNode; begin ! e := TConversationEnable.Create(nil); TConversationGroup(LastObj).AddChild(e); n := TreeView1.Items.AddChildObject(LastNode,e.ReturnStrRepr,e); *************** *** 718,727 **** end; ! procedure TMainForm.EnableGroup1Click(Sender: TObject); begin AddCommandGroupEnable; end; ! procedure TMainForm.DisableGroup1Click(Sender: TObject); begin AddCommandGroupDisable; --- 715,724 ---- end; ! procedure TMainForm.Enable1Click(Sender: TObject); begin AddCommandGroupEnable; end; ! procedure TMainForm.Disable1Click(Sender: TObject); begin AddCommandGroupDisable; *************** *** 729,736 **** procedure TMainForm.AddCommandGroupDisable; ! var d:TConversationGroupDisable; n:TTreeNode; begin ! d := TConversationGroupDisable.Create(nil); TConversationGroup(LastObj).AddChild(d); n := TreeView1.Items.AddChildObject(LastNode,d.ReturnStrRepr,d); --- 726,733 ---- procedure TMainForm.AddCommandGroupDisable; ! var d:TConversationDisable; n:TTreeNode; begin ! d := TConversationDisable.Create(nil); TConversationGroup(LastObj).AddChild(d); n := TreeView1.Items.AddChildObject(LastNode,d.ReturnStrRepr,d); *************** *** 742,746 **** procedure TMainForm.GroupDisableTargetButClick(Sender: TObject); begin ! groupTargetDisable := true; TmpLastNode := TreeView1.Selected; GroupDisableTargetBut.Caption := 'please select target from tree...'; --- 739,743 ---- procedure TMainForm.GroupDisableTargetButClick(Sender: TObject); begin ! TargetDisable := true; TmpLastNode := TreeView1.Selected; GroupDisableTargetBut.Caption := 'please select target from tree...'; *************** *** 778,782 **** begin SaveXML(CurfileName); ! //DomImplementation1.FreeDocument(currentXMLdoc); end; --- 775,779 ---- begin SaveXML(CurfileName); ! ConversationEngine.Free; end; *************** *** 808,813 **** begin n := TreeView1.Items[a]; ! //if n.IsVisible then ! n.Text := TConversationObject(n.Data).ReturnStrRepr; end; end; --- 805,809 ---- begin n := TreeView1.Items[a]; ! n.Text := TConversationObject(n.Data).ReturnStrRepr; end; end; *************** *** 883,891 **** // if TempObj is TConversationCommand then // not all commands can be runned in editor (f.e. graphical scripts)... ! if TempObj is TConversationGroupEnable then TConversationCommand(TempObj).Run else ! if TempObj is TConversationGroupDisable then ! TConversationCommand(TempObj).Run; TempObj := TempObj.Next; --- 879,887 ---- // if TempObj is TConversationCommand then // not all commands can be runned in editor (f.e. graphical scripts)... ! {if TempObj is TConversationEnable then TConversationCommand(TempObj).Run else ! if TempObj is TConversationDisable then ! TConversationCommand(TempObj).Run;} TempObj := TempObj.Next; *************** *** 946,950 **** Y: Integer); var ! n,n2:TTreeNode; co:TConversationObject; i:integer; --- 942,946 ---- Y: Integer); var ! n:TTreeNode; co:TConversationObject; i:integer; *************** *** 971,980 **** co.Parent.DeleteChild(co); i := TConversationObject(n.Data).Parent.Children.IndexOf(n.data); ! if i = TConversationObject(n.Data).Parent.Children.Count-1 then begin TConversationObject(n.Data).Parent.Children.Add(co); TreeView1.Selected.MoveTo(n,naInsert); end else begin ! TConversationObject(n.Data).Parent.Children.Insert(i+1,co); TreeView1.Selected.MoveTo(n,naInsert); end; --- 967,976 ---- co.Parent.DeleteChild(co); i := TConversationObject(n.Data).Parent.Children.IndexOf(n.data); ! if i = TConversationObject(n.Data).Parent.Children.Count then begin TConversationObject(n.Data).Parent.Children.Add(co); TreeView1.Selected.MoveTo(n,naInsert); end else begin ! TConversationObject(n.Data).Parent.Children.Insert(i,co); TreeView1.Selected.MoveTo(n,naInsert); end; *************** *** 984,993 **** co.Parent.DeleteChild(co); i := TConversationObject(n.Data).Parent.Children.IndexOf(n.data); ! if i = TConversationObject(n.Data).Parent.Children.Count-1 then begin TConversationObject(n.Data).Parent.Children.Add(co); TreeView1.Selected.MoveTo(n,naInsert); end else begin ! TConversationObject(n.Data).Parent.Children.Insert(i+1,co); TreeView1.Selected.MoveTo(n,naInsert); end; --- 980,989 ---- co.Parent.DeleteChild(co); i := TConversationObject(n.Data).Parent.Children.IndexOf(n.data); ! if i = TConversationObject(n.Data).Parent.Children.Count then begin TConversationObject(n.Data).Parent.Children.Add(co); TreeView1.Selected.MoveTo(n,naInsert); end else begin ! TConversationObject(n.Data).Parent.Children.Insert(i,co); TreeView1.Selected.MoveTo(n,naInsert); end; |
From: Michael H. <mh...@us...> - 2000-09-17 10:46:20
|
Update of /cvsroot/pythianproject/PythianProject/Source/AIDesigner In directory slayer.i.sourceforge.net:/tmp/cvs-serv5988/Source/AIDesigner Modified Files: AIDesigner.cfg AIDesigner.dpr DesignerEngine.pas Added Files: AIEditorMainForm.dfm AIEditorMainForm.pas stimIcon.bmp Removed Files: frmMain.dfm frmMain.pas Log Message: renamed AI designer form file. Conversation editor mods. -mike --- NEW FILE --- ÿ Font.ColorclWindowTextFont.Heightõ Font.Name MS Sans Serif Font.Style FormCreate PixelsPerInch` TextHeight ActivePageGUISheetAlignalClientTabOrder BevelOuterbvNoneCaptionPanel1TabOrder EditorTreeLeft ActivePageKeySheetAlignalClientStyle tsFlatButtonsTabOrder BlankSheetCaption BlankSheet TabVisible ImageIndex TabVisible B ImageIndex TabVisible B AINameEditLeft*TopWidthí AINameEditOnChangeAINameEditChange Font.ColorclYellowFont.Heightõ Font.Name MS Sans Serif Font.Style ParentFontTabOrderOnChangeAINotesMemoChange ImageIndex TabVisible B ScriptMemoLeft Font.ColorclWindowTextFont.Heightõ Font.NameTahoma Font.Style ScriptMemo ParentFontParentShowHint ScrollBarsssBothShowHint TabOrderWantTabs OnChangeScriptMemoChange ImageIndex TabVisible B ImageIndex TabVisibleOnResizeKeySheetResize B B goVertLine goHorzLine goRangeSelect goEditing KeyAddDataLeftTopWidthKHeightAnchorsakLeftakBottom ImageIndex TabVisible Keys used: B KeySetListLeftTopRWidthHeight¹ OnDblClickKeySetListDblClick OnDragDropKeySetListDragDrop OnDragOverKeySetListDragOverOnResizeKeySetListResizeOnSelectItemKeySetListSelectItem ImageIndex TabVisible ê & B ¯¯¯¯¯¯¯¯¯¯5Open an AIML file or create a new one using the file 5menu. Left click on the node and give the new file a 3name. AIML File names have no relation to their OS 2dependant names, the name given here will be used 6by the AI subsystems to locate and create AIs given a 6universal name. For instance, to get to a shopkeeper, 5the AI id "merchants.shopkeeper" might be used, with 4merchants being the file name, and shopkeeper being the name of an AI in that file. Known bugs ¯¯¯¯¯¯¯¯¯¯Lots, but none significant;- Let's you fill in blank fields for idealine/goal/key etc. ScrollBars ssVerticalTabOrder ImageIndex TabVisible B goVertLine goHorzLine goRangeSelect goEditing Operator Columns Items.StringsAddition (+)Subtraction ( - ) ImageIndex Font.ColorclWindowTextFont.Heightó Font.NameTahoma Font.Style ParentFontReadOnly TabOrder Top NewAIFile1Caption&New AI FileShortCutN@OnClickNewAIFile1Click Save1Click Exit1Click Help2Click TImageList TreeIconsLeft*TopBitmap B DefaultExt.aimlFilter5AIML Files|*.aiml|XML Files|*.xml|All Files (*.*)|*.* InitialDir.TitleOpen AIML fileLeftJTop TPopupMenu TreePopupImages TreeIconsLeft Top. Closefile1CaptionClose &fileOnClickClosefile1Click Goal1Click DefaultExtaimlFilter2AIML file|*.aiml|XML file|*.xml|Any file (*.*)|*.* InitialDir.TitleSave AIML asLeft*Top. --- NEW FILE --- unit AIEditorMainForm; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, Menus, ExtCtrls, ImgList, StdCtrls, XDOM, VoterAICore, Scripts, DataFields, Grids; const DEFAULT_AINAME = 'Unnamed AI'; type TMainForm = class(TForm) PageControl1: TPageControl; GUISheet: TTabSheet; Splitter1: TSplitter; Panel1: TPanel; EditorTree: TTreeView; [...1000 lines suppressed...] procedure TMainForm.Save1Click(Sender: TObject); var aif:TAIFile; begin aif := GetAIFilefromNode(CurrentPageNode); try aif.save; except Saveas1Click(self); end; end; procedure TMainForm.Closefile1Click(Sender: TObject); begin if MessageDlg('Save changes?',mtConfirmation,[mbYes,mbNo],0) = mrYes then Save1Click(sender); AIFiles.Delete(AIFiles.IndexOf(CurrentPageObject)); CurrentPageNode.Delete; end; end. --- NEW FILE --- BM6 Index: AIDesigner.cfg =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/AIDesigner/AIDesigner.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AIDesigner.cfg 2000/08/31 17:29:42 1.1 --- AIDesigner.cfg 2000/09/17 10:46:16 1.2 *************** *** 34,38 **** -E"..\..\Bin" -N"..\..\Bin\DCU" - -LN"e:\program files\borland\delphi4\Lib" -U"..\Units" -O"..\Units" --- 34,37 ---- Index: AIDesigner.dpr =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/AIDesigner/AIDesigner.dpr,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AIDesigner.dpr 2000/08/31 17:29:42 1.1 --- AIDesigner.dpr 2000/09/17 10:46:17 1.2 *************** *** 3,7 **** uses Forms, ! frmMain in 'frmMain.pas' {MainForm}, VoterAICore in '..\Units\VoterAICore.pas', DesignerEngine in 'DesignerEngine.pas'; --- 3,7 ---- uses Forms, ! AIEditorMainForm in 'AIEditorMainForm.pas' {MainForm}, VoterAICore in '..\Units\VoterAICore.pas', DesignerEngine in 'DesignerEngine.pas'; Index: DesignerEngine.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/AIDesigner/DesignerEngine.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** DesignerEngine.pas 2000/09/03 14:32:50 1.3 --- DesignerEngine.pas 2000/09/17 10:46:17 1.4 *************** *** 17,25 **** AIFiles :TList; DesignerTree :TTreeView; - procedure InitDesignerEngine; procedure FinalizeDesignerEngine; ! function DesignerLoadFile(FileName:string):integer; // tree refresh procedures --- 17,25 ---- AIFiles :TList; DesignerTree :TTreeView; + procedure InitDesignerEngine; procedure FinalizeDesignerEngine; ! function DesignerLoadFile(FileName:string):TAIFile; // tree refresh procedures *************** *** 36,40 **** procedure InitDesignerEngine; ! var TestAI: TAIShell; TestAIFile :TAIFile; --- 36,40 ---- procedure InitDesignerEngine; ! {var TestAI: TAIShell; TestAIFile :TAIFile; *************** *** 42,46 **** K1,K2,K3,K4,K5,K6,K7:TDataKey; S:TKeySetShell; ! IL:TIdeaLineShell; begin AIFiles := TList.Create; --- 42,46 ---- K1,K2,K3,K4,K5,K6,K7:TDataKey; S:TKeySetShell; ! IL:TIdeaLineShell; } begin AIFiles := TList.Create; *************** *** 148,152 **** procedure RefreshAIFileNode(AIFile:TAIFile; Node:TTreeNode; Recurse:boolean); var a:integer; - NeedToCreateChild:boolean; begin Node.Text := AIFile.Name + ' (' + ExtractFileName(AIFile.FileName) + ')'; --- 148,151 ---- *************** *** 256,265 **** in XML } ! function DesignerLoadFile(FileName:string):integer; var f:TAIFile; a:integer; begin ! Result := -1; // search for already loaded file --- 255,264 ---- in XML } ! function DesignerLoadFile(FileName:string):TAIFile; var f:TAIFile; a:integer; begin ! Result := nil; // search for already loaded file *************** *** 268,272 **** begin ShowMessage('File already loaded'); ! Result := 0; exit; end; --- 267,271 ---- begin ShowMessage('File already loaded'); ! Result := AIFiles[a]; exit; end; *************** *** 277,281 **** // now update tree RefreshAIFileNode(F,DesignerTree.Items.AddObjectFirst(nil,'',F),true); ! result := 0; end; --- 276,281 ---- // now update tree RefreshAIFileNode(F,DesignerTree.Items.AddObjectFirst(nil,'',F),true); ! f.Generate; ! result := f; end; --- frmMain.dfm DELETED --- --- frmMain.pas DELETED --- |
From: Michael H. <mh...@us...> - 2000-09-17 10:46:20
|
Update of /cvsroot/pythianproject/PythianProject/Bin In directory slayer.i.sourceforge.net:/tmp/cvs-serv5988/Bin Modified Files: ailibgen.aiml data.cml Log Message: renamed AI designer form file. Conversation editor mods. -mike Index: ailibgen.aiml =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Bin/ailibgen.aiml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ailibgen.aiml 2000/09/08 18:47:38 1.2 --- ailibgen.aiml 2000/09/17 10:46:13 1.3 *************** *** 1,5 **** <aiml><ai name="SimpleAnimal" author="Kamil Krauspe, Micheal Hearn" notes="Copyright (C) 2000, by Michael Hearn, Kamil Krauspe ! Thanks to Kamil for this file, it demonstrates nicely how the system will work. If you have questions about the AI or how to use this program, email me on mh...@su..."><script classname="SimpleAnimalAIClass">classSimpleAnimalAIClass: def Update(self): return None --- 1,6 ---- <aiml><ai name="SimpleAnimal" author="Kamil Krauspe, Micheal Hearn" notes="Copyright (C) 2000, by Michael Hearn, Kamil Krauspe ! Thanks to Kamil for this file, it demonstrates nicely how the system will work. If you have questions about the AI or how to use this program, email me on mh...@su... ! "><script classname="SimpleAnimalAIClass">classSimpleAnimalAIClass: def Update(self): return None Index: data.cml =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Bin/data.cml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** data.cml 2000/09/11 19:31:55 1.2 --- data.cml 2000/09/17 10:46:13 1.3 *************** *** 1,9 **** ! <convdata><conversation name="Test conversation"><playeroption id="1" enabled="TRUE">Hi there! How are you doing? ! <npcspeech id="4" enabled="TRUE">Fine thanks. You? ! </npcspeech><playeroption id="5" enabled="TRUE">Oh not bad thanks. ! <npcspeech id="8" enabled="TRUE">That's welcome news. Now listen, I've got something to tell you. ! </npcspeech><jump id="23" to="21" enabled="TRUE"></jump></playeroption><playeroption id="6" enabled="TRUE">Actually not to good recently. ! <npcspeech id="7" enabled="TRUE">Really? That's too bad. Anyway, listen carefully. ! </npcspeech><jump id="24" to="21" enabled="TRUE"></jump></playeroption><group name="Joke Group" id="21" enabled="TRUE"><npcspeech id="22" enabled="TRUE">I've got this totally great joke to tell you! </npcspeech><playeroption id="27" enabled="TRUE">Groan! <jump id="30" to="29" enabled="TRUE"></jump></playeroption><playeroption id="28" enabled="TRUE">Go on then, shock me. --- 1,3 ---- ! <convdata><conversation name="Test conversation"><group name="Joke Group" id="21" enabled="FALSE"><npcspeech id="22" enabled="TRUE">I've got this totally great joke to tell you! </npcspeech><playeroption id="27" enabled="TRUE">Groan! <jump id="30" to="29" enabled="TRUE"></jump></playeroption><playeroption id="28" enabled="TRUE">Go on then, shock me. *************** *** 12,37 **** <npcspeech id="36" enabled="TRUE">A hippopotamouse! </npcspeech><playeroption id="37" enabled="TRUE">That's pathetic. ! </playeroption><playeroption id="38" enabled="TRUE">That's rubbish. ! </playeroption><playeroption id="39" enabled="TRUE">That's ****. ! </playeroption></playeroption></playeroption></group></playeroption><playeroption id="3" enabled="TRUE">Hey you - what are you doing here? <npcspeech id="12" enabled="TRUE">Well if you're going to be like that I'm off! ! </npcspeech><script name="NPC Leaves" id="13" enabled="FALSE">test script ! </script></playeroption></conversation><conversation name="Explanation Conversation"><npcspeech id="47" enabled="TRUE">Welcome to the demo conversation :) This will show you the features of the conversation engine, and demonstrate how it works and how conversations are designed. This node is an NPC node, meaning that the character to whom this conversation is with would speak it. ! A conversation is organised like a tree. The interpreter runs each node in turn, starting with the top and working downwards. Here, this is spoken first, and when ! that is done the player options a, b and c are shown. </npcspeech><playeroption id="48" enabled="TRUE">This is player option (a). The player can choose this option from a list of options that are displayed when the interpreter runs this node. If the player chooses this the options children are run. When a player option node is run, all available options are cleared. ! Options have two flags: "force select", which means the player -must- select that option, and "disable-on-run" which if true means that the option can only ! be selected once. <npcspeech id="52" enabled="TRUE">This is an NPC speech node. It is run (and the speech spoken) if the player selects option (a). </npcspeech><delay time="1000" id="53" enabled="TRUE"></delay><npcspeech id="54" enabled="TRUE">This NPC speech is run 1 second after the first. Because nodes are run in order, you can implement several neat features like this. ! After this node is run, control moves immediately back up a level and the player options (b) and (c) are run. In fact, all the options are processed, but when an option ! is selected, ! it is marked as "done", and therefore not readded. When control is returning up a level, only player options are run, no others are. </npcspeech></playeroption><playeroption id="50" enabled="TRUE">This is player option (b) The player can also choose this option. This node is run immediately after option (a), so the player sees the options appear virtually at the same instant. --- 6,44 ---- <npcspeech id="36" enabled="TRUE">A hippopotamouse! </npcspeech><playeroption id="37" enabled="TRUE">That's pathetic. ! <jump id="261" to="138" enabled="TRUE"></jump></playeroption><playeroption id="38" enabled="TRUE">That's rubbish. ! <jump id="262" to="138" enabled="TRUE"></jump></playeroption><playeroption id="39" enabled="TRUE">That's ****. ! <jump id="263" to="138" enabled="TRUE"></jump></playeroption><group name="Joke end group" id="137" enabled="FALSE"><disable id="138" target="1" enabled="TRUE"></disable><disable id="139" target="3" enabled="TRUE"></disable><enable id="144" target="135" enabled="TRUE"></enable><jump id="142" to="265" enabled="TRUE"></jump></group></playeroption></playeroption></group><group name="Greetings Group" id="265" enabled="TRUE"><playeroption id="1" enabled="TRUE">Hi there! How are you doing? ! <npcspeech id="4" enabled="TRUE">Fine thanks. You? ! </npcspeech><playeroption id="5" enabled="TRUE">Oh not bad thanks. ! <npcspeech id="8" enabled="TRUE">That's welcome news. Now listen, I've got something to tell you. ! </npcspeech><delay time="2000" id="129" enabled="TRUE"></delay><jump id="23" to="22" enabled="TRUE"></jump></playeroption><playeroption id="6" enabled="TRUE">Actually not to good recently. ! <npcspeech id="7" enabled="TRUE">Really? That's too bad. Anyway, listen carefully. ! </npcspeech><delay time="2000" id="130" enabled="TRUE"></delay><jump id="24" to="22" enabled="TRUE"></jump></playeroption></playeroption><playeroption id="3" enabled="TRUE">Hey you - what are you doing here? <npcspeech id="12" enabled="TRUE">Well if you're going to be like that I'm off! ! </npcspeech><script name="NPC Leaves" id="13" enabled="TRUE">test script ! </script><delay time="2000" id="131" enabled="TRUE"></delay></playeroption><playeroption id="264" enabled="TRUE">Friend, do you know of the plague in this area? ! <npcspeech id="363" enabled="TRUE">No! I had no idea. ! Thankyou for warning me stranger, I will be on the lookout. ! </npcspeech><playeroption id="99" enabled="TRUE">That's not a problem. Knowledge is power as they say. ! <npcspeech id="100" enabled="TRUE">Ah yes, and they say right too. Once again, thankyou. ! </npcspeech><disable id="121" target="264" enabled="TRUE"></disable><jump id="119" to="265" enabled="TRUE"></jump></playeroption></playeroption><playeroption id="135" enabled="FALSE">It was pleasant talking to you. ! <npcspeech id="136" enabled="TRUE">Yes, and the same to you. Maybe we can talk again some time. ! </npcspeech></playeroption></group></conversation><conversation name="Explanation Conversation"><npcspeech id="47" enabled="TRUE">Welcome to the demo conversation :) This will show you the features of the conversation engine, and demonstrate how it works and how conversations are designed. This node is an NPC node, meaning that the character to whom this conversation is with would speak it. ! A conversation is organised like a tree. The interpreter runs each node in turn, starting with the top and working downwards. Here, this is spoken first, and ! when that is done the player options a, b and c are shown. </npcspeech><playeroption id="48" enabled="TRUE">This is player option (a). The player can choose this option from a list of options that are displayed when the interpreter runs this node. If the player chooses this the options children are run. When a player option node is run, all available options are cleared. ! Options have two flags: "force select", which means the player -must- select that option, and "keep" which if true means that the option can be selected as ! many times as the player likes. If keep is false (the default) then the option can only ever be selected once. <npcspeech id="52" enabled="TRUE">This is an NPC speech node. It is run (and the speech spoken) if the player selects option (a). </npcspeech><delay time="1000" id="53" enabled="TRUE"></delay><npcspeech id="54" enabled="TRUE">This NPC speech is run 1 second after the first. Because nodes are run in order, you can implement several neat features like this. ! ! After this node is run, control moves immediately back up a level and the player options (b) and (c) are run. In fact, all the options are processed, but when an ! option is selected, it is marked as "done", and therefore not readded. When control is returning up a level, only player options are run, no others are. </npcspeech></playeroption><playeroption id="50" enabled="TRUE">This is player option (b) The player can also choose this option. This node is run immediately after option (a), so the player sees the options appear virtually at the same instant. *************** *** 47,51 **** player must say all three things before he can go back. However, if none of them have force-select then the player can only choose 1 of them. However, the rest of the options will then be impossible to select. Force select is currently not editable. ! <groupenable id="72" target="68" enabled="TRUE"></groupenable><npcspeech id="76" enabled="TRUE">If the player sees this npc speech then the group has been enabled. That means that if the player selects option (b) then (c), they get extra options. </npcspeech></playeroption><npcspeech id="57" enabled="TRUE">This node will be run immediately after the player chooses (b). However, after this node execution will stop, until a player option has been selected. </npcspeech></playeroption><playeroption id="51" enabled="TRUE">This is option (c) --- 54,58 ---- player must say all three things before he can go back. However, if none of them have force-select then the player can only choose 1 of them. However, the rest of the options will then be impossible to select. Force select is currently not editable. ! <enable id="134" target="68" enabled="TRUE"></enable><npcspeech id="76" enabled="TRUE">If the player sees this npc speech then the group has been enabled. That means that if the player selects option (b) then (c), they get extra options. </npcspeech></playeroption><npcspeech id="57" enabled="TRUE">This node will be run immediately after the player chooses (b). However, after this node execution will stop, until a player option has been selected. </npcspeech></playeroption><playeroption id="51" enabled="TRUE">This is option (c) *************** *** 57,61 **** into a group that is disabled. Groups are -not- automatically run when enabled. </playeroption><playeroption id="70" enabled="TRUE">This option is also in a group. These options will only be available if the player has first selected option (b) ! </playeroption><jump id="81" to="80" enabled="TRUE"></jump></group></playeroption><groupdisable id="78" target="79" enabled="TRUE"></groupdisable><group name="Misc Group" id="79" enabled="TRUE"><npcspeech id="80" enabled="TRUE">This will not be run at first, because it's in a group that's disabled. However, the group can be used to store various nodes that are jumped to later. When something is jumped to, it is treated like the jumped nodes are added where the jump command is. This is to preserve context. --- 64,68 ---- into a group that is disabled. Groups are -not- automatically run when enabled. </playeroption><playeroption id="70" enabled="TRUE">This option is also in a group. These options will only be available if the player has first selected option (b) ! </playeroption><jump id="81" to="80" enabled="TRUE"></jump></group></playeroption><group name="Misc Group" id="79" enabled="FALSE"><npcspeech id="80" enabled="TRUE">This will not be run at first, because it's in a group that's disabled. However, the group can be used to store various nodes that are jumped to later. When something is jumped to, it is treated like the jumped nodes are added where the jump command is. This is to preserve context. |
From: Kamil K. <kkr...@us...> - 2000-09-16 07:37:03
|
Update of /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second In directory slayer.i.sourceforge.net:/tmp/cvs-serv23238 Added Files: convInterpreter.cfg convInterpreter.dof convInterpreter.dpr frmMain.dfm frmMain.pas HTTSLib_TLB.dcr HTTSLib_TLB.pas Log Message: 2nd Interpreter kk 16/9/2000 --- NEW FILE --- -$A+ -$B- -$C+ -$D+ -$E- -$F- -$G+ -$H+ -$I+ -$J+ -$K- -$L+ -$M- -$N+ -$O+ -$P+ -$Q- -$R- -$S- -$T- -$U- -$V+ -$W- -$X+ -$YD -$Z1 -cg -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -H+ -W+ -M -$M16384,1048576 -K$00400000 -LE"d:\program files\borland\delphi5\Projects\Bpl" -LN"d:\program files\borland\delphi5\Projects\Bpl" --- NEW FILE --- [Compiler] A=1 B=0 C=1 D=1 E=0 F=0 G=1 H=1 I=1 J=1 K=0 L=1 M=0 N=1 O=1 P=1 Q=0 R=0 S=0 T=0 U=0 V=1 W=0 X=1 Y=1 Z=1 ShowHints=1 ShowWarnings=1 UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; [Linker] MapFile=0 OutputObjs=0 ConsoleApp=1 DebugInfo=0 RemoteSymbols=0 MinStackSize=16384 MaxStackSize=1048576 ImageBase=4194304 ExeDescription= [Directories] OutputDir= UnitOutputDir= PackageDLLOutputDir= PackageDCPOutputDir= SearchPath= Packages=VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;Python_d4;PythonVCL_d4;NtfyIcon;glPanelPkg Conditionals= DebugSourceDirs= UsePackages=0 [Parameters] RunParams= HostApplication= [Language] ActiveLang= ProjectLang=$0000041B RootDir= [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=2057 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlUnitAliases] Count=1 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; [HistoryLists\hlSearchPath] Count=1 Item0=e:\cvsroot\pythianproject\source\units\ --- NEW FILE --- program convInterpreter; uses Forms, frmMain in 'frmMain.pas' {frm_Main}; {$R *.RES} begin Application.Initialize; Application.CreateForm(Tfrm_Main, frm_Main); Application.Run; end. --- NEW FILE --- ÿ Font.ColorclWindowTextFont.Heightõ Font.Name MS Sans Serif Font.Style FormCreate OnDestroyFormDestroy PixelsPerInch` TextHeight pnlTopLeftLeft BevelOuterbvNoneBorderStylebsSingleCaptionNo options!Font.CharsetDEFAULT_CHARSET Font.ColorclWindowTextFont.Heightõ Font.NameArial Font.StylefsBold ParentFontTabOrder BevelOuterbvNoneBorderStylebsSingleCtl3DParentCtl3DTabOrder ScrollBars ssVerticalTabOrder pnlControlLeft BevelOuterbvNoneBorderStylebsSingleTabOrder btnOpenCMLLeftTopWidthSHeightAnchorsakTopakRight BevelOuterbvNoneBorderStylebsSingleCaptionPanel1TabOrder log memo. /Messages with prefix "NPC" are NPC's talks. If 0there's "PC Choosing", you can choose from your options (what to say).2To choose a option, click on one radio button and press "Say this" button DelayTimerEnabledInterval OpenDialogCtl3D DefaultExtcmlFilter*CML Files (*.cml)|*.cml|Any file (*.*)|*.* InitialDir.OptionsofHideReadOnlyofPathMustExistofFileMustExistofEnableSizing SpellTimerEnabledIntervaldOnTimerSpellTimerTimerLeft¹TopQ --- NEW FILE --- unit frmMain; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, XDOM, conversationObjectsUnit, OleCtrls, HTTSLib_TLB, Spin; type Tfrm_Main = class(TForm) pnlTopLeft: TPanel; rdgPlayerOption: TRadioGroup; pnlBottom: TPanel; Label2: TLabel; OutMemo: TMemo; pnlControl: TPanel; btnStart: TButton; btnQuit: TButton; btnOpenCML: TButton; Panel1: TPanel; HelpMemo: TMemo; Splitter1: TSplitter; Splitter2: TSplitter; btnPOOK: TButton; XmlToDomParser1: TXmlToDomParser; DomImplementation1: TDomImplementation; DelayTimer: TTimer; chbProDelays: TCheckBox; OpenDialog: TOpenDialog; CheckBox1: TCheckBox; SpellTimer: TTimer; procedure btnStartClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure btnQuitClick(Sender: TObject); procedure DelayTimerTimer(Sender: TObject); procedure btnPOOKClick(Sender: TObject); procedure rdgPlayerOptionClick(Sender: TObject); procedure btnOpenCMLClick(Sender: TObject); procedure CheckBox1Click(Sender: TObject); procedure SpellTimerTimer(Sender: TObject); private currentXMLDoc :TdomDocument; curConv: TConversation; curObj: TConversationObject; CurFileName: string; Speller: TTextToSpeech; FUseSpelling: Boolean; sengPLY, sengNPC: Integer; procedure LoadXML(filename:string); virtual ; procedure ClearConv; procedure DisplayThis; function LogLine: string; procedure NextItem; public { Public declarations } end; var frm_Main: Tfrm_Main; implementation uses convFileIO; {$R *.DFM} procedure Tfrm_Main.FormCreate(Sender: TObject); var i: Integer; begin ConversationEngine := TConversationEngine.Create; convFileIO.DOMImpl := DomImplementation1; CurFileName := 'data.cml'; FUseSpelling := False; try Speller := TTextToSpeech.Create(nil); Speller.Visible := False; i := Speller.CountEngines; if i <= 0 then raise Exception.Create('') else if i = 1 then begin sengPLY := 0; sengNPC := 1; end else if i > 1 then begin Randomize; repeat sengPLY := Random(i); sengNPC := Random(i); until sengPLY <> sengNPC; end; except try Speller.Free; finally CheckBox1.Enabled := False; end; end; end; procedure Tfrm_Main.LoadXML; begin try currentXMLDoc := XmlToDomParser1.FileToDom(filename); CurFileName := fileName; except on Exception do begin ShowMessage('WARNING: Could not parse CML, empty tree created...'); currentXMLDoc := DomImplementation1.createDocument('convdata',nil); end; end; // turn currentXMLDoc into conversation objects TranslateDOMToConvTree(currentXMLDoc); curConv := ConversationEngine.Conversations[0]; end; procedure Tfrm_Main.btnStartClick(Sender: TObject); begin ClearConv; LoadXML(CurFileName); DelayTimer.Enabled := False; curObj := curConv; DisplayThis; Update; NextItem; end; procedure Tfrm_Main.ClearConv; begin rdgPlayerOption.Hide; btnPOOK.Hide; OutMemo.Lines.Clear; if assigned(CurrentXMLDoc) then DomImplementation1.FreeDocument(currentXMLDoc); ConversationEngine.Conversations.Clear; curConv := nil; end; procedure Tfrm_Main.FormDestroy(Sender: TObject); begin ClearConv; end; procedure Tfrm_Main.DisplayThis; begin OutMemo.Lines.Append(LogLine); end; function Tfrm_Main.LogLine: string; begin Result := curObj.ReturnStrRepr; if curObj is TConversation then Result := 'System: Conversation Data' else if curObj is TNPCSpeech then Result := 'NPC: ' + TNPCSpeech(curObj).Text.Text else if curObj is TPlayerOption then Result := 'PC Choosing ' else if curObj is TConversationScript then Result := 'Script: ' + Result else if curObj is TConversationGroupEnable then Result := 'GROUP ENABLER: ' + Result else if curObj is TConversationGroupDisable then Result := 'GROUP DISABLER: ' + Result else if curObj is TConvGroup then Result := 'GROUP: ' + Result; end; procedure Tfrm_Main.btnQuitClick(Sender: TObject); begin Close; end; procedure Tfrm_Main.NextItem; label lblBEGIN; var TempObj: TConversationObject; chPD: Boolean; begin chPD := chbProDelays.Checked; lblBEGIN: TempObj := curObj.Next; if TempObj <> nil then begin curObj := TempObj; DisplayThis; Update; if (curObj is TConversationDelay) and chPD then begin pnlTopLeft.Caption := 'TConversationDelay in progress. Please Wait!'; DelayTimer.Enabled := False; DelayTimer.Interval := TConversationDelay(curObj).DelayPeriod; DelayTimer.Enabled := True; Exit; end else if curObj is TPlayerOption then begin TempObj := curObj; rdgPlayerOption.Items.BeginUpdate; rdgPlayerOption.Items.Clear; while TempObj <> nil do begin rdgPlayerOption.Items.AddObject(TPlayerOption(TempObj).ReturnStrRepr, TempObj); TempObj := TPlayerOption(TempObj).NextPlayerOption; end; rdgPlayerOption.Items.EndUpdate; rdgPlayerOption.Show; rdgPlayerOption.SetFocus; rdgPlayerOption.ItemIndex := 0; btnPOOK.Enabled := True; btnPOOK.Show; Exit; end else if curObj is TNPCSpeech then begin if FUseSpelling then begin Speller.StopSpeaking; Speller.Select(sengNPC); Speller.Speak(TNPCSpeech(curObj).Text.Text); SpellTimer.Enabled := True; Exit; end; end else if curObj is TConversationCommand then if not (curObj is TConversationScript) then TConversationCommand(curObj).Run; goto lblBEGIN end else begin OutMemo.Lines.Append('Conversation over!'); pnlTopLeft.Caption := 'Conversation over!'; end; end; procedure Tfrm_Main.DelayTimerTimer(Sender: TObject); begin if curObj is TConversationDelay then begin pnlTopLeft.Caption := 'No options!'; DelayTimer.Enabled := False; NextItem; end; end; procedure Tfrm_Main.btnPOOKClick(Sender: TObject); var TempObj: TConversationObject; begin if rdgPlayerOption.ItemIndex < 0 then Exit; TempObj := TConversationObject(rdgPlayerOption.Items.Objects[rdgPlayerOption.ItemIndex]); rdgPlayerOption.Hide; btnPOOK.Hide; rdgPlayerOption.Items.Clear; btnPOOK.Enabled := False; OutMemo.Lines.Append('PC: ' + TempObj.ReturnStrRepr); Update; CurObj := TempObj; if (FUseSpelling) and (sengPLY > 0) then begin Speller.StopSpeaking; Speller.Select(sengPLY); Speller.Speak(TPlayerOption(TempObj).Text.Text); SpellTimer.Enabled := True; end else NextItem; end; procedure Tfrm_Main.rdgPlayerOptionClick(Sender: TObject); begin if rdgPlayerOption.ItemIndex >= 0 then btnPOOK.Enabled := True; end; procedure Tfrm_Main.btnOpenCMLClick(Sender: TObject); begin if OpenDialog.Execute then CurFileName := OpenDialog.FileName; end; procedure Tfrm_Main.CheckBox1Click(Sender: TObject); begin FUseSpelling := CheckBox1.Checked and Assigned(Speller); end; procedure Tfrm_Main.SpellTimerTimer(Sender: TObject); begin if Speller.IsSpeaking = 0 then begin SpellTimer.Enabled := False; NextItem; end; end; end. --- NEW FILE --- ***** Error reading new file: (2, 'No such file or directory') |
From: Kamil K. <kkr...@us...> - 2000-09-16 07:33:43
|
Update of /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second In directory slayer.i.sourceforge.net:/tmp/cvs-serv22976/second Log Message: Directory /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second added to the repository |