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