add Start Paused option to movie (replay) playback
This commit is contained in:
parent
45eb22d8b1
commit
8cec959345
|
@ -786,9 +786,11 @@ BEGIN
|
|||
LTEXT "",IDC_REPLAYRESET,76,80,190,8
|
||||
LTEXT "",IDC_REPLAYTIME,76,89,190,8
|
||||
CONTROL "Open Read-Only",IDC_READONLY,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,35,25,69,10
|
||||
WS_TABSTOP,14,25,69,10
|
||||
CONTROL "Show Joystick Movement",IDC_SHOWMOVEMENT,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,120,25,100,10
|
||||
WS_TABSTOP,97,25,99,10
|
||||
CONTROL "Start Paused",IDC_STARTPAUSED,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,207,25,57,10
|
||||
END
|
||||
|
||||
IDD_RECORDINP DIALOGEX 0, 0, 276, 98
|
||||
|
|
|
@ -15,6 +15,7 @@ wchar_t wszStartupGame[MAX_PATH];
|
|||
wchar_t wszAuthorInfo[MAX_METADATA-64];
|
||||
|
||||
INT32 nReplayStatus = 0; // 1 record, 2 replay, 0 nothing
|
||||
bool bReplayStartPaused = false;
|
||||
bool bReplayReadOnly = false;
|
||||
bool bReplayShowMovement = false;
|
||||
bool bReplayDontClose = false;
|
||||
|
@ -237,6 +238,13 @@ static void PrintInputs()
|
|||
}
|
||||
}
|
||||
|
||||
static void DisplayPlayingFrame()
|
||||
{
|
||||
wchar_t framestring[32];
|
||||
swprintf(framestring, L"%d / %d", GetCurrentFrame() - nStartFrame,nTotalFrames);
|
||||
VidSNewTinyMsg(framestring);
|
||||
}
|
||||
|
||||
INT32 ReplayInput()
|
||||
{
|
||||
UINT8 n;
|
||||
|
@ -276,9 +284,7 @@ INT32 ReplayInput()
|
|||
}
|
||||
|
||||
if (bReplayFrameCounterDisplay) {
|
||||
wchar_t framestring[32];
|
||||
swprintf(framestring, L"%d / %d", GetCurrentFrame() - nStartFrame,nTotalFrames);
|
||||
VidSNewTinyMsg(framestring);
|
||||
DisplayPlayingFrame();
|
||||
}
|
||||
|
||||
if (bReplayShowMovement) {
|
||||
|
@ -599,6 +605,11 @@ INT32 StartReplay(const TCHAR* szFileName) // const char* szFileName = NULL
|
|||
}
|
||||
|
||||
nReplayStatus = 2; // Set replay status
|
||||
|
||||
SetPauseMode(bReplayStartPaused); // Start Paused?
|
||||
|
||||
DisplayPlayingFrame();
|
||||
|
||||
CheckRedraw();
|
||||
|
||||
MenuEnableItems();
|
||||
|
@ -857,6 +868,9 @@ void DisplayReplayProperties(HWND hDlg, bool bClear)
|
|||
EnableWindow(GetDlgItem(hDlg, IDC_SHOWMOVEMENT), FALSE);
|
||||
SendDlgItemMessage(hDlg, IDC_SHOWMOVEMENT, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
|
||||
EnableWindow(GetDlgItem(hDlg, IDC_STARTPAUSED), FALSE);
|
||||
SendDlgItemMessage(hDlg, IDC_STARTPAUSED, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
|
||||
EnableWindow(GetDlgItem(hDlg, IDOK), FALSE);
|
||||
|
||||
if(bClear) {
|
||||
|
@ -917,6 +931,9 @@ void DisplayReplayProperties(HWND hDlg, bool bClear)
|
|||
|
||||
EnableWindow(GetDlgItem(hDlg, IDC_SHOWMOVEMENT), TRUE);
|
||||
SendDlgItemMessage(hDlg, IDC_SHOWMOVEMENT, BM_SETCHECK, (bReplayShowMovement) ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
|
||||
EnableWindow(GetDlgItem(hDlg, IDC_STARTPAUSED), TRUE);
|
||||
SendDlgItemMessage(hDlg, IDC_STARTPAUSED, BM_SETCHECK, (bReplayStartPaused) ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
}
|
||||
|
||||
memset(ReadHeader, 0, 4);
|
||||
|
@ -1167,6 +1184,12 @@ static BOOL CALLBACK ReplayDialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM
|
|||
bReplayShowMovement = true;
|
||||
}
|
||||
|
||||
// get start paused status
|
||||
bReplayStartPaused = false;
|
||||
if (BST_CHECKED == SendDlgItemMessage(hDlg, IDC_STARTPAUSED, BM_GETCHECK, 0, 0)) {
|
||||
bReplayStartPaused = true;
|
||||
}
|
||||
|
||||
EndDialog(hDlg, 1); // only allow OK if a valid selection was made
|
||||
}
|
||||
}
|
||||
|
|
|
@ -222,6 +222,7 @@
|
|||
#define IDC_REPLAYRESET 20262
|
||||
#define IDC_REPLAYTIME 20263
|
||||
#define IDC_SHOWMOVEMENT 20264
|
||||
#define IDC_STARTPAUSED 20265
|
||||
|
||||
#define IDC_STATIC_SYS 20300
|
||||
#define IDC_STATIC_OPT 20301
|
||||
|
|
Loading…
Reference in New Issue