From: SakirSoft <sak...@us...> - 2005-07-09 21:52:26
|
Update of /cvsroot/openmugen/OpenMugen/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2293 Modified Files: VM.cpp Log Message: Fixed AnimElemtTime trigger Index: VM.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/VM.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- VM.cpp 6 Jul 2005 18:56:43 -0000 1.5 +++ VM.cpp 9 Jul 2005 21:52:17 -0000 1.6 @@ -206,6 +206,8 @@ float CVirtualMachine::Execute(INSTRUCTI //Rest the Satck for the next execution m_Stack.ResetStack(); + + bSfalse = false; while(pInst[nCurrentIns].n_OpCode!=OP_STOP) { @@ -214,6 +216,14 @@ float CVirtualMachine::Execute(INSTRUCTI // PrintMessage("%s %i %s",strOpCode[pInst[nCurrentIns].n_OpCode],pInst[nCurrentIns].n_OpCode,pInst[nCurrentIns].strValue); //Execute the function (this->*pFuncTable[pInst[nCurrentIns].n_OpCode])(); + + if ( bSfalse ) + { + + m_Stack.Push(0,"#"); + break; + } + nCurrentIns++; } PopValue(); @@ -836,12 +846,18 @@ void CVirtualMachine::AnimeElemTime() m_Stack.Push((float)m_CurrentPlayer->GetCurrentImageTime(),"#"); // PrintMessage("%i",tActionElement->nCurrentImageTime); - } - else + }else if( nElementToCheck > m_CurrentPlayer->GetCurrentImageNr()+1 ) + m_Stack.Push(-1,"#"); + else if( nElementToCheck < m_CurrentPlayer->GetCurrentImageNr()+1 ) + m_Stack.Push(0,"#"); + + /*else { //Should return SFalse - m_Stack.Push(-1,"#"); - } + m_Stack.Push(0,"#"); + //bSfalse = true; + //throw(CError("nope")); + }*/ } @@ -1816,7 +1832,7 @@ void CVirtualMachine::P2BodyDist() }//Else y value else { - fDist = m_CurrentPlayer->GetPosY() - m_pPlayer2->GetPosY(); + fDist = m_CurrentPlayer->GetDistY(); m_Stack.Push(fDist,"#"); } @@ -1824,17 +1840,18 @@ void CVirtualMachine::P2BodyDist() void CVirtualMachine::P2Dist() { - float fDist=0; + float fDist=0; //1 = X Value if(m_Stack.Pop().Value==1) { - m_Stack.Push(0,"#"); + fDist = m_CurrentPlayer->GetDistY(); + m_Stack.Push(fDist,"#"); }//Else y value else { - //default - m_Stack.Push(0,"#"); + fDist = m_CurrentPlayer->GetDistY(); + m_Stack.Push(fDist,"#"); } } @@ -1863,7 +1880,7 @@ void CVirtualMachine::P2StateNo() void CVirtualMachine::P2StateType() { - m_Stack.Push(0,"#"); + m_Stack.Push(m_pPlayer2->GetStateType(),"#"); } void CVirtualMachine::P3Name() |