forked from kugelrund/LolSceneSwitch
/
LolSceneSwitch.h
64 lines (43 loc) · 1.17 KB
/
LolSceneSwitch.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#pragma once
#include <array>
#include "Settings.h"
extern "C" __declspec(dllexport) bool LoadPlugin();
extern "C" __declspec(dllexport) void UnloadPlugin();
extern "C" __declspec(dllexport) CTSTR GetPluginName();
extern "C" __declspec(dllexport) CTSTR GetPluginDescription();
extern "C" __declspec(dllexport) void OnStartStream();
extern "C" __declspec(dllexport) void OnStopStream();
extern "C" __declspec(dllexport) void ConfigPlugin(_In_ HWND);
enum class Map
{
UNKNOWN, SUMMONERS_RIFT, CRYSTAL_SCAR, TWISTED_TREELINE, HOWLING_ABYSS
};
class LolSceneSwitch
{
private:
Settings settings;
HANDLE lolProcessMonitor;
bool runMonitoring;
Map currentMap;
void ChangeScene(State state);
void SetScene(String scene) const;
static DWORD WINAPI MonitorThread(_In_ LPVOID lpParam);
public:
LolSceneSwitch();
~LolSceneSwitch();
bool IsMonitoring() const;
Settings & GetSettingsRef();
void StartMonitoring();
void EndMonitoring();
};
class LogReader
{
private:
HANDLE file;
unsigned int index = 0;
static unsigned int const BUFFER_SIZE = 256;
static std::array<char const *, 3> const searchStrings;
public:
LogReader(_In_ HANDLE file);
State GetState();
};