-
Notifications
You must be signed in to change notification settings - Fork 0
/
plutonium_sdk.hpp
79 lines (66 loc) · 1.49 KB
/
plutonium_sdk.hpp
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#pragma once
#ifndef PLUTONIUM_SDK
#define PLUTONIUM_SDK
#pragma warning(push)
#pragma warning(disable: 4229)
#define PLUTONIUM_CALLBACK __cdecl
#ifdef PLUTONIUM_LIB
#define PLUTONIUM_API extern "C" __declspec(dllimport)
#else
#define PLUTONIUM_API extern "C" __declspec(dllexport)
#endif
#include <memory>
#include <string>
#include <cstdint>
#include <exception>
#include <functional>
#ifndef PLUTONIUM_SDK_VERSION
#define PLUTONIUM_SDK_VERSION 1u
#endif
#include "plutonium/exception.hpp"
#include "plutonium/unique_ptr.hpp"
#if PLUTONIUM_SDK_VERSION == 1u
#include "plutonium/v1/interface.hpp"
namespace plutonium::sdk
{
using iinterface = v1::iinterface;
namespace interfaces = v1::interfaces;
namespace types = v1::types;
}
#else
#error Unknown SDK version specified!
#endif
namespace plutonium::sdk
{
enum class game
{
iw5,
t4,
t5,
t6,
};
class plugin
{
public:
virtual ~plugin() = default;
//
// plugin information
//
virtual std::uint32_t plugin_version()
{
return PLUTONIUM_SDK_VERSION;
}
virtual const char* plugin_name() = 0;
virtual bool is_game_supported([[maybe_unused]] game game)
{
return true;
}
//
// plugin initialization & shutdown
//
virtual void on_startup(iinterface* interface_ptr, game game) = 0;
virtual void on_shutdown() = 0;
};
}
#pragma warning(pop)
#endif