void USoundNodeSwitch::CreateStartingConnectors() { InsertChildNode( ChildNodes.Num() ); InsertChildNode( ChildNodes.Num() ); InsertChildNode( ChildNodes.Num() ); InsertChildNode( ChildNodes.Num() ); }
void USoundNodeBranch::CreateStartingConnectors() { // Locality Nodes default with two connectors - Locally instigated and . InsertChildNode( ChildNodes.Num() ); InsertChildNode( ChildNodes.Num() ); InsertChildNode( ChildNodes.Num() ); }
//************************************************************************* //* FindNodeAddToTree //* Returns a pointer to the first child with the given Number/Name. //* If the Number/Name is not present, then it is added //* This function does not check children's children. //************************************************************************* lpTreeNode FindNodeAddToTree ( lpTreeNode lpParent, LPSTR lpszName, UINT uNum) { lpTreeNode lpResult = NULL; UINT i; if (DEBUG(1)) fprintf (error_out, "Call to Find Node Add To Tree LINE: %i NUMBER: %i NAME: '%s'\n", lineno, uNum, lpszName); if (NULL == lpParent) { if (DEBUG(1)) fprintf (error_out, "Find Node: lpParent is NULL\n"); goto Exit; } if (lpMIBRoot == lpParent) lpResult = FindNodeInSubTree(lpParent, lpszName); if (NULL != lpResult) goto Exit; /* we found the node */ for (i = 0; i < lpParent->uNumChildren; i++) { if (lpParent->lpChildArray[i]->uNumSubID == uNum) { if (0 == strcmp (lpParent->lpChildArray[i]->lpszTextSubID, lpszName)) { lpResult = lpParent->lpChildArray[i]; goto Exit; } else { fprintf (error_out, "error : attempt to overwrite node %s(%i) with node %s(%i). ", lpParent->lpChildArray[i]->lpszTextSubID, lpParent->lpChildArray[i]->uNumSubID, lpszName, uNum ); yyerror ("Name overwrite detected"); } } } // at this point we did not find the node, so add it lpResult = NewChildNode (lpszName, uNum); InsertChildNode (lpParent, lpResult); if (DEBUG(1)) fprintf (error_out, " Node ADDED!\n"); Exit: return (lpResult); }
yyparse() { short yys[YYMAXDEPTH]; short yyj, yym; register YYSTYPE *yypvt; register short yystate, *yyps, yyn; register YYSTYPE *yypv; register short *yyxi; yystate = 0; yychar = -1; yynerrs = 0; yyerrflag = 0; yyps= &yys[-1]; yypv= &yyv[-1]; yystack: /* put a state and value onto the stack */ #ifdef YYDEBUG if( yydebug ) printf( "state %d, char 0%o\n", yystate, yychar ); #endif if( ++yyps>= &yys[YYMAXDEPTH] ) { yyerror( "yacc stack overflow" ); YYABORT; } *yyps = yystate; ++yypv; #ifdef UNION yyunion(yypv, &yyval); #else *yypv = yyval; #endif yynewstate: yyn = yypact[yystate]; if( yyn<= YYFLAG ) goto yydefault; /* simple state */ if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0; if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault; if( yychk[ yyn=yyact[ yyn ] ] == yychar ){ /* valid shift */ yychar = -1; #ifdef UNION yyunion(&yyval, &yylval); #else yyval = yylval; #endif yystate = yyn; if( yyerrflag > 0 ) --yyerrflag; goto yystack; } yydefault: /* default state action */ if( (yyn=yydef[yystate]) == -2 ) { if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0; /* look through exception table */ for( yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=yystate) ; yyxi += 2 ) ; /* VOID */ for(yyxi+=2; *yyxi >= 0; yyxi+=2) { if( *yyxi == yychar ) break; } if( (yyn = yyxi[1]) < 0 ) return(0); /* accept */ } if( yyn == 0 ){ /* error */ /* error ... attempt to resume parsing */ switch( yyerrflag ){ case 0: /* brand new error */ yyerror( "syntax error" ); // yyerrlab: //Comented out to shut up compiler since this is never referred to ++yynerrs; case 1: case 2: /* incompletely recovered error ... try again */ yyerrflag = 3; /* find a state where "error" is a legal shift action */ while ( yyps >= yys ) { yyn = yypact[*yyps] + YYERRCODE; if( yyn>= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ){ yystate = yyact[yyn]; /* simulate a shift of "error" */ goto yystack; } yyn = yypact[*yyps]; /* the current yyps has no shift onn "error", pop stack */ #ifdef YYDEBUG if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] ); #endif --yyps; --yypv; } /* there is no state on the stack with an error shift ... abort */ yyabort: YYABORT; case 3: /* no shift yet; clobber input char */ #ifdef YYDEBUG if( yydebug ) printf( "error recovery discards char %d\n", yychar ); #endif if( yychar == 0 ) goto yyabort; /* don't discard EOF, quit */ yychar = -1; goto yynewstate; /* try again in the same state */ } } /* reduction by production yyn */ #ifdef YYDEBUG if( yydebug ) printf("reduce %d\n",yyn); #endif yyps -= yyr2[yyn]; yypvt = yypv; yypv -= yyr2[yyn]; #ifdef UNION yyunion(&yyval, &yypv[1]); #else yyval = yypv[1]; #endif yym=yyn; /* consult goto table to find next state */ yyn = yyr1[yyn]; yyj = yypgo[yyn] + *yyps + 1; if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]]; switch(yym){ case 1: //! # line 136 "mibyacc.Y" { if (0 != nNumberOfErrors) return 1; } break; case 7: //! # line 153 "mibyacc.Y" { if (warning_level(2)) fprintf (error_out, "(i%) : warning : optional module object identifier is ignored.", lineno); } break; case 43: //! # line 218 "mibyacc.Y" { lpCurrentNode = lpMIBRoot; } break; case 44: //! # line 220 "mibyacc.Y" { InsertChildNode (lpCurrentNode, NewChildNode (yypvt[-8].strval, (UINT) yypvt[-1].numval)); fYYErrorStopReturn(1); } break; case 45: //! # line 234 "mibyacc.Y" { lpCurrentNode = lpMIBRoot; } break; case 46: //! # line 236 "mibyacc.Y" { InsertChildNode (lpCurrentNode, NewChildNode (yypvt[-17].strval, (UINT) yypvt[-1].numval)); fYYErrorStopReturn(1); } break; case 146: //! # line 442 "mibyacc.Y" { lpCurrentNode = FindNodeByName (lpCurrentNode, yypvt[-0].strval); if (NULL == lpCurrentNode) { fprintf (error_out, "error: sub-identifier '%s' not found in tree. ", yypvt[-0].strval); yyerror ("Unknown sub-identifier"); fYYErrorStopReturn(1); } } break; case 147: //! # line 451 "mibyacc.Y" { lpCurrentNode = FindNodeAddToTree (lpCurrentNode, yypvt[-3].strval, (UINT) yypvt[-1].numval); if (NULL == lpCurrentNode) { fprintf (error_out, "error: sub-identifier '%s(%i)' not found in tree. ", yypvt[-3].strval, yypvt[-1].numval); yyerror ("Unknown sub-identifier"); fYYErrorStopReturn(1); } } break; case 148: //! # line 460 "mibyacc.Y" { lpCurrentNode = FindNodeByNumber (lpCurrentNode, (UINT) yypvt[-0].numval); if (NULL == lpCurrentNode) { fprintf (error_out, "error: sub-identifier '%s' not found in tree. ", yypvt[-0].numval); yyerror ("Unknown sub-identifier"); fYYErrorStopReturn(1); } } break; case 149: //! # line 469 "mibyacc.Y" { lpCurrentNode = FindNodeByName (lpCurrentNode, yypvt[-0].strval); if (NULL == lpCurrentNode) { fprintf (error_out, "error: sub-identifier '%s' not found in tree. ", yypvt[-0].strval); yyerror ("Unknown sub-identifier"); fYYErrorStopReturn(1); } } break; case 150: //! # line 478 "mibyacc.Y" { lpCurrentNode = FindNodeAddToTree (lpCurrentNode, yypvt[-3].strval, (UINT) yypvt[-1].numval); if (NULL == lpCurrentNode) { fprintf (error_out, "error: sub-identifier '%s(%i)' not found in tree. ", yypvt[-3].strval, yypvt[-1].numval); yyerror ("Unknown sub-identifier"); fYYErrorStopReturn(1); } } break; case 151: //! # line 487 "mibyacc.Y" { lpCurrentNode = FindNodeByNumber (lpCurrentNode, (UINT) yypvt[-0].numval); if (NULL == lpCurrentNode) { fprintf (error_out, "error: sub-identifier '%s' not found in tree. ", yypvt[-0].numval); yyerror ("Unknown sub-identifier"); fYYErrorStopReturn(1); } } break;/* End of actions */ } goto yystack; /* stack new state and value */ }
void USoundNodeLocalPlayer::CreateStartingConnectors() { InsertChildNode(ChildNodes.Num()); InsertChildNode(ChildNodes.Num()); }
void USoundNodeDistanceCrossFade::CreateStartingConnectors() { // Mixers default with two connectors. InsertChildNode( ChildNodes.Num() ); InsertChildNode( ChildNodes.Num() ); }
void USoundNodeRandom::CreateStartingConnectors() { // Random Sound Nodes default with two connectors. InsertChildNode( ChildNodes.Num() ); InsertChildNode( ChildNodes.Num() ); }
void USoundNodeVehicleEngine::CreateStartingConnectors() { InsertChildNode(ChildNodes.Num()); InsertChildNode(ChildNodes.Num()); }
void USoundNodeConcatenator::CreateStartingConnectors() { // Concatenators default to two two connectors. InsertChildNode( ChildNodes.Num() ); InsertChildNode( ChildNodes.Num() ); }