|
From: SakirSoft <sak...@us...> - 2005-07-09 21:53:24
|
Update of /cvsroot/openmugen/OpenMugen/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2552 Modified Files: ControllerExecuter.cpp OpenMugen.layout StateParser.cpp StateParser.h VM.h VideoSystem.cpp Log Message: no message Index: ControllerExecuter.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/ControllerExecuter.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -p -r1.10 -r1.11 --- ControllerExecuter.cpp 6 Jul 2005 19:01:25 -0000 1.10 +++ ControllerExecuter.cpp 9 Jul 2005 21:53:14 -0000 1.11 @@ -276,6 +276,15 @@ void CControllerExecuter::ChangeAnim2() s32 nAnimAction=0; CHANGEANIM *temp=(CHANGEANIM*)lpController; + if(temp->value) + nAnimAction=(s32)m_pVM->Execute(temp->value); + if(temp->elem_no) + nCurrElement=(u16)m_pVM->Execute(temp->elem_no); + + m_CurrentPlayer->ChangeAnim2(nAnimAction,nCurrElement); + + + PrintMessage("TODO: implement ChangeAnim2 controller"); } @@ -459,7 +468,44 @@ void CControllerExecuter::SprPriority() void CControllerExecuter::TargetBind() { TARGETBIND *temp = (TARGETBIND*)lpController; - PrintMessage("TODO: implement TargetBind controller"); + s16 nTargetId = m_pVM->Execute(temp->id,-1); + float x_pos = m_pVM->Execute(temp->pos_x); + float y_pos = m_pVM->Execute(temp->pos_y); + int time = m_pVM->Execute(temp->time,1); + + if( nTargetId == -1 ) + { + int nHowManyTargtes = 0; + CPlayer **list = m_CurrentPlayer->GetAllTargets(nHowManyTargtes); + + for( int i = 0;i < nHowManyTargtes;i++) + { + CBindPlayer * bind = new CBindPlayer( list[i] , m_CurrentPlayer ); + bind->SetBindPosX( x_pos ); + bind->SetBindPosY( y_pos ); + bind->SetTime( time ); + + mugen->GetEngine()->AddObject( bind ); + + } + + }else + { + CPlayer *target = m_CurrentPlayer->GetTargetById(nTargetId); + + if( target ) + { + CBindPlayer * bind = new CBindPlayer( target , m_CurrentPlayer ); + bind->SetBindPosX( x_pos ); + bind->SetBindPosY( y_pos ); + bind->SetTime( time ); + + mugen->GetEngine()->AddObject( bind ); + + } + } + + PrintMessage("Test: implement TargetBind controller"); } void CControllerExecuter::TargetFacing() @@ -477,6 +523,31 @@ void CControllerExecuter::TargetLifeAdd( void CControllerExecuter::TargetState() { TARGETSTATE *temp = (TARGETSTATE*)lpController; + s16 nTargetId = m_pVM->Execute(temp->id,-1); + s32 StateNo = m_pVM->Execute(temp->value); + + if( nTargetId == -1 ) + { + int nHowManyTargtes = 0; + CPlayer **list = m_CurrentPlayer->GetAllTargets(nHowManyTargtes); + + for( int i = 0;i < nHowManyTargtes;i++) + { + list[i]->ChangeState(StateNo); + + } + + }else + { + CPlayer *target = m_CurrentPlayer->GetTargetById(nTargetId); + + if( target ) + { + target->ChangeState(StateNo); + } + } + + PrintMessage("TODO: implement TargetState controller"); } @@ -500,8 +571,9 @@ void CControllerExecuter::PlaySnd() void CControllerExecuter::SelfState() { CHANGESTATE *temp=(CHANGESTATE*)lpController; - - PrintMessage("TODO: implement SelfState controller"); + m_CurrentPlayer->RestoreState(); + ChangeState(); + } void CControllerExecuter::SuperPause() @@ -609,6 +681,9 @@ void CControllerExecuter::HitDef() hitvar.bGuardPlayerSnd = temp->bPlayerGuardSound; hitvar.guard_snd_grp = m_pVM->Execute(temp->snd_guard_grp,6); hitvar.guard_snd_item = m_pVM->Execute(temp->snd_guard_item,0); + hitvar.p1StateNo = m_pVM->Execute(temp->p1stateno,-1); + hitvar.p2StateNo = m_pVM->Execute(temp->p2stateno,-1); + hitvar.isbound = true; //Set guard dist m_CurrentPlayer->SetAttackDist( m_pVM->Execute(temp->guard_dist,m_CurrentPlayer->ConstData.Size.nAttackDist) ); Index: OpenMugen.layout =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/OpenMugen.layout,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -p -r1.14 -r1.15 --- OpenMugen.layout 6 Jul 2005 19:01:25 -0000 1.14 +++ OpenMugen.layout 9 Jul 2005 21:53:14 -0000 1.15 @@ -6,14 +6,14 @@ LeftChar=1 Open=0 Top=0 [Editors] -Focused=39 -Order=39,-1 +Focused=48 +Order=23,24,33,20,48 [Editor_0] Open=0 Top=0 CursorCol=1 -CursorRow=14 -TopLine=22 +CursorRow=1 +TopLine=1 LeftChar=1 [Editor_1] Open=0 @@ -26,8 +26,8 @@ LeftChar=1 Open=0 Top=0 CursorCol=1 -CursorRow=92 -TopLine=17 +CursorRow=74 +TopLine=51 LeftChar=1 [Editor_3] Open=0 @@ -39,16 +39,16 @@ LeftChar=1 [Editor_4] Open=0 Top=0 -CursorCol=6 -CursorRow=281 -TopLine=259 +CursorCol=2 +CursorRow=706 +TopLine=666 LeftChar=1 [Editor_5] Open=0 Top=0 -CursorCol=4 -CursorRow=93 -TopLine=63 +CursorCol=2 +CursorRow=95 +TopLine=58 LeftChar=1 [Editor_6] Open=0 @@ -60,9 +60,9 @@ LeftChar=1 [Editor_7] Open=0 Top=0 -CursorCol=1 -CursorRow=135 -TopLine=99 +CursorCol=8 +CursorRow=297 +TopLine=286 LeftChar=1 [Editor_8] Open=0 @@ -117,36 +117,36 @@ LeftChar=1 Open=0 Top=0 CursorCol=28 -CursorRow=146 -TopLine=127 +CursorRow=184 +TopLine=147 LeftChar=1 [Editor_17] Open=0 Top=0 -CursorCol=24 -CursorRow=102 -TopLine=81 +CursorCol=71 +CursorRow=159 +TopLine=124 LeftChar=1 [Editor_18] Open=0 Top=0 -CursorCol=11 -CursorRow=231 -TopLine=215 +CursorCol=76 +CursorRow=221 +TopLine=202 LeftChar=1 [Editor_19] Open=0 Top=0 -CursorCol=26 -CursorRow=203 -TopLine=420 +CursorCol=1 +CursorRow=437 +TopLine=411 LeftChar=1 [Editor_20] -Open=0 +Open=1 Top=0 -CursorCol=18 -CursorRow=1016 -TopLine=1007 +CursorCol=16 +CursorRow=827 +TopLine=803 LeftChar=1 [Editor_21] Open=0 @@ -163,24 +163,24 @@ CursorRow=33 TopLine=1 LeftChar=1 [Editor_23] -Open=0 +Open=1 Top=0 -CursorCol=16 -CursorRow=1589 -TopLine=1583 -LeftChar=5 +CursorCol=21 +CursorRow=852 +TopLine=830 +LeftChar=1 [Editor_24] -Open=0 +Open=1 Top=0 CursorCol=16 -CursorRow=188 -TopLine=153 +CursorRow=34 +TopLine=12 LeftChar=1 [Editor_25] Open=0 Top=0 -CursorCol=2 -CursorRow=83 +CursorCol=23 +CursorRow=30 TopLine=20 LeftChar=1 [Editor_26] @@ -193,16 +193,16 @@ LeftChar=1 [Editor_27] Open=0 Top=0 -CursorCol=8 -CursorRow=175 -TopLine=217 +CursorCol=41 +CursorRow=308 +TopLine=304 LeftChar=1 [Editor_28] Open=0 Top=0 -CursorCol=3 -CursorRow=78 -TopLine=22 +CursorCol=2 +CursorRow=28 +TopLine=28 LeftChar=1 [Editor_29] Open=0 @@ -214,16 +214,16 @@ LeftChar=1 [Editor_30] Open=0 Top=0 -CursorCol=16 -CursorRow=34 -TopLine=47 +CursorCol=17 +CursorRow=20 +TopLine=3 LeftChar=1 [Editor_31] Open=0 Top=0 CursorCol=27 CursorRow=15 -TopLine=1 +TopLine=112 LeftChar=1 [Editor_32] Open=0 @@ -233,11 +233,11 @@ CursorRow=33 TopLine=16 LeftChar=1 [Editor_33] -Open=0 +Open=1 Top=0 -CursorCol=68 -CursorRow=611 -TopLine=587 +CursorCol=58 +CursorRow=508 +TopLine=489 LeftChar=1 [Editor_34] Open=0 @@ -249,23 +249,23 @@ LeftChar=1 [Editor_35] Open=0 Top=0 -CursorCol=45 -CursorRow=209 -TopLine=460 +CursorCol=26 +CursorRow=429 +TopLine=414 LeftChar=1 [Editor_36] Open=0 Top=0 -CursorCol=17 -CursorRow=200 -TopLine=183 +CursorCol=30 +CursorRow=363 +TopLine=352 LeftChar=1 [Editor_37] Open=0 Top=0 -CursorCol=51 -CursorRow=3853 -TopLine=3818 +CursorCol=15 +CursorRow=1434 +TopLine=1411 LeftChar=1 [Editor_38] Open=0 @@ -275,8 +275,8 @@ CursorRow=28 TopLine=1 LeftChar=1 [Editor_39] -Open=1 -Top=1 +Open=0 +Top=0 CursorCol=34 CursorRow=167 TopLine=155 @@ -326,23 +326,23 @@ LeftChar=1 [Editor_46] Open=0 Top=0 -CursorCol=27 -CursorRow=49 -TopLine=1 +CursorCol=2 +CursorRow=30 +TopLine=103 LeftChar=1 [Editor_47] Open=0 Top=0 -CursorCol=16 -CursorRow=100 -TopLine=81 +CursorCol=18 +CursorRow=225 +TopLine=202 LeftChar=1 [Editor_48] -Open=0 -Top=0 -CursorCol=2 -CursorRow=143 -TopLine=106 +Open=1 +Top=1 +CursorCol=21 +CursorRow=224 +TopLine=193 LeftChar=1 [Editor_49] Open=0 Index: StateParser.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/StateParser.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -p -r1.6 -r1.7 --- StateParser.cpp 2 Jul 2005 17:13:05 -0000 1.6 +++ StateParser.cpp 9 Jul 2005 21:53:14 -0000 1.7 @@ -3104,9 +3104,23 @@ void CStateParser::ParseHitBy() { HITBY *temp = (HITBY*)StateManager->GetController(); - + bool bValue = false; + if( tok.CheckToken("value") ) { + bValue = true; + temp->slot = 1; + } + + if( tok.CheckToken("value2" ) ) + { + bValue = true; + temp->slot = 2; + } + + + if( bValue ) + { if( !tok.CheckToken("=") ) Error("missing \"=\" "); @@ -3116,8 +3130,7 @@ void CStateParser::ParseHitBy() char strAttr[20]; strcpy(strAttr,tok.GetToken()); - u8 nAttrFlag=0; - + int i = 0; while ( strAttr[i] ) { @@ -3125,18 +3138,21 @@ void CStateParser::ParseHitBy() if(strAttr[i] >= 97) strAttr[i]-=32; + if( i > 2 ) + break; + switch(strAttr[i]) { case 'S': - nAttrFlag += stand; + temp->attackType[i] = stand; break; case 'C': - nAttrFlag += crouch; + temp->attackType[i] = crouch; break; case 'A': - nAttrFlag += air; + temp->attackType[i] = air; break; } @@ -3144,160 +3160,70 @@ void CStateParser::ParseHitBy() } - temp->attackType = nAttrFlag; - //Attribute1 - if( tok.CheckToken(",") ) - { - if( tok.CheckToken("NA") ) - temp->attackAttr1=CPlayer::NormalAttack; - else if( tok.CheckToken("NT") ) - temp->attackAttr1=CPlayer::NormalThrow; - else if( tok.CheckToken("NP") ) - temp->attackAttr1=CPlayer::NormalProjectile; - else if( tok.CheckToken("SA") ) - temp->attackAttr1=CPlayer::SpecialAttack; - else if( tok.CheckToken("ST") ) - temp->attackAttr1=CPlayer::SpecialThrow; - else if( tok.CheckToken("SP") ) - temp->attackAttr1=CPlayer::SpecialProjectile; - else if( tok.CheckToken("HA") ) - temp->attackAttr1=CPlayer::HyperAttack; - else if( tok.CheckToken("HT") ) - temp->attackAttr1=CPlayer::HyperThrow; - else if( tok.CheckToken("HP") ) - temp->attackAttr1=CPlayer::HyperProjectile; - else - Error("worng attr parameter in HitBy controller"); - - } - //Attribute2 - if( tok.CheckToken(",") ) + + i=0; + + while( tok.CheckToken(",") ) { if( tok.CheckToken("NA") ) - temp->attackAttr2=CPlayer::NormalAttack; + temp->attackAttr[i]=CPlayer::NormalAttack; else if( tok.CheckToken("NT") ) - temp->attackAttr2=CPlayer::NormalThrow; + temp->attackAttr[i]=CPlayer::NormalThrow; else if( tok.CheckToken("NP") ) - temp->attackAttr2=CPlayer::NormalProjectile; + temp->attackAttr[i]=CPlayer::NormalProjectile; else if( tok.CheckToken("SA") ) - temp->attackAttr2=CPlayer::SpecialAttack; + temp->attackAttr[i]=CPlayer::SpecialAttack; else if( tok.CheckToken("ST") ) - temp->attackAttr2=CPlayer::SpecialThrow; + temp->attackAttr[i]=CPlayer::SpecialThrow; else if( tok.CheckToken("SP") ) - temp->attackAttr2=CPlayer::SpecialProjectile; + temp->attackAttr[i]=CPlayer::SpecialProjectile; else if( tok.CheckToken("HA") ) - temp->attackAttr2=CPlayer::HyperAttack; + temp->attackAttr[i]=CPlayer::HyperAttack; else if( tok.CheckToken("HT") ) - temp->attackAttr2=CPlayer::HyperThrow; + temp->attackAttr[i]=CPlayer::HyperThrow; else if( tok.CheckToken("HP") ) - temp->attackAttr2=CPlayer::HyperProjectile; + temp->attackAttr[i]=CPlayer::HyperProjectile; else Error("worng attr parameter in HitBy controller"); + + i++; } - - //Attribute3 - if( tok.CheckToken(",") ) - { - if( tok.CheckToken("NA") ) - temp->attackAttr3=CPlayer::NormalAttack; - else if( tok.CheckToken("NT") ) - temp->attackAttr3=CPlayer::NormalThrow; - else if( tok.CheckToken("NP") ) - temp->attackAttr3=CPlayer::NormalProjectile; - else if( tok.CheckToken("SA") ) - temp->attackAttr3=CPlayer::SpecialAttack; - else if( tok.CheckToken("ST") ) - temp->attackAttr3=CPlayer::SpecialThrow; - else if( tok.CheckToken("SP") ) - temp->attackAttr3=CPlayer::SpecialProjectile; - else if( tok.CheckToken("HA") ) - temp->attackAttr3=CPlayer::HyperAttack; - else if( tok.CheckToken("HT") ) - temp->attackAttr3=CPlayer::HyperThrow; - else if( tok.CheckToken("HP") ) - temp->attackAttr3=CPlayer::HyperProjectile; - else - Error("worng attr parameter in HitBy controller"); - - } + }else { - //Attribute1 - if( tok.CheckToken("NA") ) - temp->attackAttr1=CPlayer::NormalAttack; - else if( tok.CheckToken("NT") ) - temp->attackAttr1=CPlayer::NormalThrow; - else if( tok.CheckToken("NP") ) - temp->attackAttr1=CPlayer::NormalProjectile; - else if( tok.CheckToken("SA") ) - temp->attackAttr1=CPlayer::SpecialAttack; - else if( tok.CheckToken("ST") ) - temp->attackAttr1=CPlayer::SpecialThrow; - else if( tok.CheckToken("SP") ) - temp->attackAttr1=CPlayer::SpecialProjectile; - else if( tok.CheckToken("HA") ) - temp->attackAttr1=CPlayer::HyperAttack; - else if( tok.CheckToken("HT") ) - temp->attackAttr1=CPlayer::HyperThrow; - else if( tok.CheckToken("HP") ) - temp->attackAttr1=CPlayer::HyperProjectile; - else - Error("worng attr parameter in HitBy controller"); - - //Attribute2 - if( tok.CheckToken(",") ) - { + + int i=0; + + do + { if( tok.CheckToken("NA") ) - temp->attackAttr2=CPlayer::NormalAttack; + temp->attackAttr[i]=CPlayer::NormalAttack; else if( tok.CheckToken("NT") ) - temp->attackAttr2=CPlayer::NormalThrow; + temp->attackAttr[i]=CPlayer::NormalThrow; else if( tok.CheckToken("NP") ) - temp->attackAttr2=CPlayer::NormalProjectile; + temp->attackAttr[i]=CPlayer::NormalProjectile; else if( tok.CheckToken("SA") ) - temp->attackAttr2=CPlayer::SpecialAttack; + temp->attackAttr[i]=CPlayer::SpecialAttack; else if( tok.CheckToken("ST") ) - temp->attackAttr2=CPlayer::SpecialThrow; + temp->attackAttr[i]=CPlayer::SpecialThrow; else if( tok.CheckToken("SP") ) - temp->attackAttr2=CPlayer::SpecialProjectile; + temp->attackAttr[i]=CPlayer::SpecialProjectile; else if( tok.CheckToken("HA") ) - temp->attackAttr2=CPlayer::HyperAttack; + temp->attackAttr[i]=CPlayer::HyperAttack; else if( tok.CheckToken("HT") ) - temp->attackAttr2=CPlayer::HyperThrow; + temp->attackAttr[i]=CPlayer::HyperThrow; else if( tok.CheckToken("HP") ) - temp->attackAttr2=CPlayer::HyperProjectile; + temp->attackAttr[i]=CPlayer::HyperProjectile; else Error("worng attr parameter in HitBy controller"); + + i++; - } - - //Attribute3 - if( tok.CheckToken(",") ) - { - if( tok.CheckToken("NA") ) - temp->attackAttr3=CPlayer::NormalAttack; - else if( tok.CheckToken("NT") ) - temp->attackAttr3=CPlayer::NormalThrow; - else if( tok.CheckToken("NP") ) - temp->attackAttr3=CPlayer::NormalProjectile; - else if( tok.CheckToken("SA") ) - temp->attackAttr3=CPlayer::SpecialAttack; - else if( tok.CheckToken("ST") ) - temp->attackAttr3=CPlayer::SpecialThrow; - else if( tok.CheckToken("SP") ) - temp->attackAttr3=CPlayer::SpecialProjectile; - else if( tok.CheckToken("HA") ) - temp->attackAttr3=CPlayer::HyperAttack; - else if( tok.CheckToken("HT") ) - temp->attackAttr3=CPlayer::HyperThrow; - else if( tok.CheckToken("HP") ) - temp->attackAttr3=CPlayer::HyperProjectile; - else - Error("worng attr parameter in HitBy controller"); - } + }while( tok.CheckToken(",") ); } @@ -3309,7 +3235,7 @@ void CStateParser::ParseHitBy() temp->time = GenerateInstruction(); }else - Error("Unknown token \"%s\" in HitBy controller",tok.GetToken()); + Error("Unknown token \"%s\" inHitBy controller",tok.GetToken()); } @@ -3317,9 +3243,22 @@ void CStateParser::ParseNotHitBy() { HITBY *temp = (HITBY*)StateManager->GetController(); - + bool bValue = false; + if( tok.CheckToken("value") ) { + bValue = true; + temp->slot = 1; + } + + if( tok.CheckToken("value2" ) ) + { + bValue = true; + temp->slot = 2; + } + + if( bValue ) + { if( !tok.CheckToken("=") ) Error("missing \"=\" "); @@ -3338,18 +3277,21 @@ void CStateParser::ParseNotHitBy() if(strAttr[i] >= 97) strAttr[i]-=32; + if( i > 2 ) + break; + switch(strAttr[i]) { case 'S': - nAttrFlag += stand; + temp->attackType[i] = stand; break; case 'C': - nAttrFlag += crouch; + temp->attackType[i] = crouch; break; case 'A': - nAttrFlag += air; + temp->attackType[i] = air; break; } @@ -3357,184 +3299,68 @@ void CStateParser::ParseNotHitBy() } - temp->attackType = nAttrFlag; - //Attribute1 - if( tok.CheckToken(",") ) - { - if( tok.CheckToken("NA") ) - temp->attackAttr1=CPlayer::NormalAttack; - else if( tok.CheckToken("NT") ) - temp->attackAttr1=CPlayer::NormalThrow; - else if( tok.CheckToken("NP") ) - temp->attackAttr1=CPlayer::NormalProjectile; - else if( tok.CheckToken("SA") ) - temp->attackAttr1=CPlayer::SpecialAttack; - else if( tok.CheckToken("ST") ) - temp->attackAttr1=CPlayer::SpecialThrow; - else if( tok.CheckToken("SP") ) - temp->attackAttr1=CPlayer::SpecialProjectile; - else if( tok.CheckToken("HA") ) - temp->attackAttr1=CPlayer::HyperAttack; - else if( tok.CheckToken("HT") ) - temp->attackAttr1=CPlayer::HyperThrow; - else if( tok.CheckToken("HP") ) - temp->attackAttr1=CPlayer::HyperProjectile; - else if( tok.CheckToken("AP") ) - PrintMessage("AP param in nothitby controller"); - else if( tok.CheckToken("AT") ) - PrintMessage("AT param in nothitby controller"); - else - Error("worng attr parameter in HitBy controller"); - - } - //Attribute2 - if( tok.CheckToken(",") ) + + i=0; + + while( tok.CheckToken(",") ) { if( tok.CheckToken("NA") ) - temp->attackAttr2=CPlayer::NormalAttack; + temp->attackAttr[i]=CPlayer::NormalAttack; else if( tok.CheckToken("NT") ) - temp->attackAttr2=CPlayer::NormalThrow; + temp->attackAttr[i]=CPlayer::NormalThrow; else if( tok.CheckToken("NP") ) - temp->attackAttr2=CPlayer::NormalProjectile; + temp->attackAttr[i]=CPlayer::NormalProjectile; else if( tok.CheckToken("SA") ) - temp->attackAttr2=CPlayer::SpecialAttack; + temp->attackAttr[i]=CPlayer::SpecialAttack; else if( tok.CheckToken("ST") ) - temp->attackAttr2=CPlayer::SpecialThrow; + temp->attackAttr[i]=CPlayer::SpecialThrow; else if( tok.CheckToken("SP") ) - temp->attackAttr2=CPlayer::SpecialProjectile; + temp->attackAttr[i]=CPlayer::SpecialProjectile; else if( tok.CheckToken("HA") ) - temp->attackAttr2=CPlayer::HyperAttack; + temp->attackAttr[i]=CPlayer::HyperAttack; else if( tok.CheckToken("HT") ) - temp->attackAttr2=CPlayer::HyperThrow; + temp->attackAttr[i]=CPlayer::HyperThrow; else if( tok.CheckToken("HP") ) - temp->attackAttr2=CPlayer::HyperProjectile; - else if( tok.CheckToken("AP") ) - PrintMessage("AP param in nothitby controller"); - else if( tok.CheckToken("AT") ) - PrintMessage("AT param in nothitby controller"); + temp->attackAttr[i]=CPlayer::HyperProjectile; else - Error("worng attr parameter in HitBy controller"); + Error("worng attr parameter in NotHitBy controller"); + + i++; } - - //Attribute3 - if( tok.CheckToken(",") ) - { - if( tok.CheckToken("NA") ) - temp->attackAttr3=CPlayer::NormalAttack; - else if( tok.CheckToken("NT") ) - temp->attackAttr3=CPlayer::NormalThrow; - else if( tok.CheckToken("NP") ) - temp->attackAttr3=CPlayer::NormalProjectile; - else if( tok.CheckToken("SA") ) - temp->attackAttr3=CPlayer::SpecialAttack; - else if( tok.CheckToken("ST") ) - temp->attackAttr3=CPlayer::SpecialThrow; - else if( tok.CheckToken("SP") ) - temp->attackAttr3=CPlayer::SpecialProjectile; - else if( tok.CheckToken("HA") ) - temp->attackAttr3=CPlayer::HyperAttack; - else if( tok.CheckToken("HT") ) - temp->attackAttr3=CPlayer::HyperThrow; - else if( tok.CheckToken("HP") ) - temp->attackAttr3=CPlayer::HyperProjectile; - else if( tok.CheckToken("AP") ) - PrintMessage("AP param in nothitby controller"); - else if( tok.CheckToken("AT") ) - PrintMessage("AT param in nothitby controller"); - else - Error("worng attr parameter in HitBy controller"); - - } }else { - //Attribute1 - if( tok.CheckToken("NA") ) - temp->attackAttr1=CPlayer::NormalAttack; - else if( tok.CheckToken("NT") ) - temp->attackAttr1=CPlayer::NormalThrow; - else if( tok.CheckToken("NP") ) - temp->attackAttr1=CPlayer::NormalProjectile; - else if( tok.CheckToken("SA") ) - temp->attackAttr1=CPlayer::SpecialAttack; - else if( tok.CheckToken("ST") ) - temp->attackAttr1=CPlayer::SpecialThrow; - else if( tok.CheckToken("SP") ) - temp->attackAttr1=CPlayer::SpecialProjectile; - else if( tok.CheckToken("HA") ) - temp->attackAttr1=CPlayer::HyperAttack; - else if( tok.CheckToken("HT") ) - temp->attackAttr1=CPlayer::HyperThrow; - else if( tok.CheckToken("HP") ) - temp->attackAttr1=CPlayer::HyperProjectile; - else if( tok.CheckToken("AP") ) - PrintMessage("AP param in nothitby controller"); - else if( tok.CheckToken("AT") ) - PrintMessage("AT param in nothitby controller"); - else - Error("worng attr parameter in HitBy controller"); - - //Attribute2 - if( tok.CheckToken(",") ) - { + int i=0; + + do + { if( tok.CheckToken("NA") ) - temp->attackAttr2=CPlayer::NormalAttack; + temp->attackAttr[i]=CPlayer::NormalAttack; else if( tok.CheckToken("NT") ) - temp->attackAttr2=CPlayer::NormalThrow; + temp->attackAttr[i]=CPlayer::NormalThrow; else if( tok.CheckToken("NP") ) - temp->attackAttr2=CPlayer::NormalProjectile; + temp->attackAttr[i]=CPlayer::NormalProjectile; else if( tok.CheckToken("SA") ) - temp->attackAttr2=CPlayer::SpecialAttack; + temp->attackAttr[i]=CPlayer::SpecialAttack; else if( tok.CheckToken("ST") ) - temp->attackAttr2=CPlayer::SpecialThrow; + temp->attackAttr[i]=CPlayer::SpecialThrow; else if( tok.CheckToken("SP") ) - temp->attackAttr2=CPlayer::SpecialProjectile; + temp->attackAttr[i]=CPlayer::SpecialProjectile; else if( tok.CheckToken("HA") ) - temp->attackAttr2=CPlayer::HyperAttack; + temp->attackAttr[i]=CPlayer::HyperAttack; else if( tok.CheckToken("HT") ) - temp->attackAttr2=CPlayer::HyperThrow; + temp->attackAttr[i]=CPlayer::HyperThrow; else if( tok.CheckToken("HP") ) - temp->attackAttr2=CPlayer::HyperProjectile; - else if( tok.CheckToken("AP") ) - PrintMessage("AP param in nothitby controller"); - else if( tok.CheckToken("AT") ) - PrintMessage("AT param in nothitby controller"); + temp->attackAttr[i]=CPlayer::HyperProjectile; else - Error("worng attr parameter in HitBy controller"); + Error("worng attr parameter in NotHitBy controller"); + + i++; - } - - //Attribute3 - if( tok.CheckToken(",") ) - { - if( tok.CheckToken("NA") ) - temp->attackAttr3=CPlayer::NormalAttack; - else if( tok.CheckToken("NT") ) - temp->attackAttr3=CPlayer::NormalThrow; - else if( tok.CheckToken("NP") ) - temp->attackAttr3=CPlayer::NormalProjectile; - else if( tok.CheckToken("SA") ) - temp->attackAttr3=CPlayer::SpecialAttack; - else if( tok.CheckToken("ST") ) - temp->attackAttr3=CPlayer::SpecialThrow; - else if( tok.CheckToken("SP") ) - temp->attackAttr3=CPlayer::SpecialProjectile; - else if( tok.CheckToken("HA") ) - temp->attackAttr3=CPlayer::HyperAttack; - else if( tok.CheckToken("HT") ) - temp->attackAttr3=CPlayer::HyperThrow; - else if( tok.CheckToken("HP") ) - temp->attackAttr3=CPlayer::HyperProjectile; - else if( tok.CheckToken("AP") ) - PrintMessage("AP param in nothitby controller"); - else if( tok.CheckToken("AT") ) - PrintMessage("AT param in nothitby controller"); - else - Error("worng attr parameter in HitBy controller"); - } + }while( tok.CheckToken(",") ); } @@ -3546,7 +3372,7 @@ void CStateParser::ParseNotHitBy() temp->time = GenerateInstruction(); }else - Error("Unknown token \"%s\" in HitBy controller",tok.GetToken()); + Error("Unknown token \"%s\" in NotHitBy controller",tok.GetToken()); } Index: StateParser.h =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/StateParser.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- StateParser.h 2 Jul 2005 17:13:05 -0000 1.5 +++ StateParser.h 9 Jul 2005 21:53:14 -0000 1.6 @@ -372,10 +372,9 @@ struct SPRPRIO struct HITBY { - u8 attackType; - u8 attackAttr1; - u8 attackAttr2; - u8 attackAttr3; + int slot; + u8 attackType[3]; + u8 attackAttr[10]; INSTRUCTION *time; }; Index: VM.h =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/VM.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -p -r1.1.1.1 -r1.2 --- VM.h 10 Jun 2005 21:35:21 -0000 1.1.1.1 +++ VM.h 9 Jul 2005 21:53:14 -0000 1.2 @@ -31,6 +31,7 @@ class CVirtualMachine CPlayer *m_pPlayer1,*m_pPlayer2; CPlayer *m_CurrentPlayer,*root,*parent; CEngine *m_pEngine; +bool bSfalse; public: CVirtualMachine(); ~CVirtualMachine(); Index: VideoSystem.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/VideoSystem.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -p -r1.9 -r1.10 --- VideoSystem.cpp 6 Jul 2005 19:01:25 -0000 1.9 +++ VideoSystem.cpp 9 Jul 2005 21:53:14 -0000 1.10 @@ -57,7 +57,7 @@ bool CVideoSystem::InitSystem() { PrintMessage("CVideoSystem::InitSystem()"); //Set Video mode and get main Surface - screen=SDL_SetVideoMode(640,480,16,SDL_HWSURFACE/*|SDL_DOUBLEBUF*/); + screen=SDL_SetVideoMode(640,480,16,SDL_HWSURFACE/*|SDL_FULLSCREEN/*|SDL_DOUBLEBUF*/); //Check the surface for validate if(screen==NULL) { @@ -106,7 +106,7 @@ void CVideoSystem::Draw() DrawAllImages(); nowTime=SDL_GetTicks(); - if(nowTime > lastTime+500) + if(nowTime > lastTime+250) { nFps=(float)nFpsCount*1000 / (nowTime-lastTime); nFpsCount=0; @@ -118,7 +118,7 @@ void CVideoSystem::Draw() //SDL_BlitSurface(work,NULL,screen,NULL); //scale2x(work,screen); - FilterImage(); + FilterImage(); //SDL_UpdateRect(screen,0,0,640,480); SDL_Flip(screen); |