reset recording
This commit is contained in:
parent
bcf3b9be14
commit
07df6a630a
|
@ -877,17 +877,10 @@ void NDS_Reset()
|
|||
FILE* inf = 0;
|
||||
NDS_header * header = NDS_getROMHeader();
|
||||
|
||||
if(!_HACK_DONT_STOPMOVIE)
|
||||
FCEUI_StopMovie();
|
||||
|
||||
if (!header) return ;
|
||||
|
||||
lagframecounter=0;
|
||||
LagFrameFlag=0;
|
||||
lastLag=0;
|
||||
TotalLagFrames=0;
|
||||
|
||||
currFrameCounter=0;
|
||||
if(movieMode != MOVIEMODE_INACTIVE && !_HACK_DONT_STOPMOVIE)
|
||||
movie_reset_command = true;
|
||||
|
||||
MMU_clearMem();
|
||||
MMU_new.backupDevice.reset();
|
||||
|
@ -2502,9 +2495,10 @@ void NDS_setPadFromMovie(u16 pad)
|
|||
FIX(pad,2),
|
||||
FIX(pad,1),
|
||||
FIX(pad,0),
|
||||
FIX(pad,13)
|
||||
movie_lid
|
||||
);
|
||||
#undef FIX
|
||||
|
||||
}
|
||||
|
||||
turbo Turbo;
|
||||
|
@ -2650,6 +2644,8 @@ void NDS_setPad(bool R,bool L,bool D,bool U,bool T,bool S,bool B,bool A,bool Y,b
|
|||
g = FIX(G);
|
||||
f = FIX(F);
|
||||
|
||||
if(f) movie_lid=true;
|
||||
else movie_lid=false;
|
||||
|
||||
nds.pad =
|
||||
(FIX(r)<<12)|
|
||||
|
|
|
@ -58,7 +58,8 @@ char curMovieFilename[512] = {0};
|
|||
MovieData currMovieData;
|
||||
int currRerecordCount;
|
||||
bool ShowInputDisplay = false;
|
||||
|
||||
bool movie_reset_command = false;
|
||||
bool movie_lid = false;
|
||||
//--------------
|
||||
|
||||
|
||||
|
@ -441,16 +442,18 @@ void _CDECL_ FCEUI_LoadMovie(const char *fname, bool _read_only, bool tasedit, i
|
|||
//fully reload the game to reinitialize everything before playing any movie
|
||||
//poweron(true);
|
||||
|
||||
extern bool _HACK_DONT_STOPMOVIE;
|
||||
_HACK_DONT_STOPMOVIE = true;
|
||||
NDS_Reset();
|
||||
_HACK_DONT_STOPMOVIE = false;
|
||||
|
||||
////WE NEED TO LOAD A SAVESTATE
|
||||
//if(currMovieData.savestate.size() != 0)
|
||||
//{
|
||||
// bool success = MovieData::loadSavestateFrom(&currMovieData.savestate);
|
||||
// if(!success) return;
|
||||
//}
|
||||
lagframecounter=0;
|
||||
LagFrameFlag=0;
|
||||
lastLag=0;
|
||||
TotalLagFrames=0;
|
||||
|
||||
currFrameCounter = 0;
|
||||
pauseframe = _pauseframe;
|
||||
|
@ -552,10 +555,7 @@ void _CDECL_ FCEUI_SaveMovie(const char *fname, std::wstring author, int flag, s
|
|||
currMovieData.romSerial = gameInfo.ROMserial;
|
||||
currMovieData.romFilename = GetRomName();
|
||||
|
||||
extern bool _HACK_DONT_STOPMOVIE;
|
||||
_HACK_DONT_STOPMOVIE = true;
|
||||
NDS_Reset();
|
||||
_HACK_DONT_STOPMOVIE = false;
|
||||
|
||||
//todo ?
|
||||
//poweron(true);
|
||||
|
@ -568,6 +568,12 @@ void _CDECL_ FCEUI_SaveMovie(const char *fname, std::wstring author, int flag, s
|
|||
//we are going to go ahead and dump the header. from now on we will only be appending frames
|
||||
currMovieData.dump(osRecordingMovie, false);
|
||||
|
||||
currFrameCounter=0;
|
||||
lagframecounter=0;
|
||||
LagFrameFlag=0;
|
||||
lastLag=0;
|
||||
TotalLagFrames=0;
|
||||
|
||||
movieMode = MOVIEMODE_RECORD;
|
||||
movie_readonly = false;
|
||||
currRerecordCount = 0;
|
||||
|
@ -622,19 +628,13 @@ void _CDECL_ FCEUI_SaveMovie(const char *fname, std::wstring author, int flag, s
|
|||
{
|
||||
MovieRecord* mr = &currMovieData.records[currFrameCounter];
|
||||
|
||||
//reset if necessary
|
||||
if(mr->command_reset())
|
||||
{}
|
||||
//ResetNES();
|
||||
if(mr->command_microphone())
|
||||
MicButtonPressed=1;
|
||||
else
|
||||
MicButtonPressed=0;
|
||||
if(mr->command_microphone()) MicButtonPressed=1;
|
||||
else MicButtonPressed=0;
|
||||
|
||||
if(mr->command_lid())
|
||||
mr->pad |= (1 << 0);
|
||||
else
|
||||
mr->pad |= (0 << 0);
|
||||
if(mr->command_reset()) NDS_Reset();
|
||||
|
||||
if(mr->command_lid()) movie_lid = true;
|
||||
else movie_lid = false;
|
||||
|
||||
NDS_setPadFromMovie(mr->pad);
|
||||
NDS_setTouchFromMovie();
|
||||
|
@ -666,10 +666,18 @@ void _CDECL_ FCEUI_SaveMovie(const char *fname, std::wstring author, int flag, s
|
|||
|
||||
if(MicButtonPressed == 1)
|
||||
mr.commands=1;
|
||||
|
||||
mr.pad = nds.pad;
|
||||
|
||||
if((nds.pad & (1<<0)) == 1)
|
||||
if(movie_lid) {
|
||||
mr.commands=4;
|
||||
movie_lid = false;
|
||||
}
|
||||
|
||||
if(movie_reset_command) {
|
||||
mr.commands=2;
|
||||
movie_reset_command = false;
|
||||
}
|
||||
|
||||
if(nds.isTouch) {
|
||||
mr.touch.x = nds.touchX >> 4;
|
||||
|
|
|
@ -34,7 +34,7 @@ enum EMOVIEMODE
|
|||
|
||||
enum EMOVIECMD
|
||||
{
|
||||
MOVIECMD_RESET = 1,
|
||||
MOVIECMD_RESET = 2,
|
||||
};
|
||||
|
||||
//RLDUTSBAYXWEG
|
||||
|
@ -188,6 +188,9 @@ extern int currFrameCounter;
|
|||
extern EMOVIEMODE movieMode; //adelikat: main needs this for frame counter display
|
||||
extern MovieData currMovieData; //adelikat: main needs this for frame counter display
|
||||
|
||||
extern bool movie_reset_command;
|
||||
extern bool movie_lid;
|
||||
|
||||
bool FCEUI_MovieGetInfo(std::istream* fp, MOVIE_INFO& info, bool skipFrameCount);
|
||||
void _CDECL_ FCEUI_SaveMovie(const char *fname, std::wstring author, int flag, std::string sramfname);
|
||||
void _CDECL_ FCEUI_LoadMovie(const char *fname, bool _read_only, bool tasedit, int _pauseframe);
|
||||
|
|
Loading…
Reference in New Issue