VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
GameDataLocation.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
#include <string_view>
5
6
namespace
VoltMod
7
{
8
9
/** The sections of `gamedata.jsonc`, as flags: an address binds from a function or a global. */
10
enum class
GameDataSection
:
uint32_t
11
{
12
Function
= 1u << 0,
13
Global
= 1u << 1,
14
VTable
= 1u << 2,
15
Offset
= 1u << 3,
16
};
17
18
constexpr
GameDataSection
operator|
(
GameDataSection
left
,
GameDataSection
right
)
19
{
20
return
static_cast<
GameDataSection
>
(
static_cast<
uint32_t
>
(
left
) |
static_cast<
uint32_t
>
(
right
));
21
}
22
23
/** What gamedata holds for one key. */
24
struct
GameDataLocation
25
{
26
bool
Found
=
false
;
27
/** A function or global address, or the class table a vtable slot counts in. */
28
void
*
Address
=
nullptr
;
29
/** A vtable slot index or a byte offset. -1 when unbound. */
30
int
Value
= -1;
31
/** Why it did not bind. Borrowed until the next lookup; copy it to keep it. Empty when @ref Found. */
32
std::string_view
Reason
;
33
};
34
35
}
// namespace VoltMod
VoltMod::Address
Definition
BindingTypes.hpp:13
VoltMod::Offset
Definition
BindingTypes.hpp:78
VoltMod
Definition
Options.hpp:13
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
VoltMod::operator|
constexpr GameDataSection operator|(GameDataSection left, GameDataSection right)
Definition
GameDataLocation.hpp:18
VoltMod::GameDataSection
GameDataSection
Definition
GameDataLocation.hpp:11
VoltMod::GameDataSection::Global
@ Global
VoltMod::GameDataSection::VTable
@ VTable
VoltMod::GameDataSection::Function
@ Function
VoltMod::GameDataLocation
Definition
GameDataLocation.hpp:25
VoltMod::GameDataLocation::Value
int Value
Definition
GameDataLocation.hpp:30
VoltMod::GameDataLocation::Reason
std::string_view Reason
Definition
GameDataLocation.hpp:32
VoltMod::GameDataLocation::Found
bool Found
Definition
GameDataLocation.hpp:26
include
VoltMod
Engine
GameData
GameDataLocation.hpp
Generated by
1.9.8