fix tasedit bugs i just introduced, and add movie exporter

This commit is contained in:
zeromus 2008-05-30 06:01:43 +00:00
parent 2b142ddd71
commit 88669859ff
4 changed files with 17 additions and 12 deletions

View File

@ -717,8 +717,6 @@ doloopy:
FCEU_UpdateBot(); FCEU_UpdateBot();
FCEUI_Emulate(&gfx, &sound, &ssize, 0); //emulate a single frame FCEUI_Emulate(&gfx, &sound, &ssize, 0); //emulate a single frame
currMovieData.TryDumpIncremental();
FCEUD_Update(gfx, sound, ssize); //update displays and debug tools FCEUD_Update(gfx, sound, ssize); //update displays and debug tools
//mbg 6/30/06 - close game if we were commanded to by calls nested in FCEUI_Emulate() //mbg 6/30/06 - close game if we were commanded to by calls nested in FCEUI_Emulate()

View File

@ -192,6 +192,13 @@ static void ColumnSet(int column)
currMovieData.records[*it].setBitValue(0,button,newValue); currMovieData.records[*it].setBitValue(0,button,newValue);
ListView_Update(hwndList,*it); ListView_Update(hwndList,*it);
} }
//reduce the green zone
int firstSelection = *selectionFrames.begin();
currMovieData.greenZoneCount = std::min(firstSelection,currMovieData.greenZoneCount);
//redraw everything to show the reduced green zone
RedrawList();
} }
//The subclass wndproc for the listview header //The subclass wndproc for the listview header
@ -291,6 +298,9 @@ static void Export()
ofn.lpstrInitialDir=FCEU_GetPath(FCEUMKF_MOVIE); ofn.lpstrInitialDir=FCEU_GetPath(FCEUMKF_MOVIE);
if(GetSaveFileName(&ofn)) if(GetSaveFileName(&ofn))
{ {
FILE* outf = fopen(ofn.lpstrFile,"wb");
currMovieData.dump(outf);
fclose(outf);
} }
} }
@ -329,15 +339,10 @@ static void ItemChanged(NMLISTVIEW* info)
} }
else else
{ {
if(ON) { if(ON)
printf("%d ON\n",item);
selectionFrames.insert(item); selectionFrames.insert(item);
}
else if(OFF) else if(OFF)
{
printf("%d OFF\n",item);
selectionFrames.erase(item); selectionFrames.erase(item);
}
} }
} }

View File

@ -558,6 +558,8 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
JustFrameAdvanced = true; JustFrameAdvanced = true;
} }
currMovieData.TryDumpIncremental();
} }
void FCEUI_CloseGame(void) void FCEUI_CloseGame(void)

View File

@ -1252,6 +1252,10 @@
RelativePath="..\src\drivers\win\res\ICON_2.ico" RelativePath="..\src\drivers\win\res\ICON_2.ico"
> >
</File> </File>
<File
RelativePath="..\src\drivers\win\res\te_arrow.bmp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="zlib" Name="zlib"
@ -2284,10 +2288,6 @@
RelativePath="..\src\state.cpp" RelativePath="..\src\state.cpp"
> >
</File> </File>
<File
RelativePath="..\src\drivers\win\res\te_arrow.bmp"
>
</File>
<File <File
RelativePath="..\src\unif.cpp" RelativePath="..\src\unif.cpp"
> >