-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmemoryreader.h
More file actions
38 lines (31 loc) · 1.16 KB
/
Copy pathmemoryreader.h
File metadata and controls
38 lines (31 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MEMORYREADER_H
#define MEMORYREADER_H
#include <QObject>
#include <QList>
#include <QQueue>
#include "rc_internal.h"
#include "raclient.h"
#include "rastructs.h"
class MemoryReader : public QObject {
Q_OBJECT
public:
explicit MemoryReader(QObject *parent = nullptr);
void initTriggers(const QList<AchievementInfo>& achievements, const QString& richPresence, const unsigned int& ramSize, const bool customFirmware);
QList<QPair<unsigned int, unsigned int>> getUniqueMemoryAddresses();
bool processFrame(QByteArray& data, bool& customFirmware);
void resetRuntimeData();
signals:
void updateRichPresence(const QString& status);
private:
bool decrementAddressCounts(rc_memrefs_t &memrefs);
void remapTriggerAddresses(bool modified);
void mergeAddresses(const unsigned int blockSize);
QList<QPair<unsigned int, unsigned int>> uniqueMemoryAddresses;
QMap<unsigned int, rc_trigger_with_memrefs_t*> achievementTriggers;
QMap<unsigned int, unsigned int> addressMap;
QMap<unsigned int, int> addressCounts;
RAClient* raclient;
rc_richpresence_with_memrefs_t* mem_richpresence;
int rpState;
};
#endif // MEMORYREADER_H