diff --git a/changelog.txt b/changelog.txt index 6dd788d7..28c1e09f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +11-nov-2010 - mart0258 - TasEdit - Invalidate greenzone when re-recording earlier portions of a movie. 09-oct-2010 - zeromus - fix bug in new ppu that made some intensify bits not get applied to output (fixes flashing siren screen in werefolf 09-oct-2010 - gocha - win32 - Ram Watch - fix the multiple selection of watches 09-oct-2010 - gocha - Win32 - Ram Search - multiple selection of addresses, fix restoration of the selection range diff --git a/src/conddebug.cpp b/src/conddebug.cpp index 2acea4eb..7a9a4ae6 100644 --- a/src/conddebug.cpp +++ b/src/conddebug.cpp @@ -31,7 +31,7 @@ * Compare -> Sum {('==' | '!=' | '<=' | '>=' | '<' | '>') Sum} * Sum -> Product {('+' | '-') Product} * Product -> Primitive {('*' | '/') Primitive} -* Primitive -> Number | Address | Register | Flag | '(' Connect ')' +* Primitive -> Number | Address | Register | Flag | PC Bank | '(' Connect ')' * Number -> '#' [1-9A-F]* * Address -> '$' [1-9A-F]* | '$' '[' Connect ']' * Register -> 'A' | 'X' | 'Y' | 'R' @@ -228,7 +228,7 @@ Condition* Primitive(const char** str, Condition* c) return c; } - else if (isBank(next)) /* Registers */ + else if (isBank(next)) /* PC Bank */ { if (c->type1 == TYPE_NO) { @@ -322,9 +322,9 @@ Condition* Primitive(const char** str, Condition* c) Condition* Term(const char** str) { Condition* t; - Condition* t1; + Condition* t1; Condition* mid; - + t = (Condition*)FCEU_dmalloc(sizeof(Condition)); if (!t) return NULL; diff --git a/src/drivers/win/tasedit.cpp b/src/drivers/win/tasedit.cpp index 7d83a38f..0e81403c 100644 --- a/src/drivers/win/tasedit.cpp +++ b/src/drivers/win/tasedit.cpp @@ -262,7 +262,7 @@ bool JumpToFrame(int index) /* Handle jumps outside greenzone. */ if (index>currMovieData.greenZoneCount) { - if (JumpToFrame(currMovieData.greenZoneCount)) + if (JumpToFrame(currMovieData.greenZoneCount-1)) { if (FCEUI_EmulationPaused()) FCEUI_ToggleEmulationPause(); @@ -278,8 +278,8 @@ bool JumpToFrame(int index) if (static_cast(index)0) + { + frame=*selectionFrames.begin(); + JumpToFrame(frame); + } + + currMovieData.truncateAt(frame+1); + InvalidateGreenZone(frame); + currMovieData.TryDumpIncremental(); + UpdateTasEdit(); + +} + //likewise, handles a changed item range from the listview static void ItemRangeChanged(NMLVODSTATECHANGE* info) { @@ -1156,11 +1172,7 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case ID_CONTEXT_SELECTED_TRUNCATE: case ID_CONTEXT_STRAY_TRUNCATE: case IDC_HACKY1: - //hacky1: delete all items after the current selection - currMovieData.truncateAt(currFrameCounter+1); - InvalidateGreenZone(currFrameCounter); - currMovieData.TryDumpIncremental(); - UpdateTasEdit(); + Truncate(); break; case IDC_HACKY2: diff --git a/src/drivers/win/tasedit.h b/src/drivers/win/tasedit.h index fcf25ac8..2cfb3dc3 100644 --- a/src/drivers/win/tasedit.h +++ b/src/drivers/win/tasedit.h @@ -3,3 +3,4 @@ void DoTasEdit(); void UpdateTasEdit(); void CreateProject(MovieData data); +void InvalidateGreenZone(int after); diff --git a/src/movie.cpp b/src/movie.cpp index c2bd741d..b6dcf82b 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -1113,6 +1113,10 @@ void FCEUMOV_AddInputState() } else { + if (currMovieData.greenZoneCount>currFrameCounter+1) + { + InvalidateGreenZone(currFrameCounter); + } joyports[0].log(mr); joyports[1].log(mr); mr->commands = 0;