mirror of https://github.com/PCSX2/pcsx2.git
recording: removed C++ reserved pattern usages, removed japanese comments
This commit is contained in:
parent
6e111205a2
commit
cb7425c59f
|
@ -1,10 +1,10 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
|
||||
#include "MemoryTypes.h"
|
||||
#include "AppSaveStates.h"
|
||||
#include "Common.h"
|
||||
#include "Counters.h" // use"g_FrameCount"
|
||||
#include "SaveState.h" // create "SaveStateBase::InputRecordingFreeze()"
|
||||
#include "AppSaveStates.h" // use "States_GetCurrentSlot()"
|
||||
#include "Counters.h"
|
||||
#include "MemoryTypes.h"
|
||||
#include "SaveState.h"
|
||||
|
||||
#include "Recording/RecordingControls.h"
|
||||
#include "InputRecording.h"
|
||||
|
@ -14,27 +14,25 @@
|
|||
|
||||
InputRecording g_InputRecording;
|
||||
|
||||
//-----------------------------------------------
|
||||
// Save or Load - Save frame number
|
||||
// Save or load - <20>Ńt<C583><74><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>̕ۑ<CC95>
|
||||
//-----------------------------------------------
|
||||
// --------------------------------
|
||||
// Tag and save framecount along with savestate
|
||||
// --------------------------------
|
||||
void SaveStateBase::InputRecordingFreeze()
|
||||
{
|
||||
FreezeTag("InputRecording");
|
||||
Freeze(g_FrameCount); // Somehow the function saved the frame successfully
|
||||
// Freeze<7A><EFBFBD><D690>łȂ<C582><C882><EFBFBD>frame<6D>̕ۑ<CC95><DB91><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
Freeze(g_FrameCount);
|
||||
if (IsLoading()) {
|
||||
g_InputRecordingData.addUndoCount();
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Main func for handling recording and inputting controller data
|
||||
// Main func for handling controller input data
|
||||
// Called by Sio.cpp::sioWriteController
|
||||
//----------------------------------
|
||||
void InputRecording::ControllerInterrupt(u8 &data, u8 &port, u16 & bufCount, u8 buf[])
|
||||
{
|
||||
// TODO - Multi-Tap Support
|
||||
// Only examine controllers 1 / 2
|
||||
if (port < 0 || 1 < port)
|
||||
return;
|
||||
|
@ -47,7 +45,7 @@ void InputRecording::ControllerInterrupt(u8 &data, u8 &port, u16 & bufCount, u8
|
|||
// See - Lilypad.cpp:1254
|
||||
// 0x42 is the magic number for the default read query
|
||||
//
|
||||
// NOTE: this appears to possibly break if you have logging enabled in LilyPad's config!
|
||||
// NOTE: this appears to break if you have logging enabled in LilyPad's config!
|
||||
//==========================
|
||||
if (bufCount == 1) {
|
||||
if (data == 0x42)
|
||||
|
@ -77,7 +75,7 @@ void InputRecording::ControllerInterrupt(u8 &data, u8 &port, u16 & bufCount, u8
|
|||
return;
|
||||
|
||||
// We do not want to record or save the first two
|
||||
// bytes in the return from LilyPad
|
||||
// bytes in the data returned from LilyPad
|
||||
if (bufCount < 3)
|
||||
return;
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#pragma once
|
||||
#ifndef __KEY_MOVIE_H__
|
||||
#define __KEY_MOVIE_H__
|
||||
|
||||
#include "InputRecordingFile.h"
|
||||
|
||||
|
@ -47,6 +45,3 @@ private:
|
|||
extern InputRecording g_InputRecording;
|
||||
#define g_InputRecordingData (g_InputRecording.getInputRecordingData())
|
||||
#define g_InputRecordingHeader (g_InputRecording.getInputRecordingData().getHeader())
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -169,8 +169,7 @@ void InputRecordingEditor::FrameUpdate()
|
|||
//-------------------------------
|
||||
void InputRecordingEditor::DrawKeyFrameList(long selectFrame)
|
||||
{
|
||||
// Decide the number of frames to display
|
||||
// <20>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD><74><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߂<EFBFBD>
|
||||
// Determine the number of frames to display
|
||||
int start = selectFrame - 100;
|
||||
unsigned int end = selectFrame +100;
|
||||
if (start < 0) {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#pragma once
|
||||
#ifndef __KEY_EDITOR_H__
|
||||
#define __KEY_EDITOR_H__
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/listctrl.h>
|
||||
|
@ -65,5 +63,3 @@ private:
|
|||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,24 +1,14 @@
|
|||
#pragma once
|
||||
#ifndef __KEY_MOVIE_ONFILE_H__
|
||||
#define __KEY_MOVIE_ONFILE_H__
|
||||
|
||||
#include "PadData.h"
|
||||
#include "System.h"
|
||||
|
||||
//----------------------------
|
||||
// header
|
||||
// fseek since the direct place designation is done with, the order of the variables is important
|
||||
// Specifically, "FrameMax" +2 "UndoCount" is located at the position of +6 bytes
|
||||
// fseek<65>Œ<EFBFBD><C592>ڏꏊ<DA8F>w<EFBFBD>肵<EFBFBD>Ă<EFBFBD><C482><EFBFBD>̂ŕϐ<C595><CF90>̏<EFBFBD><CC8F>Ԃ͑厖
|
||||
// <20><>̓I<CC93>ɂ́uFrameMax<61>v<EFBFBD><76>+2<>uUndoCount<6E>v<EFBFBD><76>+6<>o<EFBFBD>C<EFBFBD>g<EFBFBD>̈ʒu<CA92>ɔz<C994>u
|
||||
//----------------------------
|
||||
struct InputRecordingHeader
|
||||
{
|
||||
u8 version = 3;
|
||||
u8 ID = 0xCC; // Especially, there is no meaning, a key file or ID for judgment
|
||||
// <20><><EFBFBD>ɈӖ<C988><D396>͂Ȃ<CD82><C882>Akey<65>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>p<EFBFBD><70>ID
|
||||
u8 ID = 0xCC;
|
||||
|
||||
char emu[50] = "PCSX2-1.4.0-rr";
|
||||
char emu[50] = "pcsx2-1.5.X";
|
||||
char author[50] = "";
|
||||
char cdrom[50] = "";
|
||||
|
||||
|
@ -105,7 +95,3 @@ private:
|
|||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/filepicker.h>
|
||||
|
||||
|
@ -24,4 +25,3 @@ private:
|
|||
wxButton *m_startRecording;
|
||||
wxButton *m_cancelRecording;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#pragma once
|
||||
#ifndef __PAD_DATA_H__
|
||||
#define __PAD_DATA_H__
|
||||
|
||||
#include <map>
|
||||
|
||||
|
@ -81,6 +79,3 @@ private:
|
|||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
|
@ -3,30 +3,25 @@
|
|||
#include "GSFrame.h"
|
||||
|
||||
#include "MemoryTypes.h"
|
||||
#include "App.h" // use "CoreThread"
|
||||
#include "Counters.h" // use"g_FrameCount"
|
||||
#include "App.h"
|
||||
#include "Counters.h"
|
||||
|
||||
#include "RecordingControls.h"
|
||||
|
||||
|
||||
RecordingControls g_RecordingControls;
|
||||
|
||||
// TODO - I think these functions could be named a lot better...
|
||||
|
||||
//-----------------------------------------------
|
||||
// The game is running with CoreThread, and it will not accept processing of GSFrame (wxFrame) while it is running
|
||||
// (It seems that two places are accepted for key input within CoreThread and GSFrame, too)
|
||||
// While CoreThread is stopped, the input of wxFrame works like a mechanism
|
||||
// <20>Q<EFBFBD>[<5B><><EFBFBD><EFBFBD>CoreThread<61>œ<EFBFBD><C593><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD>Ԃ<EFBFBD>GSFrame(wxFrame)<29>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD>t<F382AF95><74><EFBFBD>Ȃ<EFBFBD>
|
||||
// (<28>L<EFBFBD>[<5B><><EFBFBD>͂̎t<F382AF95><74><EFBFBD><EFBFBD>CoreThread<61><64><EFBFBD>GSFrame<6D><65><EFBFBD>2<EFBFBD>ӏ<EFBFBD><D38F><EFBFBD><EFBFBD>ݒ肳<DD92><E882B3>Ă<EFBFBD><C482><EFBFBD>ۂ<EFBFBD>)
|
||||
// CoreThread<61><64><EFBFBD><EFBFBD>~<7E><><EFBFBD>Ă<EFBFBD><C482><EFBFBD>Ԃ<EFBFBD>wxFrame<6D>̓<EFBFBD><CC93>͂<EFBFBD><CD82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>d<EFBFBD>g<EFBFBD>݂<EFBFBD><DD82>ۂ<EFBFBD>
|
||||
// Status on whether or not the current recording is stopped
|
||||
//-----------------------------------------------
|
||||
|
||||
bool RecordingControls::isStop()
|
||||
{
|
||||
return (fPauseState && CoreThread.IsOpen() && CoreThread.IsPaused());
|
||||
}
|
||||
//-----------------------------------------------
|
||||
// Counters(CoreThread)<29><>̒<EFBFBD>~<7E><><EFBFBD><EFBFBD>p (For stop judgment in)
|
||||
// Called after inputs are recorded for that frame, places lock on input recording, effectively releasing resources and resuming CoreThread.
|
||||
//-----------------------------------------------
|
||||
void RecordingControls::StartCheck()
|
||||
{
|
||||
|
@ -37,6 +32,10 @@ void RecordingControls::StartCheck()
|
|||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// Called at VSYNC End / VRender Begin, updates everything recording related for the next frame,
|
||||
// toggles RecordingControl flags back to enable input recording for the next frame.
|
||||
//-----------------------------------------------
|
||||
void RecordingControls::StopCheck()
|
||||
{
|
||||
if (fFrameAdvance) {
|
||||
|
@ -62,8 +61,7 @@ void RecordingControls::StopCheck()
|
|||
if (fStop && CoreThread.IsOpen() && CoreThread.IsRunning())
|
||||
{
|
||||
fPauseState = true;
|
||||
CoreThread.PauseSelf(); // I can not stop unless it is self
|
||||
// self<6C><66><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>Ǝ~<7E>܂<EFBFBD>Ȃ<EFBFBD>
|
||||
CoreThread.PauseSelf();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#pragma once
|
||||
#ifndef __MOVIE_CONTROLS_H__
|
||||
#define __MOVIE_CONTROLS_H__
|
||||
|
||||
class RecordingControls {
|
||||
public:
|
||||
|
@ -31,5 +29,3 @@ private:
|
|||
|
||||
};
|
||||
extern RecordingControls g_RecordingControls;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "PadData.h"
|
||||
|
||||
class RecordingInputManager
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/tglbtn.h>
|
||||
#include <wx/spinctrl.h>
|
||||
|
|
Loading…
Reference in New Issue