about summary refs log tree commit diff stats
path: root/Source/RandomizerCore.h
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2018-11-01 20:56:56 -0700
committerjbzdarkid <jbzdarkid@gmail.com>2018-11-01 20:56:56 -0700
commit5de975b03c7200cc66188a4b1a76e1213524975d (patch)
treee3ed982a0dd4fee4db402532aeda2e6bf5e66344 /Source/RandomizerCore.h
parent3557f0ba80942397a9d963208695b4fa80290cb0 (diff)
downloadwitness-tutorializer-5de975b03c7200cc66188a4b1a76e1213524975d.tar.gz
witness-tutorializer-5de975b03c7200cc66188a4b1a76e1213524975d.tar.bz2
witness-tutorializer-5de975b03c7200cc66188a4b1a76e1213524975d.zip
pain and suffering, but I can read/write decorations & dots.
Diffstat (limited to 'Source/RandomizerCore.h')
-rw-r--r--Source/RandomizerCore.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/Source/RandomizerCore.h b/Source/RandomizerCore.h index 7ec8e33..27e5724 100644 --- a/Source/RandomizerCore.h +++ b/Source/RandomizerCore.h
@@ -1,9 +1,6 @@
1#pragma once 1#pragma once
2#include "Memory.h" 2#include "Memory.h"
3 3
4// #define GLOBALS 0x5B28C0
5#define GLOBALS 0x62A080
6
7__declspec(selectany) int SWAP_NONE = 0x0; 4__declspec(selectany) int SWAP_NONE = 0x0;
8__declspec(selectany) int SWAP_TARGETS = 0x1; 5__declspec(selectany) int SWAP_TARGETS = 0x1;
9__declspec(selectany) int SWAP_LINES = 0x2; 6__declspec(selectany) int SWAP_LINES = 0x2;
@@ -20,20 +17,10 @@ public:
20 void ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order, std::vector<int> targets = {}); 17 void ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order, std::vector<int> targets = {});
21 void ReassignNames(const std::vector<int>& panels, const std::vector<int>& order); 18 void ReassignNames(const std::vector<int>& panels, const std::vector<int>& order);
22 19
23 template <class T>
24 std::vector<T> ReadPanelData(int panel, int offset, size_t size) {
25 return _memory.ReadData<T>({GLOBALS, 0x18, panel*8, offset}, size);
26 }
27
28 template <class T>
29 void WritePanelData(int panel, int offset, const std::vector<T>& data) {
30 _memory.WriteData<T>({GLOBALS, 0x18, panel*8, offset}, data);
31 }
32
33 short ReadMetadata(); 20 short ReadMetadata();
34 void WriteMetadata(short metadata); 21 void WriteMetadata(short metadata);
35 22
36private: 23// private:
37 Memory _memory = Memory("witness64_d3d11.exe"); 24 Memory _memory = Memory("witness64_d3d11.exe");
38}; 25};
39 26