diff options
Diffstat (limited to 'WitnessRandomizer/WitnessRandomizer.h')
-rw-r--r-- | WitnessRandomizer/WitnessRandomizer.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/WitnessRandomizer/WitnessRandomizer.h b/WitnessRandomizer/WitnessRandomizer.h index 527fe13..a824fba 100644 --- a/WitnessRandomizer/WitnessRandomizer.h +++ b/WitnessRandomizer/WitnessRandomizer.h | |||
@@ -4,24 +4,27 @@ int SWAP_NONE = 0x0; | |||
4 | int SWAP_TARGETS = 0x1; | 4 | int SWAP_TARGETS = 0x1; |
5 | int SWAP_LINES = 0x2; | 5 | int SWAP_LINES = 0x2; |
6 | int SWAP_STYLE = 0x4; | 6 | int SWAP_STYLE = 0x4; |
7 | int SWAP_BACK_DISTANCE = 0x8; | ||
8 | 7 | ||
9 | class WitnessRandomizer { | 8 | class WitnessRandomizer { |
10 | public: | 9 | public: |
11 | |||
12 | WitnessRandomizer(); | 10 | WitnessRandomizer(); |
13 | 11 | ||
14 | void Randomize(std::vector<int> &panels, int flags); | 12 | void Randomize(std::vector<int> &panels, int flags); |
15 | void RandomizeRange(std::vector<int> &panels, int flags, size_t startIndex, size_t endIndex); | 13 | void RandomizeRange(std::vector<int> &panels, int flags, size_t startIndex, size_t endIndex); |
16 | void SwapPanels(int panel1, int panel2, int flags); | 14 | void SwapPanels(int panel1, int panel2, int flags); |
17 | void ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order); | 15 | void ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order); |
18 | void Overwrite(int panel1, int panel2, int offset, int size); | ||
19 | 16 | ||
20 | //private: | 17 | template <class T> |
21 | void TurnOn(int panel); | 18 | std::vector<T> ReadPanelData(int panel, int offset, int size) { |
22 | void TurnOff(int panel); | 19 | return _memory.ReadData<T>({_globals, 0x18, panel*8, offset}, size); |
20 | } | ||
23 | 21 | ||
24 | void SwapPanelData(int panel1, int panel2, int finalOffset, int dataSize); | 22 | template <class T> |
23 | void WritePanelData(int panel, int offset, const std::vector<T>& data) { | ||
24 | _memory.WriteData<T>({_globals, 0x18, panel*8, offset}, data); | ||
25 | } | ||
25 | 26 | ||
27 | private: | ||
26 | Memory _memory; | 28 | Memory _memory; |
29 | int _globals = 0x5B28C0; | ||
27 | }; \ No newline at end of file | 30 | }; \ No newline at end of file |