root/deus/makeops.cpp

Revision 8, 0.9 kB (checked in by pantley2, 4 years ago)

added old DEUS project to SVN

Line 
1
2 void MakeOps()
3 {
4         // Change Attribute Operator
5         Operator OP;
6         Condition Cond;
7         string preconds[NUM_COND][NUM_COND];
8        
9         string postconds[NUM_COND][NUM_COND];
10         for(int i=0; i<NUM_COND; i++)
11         {
12                 for(int j=0; j<NUM_COND; j++)
13                 {
14                         preconds[i][j]="";
15                         postconds[i][j]="";
16                 }
17         }
18         preconds[0][0]="npc";
19         postconds[0][0]="npc";
20         postconds[1][0]="attrib value";
21         Cond.vars=preconds;
22         OP.PreConds=Cond;
23         Cond.vars=postconds;
24         OP.PostConds=Conds;
25         OP.code=OP_CHANGEATTRIBUTE;
26         OPs.push_back(OP);
27
28         //MOVENPC Operator
29         for(int i=0; i<NUM_COND; i++)
30         {
31                 for(int j=0; j<NUM_COND; j++)
32                 {
33                         ((OP.PreConds).conditions)[i][j]="";
34                         ((OP.PostConds).conditions)[i][j]="";
35                 }
36         }
37         ((OP.PreConds).conditions)[0][0]="npc";
38         ((OP.PostConds).conditions)[0][0]="npc";
39         ((OP.PostConds).conditions)[1][0]="xloc yloc";
40         OP.code=OP_MOVENPC;
41         OPs.push_back(OP);
42 }
Note: See TracBrowser for help on using the browser.