VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
GameDataRecord.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
#include <map>
5
#include <string>
6
7
namespace
VoltMod
8
{
9
10
/** Addresses and offsets from a successful load, normalized for comparison across builds. */
11
struct
GameDataRecord
12
{
13
struct
Location
14
{
15
std::string
Module
;
16
uint64_t
Rva
= 0;
17
};
18
19
struct
Slot
20
{
21
std::string
Module
;
22
uint64_t
Table
= 0;
///< The class table's RVA.
23
int
Index
= -1;
24
uint64_t
Code
= 0;
///< RVA of the function in that slot; 0 when a hook trampoline outside the module holds it.
25
};
26
27
std::string
Build
;
28
std::map<std::string, Location>
Functions
;
29
std::map<std::string, Location>
Globals
;
30
std::map<std::string, Slot>
VTables
;
31
std::map<std::string, int>
Offsets
;
32
};
33
34
/** Write @p resolved to `addons/voltmod/gamedata/dumps/resolved.json` once per build; failures only log. */
35
void
WriteGameDataRecord
(
const
GameDataRecord
& resolved);
36
37
}
// namespace VoltMod
VoltMod
Definition
Options.hpp:13
VoltMod::WriteGameDataRecord
void WriteGameDataRecord(const GameDataRecord &resolved)
Definition
GameDataRecord.cpp:37
VoltMod::GameDataRecord::Location
Definition
GameDataRecord.hpp:14
VoltMod::GameDataRecord::Location::Rva
uint64_t Rva
Definition
GameDataRecord.hpp:16
VoltMod::GameDataRecord::Location::Module
std::string Module
Definition
GameDataRecord.hpp:15
VoltMod::GameDataRecord::Slot
Definition
GameDataRecord.hpp:20
VoltMod::GameDataRecord::Slot::Code
uint64_t Code
RVA of the function in that slot; 0 when a hook trampoline outside the module holds it.
Definition
GameDataRecord.hpp:24
VoltMod::GameDataRecord::Slot::Table
uint64_t Table
The class table's RVA.
Definition
GameDataRecord.hpp:22
VoltMod::GameDataRecord::Slot::Index
int Index
Definition
GameDataRecord.hpp:23
VoltMod::GameDataRecord::Slot::Module
std::string Module
Definition
GameDataRecord.hpp:21
VoltMod::GameDataRecord
Definition
GameDataRecord.hpp:12
VoltMod::GameDataRecord::Functions
std::map< std::string, Location > Functions
Definition
GameDataRecord.hpp:28
VoltMod::GameDataRecord::Globals
std::map< std::string, Location > Globals
Definition
GameDataRecord.hpp:29
VoltMod::GameDataRecord::Offsets
std::map< std::string, int > Offsets
Definition
GameDataRecord.hpp:31
VoltMod::GameDataRecord::Build
std::string Build
Definition
GameDataRecord.hpp:27
VoltMod::GameDataRecord::VTables
std::map< std::string, Slot > VTables
Definition
GameDataRecord.hpp:30
src
Host
GameData
GameDataRecord.hpp
Generated by
1.15.0