From ab64af6e87058071065eb3e08a35e8d1c41dd612 Mon Sep 17 00:00:00 2001 From: ansstuff Date: Wed, 6 Jun 2012 18:59:21 +0000 Subject: [PATCH] Taseditor: small fix for Branches Tree - among bookmarks with equal jump_frame the cursor must be pointing at current branch --- README_BEFORE_COMMITTING_ANYTHING.txt | 5 ----- changelog.txt | 6 ++++++ src/drivers/win/res.rc | 4 ++-- src/drivers/win/taseditor/bookmarks.cpp | 2 +- src/drivers/win/taseditor/branches.cpp | 16 ++++++++++++---- src/input.cpp | 6 ++++-- 6 files changed, 25 insertions(+), 14 deletions(-) delete mode 100644 README_BEFORE_COMMITTING_ANYTHING.txt diff --git a/README_BEFORE_COMMITTING_ANYTHING.txt b/README_BEFORE_COMMITTING_ANYTHING.txt deleted file mode 100644 index e661fd9b..00000000 --- a/README_BEFORE_COMMITTING_ANYTHING.txt +++ /dev/null @@ -1,5 +0,0 @@ -the official svn tree has moved - -please see: https://sourceforge.net/p/fceultra/code/ - -we migrated on 5/26 diff --git a/changelog.txt b/changelog.txt index 0fd8a28e..113755ac 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,10 @@ + +06-Jun-2012 - AnS - Taseditor: small fix for Branches Tree - among bookmarks with equal jump_frame the cursor must be pointing at current branch +06-Jun-2012 - zeromus - support mapper 176. mapper 176 no longer maps to BMCFK23C. BMCFK23C is still accessible through crc or unif? test case would be welcome. it is unclear to me why mapper 176 control was removed from 176.cpp and given to BMCFK23C +06-Jun-2012 - AnS - Taseditor: autosave works only when project has a filename +26-May-2012 - AnS - Taseditor: Ctrl+Space accelerator = toggle "Auto-restore last position" checkbox; remapped "Restore Playback" hotkey to Spacebar; "Restore Playback" also pauses seeking; mid-click = "Restore Playback" when possible +08-May-2012 - AnS - Taseditor: changed "lost_position" logic 01-May-2012 - AnS - Lua functions emu.pause() and emu.unpause() don't yield and don't reset emulator speed anymore 30-Apr-2012 - AnS - Taseditor: Ctrl + mid click = run to Selection cursor; Shift + mid click = run to nearest Marker 26-Apr-2012 - AnS - Taseditor: fixed filename logic when user creates project from an fm2 or a corrupted fm3 diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index c3888f24..f468630a 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -228,7 +228,7 @@ BEGIN MENUITEM "Save Compact", ID_FILE_SAVECOMPACT,MFT_STRING,MFS_ENABLED MENUITEM "Recent", ID_FILE_RECENT,MFT_STRING,MFS_ENABLED MENUITEM MFT_SEPARATOR - MENUITEM "Import input", ID_FILE_IMPORT,MFT_STRING,MFS_ENABLED + MENUITEM "Import Input", ID_FILE_IMPORT,MFT_STRING,MFS_ENABLED MENUITEM "Export to FM2", ID_FILE_EXPORTFM2,MFT_STRING,MFS_ENABLED MENUITEM MFT_SEPARATOR MENUITEM "Close\tAlt+F4", ID_FILE_CLOSE,MFT_STRING,MFS_ENABLED @@ -1455,7 +1455,7 @@ BEGIN CONTROL " 2 players",IDC_RADIO_2PLAYERS,"Button",BS_AUTORADIOBUTTON,8,21,47,10 CONTROL " Fourscore",IDC_RADIO_FOURSCORE,"Button",BS_AUTORADIOBUTTON,8,35,47,10 CONTROL " Convert Marker Notes to Movie Subtitles",IDC_NOTES_TO_SUBTITLES, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,50,141,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,50,146,10 END IDD_TASEDITOR_FINDNOTE DIALOGEX 0, 0, 228, 49 diff --git a/src/drivers/win/taseditor/bookmarks.cpp b/src/drivers/win/taseditor/bookmarks.cpp index 67a77f1a..90aaf726 100644 --- a/src/drivers/win/taseditor/bookmarks.cpp +++ b/src/drivers/win/taseditor/bookmarks.cpp @@ -598,7 +598,7 @@ void BOOKMARKS::RightClick() int BOOKMARKS::FindBookmarkAtFrame(int frame) { int cur_bookmark = branches.GetCurrentBranch(); - if (cur_bookmark >= 0 && bookmarks_array[cur_bookmark].snapshot.jump_frame == frame) + if (cur_bookmark != ITEM_UNDER_MOUSE_CLOUD && bookmarks_array[cur_bookmark].snapshot.jump_frame == frame) return cur_bookmark + TOTAL_BOOKMARKS; // blue digit has highest priority when drawing for (int i = 0; i < TOTAL_BOOKMARKS; ++i) { diff --git a/src/drivers/win/taseditor/branches.cpp b/src/drivers/win/taseditor/branches.cpp index 998e5b6e..48940877 100644 --- a/src/drivers/win/taseditor/branches.cpp +++ b/src/drivers/win/taseditor/branches.cpp @@ -302,9 +302,14 @@ void BRANCHES::update() if (current_branch != ITEM_UNDER_MOUSE_CLOUD) { if (changes_since_current_branch) + { parent = TOTAL_BOOKMARKS; - else + } else + { parent = FindFullTimelineForBranch(current_branch); + if (parent != current_branch && bookmarks.bookmarks_array[parent].snapshot.jump_frame == bookmarks.bookmarks_array[current_branch].snapshot.jump_frame) + parent = current_branch; + } do { branch = parent; @@ -333,10 +338,13 @@ void BRANCHES::update() parent_y = BranchCurrY[parent]; } if (upper_frame != lower_frame) + { distance = (double)(currFrameCounter - lower_frame) / (double)(upper_frame - lower_frame); - else - distance = 0; - if (distance > 1.0) distance = 1.0; + if (distance > 1.0) distance = 1.0; + } else + { + distance = 1.0; + } playback_x = parent_x + distance * (branch_x - parent_x); playback_y = parent_y + distance * (branch_y - parent_y); } else diff --git a/src/input.cpp b/src/input.cpp index 2d9cb18d..8eec7d21 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1203,13 +1203,15 @@ static void TaseditorRewindOff(void) static void TaseditorRestorePlayback(void) { #ifdef WIN32 - playback.RestorePosition(); + if (FCEUMOV_Mode(MOVIEMODE_TASEDITOR)) + playback.RestorePosition(); #endif } static void TaseditorCancelSeeking(void) { #ifdef WIN32 - playback.CancelSeeking(); + if (FCEUMOV_Mode(MOVIEMODE_TASEDITOR)) + playback.CancelSeeking(); #endif }