|
From: SakirSoft <sak...@us...> - 2005-07-11 16:12:25
|
Update of /cvsroot/openmugen/OpenMugen/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30201 Modified Files: ControllerExecuter.cpp GameObjects.cpp Makefile.win OpenMugen.dev OpenMugen.layout SffManager.cpp SffManager.h VideoSystem.cpp global.cpp player.cpp player.h Log Message: no message Index: ControllerExecuter.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/ControllerExecuter.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -p -r1.11 -r1.12 --- ControllerExecuter.cpp 9 Jul 2005 21:53:14 -0000 1.11 +++ ControllerExecuter.cpp 11 Jul 2005 16:12:14 -0000 1.12 @@ -455,7 +455,11 @@ void CControllerExecuter::BGPalFX() void CControllerExecuter::PosFreez() { POSFREEZ *temp = (POSFREEZ*)lpController; - PrintMessage("TODO: implement PosFreez controller"); + + bool bFreez = m_pVM->Execute( temp->value ) > 0; + m_CurrentPlayer->SetPosFreez( bFreez ); + + // PrintMessage("TODO: implement PosFreez controller"); } @@ -505,13 +509,66 @@ void CControllerExecuter::TargetBind() } } - PrintMessage("Test: implement TargetBind controller"); + // PrintMessage("Test: implement TargetBind controller"); } void CControllerExecuter::TargetFacing() { TARGETFACING *temp = (TARGETFACING*)lpController; - PrintMessage("TODO: implement TargetFacing controller"); + s16 nTargetId = m_pVM->Execute(temp->id,-1); + int facing = m_pVM->Execute(temp->value,-1); + + if( nTargetId == -1 ) + { + int nHowManyTargtes = 0; + CPlayer **list = m_CurrentPlayer->GetAllTargets(nHowManyTargtes); + + for( int i = 0;i < nHowManyTargtes;i++) + { + if( facing == 1 ) + { + if( m_CurrentPlayer->GetRightFaced() ) + list[i]->FaceRight(); + else + list[i]->FaceLeft(); + + }else + { + if( !m_CurrentPlayer->GetRightFaced() ) + list[i]->FaceRight(); + else + list[i]->FaceLeft(); + + } + + } + + }else + { + CPlayer *target = m_CurrentPlayer->GetTargetById(nTargetId); + + if( target ) + { + if( facing == 1 ) + { + if( m_CurrentPlayer->GetRightFaced() ) + target->FaceRight(); + else + target->FaceLeft(); + + }else + { + if( !m_CurrentPlayer->GetRightFaced() ) + target->FaceRight(); + else + target->FaceLeft(); + + } + + } + } + + // PrintMessage("Test: implement TargetFacing controller"); } void CControllerExecuter::TargetLifeAdd() @@ -548,7 +605,7 @@ void CControllerExecuter::TargetState() } - PrintMessage("TODO: implement TargetState controller"); + // PrintMessage("TODO: implement TargetState controller"); } @@ -622,6 +679,8 @@ void CControllerExecuter::SuperPause() mugen->GetEngine()->AddObject( pause ); + m_CurrentPlayer->GetSff()->SetSprPrior(6); + PrintMessage("Test SuperPause :TODO Add unhitable, poweradd,p2defmul"); } @@ -880,8 +939,8 @@ void CControllerExecuter::VarSet() void CControllerExecuter::Turn() { - PrintMessage("TODO: turn"); - + PrintMessage("Turn"); + m_CurrentPlayer->TurnPlayer(); } void CControllerExecuter::ScreenBound() Index: GameObjects.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/GameObjects.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -p -r1.6 -r1.7 --- GameObjects.cpp 9 Jul 2005 21:51:08 -0000 1.6 +++ GameObjects.cpp 11 Jul 2005 16:12:15 -0000 1.7 @@ -375,8 +375,7 @@ CSuperPause::~CSuperPause() void CSuperPause::Think() { - if( !bPause ) - UpDateState(); + UpDateState(); } bool CSuperPause::isValid() @@ -413,14 +412,19 @@ void CSuperPause::UpDateState() if( object->GetType() != CBaseObject::PauseObject ) object->Pause(false); } + + return; } //darken the screen if( bDarken ) - mugen->GetVideo()->AddRect(0,0,319,239,0,0,0,128,6,CVideoSystem::RECT_FILLED); + mugen->GetVideo()->AddRect(0,0,319,239,0,0,0,128,5,CVideoSystem::RECT_FILLED); + + if( bPause ) + return; //the pause begins after nMoveTime is 0 if( nTime > 0 && nMoveTime == 0) Index: Makefile.win =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/Makefile.win,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -p -r1.9 -r1.10 --- Makefile.win 6 Jul 2005 19:01:25 -0000 1.9 +++ Makefile.win 11 Jul 2005 16:12:15 -0000 1.10 @@ -1,18 +1,18 @@ # Project: OpenMugen # Makefile created by Dev-C++ 4.9.9.2 -CPP = g++.exe -D__DEBUG__ -CC = gcc.exe -D__DEBUG__ +CPP = g++.exe +CC = gcc.exe WINDRES = windres.exe RES = OBJ = ../OBJ/main.o ../OBJ/game.o ../OBJ/global.o ../OBJ/SDLManager.o ../OBJ/VideoSystem.o ../OBJ/scale2xSDL.o ../OBJ/SDL_framerate.o ../OBJ/scale2x.o ../OBJ/MemManager.o ../OBJ/SffManager.o ../OBJ/player.o ../OBJ/Stack.o ../OBJ/VM.o ../OBJ/StateManager.o ../OBJ/AirManager.o ../OBJ/engine.o ../OBJ/ControllerExecuter.o ../OBJ/tokenizer.o ../OBJ/StateParser.o ../OBJ/CmdManager.o ../OBJ/assert.o ../OBJ/Input.o ../OBJ/SoundSystem.o ../OBJ/GameObjects.o $(RES) LINKOBJ = ../OBJ/main.o ../OBJ/game.o ../OBJ/global.o ../OBJ/SDLManager.o ../OBJ/VideoSystem.o ../OBJ/scale2xSDL.o ../OBJ/SDL_framerate.o ../OBJ/scale2x.o ../OBJ/MemManager.o ../OBJ/SffManager.o ../OBJ/player.o ../OBJ/Stack.o ../OBJ/VM.o ../OBJ/StateManager.o ../OBJ/AirManager.o ../OBJ/engine.o ../OBJ/ControllerExecuter.o ../OBJ/tokenizer.o ../OBJ/StateParser.o ../OBJ/CmdManager.o ../OBJ/assert.o ../OBJ/Input.o ../OBJ/SoundSystem.o ../OBJ/GameObjects.o $(RES) -LIBS = -L"D:/Development/tools/Dev-Cpp/lib" -lmingw32 -lSDLmain -lSDL -lSGE -lSDL_Image -lSDL_mixer -lSDL_image -g3 +LIBS = -L"D:/Development/tools/Dev-Cpp/lib" -lmingw32 -lSDLmain -lSDL -lSGE -lSDL_Image -lSDL_mixer -lSDL_image -march=pentium4 -msse2 INCS = -I"D:/Development/tools/Dev-Cpp/include" CXXINCS = -I"D:/Development/tools/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"D:/Development/tools/Dev-Cpp/include/c++/3.4.2/backward" -I"D:/Development/tools/Dev-Cpp/include/c++/3.4.2/mingw32" -I"D:/Development/tools/Dev-Cpp/include/c++/3.4.2" -I"D:/Development/tools/Dev-Cpp/include" BIN = ../BIN/OpenMugen.exe -CXXFLAGS = $(CXXINCS) -I"D:\Development\tools\Dev-Cpp\\include\SDL" -I"D:\Development\tools\Dev-Cpp\\include\SGE" -Dmain=SDL_main -D_WIN32 -D_DEBUG -g3 -CFLAGS = $(INCS) -Dmain=SDL_main -g3 +CXXFLAGS = $(CXXINCS) -I"D:\Development\tools\Dev-Cpp\\include\SDL" -I"D:\Development\tools\Dev-Cpp\\include\SGE" -Dmain=SDL_main -D_WIN32 -D_DEBUG -march=pentium4 -msse2 +CFLAGS = $(INCS) -Dmain=SDL_main -march=pentium4 -msse2 RM = rm -f .PHONY: all all-before all-after clean clean-custom Index: OpenMugen.dev =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/OpenMugen.dev,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -p -r1.9 -r1.10 --- OpenMugen.dev 6 Jul 2005 19:01:25 -0000 1.9 +++ OpenMugen.dev 11 Jul 2005 16:12:15 -0000 1.10 @@ -27,7 +27,7 @@ CustomMakefile= IncludeVersionInfo=0 SupportXPThemes=0 CompilerSet=0 -CompilerSettings=0000000000000001000000 +CompilerSettings=00000000000000000000ib [Unit1] FileName=main.cpp Index: OpenMugen.layout =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/OpenMugen.layout,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -p -r1.15 -r1.16 --- OpenMugen.layout 9 Jul 2005 21:53:14 -0000 1.15 +++ OpenMugen.layout 11 Jul 2005 16:12:15 -0000 1.16 @@ -6,21 +6,21 @@ LeftChar=1 Open=0 Top=0 [Editors] -Focused=48 -Order=23,24,33,20,48 +Focused=33 +Order=23,24,33,20,48,19,18,17,28,27,7,0,37,36,1,4,47,8,46 [Editor_0] -Open=0 +Open=1 Top=0 CursorCol=1 CursorRow=1 TopLine=1 LeftChar=1 [Editor_1] -Open=0 +Open=1 Top=0 CursorCol=32 CursorRow=79 -TopLine=40 +TopLine=39 LeftChar=1 [Editor_2] Open=0 @@ -37,11 +37,11 @@ CursorRow=57 TopLine=31 LeftChar=1 [Editor_4] -Open=0 +Open=1 Top=0 -CursorCol=2 -CursorRow=706 -TopLine=666 +CursorCol=22 +CursorRow=23 +TopLine=1 LeftChar=1 [Editor_5] Open=0 @@ -58,18 +58,18 @@ CursorRow=27 TopLine=13 LeftChar=1 [Editor_7] -Open=0 +Open=1 Top=0 -CursorCol=8 -CursorRow=297 -TopLine=286 +CursorCol=1 +CursorRow=312 +TopLine=275 LeftChar=1 [Editor_8] -Open=0 +Open=1 Top=0 -CursorCol=29 +CursorCol=35 CursorRow=99 -TopLine=78 +TopLine=60 LeftChar=1 [Editor_9] Open=0 @@ -121,32 +121,32 @@ CursorRow=184 TopLine=147 LeftChar=1 [Editor_17] -Open=0 +Open=1 Top=0 -CursorCol=71 -CursorRow=159 -TopLine=124 +CursorCol=3 +CursorRow=118 +TopLine=97 LeftChar=1 [Editor_18] -Open=0 +Open=1 Top=0 -CursorCol=76 -CursorRow=221 -TopLine=202 +CursorCol=30 +CursorRow=73 +TopLine=156 LeftChar=1 [Editor_19] -Open=0 +Open=1 Top=0 -CursorCol=1 -CursorRow=437 -TopLine=411 +CursorCol=35 +CursorRow=286 +TopLine=254 LeftChar=1 [Editor_20] Open=1 Top=0 -CursorCol=16 -CursorRow=827 -TopLine=803 +CursorCol=29 +CursorRow=220 +TopLine=192 LeftChar=1 [Editor_21] Open=0 @@ -191,17 +191,17 @@ CursorRow=372 TopLine=1 LeftChar=1 [Editor_27] -Open=0 +Open=1 Top=0 CursorCol=41 CursorRow=308 TopLine=304 LeftChar=1 [Editor_28] -Open=0 +Open=1 Top=0 -CursorCol=2 -CursorRow=28 +CursorCol=15 +CursorRow=56 TopLine=28 LeftChar=1 [Editor_29] @@ -234,10 +234,10 @@ TopLine=16 LeftChar=1 [Editor_33] Open=1 -Top=0 -CursorCol=58 -CursorRow=508 -TopLine=489 +Top=1 +CursorCol=25 +CursorRow=487 +TopLine=449 LeftChar=1 [Editor_34] Open=0 @@ -254,18 +254,18 @@ CursorRow=429 TopLine=414 LeftChar=1 [Editor_36] -Open=0 +Open=1 Top=0 -CursorCol=30 -CursorRow=363 -TopLine=352 +CursorCol=2 +CursorRow=374 +TopLine=364 LeftChar=1 [Editor_37] -Open=0 +Open=1 Top=0 CursorCol=15 CursorRow=1434 -TopLine=1411 +TopLine=1417 LeftChar=1 [Editor_38] Open=0 @@ -324,25 +324,25 @@ CursorRow=87 TopLine=46 LeftChar=1 [Editor_46] -Open=0 +Open=1 Top=0 -CursorCol=2 -CursorRow=30 -TopLine=103 +CursorCol=21 +CursorRow=114 +TopLine=109 LeftChar=1 [Editor_47] -Open=0 +Open=1 Top=0 -CursorCol=18 -CursorRow=225 -TopLine=202 +CursorCol=28 +CursorRow=43 +TopLine=11 LeftChar=1 [Editor_48] Open=1 -Top=1 -CursorCol=21 -CursorRow=224 -TopLine=193 +Top=0 +CursorCol=11 +CursorRow=416 +TopLine=382 LeftChar=1 [Editor_49] Open=0 Index: SffManager.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/SffManager.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -p -r1.9 -r1.10 --- SffManager.cpp 9 Jul 2005 21:50:19 -0000 1.9 +++ SffManager.cpp 11 Jul 2005 16:12:15 -0000 1.10 @@ -23,8 +23,7 @@ before the LoadSffFile CSffManager::CSffManager() { - xScaleValue=1.0; - yScaleValue=1.0; + lpSffPool=0; bSuperClass = true; bSharedPal = false; @@ -51,8 +50,6 @@ CSffManager::CSffManager(CSffManager *pS lpSffPool = pSuperClass->GetSffPool(); nSprPrior = 5; m_pAirManger = pSuperClass->GetAirManager(); - xScaleValue=1.0; - yScaleValue=1.0; bSharedPal = pSuperClass->IsSharedPal(); ColorPallet = pSuperClass->GetPal(); nFlags=CVideoSystem::BLT_NORMAL; @@ -240,7 +237,16 @@ void CSffManager::PrepareAnim2(s32 nAnim void CSffManager::BlitAnim(s16 x, s16 y,float x_scale,float y_scale) { if(Anim==0) - return; + return; + + u32 saveFlags = nFlags; + + if( ( saveFlags & CVideoSystem::BLT_FLIPH ) && ( Anim->AnimationElement[nCurrentImage].FlipFlags == HFLIPFLAG ) ) + nFlags = CVideoSystem::BLT_NORMAL | CVideoSystem::BLT_MASKED; + + if( ( saveFlags & CVideoSystem::BLT_NORMAL ) && ( Anim->AnimationElement[nCurrentImage].FlipFlags == HFLIPFLAG ) ) + nFlags = CVideoSystem::BLT_FLIPH | CVideoSystem::BLT_MASKED; + if( nFlags & CVideoSystem::BLT_FLIPH ) x -= Anim->AnimationElement[nCurrentImage].x; @@ -254,6 +260,8 @@ void CSffManager::BlitAnim(s16 x, s16 y, Anim->AnimationElement[nCurrentImage].nImageNumber, x,y,x_scale,y_scale); + nFlags = saveFlags; + if( bPause ) { return; Index: SffManager.h =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/SffManager.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -p -r1.8 -r1.9 --- SffManager.h 9 Jul 2005 21:50:19 -0000 1.8 +++ SffManager.h 11 Jul 2005 16:12:15 -0000 1.9 @@ -114,9 +114,8 @@ private: int nSprPrior; int FindSprite(s16 nGroupNumber,s16 nImageNumber); void DecodeSffFile(); - float xScaleValue,yScaleValue; //hold the current Animation - ActionElement *Anim; + ActionElement *Anim; public: CSffManager(); Index: VideoSystem.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/VideoSystem.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -p -r1.10 -r1.11 --- VideoSystem.cpp 9 Jul 2005 21:53:14 -0000 1.10 +++ VideoSystem.cpp 11 Jul 2005 16:12:15 -0000 1.11 @@ -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_FULLSCREEN/*|SDL_DOUBLEBUF*/); + screen=SDL_SetVideoMode(640,480,16,SDL_HWSURFACE/*|SDL_FULLSCREEN|*/|SDL_DOUBLEBUF); //Check the surface for validate if(screen==NULL) { @@ -116,9 +116,10 @@ void CVideoSystem::Draw() DrawText(265,10,"%2.2f FPS",nFps); - //SDL_BlitSurface(work,NULL,screen,NULL); + // SDL_BlitSurface(work,NULL,screen,NULL); //scale2x(work,screen); FilterImage(); + //SDL_SoftStretch(work,0,screen,0); //SDL_UpdateRect(screen,0,0,640,480); SDL_Flip(screen); Index: global.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/global.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- global.cpp 2 Jul 2005 17:13:05 -0000 1.2 +++ global.cpp 11 Jul 2005 16:12:15 -0000 1.3 @@ -12,7 +12,7 @@ void PrintMessage(char *str,...) vsprintf(string, str, ap); // Converts Symbols To Actual Numbers va_end(ap); -#ifdef _XBOX +/*#ifdef _XBOX pLogFile=fopen("d:\\log.txt","a+"); #else pLogFile=fopen("log.txt","a+"); @@ -20,7 +20,7 @@ void PrintMessage(char *str,...) fprintf(pLogFile,string); fprintf(pLogFile,"\n"); - fclose(pLogFile); + fclose(pLogFile);*/ printf(string); Index: player.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/player.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -p -r1.12 -r1.13 --- player.cpp 9 Jul 2005 21:51:41 -0000 1.12 +++ player.cpp 11 Jul 2005 16:12:15 -0000 1.13 @@ -38,6 +38,8 @@ CPlayer::CPlayer() bHitDef=false; bPause=false; bHitTarget = false; + bPosFreez = false; + bPhysicsUpdated = false; nLife=1000; nPower=2000; nStateTime=0; @@ -212,6 +214,10 @@ Handles the players Physic void CPlayer::HandlePhysic() { + if ( bPosFreez || bPhysicsUpdated) + return; + + bPhysicsUpdated = true; if(bRightFaced) x+=xVel; @@ -628,6 +634,7 @@ void CPlayer::HandleHit(CPlayer *opponen opponent->SetupGetHit(); + if( myGetHitVar.p1StateNo != -1 ) ChangeState( myGetHitVar.p1StateNo ); @@ -804,10 +811,7 @@ void CPlayer::HandlePushBehavior(CPlayer if( (nDistanceX < 0) && ( y == nGround ) && (nCurrAnimNumber != 5 ) && (nCurrStateNumber == 0) ) { - if(GetRightFaced()) - FaceLeft(); - else - FaceRight(); + TurnPlayer(); ChangeAnim(5); } @@ -860,7 +864,7 @@ void CPlayer::CheckGlobalStatus() bHitTarget = false; - HandlePhysic(); + UpDateFacing(); for( BI i = ObjList->begin(); i != ObjList->end(); ++i) @@ -876,6 +880,7 @@ void CPlayer::CheckGlobalStatus() m_pVMachine->SetPlayers(this,opponent); m_pControllerExec->SetPlayer(this,opponent); HandleFSM(); + HandlePhysic(); HandlePushBehavior(opponent); HandleHitDef(opponent); HandleGetHitState(); @@ -952,6 +957,8 @@ void CPlayer::ResetFlags() bChangeState=false; bWalk=true; bAutoTurn=true; + bPosFreez = false; + bPhysicsUpdated = false; } // debug info of the player @@ -1023,6 +1030,16 @@ void CPlayer::ShowClsn() } +void CPlayer::TurnPlayer() +{ + if(GetRightFaced()) + FaceLeft(); + else + FaceRight(); + + UpDateFacing(); +} + //Resets the player after a match void CPlayer::ResetPlayer() { @@ -1169,7 +1186,7 @@ void CPlayer::DrawPlayer() //draw debug info if(bDebugInfo) - Debug(); + Debug(); } /* ================================================================================ Index: player.h =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/player.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -p -r1.9 -r1.10 --- player.h 9 Jul 2005 21:51:41 -0000 1.9 +++ player.h 11 Jul 2005 16:12:15 -0000 1.10 @@ -282,6 +282,8 @@ bool inputs[ GAME_INPUT_CO //this are some special flags of the player they will be restet after a tick to true bool bAutoTurn; bool bWalk; +bool bPosFreez; +bool bPhysicsUpdated; char strCommand[255]; PLSTATEDEF *lpCurrStatedef; //ints are floats !!!!!!! @@ -441,8 +443,10 @@ enum HitPrior void SetSysFloatVar(int index,float value); void PlaySnd(s32 nGpr,s32 nItem,bool bLooped=false,u8 nLeftPan=255,u8 nRightPan=255); void SetAttackDist(float dist); + void SetPosFreez( bool freez ) { bPosFreez = freez; } void RestoreState() {m_pStateManager = m_OrginStateManager; } void SetAttacker(CPlayer *attacker) {AttackerPlayer = attacker; } + void TurnPlayer(); //trigger functions char *GetCommand(); |