Taseditor: small fix for Branches Tree - among bookmarks with equal jump_frame the cursor must be pointing at current branch

This commit is contained in:
ansstuff 2012-06-06 18:59:21 +00:00
parent 181278b136
commit ab64af6e87
6 changed files with 25 additions and 14 deletions

View File

@ -1,5 +0,0 @@
the official svn tree has moved
please see: https://sourceforge.net/p/fceultra/code/
we migrated on 5/26

View File

@ -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 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 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 26-Apr-2012 - AnS - Taseditor: fixed filename logic when user creates project from an fm2 or a corrupted fm3

View File

@ -228,7 +228,7 @@ BEGIN
MENUITEM "Save Compact", ID_FILE_SAVECOMPACT,MFT_STRING,MFS_ENABLED MENUITEM "Save Compact", ID_FILE_SAVECOMPACT,MFT_STRING,MFS_ENABLED
MENUITEM "Recent", ID_FILE_RECENT,MFT_STRING,MFS_ENABLED MENUITEM "Recent", ID_FILE_RECENT,MFT_STRING,MFS_ENABLED
MENUITEM MFT_SEPARATOR 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 "Export to FM2", ID_FILE_EXPORTFM2,MFT_STRING,MFS_ENABLED
MENUITEM MFT_SEPARATOR MENUITEM MFT_SEPARATOR
MENUITEM "Close\tAlt+F4", ID_FILE_CLOSE,MFT_STRING,MFS_ENABLED 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 " 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 " Fourscore",IDC_RADIO_FOURSCORE,"Button",BS_AUTORADIOBUTTON,8,35,47,10
CONTROL " Convert Marker Notes to Movie Subtitles",IDC_NOTES_TO_SUBTITLES, 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 END
IDD_TASEDITOR_FINDNOTE DIALOGEX 0, 0, 228, 49 IDD_TASEDITOR_FINDNOTE DIALOGEX 0, 0, 228, 49

View File

@ -598,7 +598,7 @@ void BOOKMARKS::RightClick()
int BOOKMARKS::FindBookmarkAtFrame(int frame) int BOOKMARKS::FindBookmarkAtFrame(int frame)
{ {
int cur_bookmark = branches.GetCurrentBranch(); 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 return cur_bookmark + TOTAL_BOOKMARKS; // blue digit has highest priority when drawing
for (int i = 0; i < TOTAL_BOOKMARKS; ++i) for (int i = 0; i < TOTAL_BOOKMARKS; ++i)
{ {

View File

@ -302,9 +302,14 @@ void BRANCHES::update()
if (current_branch != ITEM_UNDER_MOUSE_CLOUD) if (current_branch != ITEM_UNDER_MOUSE_CLOUD)
{ {
if (changes_since_current_branch) if (changes_since_current_branch)
{
parent = TOTAL_BOOKMARKS; parent = TOTAL_BOOKMARKS;
else } else
{
parent = FindFullTimelineForBranch(current_branch); 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 do
{ {
branch = parent; branch = parent;
@ -333,10 +338,13 @@ void BRANCHES::update()
parent_y = BranchCurrY[parent]; parent_y = BranchCurrY[parent];
} }
if (upper_frame != lower_frame) if (upper_frame != lower_frame)
{
distance = (double)(currFrameCounter - lower_frame) / (double)(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_x = parent_x + distance * (branch_x - parent_x);
playback_y = parent_y + distance * (branch_y - parent_y); playback_y = parent_y + distance * (branch_y - parent_y);
} else } else

View File

@ -1203,6 +1203,7 @@ static void TaseditorRewindOff(void)
static void TaseditorRestorePlayback(void) static void TaseditorRestorePlayback(void)
{ {
#ifdef WIN32 #ifdef WIN32
if (FCEUMOV_Mode(MOVIEMODE_TASEDITOR))
playback.RestorePosition(); playback.RestorePosition();
#endif #endif
} }
@ -1210,6 +1211,7 @@ static void TaseditorRestorePlayback(void)
static void TaseditorCancelSeeking(void) static void TaseditorCancelSeeking(void)
{ {
#ifdef WIN32 #ifdef WIN32
if (FCEUMOV_Mode(MOVIEMODE_TASEDITOR))
playback.CancelSeeking(); playback.CancelSeeking();
#endif #endif
} }