Fixed TAS splicer functions so that they build uncommented.

This commit is contained in:
mjbudd77 2021-11-05 15:08:42 -04:00
parent be417b7d3b
commit 39f90e04e7
3 changed files with 740 additions and 658 deletions

View File

@ -34,6 +34,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QStandardPaths> #include <QStandardPaths>
#include <QApplication> #include <QApplication>
#include <QGuiApplication>
#include "fceu.h" #include "fceu.h"
#include "movie.h" #include "movie.h"
@ -289,6 +290,8 @@ TasEditorWindow::TasEditorWindow(QWidget *parent)
::branches = &this->branches; ::branches = &this->branches;
::splicer = &this->splicer; ::splicer = &this->splicer;
clipboard = QGuiApplication::clipboard();
setWindowTitle("TAS Editor"); setWindowTitle("TAS Editor");
resize(512, 512); resize(512, 512);
@ -1247,6 +1250,16 @@ void TasEditorWindow::playbackFrameForwardFull(void)
fceuWrapperUnLock(); fceuWrapperUnLock();
} }
// ---------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------
void TasEditorWindow::loadClipboard(const char *txt)
{
clipboard->setText( tr(txt), QClipboard::Clipboard );
if ( clipboard->supportsSelection() )
{
clipboard->setText( tr(txt), QClipboard::Selection );
}
}
// ----------------------------------------------------------------------------------------------
// following functions use function parameters to determine range of frames // following functions use function parameters to determine range of frames
void TasEditorWindow::toggleInput(int start, int end, int joy, int button, int consecutivenessTag) void TasEditorWindow::toggleInput(int start, int end, int joy, int button, int consecutivenessTag)
{ {

View File

@ -31,6 +31,7 @@
#include <QFont> #include <QFont>
#include <QPainter> #include <QPainter>
#include <QShortcut> #include <QShortcut>
#include <QClipboard>
#include "Qt/TasEditor/taseditor_config.h" #include "Qt/TasEditor/taseditor_config.h"
#include "Qt/TasEditor/taseditor_project.h" #include "Qt/TasEditor/taseditor_project.h"
@ -164,6 +165,7 @@ class TasEditorWindow : public QDialog
HISTORY history; HISTORY history;
BRANCHES branches; BRANCHES branches;
void loadClipboard(const char *txt);
void toggleInput(int start, int end, int joy, int button, int consecutivenessTag); void toggleInput(int start, int end, int joy, int button, int consecutivenessTag);
void setInputUsingPattern(int start, int end, int joy, int button, int consecutivenessTag); void setInputUsingPattern(int start, int end, int joy, int button, int consecutivenessTag);
@ -227,6 +229,8 @@ class TasEditorWindow : public QDialog
QPushButton *similarBtn; QPushButton *similarBtn;
QPushButton *moreBtn; QPushButton *moreBtn;
QClipboard *clipboard;
std::vector<std::string> patternsNames; std::vector<std::string> patternsNames;
std::vector<std::vector<uint8_t>> patterns; std::vector<std::vector<uint8_t>> patterns;
private: private:
@ -257,6 +261,7 @@ class TasEditorWindow : public QDialog
void playbackFrameForwardFull(void); void playbackFrameForwardFull(void);
friend class RECORDER; friend class RECORDER;
friend class SPLICER;
}; };
extern TASEDITOR_PROJECT *project; extern TASEDITOR_PROJECT *project;

File diff suppressed because it is too large Load Diff