diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index 39a46be2..9e433f8a 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -277,7 +277,8 @@ BEGIN MENUITEM "Set Autosave period", ID_CONFIG_SETAUTOSAVEPERIOD,MFT_STRING,MFS_ENABLED MENUITEM MFT_SEPARATOR MENUITEM "Silent Autosave", ID_CONFIG_SILENTAUTOSAVE,MFT_STRING,MFS_ENABLED - MENUITEM "Autofire Pattern skips Lag", ID_CONFIG_COLUMNSETPATTERNSKIPSLAG,MFT_STRING,MFS_ENABLED + MENUITEM "Autofire Pattern skips Lag", ID_CONFIG_PATTERNSKIPSLAG,MFT_STRING,MFS_ENABLED + MENUITEM "Auto-adjust Input according to Lag", ID_CONFIG_ADJUSTLAG,MFT_STRING,MFS_ENABLED MENUITEM "Draw Input by dragging", ID_CONFIG_DRAWINPUTBYDRAGGING,MFT_STRING,MFS_ENABLED MENUITEM MFT_SEPARATOR MENUITEM "Combine consecutive Recordings/Draws", ID_CONFIG_COMBINECONSECUTIVERECORDINGS,MFT_STRING,MFS_ENABLED @@ -1405,21 +1406,21 @@ BEGIN EDITTEXT IDC_LABEL_NEWPPUUSED,76,166,155,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP END -TASEDITOR DIALOGEX 0, 0, 326, 359 +TASEDITOR DIALOGEX 0, 0, 326, 348 STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "TAS Editor" MENU TASEDITORMENU FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL "",IDC_PROGRESS_BUTTON,"Button",BS_OWNERDRAW,200,36,116,12 - CONTROL "",IDC_BRANCHES_BUTTON,"Button",BS_OWNERDRAW,207,179,104,10 - CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOSORTHEADER | WS_BORDER,5,13,187,328 - GROUPBOX " Playback ",IDC_PLAYBACK_BOX,197,0,123,75,BS_CENTER,WS_EX_RIGHT - GROUPBOX " Recorder ",IDC_RECORDER_BOX,197,75,123,46,BS_CENTER,WS_EX_RIGHT - GROUPBOX " Splicer ",IDC_SPLICER_BOX,197,122,123,30,BS_CENTER,WS_EX_RIGHT - GROUPBOX " Lua ",IDC_LUA_BOX,197,153,123,26,BS_CENTER,WS_EX_RIGHT - GROUPBOX " Bookmarks ",IDC_BOOKMARKS_BOX,197,180,123,102,BS_CENTER,WS_EX_RIGHT - GROUPBOX " History ",IDC_HISTORY_BOX,197,283,123,52,BS_CENTER,WS_EX_RIGHT + CONTROL "",IDC_BRANCHES_BUTTON,"Button",BS_OWNERDRAW,207,167,104,10 + CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOSORTHEADER | WS_BORDER,5,13,187,316 + GROUPBOX " Playback ",IDC_PLAYBACK_BOX,197,0,123,62,BS_CENTER,WS_EX_RIGHT + GROUPBOX " Recorder ",IDC_RECORDER_BOX,197,63,123,46,BS_CENTER,WS_EX_RIGHT + GROUPBOX " Splicer ",IDC_SPLICER_BOX,197,110,123,30,BS_CENTER,WS_EX_RIGHT + GROUPBOX " Lua ",IDC_LUA_BOX,197,141,123,26,BS_CENTER,WS_EX_RIGHT + GROUPBOX " Bookmarks ",IDC_BOOKMARKS_BOX,197,168,123,102,BS_CENTER,WS_EX_RIGHT + GROUPBOX " History ",IDC_HISTORY_BOX,197,271,123,53,BS_CENTER,WS_EX_RIGHT PUSHBUTTON "<<",TASEDITOR_REWIND_FULL,201,9,23,14,NOT WS_TABSTOP PUSHBUTTON "<",TASEDITOR_REWIND,224,9,23,14,NOT WS_TABSTOP PUSHBUTTON "||",TASEDITOR_PLAYSTOP,247,9,23,14,NOT WS_TABSTOP @@ -1429,32 +1430,30 @@ BEGIN CONTROL " Follow cursor",CHECK_FOLLOW_CURSOR,"Button",BS_AUTOCHECKBOX,203,25,56,12 CONTROL " Auto-restore last position",CHECK_AUTORESTORE_PLAYBACK, "Button",BS_AUTOCHECKBOX,203,48,109,12 - CONTROL "",IDC_BOOKMARKSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOSCROLL | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | NOT WS_VISIBLE | WS_BORDER,202,189,113,89 - CONTROL "",IDC_HISTORYLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOLABELWRAP | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER,202,292,113,39 - CONTROL " All",IDC_RADIO_ALL,"Button",BS_AUTORADIOBUTTON,291,83,24,10 - CONTROL " 1P",IDC_RADIO_1P,"Button",BS_AUTORADIOBUTTON,203,95,25,10 - CONTROL " 2P",IDC_RADIO_2P,"Button",BS_AUTORADIOBUTTON,232,95,25,10 - CONTROL " 3P",IDC_RADIO_3P,"Button",BS_AUTORADIOBUTTON,262,95,24,10 - CONTROL " 4P",IDC_RADIO_4P,"Button",BS_AUTORADIOBUTTON,291,95,24,10 - CONTROL " Superimpose",IDC_SUPERIMPOSE,"Button",BS_AUTO3STATE,203,108,55,10 - PUSHBUTTON "<<",TASEDITOR_PREV_MARKER,202,340,23,14,NOT WS_TABSTOP - PUSHBUTTON "Similar",TASEDITOR_FIND_BEST_SIMILAR_MARKER,225,340,34,14,NOT WS_TABSTOP - PUSHBUTTON "More",TASEDITOR_FIND_NEXT_SIMILAR_MARKER,259,340,34,14,NOT WS_TABSTOP - PUSHBUTTON ">>",TASEDITOR_NEXT_MARKER,292,340,23,14,NOT WS_TABSTOP + CONTROL "",IDC_BOOKMARKSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOSCROLL | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | NOT WS_VISIBLE | WS_BORDER,202,177,113,89 + CONTROL "",IDC_HISTORYLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOLABELWRAP | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER,202,280,113,40 + CONTROL " All",IDC_RADIO_ALL,"Button",BS_AUTORADIOBUTTON,291,71,24,10 + CONTROL " 1P",IDC_RADIO_1P,"Button",BS_AUTORADIOBUTTON,203,83,25,10 + CONTROL " 2P",IDC_RADIO_2P,"Button",BS_AUTORADIOBUTTON,232,83,25,10 + CONTROL " 3P",IDC_RADIO_3P,"Button",BS_AUTORADIOBUTTON,262,83,24,10 + CONTROL " 4P",IDC_RADIO_4P,"Button",BS_AUTORADIOBUTTON,291,83,24,10 + CONTROL " Superimpose",IDC_SUPERIMPOSE,"Button",BS_AUTO3STATE,203,96,55,10 + PUSHBUTTON "<<",TASEDITOR_PREV_MARKER,202,328,23,14,NOT WS_TABSTOP + PUSHBUTTON "Similar",TASEDITOR_FIND_BEST_SIMILAR_MARKER,225,328,34,14,NOT WS_TABSTOP + PUSHBUTTON "More",TASEDITOR_FIND_NEXT_SIMILAR_MARKER,259,328,34,14,NOT WS_TABSTOP + PUSHBUTTON ">>",TASEDITOR_NEXT_MARKER,292,328,23,14,NOT WS_TABSTOP EDITTEXT IDC_PLAYBACK_MARKER_EDIT,65,0,127,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - RTEXT "Marker 0",IDC_PLAYBACK_MARKER,4,2,60,10,SS_NOTIFY,WS_EX_RIGHT - EDITTEXT IDC_SELECTION_MARKER_EDIT,65,341,127,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - RTEXT "Marker 99999",IDC_SELECTION_MARKER,4,343,60,10,SS_NOTIFY,WS_EX_RIGHT - CONTROL "",IDC_BRANCHES_BITMAP,"Static",SS_OWNERDRAW | SS_NOTIFY | SS_REALSIZEIMAGE | NOT WS_VISIBLE,202,189,113,89 + RTEXT "Marker 0",IDC_PLAYBACK_MARKER,3,2,60,10,SS_NOTIFY,WS_EX_RIGHT + EDITTEXT IDC_SELECTION_MARKER_EDIT,65,329,127,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + RTEXT "Marker 99999",IDC_SELECTION_MARKER,3,331,60,10,SS_NOTIFY,WS_EX_RIGHT + CONTROL "",IDC_BRANCHES_BITMAP,"Static",SS_OWNERDRAW | SS_NOTIFY | SS_REALSIZEIMAGE | NOT WS_VISIBLE,202,177,113,89 CONTROL " Turbo seek",CHECK_TURBO_SEEK,"Button",BS_AUTOCHECKBOX,263,25,50,12 - LTEXT "Selection: 0 rows, 16 columns",IDC_TEXT_SELECTION,204,130,112,10,SS_NOTIFY - LTEXT "Clipboard: 0 rows, 16 columns",IDC_TEXT_CLIPBOARD,203,140,114,10,SS_NOTIFY - CONTROL " Recording",IDC_RECORDING,"Button",BS_AUTO3STATE,203,83,64,10 - PUSHBUTTON "Run function",TASEDITOR_RUN_MANUAL,202,162,54,14,WS_DISABLED | NOT WS_TABSTOP - CONTROL "Auto function",IDC_RUN_AUTO,"Button",BS_AUTOCHECKBOX,261,164,55,10 - CONTROL " Use pattern",IDC_USEPATTERN,"Button",BS_AUTOCHECKBOX,262,108,53,10 - CONTROL " Auto-adjust Input due to lag",CHECK_AUTOADJUSTINPUTDUETOLAG, - "Button",BS_AUTOCHECKBOX,203,61,109,12 + LTEXT "Selection: 0 rows, 16 columns",IDC_TEXT_SELECTION,204,118,112,10,SS_NOTIFY + LTEXT "Clipboard: 0 rows, 16 columns",IDC_TEXT_CLIPBOARD,203,128,114,10,SS_NOTIFY + CONTROL " Recording",IDC_RECORDING,"Button",BS_AUTO3STATE,203,71,81,10 + PUSHBUTTON "Run function",TASEDITOR_RUN_MANUAL,202,150,54,14,WS_DISABLED | NOT WS_TABSTOP + CONTROL "Auto function",IDC_RUN_AUTO,"Button",BS_AUTOCHECKBOX,261,152,55,10 + CONTROL " Use pattern",IDC_USEPATTERN,"Button",BS_AUTOCHECKBOX,262,96,53,10 END IDD_TASEDITOR_ABOUT DIALOGEX 0, 0, 238, 78 diff --git a/src/drivers/win/resource.h b/src/drivers/win/resource.h index e176b478..dcaad14f 100644 --- a/src/drivers/win/resource.h +++ b/src/drivers/win/resource.h @@ -1124,6 +1124,9 @@ #define ACCEL_CTRL_SPACE 40563 #define ID_HELP_OPEN_MANUAL 40564 #define ID_DISPLAY_FPS 40565 +#define ID_CONFIG_AUTO 40566 +#define ID_CONFIG_ADJUSTLAG 40567 +#define ID_CONFIG_PATTERNSKIPSLAG 40568 #define IDC_DEBUGGER_ICONTRAY 55535 #define MW_ValueLabel2 65423 #define MW_ValueLabel1 65426 @@ -1133,7 +1136,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 289 -#define _APS_NEXT_COMMAND_VALUE 40566 +#define _APS_NEXT_COMMAND_VALUE 40569 #define _APS_NEXT_CONTROL_VALUE 1282 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/src/drivers/win/taseditor/history.cpp b/src/drivers/win/taseditor/history.cpp index f6ce35a5..fe3e1efe 100644 --- a/src/drivers/win/taseditor/history.cpp +++ b/src/drivers/win/taseditor/history.cpp @@ -1151,7 +1151,46 @@ LONG HISTORY::CustomDraw(NMLVCUSTOMDRAW* msg) case CDDS_PREPAINT: return CDRF_NOTIFYITEMDRAW; case CDDS_ITEMPREPAINT: + { msg->clrText = HISTORY_NORMAL_COLOR; + msg->clrTextBk = HISTORY_NORMAL_BG_COLOR; + // if this row is not "current History item" then check if it's "related" to current + int row = msg->nmcd.dwItemSpec; + if (row != history_cursor_pos) + { + int current_start_frame = snapshots[(history_start_pos + history_cursor_pos) % history_size].start_frame; + int current_end_frame = snapshots[(history_start_pos + history_cursor_pos) % history_size].end_frame; + int row_start_frame = snapshots[(history_start_pos + row) % history_size].start_frame; + int row_end_frame = snapshots[(history_start_pos + row) % history_size].end_frame; + if (current_end_frame >= 0) + { + if (row_end_frame >= 0) + { + // both items have defined ends, check if they intersect + if (row_start_frame <= current_end_frame && row_end_frame >= current_start_frame) + msg->clrTextBk = HISTORY_RELATED_BG_COLOR; + } else + { + // current item has defined end, check if the row item falls into the segment + if (row_start_frame >= current_start_frame && row_start_frame <= current_end_frame) + msg->clrTextBk = HISTORY_RELATED_BG_COLOR; + } + } else + { + if (row_end_frame >= 0) + { + // row item has defined end, check if current item falls into the segment + if (current_start_frame >= row_start_frame && current_start_frame <= row_end_frame) + msg->clrTextBk = HISTORY_RELATED_BG_COLOR; + } else + { + // both items don't have defined ends, check if they are at the same frame + if (row_start_frame == current_start_frame) + msg->clrTextBk = HISTORY_RELATED_BG_COLOR; + } + } + } + } default: return CDRF_DODEFAULT; } diff --git a/src/drivers/win/taseditor/history.h b/src/drivers/win/taseditor/history.h index bc34c452..eba7e347 100644 --- a/src/drivers/win/taseditor/history.h +++ b/src/drivers/win/taseditor/history.h @@ -82,6 +82,8 @@ enum CATEGORIES_OF_OPERATIONS }; #define HISTORY_NORMAL_COLOR 0x000000 +#define HISTORY_NORMAL_BG_COLOR 0xFFFFFF +#define HISTORY_RELATED_BG_COLOR 0xF9DDE6 #define WM_MOUSEWHEEL_RESENT WM_APP+123 diff --git a/src/drivers/win/taseditor/laglog.cpp b/src/drivers/win/taseditor/laglog.cpp index bc63ab03..16831c7b 100644 --- a/src/drivers/win/taseditor/laglog.cpp +++ b/src/drivers/win/taseditor/laglog.cpp @@ -32,10 +32,17 @@ void LAGLOG::reset() void LAGLOG::compress_data() { int len = lag_log.size() * sizeof(uint8); - uLongf comprlen = (len>>9)+12 + len; - lag_log_compressed.resize(comprlen); - compress(&lag_log_compressed[0], &comprlen, (uint8*)&lag_log[0], len); - lag_log_compressed.resize(comprlen); + if (len) + { + uLongf comprlen = (len>>9)+12 + len; + lag_log_compressed.resize(comprlen); + compress(&lag_log_compressed[0], &comprlen, (uint8*)&lag_log[0], len); + lag_log_compressed.resize(comprlen); + } else + { + // LagLog can be empty + lag_log_compressed.resize(0); + } already_compressed = true; } bool LAGLOG::Get_already_compressed() @@ -52,11 +59,14 @@ void LAGLOG::save(EMUFILE *os) // write size int size = lag_log.size(); write32le(size, os); - // write array - if (!already_compressed) - compress_data(); - write32le(lag_log_compressed.size(), os); - os->fwrite(&lag_log_compressed[0], lag_log_compressed.size()); + if (size) + { + // write array + if (!already_compressed) + compress_data(); + write32le(lag_log_compressed.size(), os); + os->fwrite(&lag_log_compressed[0], lag_log_compressed.size()); + } } // returns true if couldn't load bool LAGLOG::load(EMUFILE *is) @@ -64,17 +74,23 @@ bool LAGLOG::load(EMUFILE *is) int size; if (read32le(&size, is)) { - lag_log.resize(size); - // read and uncompress array already_compressed = true; - int comprlen; - uLongf destlen = size * sizeof(int); - if (!read32le(&comprlen, is)) return true; - if (comprlen <= 0) return true; - lag_log_compressed.resize(comprlen); - if (is->fread(&lag_log_compressed[0], comprlen) != comprlen) return true; - int e = uncompress((uint8*)&lag_log[0], &destlen, &lag_log_compressed[0], comprlen); - if (e != Z_OK && e != Z_BUF_ERROR) return true; + lag_log.resize(size); + if (size) + { + // read and uncompress array + int comprlen; + uLongf destlen = size * sizeof(int); + if (!read32le(&comprlen, is)) return true; + if (comprlen <= 0) return true; + lag_log_compressed.resize(comprlen); + if (is->fread(&lag_log_compressed[0], comprlen) != comprlen) return true; + int e = uncompress((uint8*)&lag_log[0], &destlen, &lag_log_compressed[0], comprlen); + if (e != Z_OK && e != Z_BUF_ERROR) return true; + } else + { + lag_log_compressed.resize(0); + } // all ok return false; } @@ -82,12 +98,15 @@ bool LAGLOG::load(EMUFILE *is) } bool LAGLOG::skipLoad(EMUFILE *is) { - if (!(is->fseek(sizeof(int), SEEK_CUR))) + int size; + if (read32le(&size, is)) { - // read array - int comprlen; - if (!read32le(&comprlen, is)) return true; - if (is->fseek(comprlen, SEEK_CUR) != 0) return true; + if (size) + { + // skip array + if (!read32le(&size, is)) return true; + if (is->fseek(size, SEEK_CUR) != 0) return true; + } // all ok return false; } diff --git a/src/drivers/win/taseditor/snapshot.cpp b/src/drivers/win/taseditor/snapshot.cpp index 472a12fe..269b7e55 100644 --- a/src/drivers/win/taseditor/snapshot.cpp +++ b/src/drivers/win/taseditor/snapshot.cpp @@ -86,7 +86,8 @@ void SNAPSHOT::save(EMUFILE *os) os->fwrite(&description[0], len); // save InputLog data inputlog.save(os); - + // save LagLog data + laglog.save(os); // save Markers data markers.save(os); } @@ -108,7 +109,8 @@ bool SNAPSHOT::load(EMUFILE *is) description[tmp] = 0; // add '0' because it wasn't saved in the file // load InputLog data if (inputlog.load(is)) return true; - + // load LagLog data + if (laglog.load(is)) return true; // load Markers data if (markers.load(is)) return true; return false; @@ -130,7 +132,8 @@ bool SNAPSHOT::skipLoad(EMUFILE *is) if (is->fseek(tmp1, SEEK_CUR) != 0) return true; // skip InputLog data if (inputlog.skipLoad(is)) return true; - + // skip LagLog data + if (laglog.skipLoad(is)) return true; // skip Markers data if (markers.skipLoad(is)) return true; return false; diff --git a/src/drivers/win/taseditor/snapshot.h b/src/drivers/win/taseditor/snapshot.h index 4ec495bc..2ce50622 100644 --- a/src/drivers/win/taseditor/snapshot.h +++ b/src/drivers/win/taseditor/snapshot.h @@ -25,8 +25,8 @@ public: LAGLOG laglog; MARKERS markers; int keyframe; // for jumping when making undo - int start_frame; // for consecutive Draws - int end_frame; // for consecutive Draws + int start_frame; // for consecutive Draws and "Related items highlighting" + int end_frame; // for consecutive Draws and "Related items highlighting" int consecutive_tag; // for consecutive Recordings and Draws uint32 rec_joypad_diff_bits; // for consecutive Recordings int mod_type; diff --git a/src/drivers/win/taseditor/taseditor_window.cpp b/src/drivers/win/taseditor/taseditor_window.cpp index d7ad7f8f..b2a05739 100644 --- a/src/drivers/win/taseditor/taseditor_window.cpp +++ b/src/drivers/win/taseditor/taseditor_window.cpp @@ -72,7 +72,6 @@ LRESULT APIENTRY TASEDITOR_FORWARD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, L LRESULT APIENTRY TASEDITOR_FORWARD_FULL_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT APIENTRY CHECK_FOLLOW_CURSOR_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT APIENTRY CHECK_AUTORESTORE_PLAYBACK_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); -LRESULT APIENTRY CHECK_AUTOADJUSTINPUTDUETOLAG_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT APIENTRY IDC_RADIO_ALL_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT APIENTRY IDC_RADIO_1P_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT APIENTRY IDC_RADIO_2P_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); @@ -99,7 +98,6 @@ WNDPROC TASEDITOR_FORWARD_FULL_oldWndProc = 0, CHECK_FOLLOW_CURSOR_oldWndProc = 0, CHECK_AUTORESTORE_PLAYBACK_oldWndProc = 0, - CHECK_AUTOADJUSTINPUTDUETOLAG_oldWndProc = 0, IDC_RADIO_ALL_oldWndProc = 0, IDC_RADIO_1P_oldWndProc = 0, IDC_RADIO_2P_oldWndProc = 0, @@ -148,7 +146,6 @@ Window_items_struct window_items[TASEDITOR_WINDOW_TOTAL_ITEMS] = { IDC_PROGRESS1, -1, 0, 0, 0, "", "", false, 0, 0, CHECK_FOLLOW_CURSOR, -1, 0, 0, 0, "The Piano Roll will follow Playback cursor movements", "", false, 0, 0, CHECK_AUTORESTORE_PLAYBACK, -1, 0, 0, 0, "Whenever you change Input above Playback cursor, the cursor returns to where it was before the change", "", false, EMUCMD_TASEDITOR_SWITCH_AUTORESTORING, 0, - CHECK_AUTOADJUSTINPUTDUETOLAG, -1, 0, 0, 0, "TAS Editor will adjust Input when new lag frames appear or old lag frames disappear while emulating", "", false, 0, 0, IDC_BOOKMARKSLIST, -1, 0, 0, 0, "Right click = set Bookmark, Left click = jump to Bookmark or load Branch", "", false, 0, 0, IDC_HISTORYLIST, -1, 0, 0, -1, "Click to revert the project back to that time", "", false, 0, 0, IDC_RADIO_ALL, -1, 0, 0, 0, "Switch off Multitracking", "", false, 0, 0, @@ -157,7 +154,7 @@ Window_items_struct window_items[TASEDITOR_WINDOW_TOTAL_ITEMS] = { IDC_RADIO_3P, -1, 0, 0, 0, "Select Joypad 3 as current", "", false, EMUCMD_TASEDITOR_SWITCH_MULTITRACKING, 0, IDC_RADIO_4P, -1, 0, 0, 0, "Select Joypad 4 as current", "", false, EMUCMD_TASEDITOR_SWITCH_MULTITRACKING, 0, IDC_SUPERIMPOSE, -1, 0, 0, 0, "Allows to superimpose old Input with new buttons, instead of overwriting", "", false, 0, 0, - IDC_USEPATTERN, -1, 0, 0, 0, "Applies current Autofire Pattern to Input recording", "", false, 0, 0, + IDC_USEPATTERN, -1, 0, 0, 0, "Applies current Autofire Pattern to Input recording", "", false, 0, 0, TASEDITOR_PREV_MARKER, -1, -1, 0, -1, "Send Selection to previous Marker (mouse: Ctrl+Wheel up) (hotkey: Ctrl+PageUp)", "", false, 0, 0, TASEDITOR_FIND_BEST_SIMILAR_MARKER, -1, -1, 0, -1, "Auto-search for Marker Note", "", false, 0, 0, TASEDITOR_FIND_NEXT_SIMILAR_MARKER, -1, -1, 0, -1, "Continue Auto-search", "", false, 0, 0, @@ -272,7 +269,6 @@ void TASEDITOR_WINDOW::init() TASEDITOR_FORWARD_FULL_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, TASEDITOR_FORWARD_FULL), GWL_WNDPROC, (LONG)TASEDITOR_FORWARD_FULL_WndProc); CHECK_FOLLOW_CURSOR_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, CHECK_FOLLOW_CURSOR), GWL_WNDPROC, (LONG)CHECK_FOLLOW_CURSOR_WndProc); CHECK_AUTORESTORE_PLAYBACK_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, CHECK_AUTORESTORE_PLAYBACK), GWL_WNDPROC, (LONG)CHECK_AUTORESTORE_PLAYBACK_WndProc); - CHECK_AUTOADJUSTINPUTDUETOLAG_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, CHECK_AUTOADJUSTINPUTDUETOLAG), GWL_WNDPROC, (LONG)CHECK_AUTOADJUSTINPUTDUETOLAG_WndProc); IDC_RADIO_ALL_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_RADIO_ALL), GWL_WNDPROC, (LONG)IDC_RADIO_ALL_WndProc); IDC_RADIO_1P_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_RADIO_1P), GWL_WNDPROC, (LONG)IDC_RADIO_1P_WndProc); IDC_RADIO_2P_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_RADIO_2P), GWL_WNDPROC, (LONG)IDC_RADIO_2P_WndProc); @@ -553,7 +549,6 @@ void TASEDITOR_WINDOW::UpdateCheckedItems() // check option ticks CheckDlgButton(hwndTasEditor, CHECK_FOLLOW_CURSOR, taseditor_config.follow_playback?BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndTasEditor, CHECK_AUTORESTORE_PLAYBACK, taseditor_config.restore_position?BST_CHECKED:BST_UNCHECKED); - CheckDlgButton(hwndTasEditor, CHECK_AUTOADJUSTINPUTDUETOLAG, taseditor_config.adjust_input_due_to_lag?BST_CHECKED:BST_UNCHECKED); if (taseditor_config.superimpose == SUPERIMPOSE_UNCHECKED) CheckDlgButton(hwndTasEditor, IDC_SUPERIMPOSE, BST_UNCHECKED); else if (taseditor_config.superimpose == SUPERIMPOSE_CHECKED) @@ -565,20 +560,21 @@ void TASEDITOR_WINDOW::UpdateCheckedItems() CheckDlgButton(hwndTasEditor, CHECK_TURBO_SEEK, taseditor_config.turbo_seek?BST_CHECKED : BST_UNCHECKED); CheckMenuItem(hmenu, ID_VIEW_SHOWBRANCHSCREENSHOTS, taseditor_config.show_branch_screenshots?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(hmenu, ID_VIEW_SHOWBRANCHTOOLTIPS, taseditor_config.show_branch_descr?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_VIEW_ENABLEHOTCHANGES, taseditor_config.enable_hot_changes?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(hmenu, ID_VIEW_JUMPWHENMAKINGUNDO, taseditor_config.jump_to_undo?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(hmenu, ID_VIEW_FOLLOWMARKERNOTECONTEXT, taseditor_config.follow_note_context?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_VIEW_ENABLEHOTCHANGES, taseditor_config.enable_hot_changes?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_CONFIG_BRANCHESRESTOREFULLMOVIE, taseditor_config.branch_full_movie?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_CONFIG_OLDBRANCHINGCONTROLS, taseditor_config.old_branching_controls?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_CONFIG_HUDINBRANCHSCREENSHOTS, taseditor_config.branch_scr_hud?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_CONFIG_BINDMARKERSTOINPUT, taseditor_config.bind_markers?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_CONFIG_EMPTYNEWMARKERNOTES, taseditor_config.empty_marker_notes?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_SILENTAUTOSAVE, taseditor_config.silent_autosave?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_PATTERNSKIPSLAG, taseditor_config.pattern_skips_lag?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_ADJUSTLAG, taseditor_config.adjust_input_due_to_lag?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_DRAWINPUTBYDRAGGING, taseditor_config.draw_input?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(hmenu, ID_CONFIG_COMBINECONSECUTIVERECORDINGS, taseditor_config.combine_consecutive?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(hmenu, ID_CONFIG_USE1PFORRECORDING, taseditor_config.use_1p_rec?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(hmenu, ID_CONFIG_USEINPUTKEYSFORCOLUMNSET, taseditor_config.columnset_by_keys?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_CONFIG_COLUMNSETPATTERNSKIPSLAG, taseditor_config.pattern_skips_lag?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_CONFIG_DRAWINPUTBYDRAGGING, taseditor_config.draw_input?MF_CHECKED : MF_UNCHECKED); - CheckMenuItem(hmenu, ID_CONFIG_SILENTAUTOSAVE, taseditor_config.silent_autosave?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_BINDMARKERSTOINPUT, taseditor_config.bind_markers?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_EMPTYNEWMARKERNOTES, taseditor_config.empty_marker_notes?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_OLDBRANCHINGCONTROLS, taseditor_config.old_branching_controls?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_BRANCHESRESTOREFULLMOVIE, taseditor_config.branch_full_movie?MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(hmenu, ID_CONFIG_HUDINBRANCHSCREENSHOTS, taseditor_config.branch_scr_hud?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(hmenu, ID_CONFIG_AUTOPAUSEATTHEENDOFMOVIE, taseditor_config.autopause_at_finish?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(hmenu, ID_HELP_TOOLTIPS, taseditor_config.tooltips?MF_CHECKED : MF_UNCHECKED); } @@ -1039,7 +1035,7 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara taseditor_config.restore_position ^= 1; taseditor_window.UpdateCheckedItems(); break; - case CHECK_AUTOADJUSTINPUTDUETOLAG: + case ID_CONFIG_ADJUSTLAG: taseditor_config.adjust_input_due_to_lag ^= 1; taseditor_window.UpdateCheckedItems(); break; @@ -1126,7 +1122,7 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara taseditor_config.columnset_by_keys ^= 1; taseditor_window.UpdateCheckedItems(); break; - case ID_CONFIG_COLUMNSETPATTERNSKIPSLAG: + case ID_CONFIG_PATTERNSKIPSLAG: taseditor_config.pattern_skips_lag ^= 1; taseditor_window.UpdateCheckedItems(); break; @@ -1646,19 +1642,6 @@ LRESULT APIENTRY CHECK_AUTORESTORE_PLAYBACK_WndProc(HWND hWnd, UINT msg, WPARAM } return CallWindowProc(CHECK_AUTORESTORE_PLAYBACK_oldWndProc, hWnd, msg, wParam, lParam); } -LRESULT APIENTRY CHECK_AUTOADJUSTINPUTDUETOLAG_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_MBUTTONDOWN: - case WM_MBUTTONDBLCLK: - playback.MiddleButtonClick(); - return 0; - case WM_KEYDOWN: - return 0; // disable Spacebar - } - return CallWindowProc(CHECK_AUTOADJUSTINPUTDUETOLAG_oldWndProc, hWnd, msg, wParam, lParam); -} LRESULT APIENTRY IDC_RADIO_ALL_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) diff --git a/vc/Help/fceux.hnd b/vc/Help/fceux.hnd index 53163b15..5a76a4ba 100644 Binary files a/vc/Help/fceux.hnd and b/vc/Help/fceux.hnd differ