mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
Merge remote-tracking branch 'origin/feature/demonware' into develop
This commit is contained in:
commit
4597a0c356
@ -184,7 +184,8 @@ namespace exception
|
|||||||
void write_minidump(const LPEXCEPTION_POINTERS exceptioninfo)
|
void write_minidump(const LPEXCEPTION_POINTERS exceptioninfo)
|
||||||
{
|
{
|
||||||
const std::string crash_name = utils::string::va("minidumps/s1x-crash-%d-%s.zip",
|
const std::string crash_name = utils::string::va("minidumps/s1x-crash-%d-%s.zip",
|
||||||
game::environment::get_real_mode(), get_timestamp().data());
|
game::environment::get_real_mode(),
|
||||||
|
get_timestamp().data());
|
||||||
|
|
||||||
utils::compression::zip::archive zip_file{};
|
utils::compression::zip::archive zip_file{};
|
||||||
zip_file.add("crash.dmp", create_minidump(exceptioninfo));
|
zip_file.add("crash.dmp", create_minidump(exceptioninfo));
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include "command.hpp"
|
#include "command.hpp"
|
||||||
#include "game_console.hpp"
|
#include "game_console.hpp"
|
||||||
|
|
||||||
#include <utils/hook.hpp>
|
|
||||||
|
|
||||||
namespace stats
|
namespace stats
|
||||||
{
|
{
|
||||||
class component final : public component_interface
|
class component final : public component_interface
|
||||||
@ -29,11 +27,12 @@ namespace stats
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SL_FindString
|
// SL_FindString
|
||||||
auto lookupString = game::SL_FindString(params.get(1));
|
const auto lookup_string = game::SL_FindString(params.get(1));
|
||||||
auto value = atoi(params.get(2));
|
const auto value = atoi(params.get(2));
|
||||||
|
|
||||||
// SetPlayerDataInt
|
// SetPlayerDataInt
|
||||||
reinterpret_cast<void(*)(signed int, unsigned int, unsigned int, unsigned int)>(0x1403BF550)(0, lookupString, value, 0);
|
reinterpret_cast<void(*)(signed int, unsigned int, unsigned int, unsigned int)>(0x1403BF550)(
|
||||||
|
0, lookup_string, value, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
command::add("getPlayerDataInt", [](const command::params& params)
|
command::add("getPlayerDataInt", [](const command::params& params)
|
||||||
@ -45,10 +44,11 @@ namespace stats
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SL_FindString
|
// SL_FindString
|
||||||
auto lookupString = game::SL_FindString(params.get(1));
|
const auto lookup_string = game::SL_FindString(params.get(1));
|
||||||
|
|
||||||
// GetPlayerDataInt
|
// GetPlayerDataInt
|
||||||
auto result = reinterpret_cast<int(*)(signed int, unsigned int, unsigned int)>(0x1403BE860)(0, lookupString, 0);
|
const auto result = reinterpret_cast<int(*)(signed int, unsigned int, unsigned int)>(0x1403BE860)(
|
||||||
|
0, lookup_string, 0);
|
||||||
game_console::print(game_console::con_type_info, "%d\n", result);
|
game_console::print(game_console::con_type_info, "%d\n", result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ namespace demonware
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool byte_buffer::read_array_header(const unsigned char expected, unsigned int* element_count,
|
bool byte_buffer::read_array_header(const unsigned char expected, unsigned int* element_count,
|
||||||
unsigned int* element_size)
|
unsigned int* element_size)
|
||||||
{
|
{
|
||||||
if (element_count) *element_count = 0;
|
if (element_count) *element_count = 0;
|
||||||
if (element_size) *element_size = 0;
|
if (element_size) *element_size = 0;
|
||||||
@ -237,7 +237,7 @@ namespace demonware
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool byte_buffer::write_array_header(const unsigned char type, const unsigned int element_count,
|
bool byte_buffer::write_array_header(const unsigned char type, const unsigned int element_count,
|
||||||
const unsigned int element_size)
|
const unsigned int element_size)
|
||||||
{
|
{
|
||||||
const auto using_types = this->is_using_data_types();
|
const auto using_types = this->is_using_data_types();
|
||||||
this->set_use_data_types(false);
|
this->set_use_data_types(false);
|
||||||
|
@ -4,13 +4,18 @@
|
|||||||
|
|
||||||
namespace demonware
|
namespace demonware
|
||||||
{
|
{
|
||||||
|
|
||||||
class bdTaskResult
|
class bdTaskResult
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~bdTaskResult() = default;
|
virtual ~bdTaskResult() = default;
|
||||||
virtual void serialize(byte_buffer*) { }
|
|
||||||
virtual void deserialize(byte_buffer*) { }
|
virtual void serialize(byte_buffer*)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void deserialize(byte_buffer*)
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class bdFileData final : public bdTaskResult
|
class bdFileData final : public bdTaskResult
|
||||||
@ -136,5 +141,4 @@ namespace demonware
|
|||||||
buffer->read_string(&this->timezone);
|
buffer->read_string(&this->timezone);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ namespace demonware
|
|||||||
|
|
||||||
std::string packet_buffer;
|
std::string packet_buffer;
|
||||||
|
|
||||||
void calculate_hmacs_s1(const char* data_, unsigned int data_size, const char* key, unsigned int key_size,
|
void calculate_hmacs_s1(const char* data_, const unsigned int data_size, const char* key, const unsigned int key_size,
|
||||||
char* dst, unsigned int dst_size)
|
char* dst, const unsigned int dst_size)
|
||||||
{
|
{
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
unsigned int pos = 0;
|
unsigned int pos = 0;
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
namespace demonware
|
namespace demonware
|
||||||
{
|
{
|
||||||
|
|
||||||
std::string unencrypted_reply::data()
|
std::string unencrypted_reply::data()
|
||||||
{
|
{
|
||||||
byte_buffer result;
|
byte_buffer result;
|
||||||
@ -29,9 +28,9 @@ namespace demonware
|
|||||||
byte_buffer enc_buffer;
|
byte_buffer enc_buffer;
|
||||||
enc_buffer.set_use_data_types(false);
|
enc_buffer.set_use_data_types(false);
|
||||||
|
|
||||||
enc_buffer.write_uint32(static_cast<unsigned int>(this->buffer_.size())); // service data size CHECKTHIS!!
|
enc_buffer.write_uint32(static_cast<unsigned int>(this->buffer_.size())); // service data size CHECKTHIS!!
|
||||||
enc_buffer.write_byte(this->type()); // TASK_REPLY type
|
enc_buffer.write_byte(this->type()); // TASK_REPLY type
|
||||||
enc_buffer.write(this->buffer_); // service data
|
enc_buffer.write(this->buffer_); // service data
|
||||||
|
|
||||||
auto aligned_data = enc_buffer.get_buffer();
|
auto aligned_data = enc_buffer.get_buffer();
|
||||||
auto size = aligned_data.size();
|
auto size = aligned_data.size();
|
||||||
@ -45,7 +44,7 @@ namespace demonware
|
|||||||
const auto enc_data = utils::cryptography::aes::encrypt(aligned_data, seed, demonware::get_encrypt_key());
|
const auto enc_data = utils::cryptography::aes::encrypt(aligned_data, seed, demonware::get_encrypt_key());
|
||||||
|
|
||||||
// header : encrypted service data : hash
|
// header : encrypted service data : hash
|
||||||
static std::int32_t msg_count = 0;
|
static auto msg_count = 0;
|
||||||
msg_count++;
|
msg_count++;
|
||||||
|
|
||||||
byte_buffer response;
|
byte_buffer response;
|
||||||
@ -60,7 +59,8 @@ namespace demonware
|
|||||||
|
|
||||||
// hash entire packet and append end
|
// hash entire packet and append end
|
||||||
unsigned int outlen = 20;
|
unsigned int outlen = 20;
|
||||||
auto hash_data = utils::cryptography::hmac_sha1::process(response.get_buffer(), demonware::get_hmac_key(), &outlen);
|
auto hash_data = utils::cryptography::hmac_sha1::process(response.get_buffer(), demonware::get_hmac_key(),
|
||||||
|
&outlen);
|
||||||
hash_data.resize(8);
|
hash_data.resize(8);
|
||||||
response.write(8, hash_data.data());
|
response.write(8, hash_data.data());
|
||||||
|
|
||||||
@ -86,5 +86,4 @@ namespace demonware
|
|||||||
|
|
||||||
this->server_->send_reply(reply.get());
|
this->server_->send_reply(reply.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ namespace demonware
|
|||||||
class typed_reply : public raw_reply
|
class typed_reply : public raw_reply
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typed_reply(uint8_t _type) : type_(_type)
|
typed_reply(const uint8_t _type) : type_(_type)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,12 +71,12 @@ namespace demonware
|
|||||||
class unencrypted_reply final : public typed_reply
|
class unencrypted_reply final : public typed_reply
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
unencrypted_reply(uint8_t _type, bit_buffer* bbuffer) : typed_reply(_type)
|
unencrypted_reply(const uint8_t _type, bit_buffer* bbuffer) : typed_reply(_type)
|
||||||
{
|
{
|
||||||
this->buffer_.append(bbuffer->get_buffer());
|
this->buffer_.append(bbuffer->get_buffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
unencrypted_reply(uint8_t _type, byte_buffer* bbuffer) : typed_reply(_type)
|
unencrypted_reply(const uint8_t _type, byte_buffer* bbuffer) : typed_reply(_type)
|
||||||
{
|
{
|
||||||
this->buffer_.append(bbuffer->get_buffer());
|
this->buffer_.append(bbuffer->get_buffer());
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ namespace demonware
|
|||||||
class service_reply final
|
class service_reply final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
service_reply(service_server* _server, uint8_t _type, uint32_t _error)
|
service_reply(service_server* _server, const uint8_t _type, const uint32_t _error)
|
||||||
: type_(_type), error_(_error), reply_(_server, 1)
|
: type_(_type), error_(_error), reply_(_server, 1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,9 @@ namespace demonware
|
|||||||
std::string packet_1 = buffer.get_remaining();
|
std::string packet_1 = buffer.get_remaining();
|
||||||
demonware::queue_packet_to_hash(packet_1);
|
demonware::queue_packet_to_hash(packet_1);
|
||||||
|
|
||||||
const std::string packet_2("\x16\x00\x00\x00\xab\x81\xd2\x00\x00\x00\x13\x37\x13\x37\x13\x37\x13\x37\x13\x37\x13\x37\x13\x37\x13\x37", 26);
|
const std::string packet_2(
|
||||||
|
"\x16\x00\x00\x00\xab\x81\xd2\x00\x00\x00\x13\x37\x13\x37\x13\x37\x13\x37\x13\x37\x13\x37\x13\x37\x13\x37",
|
||||||
|
26);
|
||||||
demonware::queue_packet_to_hash(packet_2);
|
demonware::queue_packet_to_hash(packet_2);
|
||||||
|
|
||||||
raw_reply reply(packet_2);
|
raw_reply reply(packet_2);
|
||||||
@ -121,7 +123,9 @@ namespace demonware
|
|||||||
char hash[8];
|
char hash[8];
|
||||||
std::memcpy(hash, &(enc.data()[enc.size() - 8]), 8);
|
std::memcpy(hash, &(enc.data()[enc.size() - 8]), 8);
|
||||||
|
|
||||||
std::string dec = utils::cryptography::aes::decrypt(std::string(enc.data(), enc.size() - 8), std::string(seed, 16), demonware::get_decrypt_key());
|
std::string dec = utils::cryptography::aes::decrypt(
|
||||||
|
std::string(enc.data(), enc.size() - 8), std::string(seed, 16),
|
||||||
|
demonware::get_decrypt_key());
|
||||||
|
|
||||||
byte_buffer serv(dec);
|
byte_buffer serv(dec);
|
||||||
serv.set_use_data_types(false);
|
serv.set_use_data_types(false);
|
||||||
@ -170,5 +174,4 @@ namespace demonware
|
|||||||
this->create_reply(task_id)->send();
|
this->create_reply(task_id)->send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace demonware
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~service_server() = default;
|
virtual ~service_server() = default;
|
||||||
|
|
||||||
virtual std::shared_ptr<remote_reply> create_message(uint8_t type)
|
virtual std::shared_ptr<remote_reply> create_message(uint8_t type)
|
||||||
{
|
{
|
||||||
auto reply = std::make_shared<remote_reply>(this, type);
|
auto reply = std::make_shared<remote_reply>(this, type);
|
||||||
@ -24,5 +24,4 @@ namespace demonware
|
|||||||
|
|
||||||
virtual void send_reply(reply* data) = 0;
|
virtual void send_reply(reply* data) = 0;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
} // namespace demonware
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "stun_server.hpp"
|
#include "stun_server.hpp"
|
||||||
|
|
||||||
|
#include "../byte_buffer.hpp"
|
||||||
|
|
||||||
namespace demonware
|
namespace demonware
|
||||||
{
|
{
|
||||||
void stun_server::handle(const endpoint_data& endpoint, const std::string& packet)
|
void stun_server::handle(const endpoint_data& endpoint, const std::string& packet)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "udp_server.hpp"
|
#include "udp_server.hpp"
|
||||||
#include "../byte_buffer.hpp"
|
|
||||||
|
|
||||||
namespace demonware
|
namespace demonware
|
||||||
{
|
{
|
||||||
|
@ -9,14 +9,14 @@ namespace demonware
|
|||||||
this->register_task(4, &bdAnticheat::report_console_details);
|
this->register_task(4, &bdAnticheat::report_console_details);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdAnticheat::unk2(service_server* server, byte_buffer* buffer) const
|
void bdAnticheat::unk2(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO: Read data as soon as needed
|
// TODO: Read data as soon as needed
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdAnticheat::report_console_details(service_server* server, byte_buffer* buffer) const
|
void bdAnticheat::report_console_details(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO: Read data as soon as needed
|
// TODO: Read data as soon as needed
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -9,14 +9,14 @@ namespace demonware
|
|||||||
this->register_task(3, &bdContentStreaming::unk3);
|
this->register_task(3, &bdContentStreaming::unk3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdContentStreaming::unk2(service_server* server, byte_buffer* buffer) const
|
void bdContentStreaming::unk2(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdContentStreaming::unk3(service_server* server, byte_buffer* buffer) const
|
void bdContentStreaming::unk3(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -9,14 +9,14 @@ namespace demonware
|
|||||||
this->register_task(2, &bdCounters::unk2);
|
this->register_task(2, &bdCounters::unk2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdCounters::unk1(service_server* server, byte_buffer* buffer) const
|
void bdCounters::unk1(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdCounters::unk2(service_server* server, byte_buffer* buffer) const
|
void bdCounters::unk2(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -8,7 +8,7 @@ namespace demonware
|
|||||||
this->register_task(6, &bdEventLog::unk6);
|
this->register_task(6, &bdEventLog::unk6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdEventLog::unk6(service_server* server, byte_buffer* buffer) const
|
void bdEventLog::unk6(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -11,28 +11,28 @@ namespace demonware
|
|||||||
this->register_task(8, &bdFacebook::unk8);
|
this->register_task(8, &bdFacebook::unk8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdFacebook::unk1(service_server* server, byte_buffer* buffer) const
|
void bdFacebook::unk1(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdFacebook::unk3(service_server* server, byte_buffer* buffer) const
|
void bdFacebook::unk3(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdFacebook::unk7(service_server* server, byte_buffer* buffer) const
|
void bdFacebook::unk7(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdFacebook::unk8(service_server* server, byte_buffer* buffer) const
|
void bdFacebook::unk8(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -9,14 +9,14 @@ namespace demonware
|
|||||||
this->register_task(4, &bdGroups::unk4);
|
this->register_task(4, &bdGroups::unk4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdGroups::set_groups(service_server* server, byte_buffer* buffer) const
|
void bdGroups::set_groups(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdGroups::unk4(service_server* server, byte_buffer* buffer) const
|
void bdGroups::unk4(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -9,14 +9,14 @@ namespace demonware
|
|||||||
this->register_task(3, &bdMarketing::unk3);
|
this->register_task(3, &bdMarketing::unk3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMarketing::unk2(service_server* server, byte_buffer* buffer) const
|
void bdMarketing::unk2(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMarketing::unk3(service_server* server, byte_buffer* buffer) const
|
void bdMarketing::unk3(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -12,35 +12,35 @@ namespace demonware
|
|||||||
this->register_task(16, &bdMatchMaking2::unk16);
|
this->register_task(16, &bdMatchMaking2::unk16);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMatchMaking2::unk1(service_server* server, byte_buffer* buffer) const
|
void bdMatchMaking2::unk1(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMatchMaking2::unk2(service_server* server, byte_buffer* buffer) const
|
void bdMatchMaking2::unk2(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMatchMaking2::unk3(service_server* server, byte_buffer* buffer) const
|
void bdMatchMaking2::unk3(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMatchMaking2::unk5(service_server* server, byte_buffer* buffer) const
|
void bdMatchMaking2::unk5(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdMatchMaking2::unk16(service_server* server, byte_buffer* buffer) const
|
void bdMatchMaking2::unk16(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -9,14 +9,14 @@ namespace demonware
|
|||||||
this->register_task(3, &bdPresence::unk3);
|
this->register_task(3, &bdPresence::unk3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdPresence::unk1(service_server* server, byte_buffer* buffer) const
|
void bdPresence::unk1(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdPresence::unk3(service_server* server, byte_buffer* buffer) const
|
void bdPresence::unk3(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -8,7 +8,7 @@ namespace demonware
|
|||||||
this->register_task(3, &bdProfiles::unk3);
|
this->register_task(3, &bdProfiles::unk3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdProfiles::unk3(service_server* server, byte_buffer* buffer) const
|
void bdProfiles::unk3(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -9,14 +9,14 @@ namespace demonware
|
|||||||
this->register_task(2, &bdRichPresence::unk2);
|
this->register_task(2, &bdRichPresence::unk2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdRichPresence::unk1(service_server* server, byte_buffer* buffer) const
|
void bdRichPresence::unk1(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdRichPresence::unk2(service_server* server, byte_buffer* buffer) const
|
void bdRichPresence::unk2(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -12,35 +12,35 @@ namespace demonware
|
|||||||
this->register_task(11, &bdStats::unk11);
|
this->register_task(11, &bdStats::unk11);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStats::unk1(service_server* server, byte_buffer* buffer) const
|
void bdStats::unk1(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStats::unk3(service_server* server, byte_buffer* buffer) const
|
void bdStats::unk3(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStats::unk4(service_server* server, byte_buffer* buffer) const
|
void bdStats::unk4(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStats::unk8(service_server* server, byte_buffer* buffer) const
|
void bdStats::unk8(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStats::unk11(service_server* server, byte_buffer* buffer) const
|
void bdStats::unk11(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -9,172 +9,172 @@
|
|||||||
|
|
||||||
namespace demonware
|
namespace demonware
|
||||||
{
|
{
|
||||||
bdStorage::bdStorage() : service(10, "bdStorage")
|
bdStorage::bdStorage() : service(10, "bdStorage")
|
||||||
{
|
{
|
||||||
this->register_task(6, &bdStorage::list_publisher_files);
|
this->register_task(6, &bdStorage::list_publisher_files);
|
||||||
this->register_task(7, &bdStorage::get_publisher_file);
|
this->register_task(7, &bdStorage::get_publisher_file);
|
||||||
this->register_task(10, &bdStorage::set_user_file);
|
this->register_task(10, &bdStorage::set_user_file);
|
||||||
this->register_task(12, &bdStorage::get_user_file);
|
this->register_task(12, &bdStorage::get_user_file);
|
||||||
this->register_task(13, &bdStorage::unk13);
|
this->register_task(13, &bdStorage::unk13);
|
||||||
|
|
||||||
this->map_publisher_resource("motd-.*\\.txt", DW_MOTD);
|
this->map_publisher_resource("motd-.*\\.txt", DW_MOTD);
|
||||||
this->map_publisher_resource("ffotd-.*\\.ff", DW_FASTFILE);
|
this->map_publisher_resource("ffotd-.*\\.ff", DW_FASTFILE);
|
||||||
this->map_publisher_resource("playlists(_.+)?\\.aggr", DW_PLAYLISTS);
|
this->map_publisher_resource("playlists(_.+)?\\.aggr", DW_PLAYLISTS);
|
||||||
this->map_publisher_resource("social_[Tt][Uu][0-9]+\\.cfg", DW_SOCIAL_CONFIG);
|
this->map_publisher_resource("social_[Tt][Uu][0-9]+\\.cfg", DW_SOCIAL_CONFIG);
|
||||||
this->map_publisher_resource("mm\\.cfg", DW_MM_CONFIG);
|
this->map_publisher_resource("mm\\.cfg", DW_MM_CONFIG);
|
||||||
this->map_publisher_resource("entitlement_config\\.info", DW_ENTITLEMENT_CONFIG);
|
this->map_publisher_resource("entitlement_config\\.info", DW_ENTITLEMENT_CONFIG);
|
||||||
this->map_publisher_resource("lootConfig_[Tt][Uu][0-9]+\\.csv", DW_LOOT_CONFIG);
|
this->map_publisher_resource("lootConfig_[Tt][Uu][0-9]+\\.csv", DW_LOOT_CONFIG);
|
||||||
this->map_publisher_resource("winStoreConfig_[Tt][Uu][0-9]+\\.csv", DW_STORE_CONFIG);
|
this->map_publisher_resource("winStoreConfig_[Tt][Uu][0-9]+\\.csv", DW_STORE_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStorage::map_publisher_resource(const std::string& expression, const INT id)
|
void bdStorage::map_publisher_resource(const std::string& expression, const INT id)
|
||||||
{
|
{
|
||||||
auto data = utils::nt::load_resource(id);
|
auto data = utils::nt::load_resource(id);
|
||||||
this->publisher_resources_.emplace_back(std::regex{ expression }, data);
|
this->publisher_resources_.emplace_back(std::regex{expression}, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bdStorage::load_publisher_resource(const std::string& name, std::string& buffer)
|
bool bdStorage::load_publisher_resource(const std::string& name, std::string& buffer)
|
||||||
{
|
{
|
||||||
for (const auto& resource : this->publisher_resources_)
|
for (const auto& resource : this->publisher_resources_)
|
||||||
{
|
{
|
||||||
if (std::regex_match(name, resource.first))
|
if (std::regex_match(name, resource.first))
|
||||||
{
|
{
|
||||||
buffer = resource.second;
|
buffer = resource.second;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("[DW]: [bdStorage]: missing publisher file: %s\n", name.data());
|
printf("[DW]: [bdStorage]: missing publisher file: %s\n", name.data());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStorage::list_publisher_files(service_server* server, byte_buffer* buffer)
|
void bdStorage::list_publisher_files(service_server* server, byte_buffer* buffer)
|
||||||
{
|
{
|
||||||
uint32_t date;
|
uint32_t date;
|
||||||
uint16_t num_results, offset;
|
uint16_t num_results, offset;
|
||||||
std::string filename, data;
|
std::string filename, data;
|
||||||
|
|
||||||
buffer->read_uint32(&date);
|
buffer->read_uint32(&date);
|
||||||
buffer->read_uint16(&num_results);
|
buffer->read_uint16(&num_results);
|
||||||
buffer->read_uint16(&offset);
|
buffer->read_uint16(&offset);
|
||||||
buffer->read_string(&filename);
|
buffer->read_string(&filename);
|
||||||
|
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
|
||||||
if (this->load_publisher_resource(filename, data))
|
if (this->load_publisher_resource(filename, data))
|
||||||
{
|
{
|
||||||
auto* info = new bdFileInfo;
|
auto* info = new bdFileInfo;
|
||||||
|
|
||||||
info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data());
|
info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data());
|
||||||
info->filename = filename;
|
info->filename = filename;
|
||||||
info->create_time = 0;
|
info->create_time = 0;
|
||||||
info->modified_time = info->create_time;
|
info->modified_time = info->create_time;
|
||||||
info->file_size = uint32_t(data.size());
|
info->file_size = uint32_t(data.size());
|
||||||
info->owner_id = 0;
|
info->owner_id = 0;
|
||||||
info->priv = false;
|
info->priv = false;
|
||||||
|
|
||||||
reply->add(info);
|
reply->add(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStorage::get_publisher_file(service_server* server, byte_buffer* buffer)
|
void bdStorage::get_publisher_file(service_server* server, byte_buffer* buffer)
|
||||||
{
|
{
|
||||||
std::string filename;
|
std::string filename;
|
||||||
buffer->read_string(&filename);
|
buffer->read_string(&filename);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("[DW]: [bdStorage]: loading publisher file: %s\n", filename.data());
|
printf("[DW]: [bdStorage]: loading publisher file: %s\n", filename.data());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string data;
|
std::string data;
|
||||||
|
|
||||||
if (this->load_publisher_resource(filename, data))
|
if (this->load_publisher_resource(filename, data))
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("[DW]: [bdStorage]: sending publisher file: %s, size: %lld\n", filename.data(), data.size());
|
printf("[DW]: [bdStorage]: sending publisher file: %s, size: %lld\n", filename.data(), data.size());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->add(new bdFileData(data));
|
reply->add(new bdFileData(data));
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
server->create_reply(this->task_id(), game::BD_NO_FILE)->send();
|
server->create_reply(this->task_id(), game::BD_NO_FILE)->send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string bdStorage::get_user_file_path(const std::string& name)
|
std::string bdStorage::get_user_file_path(const std::string& name)
|
||||||
{
|
{
|
||||||
return "players2/user/" + name;
|
return "players2/user/" + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStorage::set_user_file(service_server* server, byte_buffer* buffer) const
|
void bdStorage::set_user_file(service_server* server, byte_buffer* buffer) const
|
||||||
{
|
{
|
||||||
bool priv;
|
bool priv;
|
||||||
uint64_t owner;
|
uint64_t owner;
|
||||||
std::string game, filename, data;
|
std::string game, filename, data;
|
||||||
|
|
||||||
buffer->read_string(&game);
|
buffer->read_string(&game);
|
||||||
buffer->read_string(&filename);
|
buffer->read_string(&filename);
|
||||||
buffer->read_bool(&priv);
|
buffer->read_bool(&priv);
|
||||||
buffer->read_blob(&data);
|
buffer->read_blob(&data);
|
||||||
buffer->read_uint64(&owner);
|
buffer->read_uint64(&owner);
|
||||||
|
|
||||||
const auto path = get_user_file_path(filename);
|
const auto path = get_user_file_path(filename);
|
||||||
utils::io::write_file(path, data);
|
utils::io::write_file(path, data);
|
||||||
|
|
||||||
auto* info = new bdFileInfo;
|
auto* info = new bdFileInfo;
|
||||||
|
|
||||||
info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data());
|
info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data());
|
||||||
info->filename = filename;
|
info->filename = filename;
|
||||||
info->create_time = uint32_t(time(nullptr));
|
info->create_time = uint32_t(time(nullptr));
|
||||||
info->modified_time = info->create_time;
|
info->modified_time = info->create_time;
|
||||||
info->file_size = uint32_t(data.size());
|
info->file_size = uint32_t(data.size());
|
||||||
info->owner_id = owner;
|
info->owner_id = owner;
|
||||||
info->priv = priv;
|
info->priv = priv;
|
||||||
|
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->add(info);
|
reply->add(info);
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStorage::get_user_file(service_server* server, byte_buffer* buffer) const
|
void bdStorage::get_user_file(service_server* server, byte_buffer* buffer) const
|
||||||
{
|
{
|
||||||
uint64_t owner{};
|
uint64_t owner{};
|
||||||
std::string game, filename, platform, data;
|
std::string game, filename, platform, data;
|
||||||
|
|
||||||
buffer->read_string(&game);
|
buffer->read_string(&game);
|
||||||
buffer->read_string(&filename);
|
buffer->read_string(&filename);
|
||||||
buffer->read_uint64(&owner);
|
buffer->read_uint64(&owner);
|
||||||
buffer->read_string(&platform);
|
buffer->read_string(&platform);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("[DW]: [bdStorage]: user file: %s, %s, %s\n", game.data(), filename.data(), platform.data());
|
printf("[DW]: [bdStorage]: user file: %s, %s, %s\n", game.data(), filename.data(), platform.data());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const auto path = get_user_file_path(filename);
|
const auto path = get_user_file_path(filename);
|
||||||
if (utils::io::read_file(path, &data))
|
if (utils::io::read_file(path, &data))
|
||||||
{
|
{
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->add(new bdFileData(data));
|
reply->add(new bdFileData(data));
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
server->create_reply(this->task_id(), game::BD_NO_FILE)->send();
|
server->create_reply(this->task_id(), game::BD_NO_FILE)->send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdStorage::unk13(service_server* server, byte_buffer* buffer) const
|
void bdStorage::unk13(service_server* server, byte_buffer* buffer) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
} // namespace demonware
|
}
|
||||||
|
@ -2,23 +2,23 @@
|
|||||||
|
|
||||||
namespace demonware
|
namespace demonware
|
||||||
{
|
{
|
||||||
class bdStorage final : public service
|
class bdStorage final : public service
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bdStorage();
|
bdStorage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::pair<std::regex, std::string>> publisher_resources_;
|
std::vector<std::pair<std::regex, std::string>> publisher_resources_;
|
||||||
|
|
||||||
void map_publisher_resource(const std::string& expression, INT id);
|
void map_publisher_resource(const std::string& expression, INT id);
|
||||||
bool load_publisher_resource(const std::string& name, std::string& buffer);
|
bool load_publisher_resource(const std::string& name, std::string& buffer);
|
||||||
|
|
||||||
void list_publisher_files(service_server* server, byte_buffer* buffer);
|
void list_publisher_files(service_server* server, byte_buffer* buffer);
|
||||||
void get_publisher_file(service_server* server, byte_buffer* buffer);
|
void get_publisher_file(service_server* server, byte_buffer* buffer);
|
||||||
void set_user_file(service_server* server, byte_buffer* buffer) const;
|
void set_user_file(service_server* server, byte_buffer* buffer) const;
|
||||||
void get_user_file(service_server* server, byte_buffer* buffer) const;
|
void get_user_file(service_server* server, byte_buffer* buffer) const;
|
||||||
void unk13(service_server* server, byte_buffer* buffer) const;
|
void unk13(service_server* server, byte_buffer* buffer) const;
|
||||||
|
|
||||||
static std::string get_user_file_path(const std::string& name);
|
static std::string get_user_file_path(const std::string& name);
|
||||||
};
|
};
|
||||||
} // namespace demonware
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace demonware
|
|||||||
this->register_task(1, &bdUNK104::unk1);
|
this->register_task(1, &bdUNK104::unk1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdUNK104::unk1(service_server* server, byte_buffer* buffer) const
|
void bdUNK104::unk1(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -8,7 +8,7 @@ namespace demonware
|
|||||||
//this->register_task(6, "unk6", &bdUNK63::unk6);
|
//this->register_task(6, "unk6", &bdUNK63::unk6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdUNK63::unk(service_server* server, byte_buffer* buffer) const
|
void bdUNK63::unk(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -13,42 +13,42 @@ namespace demonware
|
|||||||
this->register_task(193, &bdUNK80::unk193);
|
this->register_task(193, &bdUNK80::unk193);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdUNK80::unk42(service_server* server, byte_buffer* buffer) const
|
void bdUNK80::unk42(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdUNK80::unk49(service_server* server, byte_buffer* buffer) const
|
void bdUNK80::unk49(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdUNK80::unk60(service_server* server, byte_buffer* buffer) const
|
void bdUNK80::unk60(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdUNK80::unk130(service_server* server, byte_buffer* buffer) const
|
void bdUNK80::unk130(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdUNK80::unk165(service_server* server, byte_buffer* buffer) const
|
void bdUNK80::unk165(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->send();
|
reply->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bdUNK80::unk193(service_server* server, byte_buffer* buffer) const
|
void bdUNK80::unk193(service_server* server, byte_buffer* /*buffer*/) const
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
@ -5,127 +5,130 @@
|
|||||||
|
|
||||||
namespace dvars
|
namespace dvars
|
||||||
{
|
{
|
||||||
game::dvar_t* aimassist_enabled = nullptr;
|
game::dvar_t* aimassist_enabled = nullptr;
|
||||||
|
|
||||||
game::dvar_t* con_inputBoxColor = nullptr;
|
game::dvar_t* con_inputBoxColor = nullptr;
|
||||||
game::dvar_t* con_inputHintBoxColor = nullptr;
|
game::dvar_t* con_inputHintBoxColor = nullptr;
|
||||||
game::dvar_t* con_outputBarColor = nullptr;
|
game::dvar_t* con_outputBarColor = nullptr;
|
||||||
game::dvar_t* con_outputSliderColor = nullptr;
|
game::dvar_t* con_outputSliderColor = nullptr;
|
||||||
game::dvar_t* con_outputWindowColor = nullptr;
|
game::dvar_t* con_outputWindowColor = nullptr;
|
||||||
game::dvar_t* con_inputDvarMatchColor = nullptr;
|
game::dvar_t* con_inputDvarMatchColor = nullptr;
|
||||||
game::dvar_t* con_inputDvarValueColor = nullptr;
|
game::dvar_t* con_inputDvarValueColor = nullptr;
|
||||||
game::dvar_t* con_inputDvarInactiveValueColor = nullptr;
|
game::dvar_t* con_inputDvarInactiveValueColor = nullptr;
|
||||||
game::dvar_t* con_inputCmdMatchColor = nullptr;
|
game::dvar_t* con_inputCmdMatchColor = nullptr;
|
||||||
|
|
||||||
game::dvar_t* g_playerEjection = nullptr;
|
game::dvar_t* g_playerEjection = nullptr;
|
||||||
game::dvar_t* g_playerCollision = nullptr;
|
game::dvar_t* g_playerCollision = nullptr;
|
||||||
|
|
||||||
game::dvar_t* pm_bouncing = nullptr;
|
game::dvar_t* pm_bouncing = nullptr;
|
||||||
|
|
||||||
game::dvar_t* r_fullbright = nullptr;
|
game::dvar_t* r_fullbright = nullptr;
|
||||||
|
|
||||||
std::string dvar_get_vector_domain(const int components, const game::dvar_limits& domain)
|
std::string dvar_get_vector_domain(const int components, const game::dvar_limits& domain)
|
||||||
{
|
{
|
||||||
if (domain.vector.min == -FLT_MAX)
|
if (domain.vector.min == -FLT_MAX)
|
||||||
{
|
{
|
||||||
if (domain.vector.max == FLT_MAX)
|
if (domain.vector.max == FLT_MAX)
|
||||||
{
|
{
|
||||||
return utils::string::va("Domain is any %iD vector", components);
|
return utils::string::va("Domain is any %iD vector", components);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return utils::string::va("Domain is any %iD vector with components %g or smaller", components, domain.vector.max);
|
return utils::string::va("Domain is any %iD vector with components %g or smaller", components,
|
||||||
}
|
domain.vector.max);
|
||||||
}
|
}
|
||||||
else if (domain.vector.max == FLT_MAX)
|
}
|
||||||
{
|
else if (domain.vector.max == FLT_MAX)
|
||||||
return utils::string::va("Domain is any %iD vector with components %g or bigger", components, domain.vector.min);
|
{
|
||||||
}
|
return utils::string::va("Domain is any %iD vector with components %g or bigger", components,
|
||||||
else
|
domain.vector.min);
|
||||||
{
|
}
|
||||||
return utils::string::va("Domain is any %iD vector with components from %g to %g", components, domain.vector.min, domain.vector.max);
|
else
|
||||||
}
|
{
|
||||||
}
|
return utils::string::va("Domain is any %iD vector with components from %g to %g", components,
|
||||||
|
domain.vector.min, domain.vector.max);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string dvar_get_domain(const game::dvar_type type, const game::dvar_limits& domain)
|
std::string dvar_get_domain(const game::dvar_type type, const game::dvar_limits& domain)
|
||||||
{
|
{
|
||||||
std::string str;
|
std::string str;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case game::dvar_type::boolean:
|
case game::dvar_type::boolean:
|
||||||
return "Domain is 0 or 1"s;
|
return "Domain is 0 or 1"s;
|
||||||
|
|
||||||
case game::dvar_type::value:
|
case game::dvar_type::value:
|
||||||
if (domain.value.min == -FLT_MAX)
|
if (domain.value.min == -FLT_MAX)
|
||||||
{
|
{
|
||||||
if (domain.value.max == FLT_MAX)
|
if (domain.value.max == FLT_MAX)
|
||||||
{
|
{
|
||||||
return "Domain is any number"s;
|
return "Domain is any number"s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return utils::string::va("Domain is any number %g or smaller", domain.value.max);
|
return utils::string::va("Domain is any number %g or smaller", domain.value.max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (domain.value.max == FLT_MAX)
|
else if (domain.value.max == FLT_MAX)
|
||||||
{
|
{
|
||||||
return utils::string::va("Domain is any number %g or bigger", domain.value.min);
|
return utils::string::va("Domain is any number %g or bigger", domain.value.min);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return utils::string::va("Domain is any number from %g to %g", domain.value.min, domain.value.max);
|
return utils::string::va("Domain is any number from %g to %g", domain.value.min, domain.value.max);
|
||||||
}
|
}
|
||||||
|
|
||||||
case game::dvar_type::vec2:
|
case game::dvar_type::vec2:
|
||||||
return dvar_get_vector_domain(2, domain);
|
return dvar_get_vector_domain(2, domain);
|
||||||
|
|
||||||
case game::dvar_type::rgb:
|
case game::dvar_type::rgb:
|
||||||
case game::dvar_type::vec3:
|
case game::dvar_type::vec3:
|
||||||
return dvar_get_vector_domain(3, domain);
|
return dvar_get_vector_domain(3, domain);
|
||||||
|
|
||||||
case game::dvar_type::vec4:
|
case game::dvar_type::vec4:
|
||||||
return dvar_get_vector_domain(4, domain);
|
return dvar_get_vector_domain(4, domain);
|
||||||
|
|
||||||
case game::dvar_type::integer:
|
case game::dvar_type::integer:
|
||||||
if (domain.enumeration.stringCount == INT_MIN)
|
if (domain.enumeration.stringCount == INT_MIN)
|
||||||
{
|
{
|
||||||
if (domain.integer.max == INT_MAX)
|
if (domain.integer.max == INT_MAX)
|
||||||
{
|
{
|
||||||
return "Domain is any integer"s;
|
return "Domain is any integer"s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return utils::string::va("Domain is any integer %i or smaller", domain.integer.max);
|
return utils::string::va("Domain is any integer %i or smaller", domain.integer.max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (domain.integer.max == INT_MAX)
|
else if (domain.integer.max == INT_MAX)
|
||||||
{
|
{
|
||||||
return utils::string::va("Domain is any integer %i or bigger", domain.integer.min);
|
return utils::string::va("Domain is any integer %i or bigger", domain.integer.min);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return utils::string::va("Domain is any integer from %i to %i", domain.integer.min, domain.integer.max);
|
return utils::string::va("Domain is any integer from %i to %i", domain.integer.min, domain.integer.max);
|
||||||
}
|
}
|
||||||
|
|
||||||
case game::dvar_type::color:
|
case game::dvar_type::color:
|
||||||
return "Domain is any 4-component color, in RGBA format"s;
|
return "Domain is any 4-component color, in RGBA format"s;
|
||||||
|
|
||||||
case game::dvar_type::enumeration:
|
case game::dvar_type::enumeration:
|
||||||
str = "Domain is one of the following:"s;
|
str = "Domain is one of the following:"s;
|
||||||
|
|
||||||
for (auto stringIndex = 0; stringIndex < domain.enumeration.stringCount; ++stringIndex)
|
for (auto string_index = 0; string_index < domain.enumeration.stringCount; ++string_index)
|
||||||
{
|
{
|
||||||
str += utils::string::va("\n %2i: %s", stringIndex, domain.enumeration.strings[stringIndex]);
|
str += utils::string::va("\n %2i: %s", string_index, domain.enumeration.strings[string_index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
|
|
||||||
case game::dvar_type::string:
|
case game::dvar_type::string:
|
||||||
return "Domain is any text"s;
|
return "Domain is any text"s;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return utils::string::va("unhandled dvar type '%i'", type);
|
return utils::string::va("unhandled dvar type '%i'", type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ namespace game
|
|||||||
public:
|
public:
|
||||||
symbol(const size_t sp_address, const size_t mp_address)
|
symbol(const size_t sp_address, const size_t mp_address)
|
||||||
: sp_object_(reinterpret_cast<T*>(sp_address))
|
: sp_object_(reinterpret_cast<T*>(sp_address))
|
||||||
, mp_object_(reinterpret_cast<T*>(mp_address))
|
, mp_object_(reinterpret_cast<T*>(mp_address))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ namespace game
|
|||||||
return mp_object_;
|
return mp_object_;
|
||||||
}
|
}
|
||||||
|
|
||||||
operator T* () const
|
operator T*() const
|
||||||
{
|
{
|
||||||
return this->get();
|
return this->get();
|
||||||
}
|
}
|
||||||
|
@ -676,7 +676,7 @@ namespace game
|
|||||||
{
|
{
|
||||||
cmd_function_s* next;
|
cmd_function_s* next;
|
||||||
const char* name;
|
const char* name;
|
||||||
void(__cdecl* function)();
|
void (__cdecl* function)();
|
||||||
};
|
};
|
||||||
|
|
||||||
enum DvarSetSource : std::uint32_t
|
enum DvarSetSource : std::uint32_t
|
||||||
@ -850,7 +850,8 @@ namespace game
|
|||||||
ASSET_TYPE_REVERB_CURVE,
|
ASSET_TYPE_REVERB_CURVE,
|
||||||
ASSET_TYPE_SOUND_CONTEXT,
|
ASSET_TYPE_SOUND_CONTEXT,
|
||||||
ASSET_TYPE_LOADED_SOUND,
|
ASSET_TYPE_LOADED_SOUND,
|
||||||
ASSET_TYPE_CLIPMAP, // col_map
|
ASSET_TYPE_CLIPMAP,
|
||||||
|
// col_map
|
||||||
ASSET_TYPE_COMWORLD,
|
ASSET_TYPE_COMWORLD,
|
||||||
ASSET_TYPE_GLASSWORLD,
|
ASSET_TYPE_GLASSWORLD,
|
||||||
ASSET_TYPE_PATHDATA,
|
ASSET_TYPE_PATHDATA,
|
||||||
@ -1080,7 +1081,6 @@ namespace game
|
|||||||
|
|
||||||
struct playerState_s
|
struct playerState_s
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct clientHeader_t
|
struct clientHeader_t
|
||||||
@ -1119,7 +1119,6 @@ namespace game
|
|||||||
|
|
||||||
struct playerState_s
|
struct playerState_s
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1128,4 +1127,4 @@ namespace game
|
|||||||
sp::playerState_s* sp;
|
sp::playerState_s* sp;
|
||||||
mp::playerState_s* mp;
|
mp::playerState_s* mp;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -8,191 +8,211 @@ namespace game
|
|||||||
* Functions
|
* Functions
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
|
|
||||||
WEAK symbol<void(void*, void*)> AimAssist_AddToTargetList{ 0, 0x140001730 };
|
WEAK symbol<void(void*, void*)> AimAssist_AddToTargetList{0, 0x140001730};
|
||||||
|
|
||||||
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{ 0x1402F7570, 0x1403CE480 };
|
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{0x1402F7570, 0x1403CE480};
|
||||||
WEAK symbol<void()> Com_Frame_Try_Block_Function{ 0x1402F7E10, 0x1403CEF30 };
|
WEAK symbol<void()> Com_Frame_Try_Block_Function{0x1402F7E10, 0x1403CEF30};
|
||||||
WEAK symbol<CodPlayMode()> Com_GetCurrentCoDPlayMode{ 0, 0x1404C9690 };
|
WEAK symbol<CodPlayMode()> Com_GetCurrentCoDPlayMode{0, 0x1404C9690};
|
||||||
WEAK symbol<void()> Com_Quit_f{ 0x1402F9390, 0x1403D08C0 };
|
WEAK symbol<void()> Com_Quit_f{0x1402F9390, 0x1403D08C0};
|
||||||
|
|
||||||
WEAK symbol<void(const char* cmdName, void(), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{ 0x1402EDDB0, 0x1403AF2C0 };
|
WEAK symbol<void(const char* cmdName, void (), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{
|
||||||
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{ 0x1402EE350, 0x1403AF900 };
|
0x1402EDDB0, 0x1403AF2C0
|
||||||
WEAK symbol<void(const char*)> Cmd_RemoveCommand{ 0x1402EE910, 0x1403AFEF0 };
|
};
|
||||||
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{ 0x1402EEA30, 0x1403B0020 };
|
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{
|
||||||
WEAK symbol<void()> Cmd_EndTokenizeString{ 0x1402EE000, 0x1403AF5B0 };
|
0x1402EE350, 0x1403AF900
|
||||||
|
};
|
||||||
|
WEAK symbol<void(const char*)> Cmd_RemoveCommand{0x1402EE910, 0x1403AFEF0};
|
||||||
|
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{0x1402EEA30, 0x1403B0020};
|
||||||
|
WEAK symbol<void()> Cmd_EndTokenizeString{0x1402EE000, 0x1403AF5B0};
|
||||||
|
|
||||||
WEAK symbol<void(const char* message)> Conbuf_AppendText{ 0x14038F220, 0x1404D9040 };
|
WEAK symbol<void(const char* message)> Conbuf_AppendText{0x14038F220, 0x1404D9040};
|
||||||
|
|
||||||
WEAK symbol<void(int localClientNum, void (*)(int localClientNum))> Cbuf_AddCall{ 0x1402ED820, 0x1403AECF0 };
|
WEAK symbol<void(int localClientNum, void (*)(int localClientNum))> Cbuf_AddCall{0x1402ED820, 0x1403AECF0};
|
||||||
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{ 0x1402ED890, 0x1403AED70 };
|
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{0x1402ED890, 0x1403AED70};
|
||||||
WEAK symbol<void(int localClientNum, int controllerIndex, const char* buffer,
|
WEAK symbol<void(int localClientNum, int controllerIndex, const char* buffer,
|
||||||
void(int, int, const char*))> Cbuf_ExecuteBufferInternal{ 0x1402ED9A0, 0x1403AEE80 };
|
void (int, int, const char*))> Cbuf_ExecuteBufferInternal{0x1402ED9A0, 0x1403AEE80};
|
||||||
|
|
||||||
WEAK symbol<bool()> CL_IsCgameInitialized{ 0x140136560, 0x1401FD510 };
|
WEAK symbol<bool()> CL_IsCgameInitialized{0x140136560, 0x1401FD510};
|
||||||
|
|
||||||
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessage{ 0x1400EE500, 0x1401A3050 };
|
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessage{0x1400EE500, 0x1401A3050};
|
||||||
WEAK symbol<void(int localClientNum, /*mp::cg_s**/void* cg, const char* dvar, const char* value)> CG_SetClientDvarFromServer
|
WEAK symbol<void(int localClientNum, /*mp::cg_s**/void* cg, const char* dvar, const char* value)>
|
||||||
{ 0, 0x1401BF0A0 };
|
CG_SetClientDvarFromServer
|
||||||
|
{0, 0x1401BF0A0};
|
||||||
|
|
||||||
WEAK symbol<void(XAssetType type, void(__cdecl* func)(XAssetHeader, void*), void* inData, bool includeOverride)> DB_EnumXAssets_FastFile{ 0x14017D7C0, 0x14026EC10 };
|
WEAK symbol<void(XAssetType type, void (__cdecl* func)(XAssetHeader, void*), void* inData, bool includeOverride)>
|
||||||
WEAK symbol<int(XAssetType type)> DB_GetXAssetTypeSize{ 0x140151C20, 0x140240DF0 };
|
DB_EnumXAssets_FastFile{0x14017D7C0, 0x14026EC10};
|
||||||
WEAK symbol<void(XZoneInfo* zoneInfo, unsigned int zoneCount, DBSyncMode syncMode)> DB_LoadXAssets{ 0x1402F8B50, 0x140270F30 };
|
WEAK symbol<int(XAssetType type)> DB_GetXAssetTypeSize{0x140151C20, 0x140240DF0};
|
||||||
|
WEAK symbol<void(XZoneInfo* zoneInfo, unsigned int zoneCount, DBSyncMode syncMode)> DB_LoadXAssets{
|
||||||
|
0x1402F8B50, 0x140270F30
|
||||||
|
};
|
||||||
|
|
||||||
WEAK symbol<dvar_t* (const char* name)> Dvar_FindVar{ 0x140370860, 0x1404BF8B0 };
|
WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x140370860, 0x1404BF8B0};
|
||||||
WEAK symbol<void(const dvar_t* dvar)> Dvar_ClearModified{ 0x140370700, 0x1404BF690 };
|
WEAK symbol<void(const dvar_t* dvar)> Dvar_ClearModified{0x140370700, 0x1404BF690};
|
||||||
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{ 0x1402FB590, 0x1403D3290 };
|
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{0x1402FB590, 0x1403D3290};
|
||||||
WEAK symbol<bool(const char* name)> Dvar_IsValidName{ 0x140370CB0, 0x1404BFF70 };
|
WEAK symbol<bool(const char* name)> Dvar_IsValidName{0x140370CB0, 0x1404BFF70};
|
||||||
WEAK symbol<void(dvar_t* dvar, DvarSetSource source)> Dvar_Reset{ 0x140372950, 0x1404C1DB0 };
|
WEAK symbol<void(dvar_t* dvar, DvarSetSource source)> Dvar_Reset{0x140372950, 0x1404C1DB0};
|
||||||
WEAK symbol<void(const char* dvar, const char* buffer)> Dvar_SetCommand{ 0x1403730D0, 0x1404C2520 };
|
WEAK symbol<void(const char* dvar, const char* buffer)> Dvar_SetCommand{0x1403730D0, 0x1404C2520};
|
||||||
WEAK symbol<void(dvar_t* dvar, const char* string)> Dvar_SetString{ 0x140373DE0, 0x1404C3610 };
|
WEAK symbol<void(dvar_t* dvar, const char* string)> Dvar_SetString{0x140373DE0, 0x1404C3610};
|
||||||
WEAK symbol<void(const char*, const char*, DvarSetSource)> Dvar_SetFromStringByNameFromSource{ 0x1403737D0, 0x1404C2E40 };
|
WEAK symbol<void(const char*, const char*, DvarSetSource)> Dvar_SetFromStringByNameFromSource{
|
||||||
WEAK symbol<const char* (dvar_t* dvar, dvar_value value)> Dvar_ValueToString{ 0x140374E10, 0x1404C47B0 };
|
0x1403737D0, 0x1404C2E40
|
||||||
|
};
|
||||||
|
WEAK symbol<const char*(dvar_t* dvar, dvar_value value)> Dvar_ValueToString{0x140374E10, 0x1404C47B0};
|
||||||
|
|
||||||
WEAK symbol<dvar_t* (const char* dvarName, bool value, unsigned int flags, const char* description)>
|
WEAK symbol<dvar_t*(const char* dvarName, bool value, unsigned int flags, const char* description)>
|
||||||
Dvar_RegisterBool{ 0x140371850, 0x1404C0BE0 };
|
Dvar_RegisterBool{0x140371850, 0x1404C0BE0};
|
||||||
WEAK symbol<dvar_t* (const char* dvarName, const char** valueList, int defaultIndex, unsigned int flags,
|
WEAK symbol<dvar_t*(const char* dvarName, const char** valueList, int defaultIndex, unsigned int flags,
|
||||||
const char* description)> Dvar_RegisterEnum{ 0x140371B30, 0x1404C0EC0 };
|
const char* description)> Dvar_RegisterEnum{0x140371B30, 0x1404C0EC0};
|
||||||
WEAK symbol<dvar_t* (const char* dvarName, float value, float min, float max, unsigned int flags,
|
WEAK symbol<dvar_t*(const char* dvarName, float value, float min, float max, unsigned int flags,
|
||||||
const char* description)> Dvar_RegisterFloat{ 0x140371C20, 0x1404C0FB0 };
|
const char* description)> Dvar_RegisterFloat{0x140371C20, 0x1404C0FB0};
|
||||||
WEAK symbol<dvar_t* (const char* dvarName, int value, int min, int max, unsigned int flags, const char* desc)>
|
WEAK symbol<dvar_t*(const char* dvarName, int value, int min, int max, unsigned int flags, const char* desc)>
|
||||||
Dvar_RegisterInt{ 0x140371CF0, 0x1404C1080 };
|
Dvar_RegisterInt{0x140371CF0, 0x1404C1080};
|
||||||
WEAK symbol<dvar_t* (const char* dvarName, const char* value, unsigned int flags, const char* description)>
|
WEAK symbol<dvar_t*(const char* dvarName, const char* value, unsigned int flags, const char* description)>
|
||||||
Dvar_RegisterString{ 0x140372050, 0x1404C1450 };
|
Dvar_RegisterString{0x140372050, 0x1404C1450};
|
||||||
WEAK symbol<dvar_t* (const char* dvarName, float x, float y, float z, float w, float min, float max,
|
WEAK symbol<dvar_t*(const char* dvarName, float x, float y, float z, float w, float min, float max,
|
||||||
unsigned int flags, const char* description)> Dvar_RegisterVec4{ 0x140372430, 0x1404C1800 };
|
unsigned int flags, const char* description)> Dvar_RegisterVec4{0x140372430, 0x1404C1800};
|
||||||
|
|
||||||
WEAK symbol<DWOnlineStatus()> dwGetLogOnStatus{ 0, 0x14053CCB0 };
|
WEAK symbol<DWOnlineStatus()> dwGetLogOnStatus{0, 0x14053CCB0};
|
||||||
|
|
||||||
WEAK symbol<long long(const char* qpath, char** buffer)> FS_ReadFile{ 0x140362390, 0x1404AF380 };
|
WEAK symbol<long long(const char* qpath, char** buffer)> FS_ReadFile{0x140362390, 0x1404AF380};
|
||||||
WEAK symbol<void(void* buffer)> FS_FreeFile{ 0x140362380, 0x1404AF370 };
|
WEAK symbol<void(void* buffer)> FS_FreeFile{0x140362380, 0x1404AF370};
|
||||||
|
|
||||||
WEAK symbol<void()> G_Glass_Update{ 0x14021D540, 0x1402EDEE0 };
|
WEAK symbol<void()> G_Glass_Update{0x14021D540, 0x1402EDEE0};
|
||||||
|
|
||||||
WEAK symbol<unsigned int(const char* name)> G_GetWeaponForName{ 0x140274590, 0x14033FF60 };
|
WEAK symbol<unsigned int(const char* name)> G_GetWeaponForName{0x140274590, 0x14033FF60};
|
||||||
WEAK symbol<int(playerState_s* ps, unsigned int weapon, int dualWield, int startInAltMode, int, int, int, char, ...)>
|
WEAK symbol<int(playerState_s* ps, unsigned int weapon, int dualWield, int startInAltMode, int, int, int, char,
|
||||||
G_GivePlayerWeapon{ 0x1402749B0, 0x140340470 };
|
...)>
|
||||||
WEAK symbol<void(playerState_s* ps, unsigned int weapon, int hadWeapon)> G_InitializeAmmo{ 0x1402217F0, 0x1402F22B0 };
|
G_GivePlayerWeapon{0x1402749B0, 0x140340470};
|
||||||
WEAK symbol<void(int clientNum, unsigned int weapon)> G_SelectWeapon{ 0x140275380, 0x140340D50 };
|
WEAK symbol<void(playerState_s* ps, unsigned int weapon, int hadWeapon)> G_InitializeAmmo{0x1402217F0, 0x1402F22B0};
|
||||||
WEAK symbol<int(playerState_s* ps, unsigned int weapon)> G_TakePlayerWeapon{ 0x1402754E0, 0x1403411D0 };
|
WEAK symbol<void(int clientNum, unsigned int weapon)> G_SelectWeapon{0x140275380, 0x140340D50};
|
||||||
|
WEAK symbol<int(playerState_s* ps, unsigned int weapon)> G_TakePlayerWeapon{0x1402754E0, 0x1403411D0};
|
||||||
|
|
||||||
WEAK symbol<char* (char* string)> I_CleanStr{ 0x140379010, 0x1404C99A0 };
|
WEAK symbol<char*(char* string)> I_CleanStr{0x140379010, 0x1404C99A0};
|
||||||
|
|
||||||
WEAK symbol<const char* (int, int, int)> Key_KeynumToString{ 0x14013F380, 0x140207C50 };
|
WEAK symbol<const char*(int, int, int)> Key_KeynumToString{0x14013F380, 0x140207C50};
|
||||||
|
|
||||||
WEAK symbol<unsigned int(int)> Live_SyncOnlineDataFlags{ 0x1404459A0, 0x140562830 };
|
WEAK symbol<unsigned int(int)> Live_SyncOnlineDataFlags{0x1404459A0, 0x140562830};
|
||||||
|
|
||||||
WEAK symbol<void(int clientNum, const char* menu, int a3, int a4, unsigned int a5)> LUI_OpenMenu{ 0, 0x14048E450 };
|
WEAK symbol<void(int clientNum, const char* menu, int a3, int a4, unsigned int a5)> LUI_OpenMenu{0, 0x14048E450};
|
||||||
|
|
||||||
WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{ 0, 0x140488570 };
|
WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{0, 0x140488570};
|
||||||
|
|
||||||
WEAK symbol<Material* (const char* material)> Material_RegisterHandle{ 0x1404919D0, 0x1405AFBE0 };
|
WEAK symbol<Material*(const char* material)> Material_RegisterHandle{0x1404919D0, 0x1405AFBE0};
|
||||||
|
|
||||||
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{ 0, 0x1404B6F10 };
|
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{0, 0x1404B6F10};
|
||||||
|
|
||||||
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{ 0, 0x1403DADC0 };
|
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{0, 0x1403DADC0};
|
||||||
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{ 0, 0x1403DAF80 };
|
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{
|
||||||
WEAK symbol<bool(const char* s, netadr_s* a)> NET_StringToAdr{ 0, 0x1403DB070 };
|
0, 0x1403DAF80
|
||||||
|
};
|
||||||
|
WEAK symbol<bool(const char* s, netadr_s* a)> NET_StringToAdr{0, 0x1403DB070};
|
||||||
|
|
||||||
WEAK symbol<void(float x, float y, float width, float height, float s0, float t0, float s1, float t1,
|
WEAK symbol<void(float x, float y, float width, float height, float s0, float t0, float s1, float t1,
|
||||||
float* color, Material* material)> R_AddCmdDrawStretchPic{ 0x1404A2580, 0x1405C0CB0 };
|
float* color, Material* material)> R_AddCmdDrawStretchPic{0x1404A2580, 0x1405C0CB0};
|
||||||
WEAK symbol<void(const char*, int, Font_s*, float, float, float, float, float, float*, int)> R_AddCmdDrawText{ 0x1404A2BF0, 0x1405C1320 };
|
WEAK symbol<void(const char*, int, Font_s*, float, float, float, float, float, float*, int)> R_AddCmdDrawText{
|
||||||
|
0x1404A2BF0, 0x1405C1320
|
||||||
|
};
|
||||||
|
|
||||||
WEAK symbol<void(const char*, int, Font_s*, float, float, float, float, float, const float*, int, int, char)>
|
WEAK symbol<void(const char*, int, Font_s*, float, float, float, float, float, const float*, int, int, char)>
|
||||||
R_AddCmdDrawTextWithCursor{ 0x1404A35E0, 0x1405C1D10 };
|
R_AddCmdDrawTextWithCursor{0x1404A35E0, 0x1405C1D10};
|
||||||
WEAK symbol<Font_s* (const char* font)> R_RegisterFont{ 0x140481F90, 0x14059F3C0 };
|
WEAK symbol<Font_s*(const char* font)> R_RegisterFont{0x140481F90, 0x14059F3C0};
|
||||||
WEAK symbol<void()> R_SyncRenderThread{ 0x1404A4D60, 0x1405C34F0 };
|
WEAK symbol<void()> R_SyncRenderThread{0x1404A4D60, 0x1405C34F0};
|
||||||
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{ 0x140482270, 0x14059F6B0 };
|
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{0x140482270, 0x14059F6B0};
|
||||||
|
|
||||||
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{ 0x14014FA70, 0x14023CB50 };
|
WEAK symbol<ScreenPlacement*()> ScrPlace_GetViewPlacement{0x14014FA70, 0x14023CB50};
|
||||||
|
|
||||||
WEAK symbol<unsigned int()> Scr_AllocArray{ 0x140317C50, 0x1403F4280 };
|
WEAK symbol<unsigned int()> Scr_AllocArray{0x140317C50, 0x1403F4280};
|
||||||
WEAK symbol<const float* (const float* v)> Scr_AllocVector{ 0x140317D10, 0x1403F4370 };
|
WEAK symbol<const float*(const float* v)> Scr_AllocVector{0x140317D10, 0x1403F4370};
|
||||||
WEAK symbol<const char* (int index)> Scr_GetString{ 0x14031C570, 0x1403F8C50 };
|
WEAK symbol<const char*(int index)> Scr_GetString{0x14031C570, 0x1403F8C50};
|
||||||
WEAK symbol<unsigned int()> Scr_GetInt{ 0x14031C1F0, 0x1403F88D0 };
|
WEAK symbol<unsigned int()> Scr_GetInt{0x14031C1F0, 0x1403F88D0};
|
||||||
WEAK symbol<float(int index)> Scr_GetFloat{ 0x14031C090, 0x1403F8820 };
|
WEAK symbol<float(int index)> Scr_GetFloat{0x14031C090, 0x1403F8820};
|
||||||
WEAK symbol<int()> Scr_GetNumParam{ 0x14031C2A0, 0x1403F8980 };
|
WEAK symbol<int()> Scr_GetNumParam{0x14031C2A0, 0x1403F8980};
|
||||||
WEAK symbol<void()> Scr_ClearOutParams{ 0x14031B7C0, 0x1403F8040 };
|
WEAK symbol<void()> Scr_ClearOutParams{0x14031B7C0, 0x1403F8040};
|
||||||
|
|
||||||
WEAK symbol<scr_string_t(const char* str)> SL_FindString{ 0x140314AF0, 0x1403F11C0 };
|
WEAK symbol<scr_string_t(const char* str)> SL_FindString{0x140314AF0, 0x1403F11C0};
|
||||||
|
|
||||||
WEAK symbol<void(const char* text_in)> SV_Cmd_TokenizeString{ 0, 0x1403B0640 };
|
WEAK symbol<void(const char* text_in)> SV_Cmd_TokenizeString{0, 0x1403B0640};
|
||||||
WEAK symbol<void()> SV_Cmd_EndTokenizedString{ 0, 0x1403B0600 };
|
WEAK symbol<void()> SV_Cmd_EndTokenizedString{0, 0x1403B0600};
|
||||||
|
|
||||||
WEAK symbol<mp::gentity_s* (const char* name)> SV_AddBot{ 0, 0x140438EC0 };
|
WEAK symbol<mp::gentity_s*(const char* name)> SV_AddBot{0, 0x140438EC0};
|
||||||
WEAK symbol<bool(int clientNum)> SV_BotIsBot{ 0, 0x140427300 };
|
WEAK symbol<bool(int clientNum)> SV_BotIsBot{0, 0x140427300};
|
||||||
WEAK symbol<mp::gentity_s* (int)> SV_AddTestClient{ 0, 0x140439190 };
|
WEAK symbol<mp::gentity_s*(int)> SV_AddTestClient{0, 0x140439190};
|
||||||
WEAK symbol<bool(mp::gentity_s*)> SV_CanSpawnTestClient{ 0, 0x140439460 };
|
WEAK symbol<bool(mp::gentity_s*)> SV_CanSpawnTestClient{0, 0x140439460};
|
||||||
WEAK symbol<int(mp::gentity_s* ent)> SV_SpawnTestClient{ 0, 0x14043C750 };
|
WEAK symbol<int(mp::gentity_s* ent)> SV_SpawnTestClient{0, 0x14043C750};
|
||||||
|
|
||||||
WEAK symbol<void(mp::gentity_s*)> SV_AddEntity{ 0, 0x1403388B0 };
|
WEAK symbol<void(mp::gentity_s*)> SV_AddEntity{0, 0x1403388B0};
|
||||||
|
|
||||||
WEAK symbol<void(netadr_s* from)> SV_DirectConnect{ 0, 0x1404397A0 };
|
WEAK symbol<void(netadr_s* from)> SV_DirectConnect{0, 0x1404397A0};
|
||||||
WEAK symbol<void(mp::client_t* client)> SV_DropClient{ 0, 0x140438A30 };
|
WEAK symbol<void(mp::client_t* client)> SV_DropClient{0, 0x140438A30};
|
||||||
WEAK symbol<void(mp::client_t*, const char*, int)> SV_ExecuteClientCommand{ 0, 0x15121D8E6 };
|
WEAK symbol<void(mp::client_t*, const char*, int)> SV_ExecuteClientCommand{0, 0x15121D8E6};
|
||||||
WEAK symbol<void(int localClientNum)> SV_FastRestart{ 0, 0x1404374E0 };
|
WEAK symbol<void(int localClientNum)> SV_FastRestart{0, 0x1404374E0};
|
||||||
WEAK symbol<void(int clientNum, svscmd_type type, const char* text)> SV_GameSendServerCommand{ 0x1403F3A70, 0x14043E120 };
|
WEAK symbol<void(int clientNum, svscmd_type type, const char* text)> SV_GameSendServerCommand{
|
||||||
WEAK symbol<const char* (int clientNum)> SV_GetGuid{ 0, 0x14043E1E0 };
|
0x1403F3A70, 0x14043E120
|
||||||
WEAK symbol<playerState_s* (int num)> SV_GetPlayerstateForClientNum{ 0x1403F3AB0, 0x14043E260 };
|
};
|
||||||
WEAK symbol<void(int clientNum, const char* reason)> SV_KickClientNum{ 0, 0x1404377A0 };
|
WEAK symbol<const char*(int clientNum)> SV_GetGuid{0, 0x14043E1E0};
|
||||||
WEAK symbol<bool()> SV_Loaded{ 0x1403F42C0, 0x14043FA50 };
|
WEAK symbol<playerState_s*(int num)> SV_GetPlayerstateForClientNum{0x1403F3AB0, 0x14043E260};
|
||||||
WEAK symbol<bool(const char* map) >SV_MapExists{ 0, 0x140437800 };
|
WEAK symbol<void(int clientNum, const char* reason)> SV_KickClientNum{0, 0x1404377A0};
|
||||||
WEAK symbol<void(int localClientNum, const char* map, bool mapIsPreloaded)> SV_StartMap{ 0, 0x140438320 };
|
WEAK symbol<bool()> SV_Loaded{0x1403F42C0, 0x14043FA50};
|
||||||
WEAK symbol<void(int localClientNum, const char* map, bool mapIsPreloaded, bool migrate)> SV_StartMapForParty{ 0, 0x140438490 };
|
WEAK symbol<bool(const char* map)> SV_MapExists{0, 0x140437800};
|
||||||
|
WEAK symbol<void(int localClientNum, const char* map, bool mapIsPreloaded)> SV_StartMap{0, 0x140438320};
|
||||||
|
WEAK symbol<void(int localClientNum, const char* map, bool mapIsPreloaded, bool migrate)> SV_StartMapForParty{
|
||||||
|
0, 0x140438490
|
||||||
|
};
|
||||||
|
|
||||||
WEAK symbol<void(char* path, int pathSize, Sys_Folder folder, const char* filename, const char* ext)> Sys_BuildAbsPath{ 0x14037BBE0, 0x1404CC7E0 };
|
WEAK symbol<void(char* path, int pathSize, Sys_Folder folder, const char* filename, const char* ext)>
|
||||||
WEAK symbol<HANDLE(int folder, const char* baseFileName)> Sys_CreateFile{ 0x14037BCA0, 0x1404CC8A0 };
|
Sys_BuildAbsPath{0x14037BBE0, 0x1404CC7E0};
|
||||||
WEAK symbol<void(const char* error, ...)> Sys_Error{ 0x14038C770, 0x1404D6260 };
|
WEAK symbol<HANDLE(int folder, const char* baseFileName)> Sys_CreateFile{0x14037BCA0, 0x1404CC8A0};
|
||||||
WEAK symbol<bool(const char* path)> Sys_FileExists{ 0x14038C810, 0x1404D6310 };
|
WEAK symbol<void(const char* error, ...)> Sys_Error{0x14038C770, 0x1404D6260};
|
||||||
WEAK symbol<bool()> Sys_IsDatabaseReady2{ 0x1402FF980, 0x1403E1840 };
|
WEAK symbol<bool(const char* path)> Sys_FileExists{0x14038C810, 0x1404D6310};
|
||||||
WEAK symbol<int()> Sys_Milliseconds{ 0x14038E9F0, 0x1404D8730 };
|
WEAK symbol<bool()> Sys_IsDatabaseReady2{0x1402FF980, 0x1403E1840};
|
||||||
WEAK symbol<bool(int, void const*, const netadr_s*)> Sys_SendPacket{ 0x14038E720, 0x1404D8460 };
|
WEAK symbol<int()> Sys_Milliseconds{0x14038E9F0, 0x1404D8730};
|
||||||
WEAK symbol<void(Sys_Folder, const char* path)> Sys_SetFolder{ 0x14037BDD0, 0x1404CCA10 };
|
WEAK symbol<bool(int, void const*, const netadr_s*)> Sys_SendPacket{0x14038E720, 0x1404D8460};
|
||||||
WEAK symbol<void()> Sys_ShowConsole{ 0x14038FA90, 0x1404D98B0 };
|
WEAK symbol<void(Sys_Folder, const char* path)> Sys_SetFolder{0x14037BDD0, 0x1404CCA10};
|
||||||
|
WEAK symbol<void()> Sys_ShowConsole{0x14038FA90, 0x1404D98B0};
|
||||||
|
|
||||||
WEAK symbol<const char* (const char*)> UI_GetMapDisplayName{ 0, 0x1403B1CD0 };
|
WEAK symbol<const char*(const char*)> UI_GetMapDisplayName{0, 0x1403B1CD0};
|
||||||
WEAK symbol<const char* (const char*)> UI_GetGameTypeDisplayName{ 0, 0x1403B1670 };
|
WEAK symbol<const char*(const char*)> UI_GetGameTypeDisplayName{0, 0x1403B1670};
|
||||||
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript { 0, 0x140490060 };
|
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{0, 0x140490060};
|
||||||
WEAK symbol<int(const char* text, int maxChars, Font_s* font, float scale)> UI_TextWidth{ 0, 0x140492380 };
|
WEAK symbol<int(const char* text, int maxChars, Font_s* font, float scale)> UI_TextWidth{0, 0x140492380};
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
* Variables
|
* Variables
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
|
|
||||||
WEAK symbol<int> keyCatchers{ 0x1413D5B00, 0x1417E168C };
|
WEAK symbol<int> keyCatchers{0x1413D5B00, 0x1417E168C};
|
||||||
WEAK symbol<PlayerKeyState> playerKeys{ 0x1413BC5DC, 0x1417DA46C };
|
WEAK symbol<PlayerKeyState> playerKeys{0x1413BC5DC, 0x1417DA46C};
|
||||||
|
|
||||||
WEAK symbol<CmdArgs> cmd_args{ 0x1492EC6F0, 0x1479ECB00 };
|
WEAK symbol<CmdArgs> cmd_args{0x1492EC6F0, 0x1479ECB00};
|
||||||
WEAK symbol<CmdArgs> sv_cmd_args{ 0x1492EC7A0, 0x1479ECBB0 };
|
WEAK symbol<CmdArgs> sv_cmd_args{0x1492EC7A0, 0x1479ECBB0};
|
||||||
WEAK symbol<cmd_function_s*> cmd_functions{ 0x1492EC848, 0x1479ECC58 };
|
WEAK symbol<cmd_function_s*> cmd_functions{0x1492EC848, 0x1479ECC58};
|
||||||
|
|
||||||
WEAK symbol<int> dvarCount{ 0x14A7BFF34, 0x14B32AA30 };
|
WEAK symbol<int> dvarCount{0x14A7BFF34, 0x14B32AA30};
|
||||||
WEAK symbol<dvar_t*> sortedDvars{ 0x14A7BFF50, 0x14B32AA50 };
|
WEAK symbol<dvar_t*> sortedDvars{0x14A7BFF50, 0x14B32AA50};
|
||||||
|
|
||||||
WEAK symbol<const char*> command_whitelist{ 0x140808EF0, 0x1409B8DC0 };
|
WEAK symbol<const char*> command_whitelist{0x140808EF0, 0x1409B8DC0};
|
||||||
|
|
||||||
WEAK symbol<SOCKET> query_socket{ 0, 0x14B5B9180 };
|
WEAK symbol<SOCKET> query_socket{0, 0x14B5B9180};
|
||||||
|
|
||||||
WEAK symbol<void*> DB_XAssetPool{ 0x140804690, 0x1409B40D0 };
|
WEAK symbol<void*> DB_XAssetPool{0x140804690, 0x1409B40D0};
|
||||||
WEAK symbol<int> g_poolSize{ 0x140804140, 0x1409B4B90 };
|
WEAK symbol<int> g_poolSize{0x140804140, 0x1409B4B90};
|
||||||
WEAK symbol<const char*> g_assetNames{ 0x140803C90 , 0x1409B3180 };
|
WEAK symbol<const char*> g_assetNames{0x140803C90, 0x1409B3180};
|
||||||
|
|
||||||
WEAK symbol<DWORD> threadIds{ 0x149632EC0, 0x147DCEA30 };
|
WEAK symbol<DWORD> threadIds{0x149632EC0, 0x147DCEA30};
|
||||||
|
|
||||||
WEAK symbol<GfxDrawMethod_s> gfxDrawMethod{ 0x14CDFAFE8, 0x14D80FD98 };
|
WEAK symbol<GfxDrawMethod_s> gfxDrawMethod{0x14CDFAFE8, 0x14D80FD98};
|
||||||
|
|
||||||
namespace mp
|
namespace mp
|
||||||
{
|
{
|
||||||
WEAK symbol<gentity_s> g_entities{ 0, 0x144758C70 };
|
WEAK symbol<gentity_s> g_entities{0, 0x144758C70};
|
||||||
WEAK symbol<client_t> svs_clients{ 0, 0x1496C4B10 };
|
WEAK symbol<client_t> svs_clients{0, 0x1496C4B10};
|
||||||
WEAK symbol<int> svs_numclients{ 0, 0x1496C4B0C };
|
WEAK symbol<int> svs_numclients{0, 0x1496C4B0C};
|
||||||
|
|
||||||
WEAK symbol<int> sv_serverId_value{ 0, 0x1488A9A60 };
|
WEAK symbol<int> sv_serverId_value{0, 0x1488A9A60};
|
||||||
|
|
||||||
WEAK symbol<char> virtualLobby_loaded{ 0, 0x1417E161D };
|
WEAK symbol<char> virtualLobby_loaded{0, 0x1417E161D};
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace sp
|
namespace sp
|
||||||
{
|
{
|
||||||
WEAK symbol<gentity_s> g_entities{ 0x143C26DC0, 0 };
|
WEAK symbol<gentity_s> g_entities{0x143C26DC0, 0};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ LRESULT window::processor(const UINT message, const WPARAM w_param, const LPARAM
|
|||||||
{
|
{
|
||||||
const utils::nt::library user32{"user32.dll"};
|
const utils::nt::library user32{"user32.dll"};
|
||||||
const auto get_dpi = user32 ? user32.get_proc<UINT(WINAPI *)(HWND)>("GetDpiForWindow") : nullptr;
|
const auto get_dpi = user32 ? user32.get_proc<UINT(WINAPI *)(HWND)>("GetDpiForWindow") : nullptr;
|
||||||
|
|
||||||
if (get_dpi)
|
if (get_dpi)
|
||||||
{
|
{
|
||||||
const auto dpi = get_dpi(*this);
|
const auto dpi = get_dpi(*this);
|
||||||
@ -192,7 +192,7 @@ LRESULT CALLBACK window::static_processor(HWND hwnd, UINT message, WPARAM w_para
|
|||||||
auto data = reinterpret_cast<LPCREATESTRUCT>(l_param);
|
auto data = reinterpret_cast<LPCREATESTRUCT>(l_param);
|
||||||
SetWindowLongPtrA(hwnd, GWLP_USERDATA, LONG_PTR(data->lpCreateParams));
|
SetWindowLongPtrA(hwnd, GWLP_USERDATA, LONG_PTR(data->lpCreateParams));
|
||||||
|
|
||||||
reinterpret_cast<window*>(data->lpCreateParams)->handle_ = hwnd;
|
static_cast<window*>(data->lpCreateParams)->handle_ = hwnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto self = reinterpret_cast<window*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
const auto self = reinterpret_cast<window*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
||||||
|
@ -76,10 +76,10 @@ void component_loader::pre_destroy()
|
|||||||
|
|
||||||
void component_loader::clean()
|
void component_loader::clean()
|
||||||
{
|
{
|
||||||
auto& components = get_components();
|
auto& components = get_components();
|
||||||
for(auto i = components.begin(); i != components.end();)
|
for (auto i = components.begin(); i != components.end();)
|
||||||
{
|
{
|
||||||
if(!(*i)->is_supported())
|
if (!(*i)->is_supported())
|
||||||
{
|
{
|
||||||
(*i)->pre_destroy();
|
(*i)->pre_destroy();
|
||||||
i = components.erase(i);
|
i = components.erase(i);
|
||||||
@ -118,10 +118,10 @@ std::vector<std::unique_ptr<component_interface>>& component_loader::get_compone
|
|||||||
using component_vector_container = std::unique_ptr<component_vector, std::function<void(component_vector*)>>;
|
using component_vector_container = std::unique_ptr<component_vector, std::function<void(component_vector*)>>;
|
||||||
|
|
||||||
static component_vector_container components(new component_vector, [](component_vector* component_vector)
|
static component_vector_container components(new component_vector, [](component_vector* component_vector)
|
||||||
{
|
{
|
||||||
pre_destroy();
|
pre_destroy();
|
||||||
delete component_vector;
|
delete component_vector;
|
||||||
});
|
});
|
||||||
|
|
||||||
return *components;
|
return *components;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace tls
|
|||||||
{
|
{
|
||||||
utils::binary_resource tls_dll_file(TLS_DLL, "s1x_tlsdll.dll");
|
utils::binary_resource tls_dll_file(TLS_DLL, "s1x_tlsdll.dll");
|
||||||
}
|
}
|
||||||
|
|
||||||
PIMAGE_TLS_DIRECTORY allocate_tls_index()
|
PIMAGE_TLS_DIRECTORY allocate_tls_index()
|
||||||
{
|
{
|
||||||
static auto already_allocated = false;
|
static auto already_allocated = false;
|
||||||
|
@ -8,7 +8,7 @@ extern "C"
|
|||||||
__declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 1;
|
__declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
int s_read_arc4random(void*, size_t)
|
int s_read_arc4random(void*, size_t)
|
||||||
{
|
{
|
||||||
@ -29,4 +29,4 @@ extern "C"
|
|||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,4 +95,4 @@
|
|||||||
|
|
||||||
#include "resource.hpp"
|
#include "resource.hpp"
|
||||||
|
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
|
@ -81,12 +81,12 @@ namespace steam
|
|||||||
const auto* operand = ud_insn_opr(&ud, 1);
|
const auto* operand = ud_insn_opr(&ud, 1);
|
||||||
if (operand && operand->type == UD_OP_MEM && operand->base == UD_R_RIP)
|
if (operand && operand->type == UD_OP_MEM && operand->base == UD_R_RIP)
|
||||||
{
|
{
|
||||||
auto* operand_ptr = reinterpret_cast<char*>(ud_insn_len(&ud) + ud_insn_off(&ud) + operand->lval.sdword);
|
auto* operand_ptr = reinterpret_cast<char*>(ud_insn_len(&ud) + ud_insn_off(&ud) + operand->lval.
|
||||||
|
sdword);
|
||||||
if (!utils::memory::is_bad_read_ptr(operand_ptr) && utils::memory::is_rdata_ptr(operand_ptr))
|
if (!utils::memory::is_bad_read_ptr(operand_ptr) && utils::memory::is_rdata_ptr(operand_ptr))
|
||||||
{
|
{
|
||||||
return operand_ptr;
|
return operand_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,8 @@ namespace steam
|
|||||||
throw std::runtime_error("Invalid interface pointer");
|
throw std::runtime_error("Invalid interface pointer");
|
||||||
}
|
}
|
||||||
|
|
||||||
return static_cast<T(__thiscall*)(void*, Args ...)>((*this->interface_ptr_)[table_entry])(this->interface_ptr_, args...);
|
return static_cast<T(__thiscall*)(void*, Args ...)>((*this->interface_ptr_)[table_entry])(
|
||||||
|
this->interface_ptr_, args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -3,103 +3,102 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
bool apps::BIsSubscribed()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool apps::BIsSubscribed()
|
bool apps::BIsLowViolence()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool apps::BIsLowViolence()
|
bool apps::BIsCybercafe()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool apps::BIsCybercafe()
|
bool apps::BIsVACBanned()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool apps::BIsVACBanned()
|
const char* apps::GetCurrentGameLanguage()
|
||||||
{
|
{
|
||||||
return false;
|
return "english";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* apps::GetCurrentGameLanguage()
|
const char* apps::GetAvailableGameLanguages()
|
||||||
{
|
{
|
||||||
return "english";
|
return "english";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* apps::GetAvailableGameLanguages()
|
bool apps::BIsSubscribedApp(unsigned int appID)
|
||||||
{
|
{
|
||||||
return "english";
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool apps::BIsSubscribedApp(unsigned int appID)
|
bool apps::BIsDlcInstalled(unsigned int appID)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool apps::BIsDlcInstalled(unsigned int appID)
|
unsigned int apps::GetEarliestPurchaseUnixTime(unsigned int nAppID)
|
||||||
{
|
{
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int apps::GetEarliestPurchaseUnixTime(unsigned int nAppID)
|
bool apps::BIsSubscribedFromFreeWeekend()
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool apps::BIsSubscribedFromFreeWeekend()
|
int apps::GetDLCCount()
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int apps::GetDLCCount()
|
bool apps::BGetDLCDataByIndex(int iDLC, unsigned int* pAppID, bool* pbAvailable, char* pchName,
|
||||||
{
|
int cchNameBufferSize)
|
||||||
return 0;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool apps::BGetDLCDataByIndex(int iDLC, unsigned int* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize)
|
void apps::InstallDLC(unsigned int nAppID)
|
||||||
{
|
{
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void apps::InstallDLC(unsigned int nAppID)
|
void apps::UninstallDLC(unsigned int nAppID)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void apps::UninstallDLC(unsigned int nAppID)
|
void apps::RequestAppProofOfPurchaseKey(unsigned int nAppID)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void apps::RequestAppProofOfPurchaseKey(unsigned int nAppID)
|
bool apps::GetCurrentBetaName(char* pchName, int cchNameBufferSize)
|
||||||
{
|
{
|
||||||
}
|
strncpy_s(pchName, cchNameBufferSize, "public", cchNameBufferSize);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool apps::GetCurrentBetaName(char* pchName, int cchNameBufferSize)
|
bool apps::MarkContentCorrupt(bool bMissingFilesOnly)
|
||||||
{
|
{
|
||||||
strncpy_s(pchName, cchNameBufferSize, "public", cchNameBufferSize);
|
return false;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool apps::MarkContentCorrupt(bool bMissingFilesOnly)
|
unsigned int apps::GetInstalledDepots(int* pvecDepots, unsigned int cMaxDepots)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int apps::GetInstalledDepots(int* pvecDepots, unsigned int cMaxDepots)
|
unsigned int apps::GetAppInstallDir(unsigned int appID, char* pchFolder, unsigned int cchFolderBufferSize)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int apps::GetAppInstallDir(unsigned int appID, char* pchFolder, unsigned int cchFolderBufferSize)
|
bool apps::BIsAppInstalled(unsigned int appID)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bool apps::BIsAppInstalled(unsigned int appID)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace steam
|
|
@ -2,32 +2,31 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
class apps
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~apps() = default;
|
||||||
|
|
||||||
class apps
|
virtual bool BIsSubscribed();
|
||||||
{
|
virtual bool BIsLowViolence();
|
||||||
public:
|
virtual bool BIsCybercafe();
|
||||||
~apps() = default;
|
virtual bool BIsVACBanned();
|
||||||
|
virtual const char* GetCurrentGameLanguage();
|
||||||
virtual bool BIsSubscribed();
|
virtual const char* GetAvailableGameLanguages();
|
||||||
virtual bool BIsLowViolence();
|
virtual bool BIsSubscribedApp(unsigned int appID);
|
||||||
virtual bool BIsCybercafe();
|
virtual bool BIsDlcInstalled(unsigned int appID);
|
||||||
virtual bool BIsVACBanned();
|
virtual unsigned int GetEarliestPurchaseUnixTime(unsigned int nAppID);
|
||||||
virtual const char* GetCurrentGameLanguage();
|
virtual bool BIsSubscribedFromFreeWeekend();
|
||||||
virtual const char* GetAvailableGameLanguages();
|
virtual int GetDLCCount();
|
||||||
virtual bool BIsSubscribedApp(unsigned int appID);
|
virtual bool BGetDLCDataByIndex(int iDLC, unsigned int* pAppID, bool* pbAvailable, char* pchName,
|
||||||
virtual bool BIsDlcInstalled(unsigned int appID);
|
int cchNameBufferSize);
|
||||||
virtual unsigned int GetEarliestPurchaseUnixTime(unsigned int nAppID);
|
virtual void InstallDLC(unsigned int nAppID);
|
||||||
virtual bool BIsSubscribedFromFreeWeekend();
|
virtual void UninstallDLC(unsigned int nAppID);
|
||||||
virtual int GetDLCCount();
|
virtual void RequestAppProofOfPurchaseKey(unsigned int nAppID);
|
||||||
virtual bool BGetDLCDataByIndex(int iDLC, unsigned int* pAppID, bool* pbAvailable, char* pchName, int cchNameBufferSize);
|
virtual bool GetCurrentBetaName(char* pchName, int cchNameBufferSize);
|
||||||
virtual void InstallDLC(unsigned int nAppID);
|
virtual bool MarkContentCorrupt(bool bMissingFilesOnly);
|
||||||
virtual void UninstallDLC(unsigned int nAppID);
|
virtual unsigned int GetInstalledDepots(int* pvecDepots, unsigned int cMaxDepots);
|
||||||
virtual void RequestAppProofOfPurchaseKey(unsigned int nAppID);
|
virtual unsigned int GetAppInstallDir(unsigned int appID, char* pchFolder, unsigned int cchFolderBufferSize);
|
||||||
virtual bool GetCurrentBetaName(char* pchName, int cchNameBufferSize);
|
virtual bool BIsAppInstalled(unsigned int appID);
|
||||||
virtual bool MarkContentCorrupt(bool bMissingFilesOnly);
|
};
|
||||||
virtual unsigned int GetInstalledDepots(int* pvecDepots, unsigned int cMaxDepots);
|
}
|
||||||
virtual unsigned int GetAppInstallDir(unsigned int appID, char* pchFolder, unsigned int cchFolderBufferSize);
|
|
||||||
virtual bool BIsAppInstalled(unsigned int appID);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -3,311 +3,311 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
const char* friends::GetPersonaName()
|
||||||
|
{
|
||||||
|
return "1337";
|
||||||
|
}
|
||||||
|
|
||||||
const char* friends::GetPersonaName()
|
unsigned long long friends::SetPersonaName(const char* pchPersonaName)
|
||||||
{
|
{
|
||||||
return "1337";
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long friends::SetPersonaName(const char* pchPersonaName)
|
int friends::GetPersonaState()
|
||||||
{
|
{
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetPersonaState()
|
int friends::GetFriendCount(int eFriendFlags)
|
||||||
{
|
{
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetFriendCount(int eFriendFlags)
|
steam_id friends::GetFriendByIndex(int iFriend, int iFriendFlags)
|
||||||
{
|
{
|
||||||
return 0;
|
return steam_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id friends::GetFriendByIndex(int iFriend, int iFriendFlags)
|
int friends::GetFriendRelationship(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return steam_id();
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetFriendRelationship(steam_id steamIDFriend)
|
int friends::GetFriendPersonaState(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetFriendPersonaState(steam_id steamIDFriend)
|
const char* friends::GetFriendPersonaName(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return 0;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* friends::GetFriendPersonaName(steam_id steamIDFriend)
|
bool friends::GetFriendGamePlayed(steam_id steamIDFriend, void* pFriendGameInfo)
|
||||||
{
|
{
|
||||||
return "";
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::GetFriendGamePlayed(steam_id steamIDFriend, void* pFriendGameInfo)
|
const char* friends::GetFriendPersonaNameHistory(steam_id steamIDFriend, int iPersonaName)
|
||||||
{
|
{
|
||||||
return false;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* friends::GetFriendPersonaNameHistory(steam_id steamIDFriend, int iPersonaName)
|
bool friends::HasFriend(steam_id steamIDFriend, int eFriendFlags)
|
||||||
{
|
{
|
||||||
return "";
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::HasFriend(steam_id steamIDFriend, int eFriendFlags)
|
int friends::GetClanCount()
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetClanCount()
|
steam_id friends::GetClanByIndex(int iClan)
|
||||||
{
|
{
|
||||||
return 0;
|
return steam_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id friends::GetClanByIndex(int iClan)
|
const char* friends::GetClanName(steam_id steamIDClan)
|
||||||
{
|
{
|
||||||
return steam_id();
|
return "3arc";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* friends::GetClanName(steam_id steamIDClan)
|
const char* friends::GetClanTag(steam_id steamIDClan)
|
||||||
{
|
{
|
||||||
return "3arc";
|
return this->GetClanName(steamIDClan);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* friends::GetClanTag(steam_id steamIDClan)
|
bool friends::GetClanActivityCounts(steam_id steamID, int* pnOnline, int* pnInGame, int* pnChatting)
|
||||||
{
|
{
|
||||||
return this->GetClanName(steamIDClan);
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::GetClanActivityCounts(steam_id steamID, int* pnOnline, int* pnInGame, int* pnChatting)
|
unsigned long long friends::DownloadClanActivityCounts(steam_id groupIDs[], int nIds)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long friends::DownloadClanActivityCounts(steam_id groupIDs[], int nIds)
|
int friends::GetFriendCountFromSource(steam_id steamIDSource)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetFriendCountFromSource(steam_id steamIDSource)
|
steam_id friends::GetFriendFromSourceByIndex(steam_id steamIDSource, int iFriend)
|
||||||
{
|
{
|
||||||
return 0;
|
return steam_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id friends::GetFriendFromSourceByIndex(steam_id steamIDSource, int iFriend)
|
bool friends::IsUserInSource(steam_id steamIDUser, steam_id steamIDSource)
|
||||||
{
|
{
|
||||||
return steam_id();
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::IsUserInSource(steam_id steamIDUser, steam_id steamIDSource)
|
void friends::SetInGameVoiceSpeaking(steam_id steamIDUser, bool bSpeaking)
|
||||||
{
|
{
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void friends::SetInGameVoiceSpeaking(steam_id steamIDUser, bool bSpeaking)
|
void friends::ActivateGameOverlay(const char* pchDialog)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void friends::ActivateGameOverlay(const char* pchDialog)
|
void friends::ActivateGameOverlayToUser(const char* pchDialog, steam_id steamID)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void friends::ActivateGameOverlayToUser(const char* pchDialog, steam_id steamID)
|
void friends::ActivateGameOverlayToWebPage(const char* pchURL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void friends::ActivateGameOverlayToWebPage(const char* pchURL)
|
void friends::ActivateGameOverlayToStore(unsigned int nAppID, unsigned int eFlag)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void friends::ActivateGameOverlayToStore(unsigned int nAppID, unsigned int eFlag)
|
void friends::SetPlayedWith(steam_id steamIDUserPlayedWith)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void friends::SetPlayedWith(steam_id steamIDUserPlayedWith)
|
void friends::ActivateGameOverlayInviteDialog(steam_id steamIDLobby)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void friends::ActivateGameOverlayInviteDialog(steam_id steamIDLobby)
|
int friends::GetSmallFriendAvatar(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int friends::GetSmallFriendAvatar(steam_id steamIDFriend)
|
int friends::GetMediumFriendAvatar(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetMediumFriendAvatar(steam_id steamIDFriend)
|
int friends::GetLargeFriendAvatar(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetLargeFriendAvatar(steam_id steamIDFriend)
|
bool friends::RequestUserInformation(steam_id steamIDUser, bool bRequireNameOnly)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::RequestUserInformation(steam_id steamIDUser, bool bRequireNameOnly)
|
unsigned long long friends::RequestClanOfficerList(steam_id steamIDClan)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long friends::RequestClanOfficerList(steam_id steamIDClan)
|
steam_id friends::GetClanOwner(steam_id steamIDClan)
|
||||||
{
|
{
|
||||||
return 0;
|
return steam_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id friends::GetClanOwner(steam_id steamIDClan)
|
int friends::GetClanOfficerCount(steam_id steamIDClan)
|
||||||
{
|
{
|
||||||
return steam_id();
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetClanOfficerCount(steam_id steamIDClan)
|
steam_id friends::GetClanOfficerByIndex(steam_id steamIDClan, int iOfficer)
|
||||||
{
|
{
|
||||||
return 0;
|
return steam_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id friends::GetClanOfficerByIndex(steam_id steamIDClan, int iOfficer)
|
int friends::GetUserRestrictions()
|
||||||
{
|
{
|
||||||
return steam_id();
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetUserRestrictions()
|
bool friends::SetRichPresence(const char* pchKey, const char* pchValue)
|
||||||
{
|
{
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::SetRichPresence(const char* pchKey, const char* pchValue)
|
void friends::ClearRichPresence()
|
||||||
{
|
{
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void friends::ClearRichPresence()
|
const char* friends::GetFriendRichPresence(steam_id steamIDFriend, const char* pchKey)
|
||||||
{
|
{
|
||||||
}
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
const char* friends::GetFriendRichPresence(steam_id steamIDFriend, const char* pchKey)
|
int friends::GetFriendRichPresenceKeyCount(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return "";
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetFriendRichPresenceKeyCount(steam_id steamIDFriend)
|
const char* friends::GetFriendRichPresenceKeyByIndex(steam_id steamIDFriend, int iKey)
|
||||||
{
|
{
|
||||||
return 0;
|
return "a";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* friends::GetFriendRichPresenceKeyByIndex(steam_id steamIDFriend, int iKey)
|
void friends::RequestFriendRichPresence(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return "a";
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void friends::RequestFriendRichPresence(steam_id steamIDFriend)
|
bool friends::InviteUserToGame(steam_id steamIDFriend, const char* pchConnectString)
|
||||||
{
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool friends::InviteUserToGame(steam_id steamIDFriend, const char* pchConnectString)
|
int friends::GetCoplayFriendCount()
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetCoplayFriendCount()
|
steam_id friends::GetCoplayFriend(int iCoplayFriend)
|
||||||
{
|
{
|
||||||
return 0;
|
return steam_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id friends::GetCoplayFriend(int iCoplayFriend)
|
int friends::GetFriendCoplayTime(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return steam_id();
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetFriendCoplayTime(steam_id steamIDFriend)
|
unsigned int friends::GetFriendCoplayGame(steam_id steamIDFriend)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int friends::GetFriendCoplayGame(steam_id steamIDFriend)
|
unsigned long long friends::JoinClanChatRoom(steam_id steamIDClan)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long friends::JoinClanChatRoom(steam_id steamIDClan)
|
bool friends::LeaveClanChatRoom(steam_id steamIDClan)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::LeaveClanChatRoom(steam_id steamIDClan)
|
int friends::GetClanChatMemberCount(steam_id steamIDClan)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int friends::GetClanChatMemberCount(steam_id steamIDClan)
|
steam_id friends::GetChatMemberByIndex(steam_id steamIDClan, int iUser)
|
||||||
{
|
{
|
||||||
return 0;
|
return steam_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id friends::GetChatMemberByIndex(steam_id steamIDClan, int iUser)
|
bool friends::SendClanChatMessage(steam_id steamIDClanChat, const char* pchText)
|
||||||
{
|
{
|
||||||
return steam_id();
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::SendClanChatMessage(steam_id steamIDClanChat, const char* pchText)
|
int friends::GetClanChatMessage(steam_id steamIDClanChat, int iMessage, void* prgchText, int cchTextMax,
|
||||||
{
|
unsigned int* peChatEntryType, steam_id* pSteamIDChatter)
|
||||||
return false;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int friends::GetClanChatMessage(steam_id steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, unsigned int* peChatEntryType, steam_id* pSteamIDChatter)
|
bool friends::IsClanChatAdmin(steam_id steamIDClanChat, steam_id steamIDUser)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::IsClanChatAdmin(steam_id steamIDClanChat, steam_id steamIDUser)
|
bool friends::IsClanChatWindowOpenInSteam(steam_id steamIDClanChat)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::IsClanChatWindowOpenInSteam(steam_id steamIDClanChat)
|
bool friends::OpenClanChatWindowInSteam(steam_id steamIDClanChat)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::OpenClanChatWindowInSteam(steam_id steamIDClanChat)
|
bool friends::CloseClanChatWindowInSteam(steam_id steamIDClanChat)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::CloseClanChatWindowInSteam(steam_id steamIDClanChat)
|
bool friends::SetListenForFriendsMessages(bool bInterceptEnabled)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::SetListenForFriendsMessages(bool bInterceptEnabled)
|
bool friends::ReplyToFriendMessage(steam_id steamIDFriend, const char* pchMsgToSend)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool friends::ReplyToFriendMessage(steam_id steamIDFriend, const char* pchMsgToSend)
|
int friends::GetFriendMessage(steam_id steamIDFriend, int iMessageID, void* pvData, int cubData,
|
||||||
{
|
unsigned int* peChatEntryType)
|
||||||
return false;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int friends::GetFriendMessage(steam_id steamIDFriend, int iMessageID, void* pvData, int cubData, unsigned int* peChatEntryType)
|
unsigned long long friends::GetFollowerCount(steam_id steamID)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long friends::GetFollowerCount(steam_id steamID)
|
unsigned long long friends::IsFollowing(steam_id steamID)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long friends::IsFollowing(steam_id steamID)
|
unsigned long long friends::EnumerateFollowingList(unsigned int unStartIndex)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
unsigned long long friends::EnumerateFollowingList(unsigned int unStartIndex)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -2,75 +2,75 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
class friends
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~friends() = default;
|
||||||
|
|
||||||
class friends
|
virtual const char* GetPersonaName();
|
||||||
{
|
virtual unsigned long long SetPersonaName(const char* pchPersonaName);
|
||||||
public:
|
virtual int GetPersonaState();
|
||||||
~friends() = default;
|
virtual int GetFriendCount(int eFriendFlags);
|
||||||
|
virtual steam_id GetFriendByIndex(int iFriend, int iFriendFlags);
|
||||||
virtual const char* GetPersonaName();
|
virtual int GetFriendRelationship(steam_id steamIDFriend);
|
||||||
virtual unsigned long long SetPersonaName(const char* pchPersonaName);
|
virtual int GetFriendPersonaState(steam_id steamIDFriend);
|
||||||
virtual int GetPersonaState();
|
virtual const char* GetFriendPersonaName(steam_id steamIDFriend);
|
||||||
virtual int GetFriendCount(int eFriendFlags);
|
virtual bool GetFriendGamePlayed(steam_id steamIDFriend, void* pFriendGameInfo);
|
||||||
virtual steam_id GetFriendByIndex(int iFriend, int iFriendFlags);
|
virtual const char* GetFriendPersonaNameHistory(steam_id steamIDFriend, int iPersonaName);
|
||||||
virtual int GetFriendRelationship(steam_id steamIDFriend);
|
virtual bool HasFriend(steam_id steamIDFriend, int eFriendFlags);
|
||||||
virtual int GetFriendPersonaState(steam_id steamIDFriend);
|
virtual int GetClanCount();
|
||||||
virtual const char* GetFriendPersonaName(steam_id steamIDFriend);
|
virtual steam_id GetClanByIndex(int iClan);
|
||||||
virtual bool GetFriendGamePlayed(steam_id steamIDFriend, void* pFriendGameInfo);
|
virtual const char* GetClanName(steam_id steamIDClan);
|
||||||
virtual const char* GetFriendPersonaNameHistory(steam_id steamIDFriend, int iPersonaName);
|
virtual const char* GetClanTag(steam_id steamIDClan);
|
||||||
virtual bool HasFriend(steam_id steamIDFriend, int eFriendFlags);
|
virtual bool GetClanActivityCounts(steam_id steamID, int* pnOnline, int* pnInGame, int* pnChatting);
|
||||||
virtual int GetClanCount();
|
virtual unsigned long long DownloadClanActivityCounts(steam_id groupIDs[], int nIds);
|
||||||
virtual steam_id GetClanByIndex(int iClan);
|
virtual int GetFriendCountFromSource(steam_id steamIDSource);
|
||||||
virtual const char* GetClanName(steam_id steamIDClan);
|
virtual steam_id GetFriendFromSourceByIndex(steam_id steamIDSource, int iFriend);
|
||||||
virtual const char* GetClanTag(steam_id steamIDClan);
|
virtual bool IsUserInSource(steam_id steamIDUser, steam_id steamIDSource);
|
||||||
virtual bool GetClanActivityCounts(steam_id steamID, int* pnOnline, int* pnInGame, int* pnChatting);
|
virtual void SetInGameVoiceSpeaking(steam_id steamIDUser, bool bSpeaking);
|
||||||
virtual unsigned long long DownloadClanActivityCounts(steam_id groupIDs[], int nIds);
|
virtual void ActivateGameOverlay(const char* pchDialog);
|
||||||
virtual int GetFriendCountFromSource(steam_id steamIDSource);
|
virtual void ActivateGameOverlayToUser(const char* pchDialog, steam_id steamID);
|
||||||
virtual steam_id GetFriendFromSourceByIndex(steam_id steamIDSource, int iFriend);
|
virtual void ActivateGameOverlayToWebPage(const char* pchURL);
|
||||||
virtual bool IsUserInSource(steam_id steamIDUser, steam_id steamIDSource);
|
virtual void ActivateGameOverlayToStore(unsigned int nAppID, unsigned int eFlag);
|
||||||
virtual void SetInGameVoiceSpeaking(steam_id steamIDUser, bool bSpeaking);
|
virtual void SetPlayedWith(steam_id steamIDUserPlayedWith);
|
||||||
virtual void ActivateGameOverlay(const char* pchDialog);
|
virtual void ActivateGameOverlayInviteDialog(steam_id steamIDLobby);
|
||||||
virtual void ActivateGameOverlayToUser(const char* pchDialog, steam_id steamID);
|
virtual int GetSmallFriendAvatar(steam_id steamIDFriend);
|
||||||
virtual void ActivateGameOverlayToWebPage(const char* pchURL);
|
virtual int GetMediumFriendAvatar(steam_id steamIDFriend);
|
||||||
virtual void ActivateGameOverlayToStore(unsigned int nAppID, unsigned int eFlag);
|
virtual int GetLargeFriendAvatar(steam_id steamIDFriend);
|
||||||
virtual void SetPlayedWith(steam_id steamIDUserPlayedWith);
|
virtual bool RequestUserInformation(steam_id steamIDUser, bool bRequireNameOnly);
|
||||||
virtual void ActivateGameOverlayInviteDialog(steam_id steamIDLobby);
|
virtual unsigned long long RequestClanOfficerList(steam_id steamIDClan);
|
||||||
virtual int GetSmallFriendAvatar(steam_id steamIDFriend);
|
virtual steam_id GetClanOwner(steam_id steamIDClan);
|
||||||
virtual int GetMediumFriendAvatar(steam_id steamIDFriend);
|
virtual int GetClanOfficerCount(steam_id steamIDClan);
|
||||||
virtual int GetLargeFriendAvatar(steam_id steamIDFriend);
|
virtual steam_id GetClanOfficerByIndex(steam_id steamIDClan, int iOfficer);
|
||||||
virtual bool RequestUserInformation(steam_id steamIDUser, bool bRequireNameOnly);
|
virtual int GetUserRestrictions();
|
||||||
virtual unsigned long long RequestClanOfficerList(steam_id steamIDClan);
|
virtual bool SetRichPresence(const char* pchKey, const char* pchValue);
|
||||||
virtual steam_id GetClanOwner(steam_id steamIDClan);
|
virtual void ClearRichPresence();
|
||||||
virtual int GetClanOfficerCount(steam_id steamIDClan);
|
virtual const char* GetFriendRichPresence(steam_id steamIDFriend, const char* pchKey);
|
||||||
virtual steam_id GetClanOfficerByIndex(steam_id steamIDClan, int iOfficer);
|
virtual int GetFriendRichPresenceKeyCount(steam_id steamIDFriend);
|
||||||
virtual int GetUserRestrictions();
|
virtual const char* GetFriendRichPresenceKeyByIndex(steam_id steamIDFriend, int iKey);
|
||||||
virtual bool SetRichPresence(const char* pchKey, const char* pchValue);
|
virtual void RequestFriendRichPresence(steam_id steamIDFriend);
|
||||||
virtual void ClearRichPresence();
|
virtual bool InviteUserToGame(steam_id steamIDFriend, const char* pchConnectString);
|
||||||
virtual const char* GetFriendRichPresence(steam_id steamIDFriend, const char* pchKey);
|
virtual int GetCoplayFriendCount();
|
||||||
virtual int GetFriendRichPresenceKeyCount(steam_id steamIDFriend);
|
virtual steam_id GetCoplayFriend(int iCoplayFriend);
|
||||||
virtual const char* GetFriendRichPresenceKeyByIndex(steam_id steamIDFriend, int iKey);
|
virtual int GetFriendCoplayTime(steam_id steamIDFriend);
|
||||||
virtual void RequestFriendRichPresence(steam_id steamIDFriend);
|
virtual unsigned int GetFriendCoplayGame(steam_id steamIDFriend);
|
||||||
virtual bool InviteUserToGame(steam_id steamIDFriend, const char* pchConnectString);
|
virtual unsigned long long JoinClanChatRoom(steam_id steamIDClan);
|
||||||
virtual int GetCoplayFriendCount();
|
virtual bool LeaveClanChatRoom(steam_id steamIDClan);
|
||||||
virtual steam_id GetCoplayFriend(int iCoplayFriend);
|
virtual int GetClanChatMemberCount(steam_id steamIDClan);
|
||||||
virtual int GetFriendCoplayTime(steam_id steamIDFriend);
|
virtual steam_id GetChatMemberByIndex(steam_id steamIDClan, int iUser);
|
||||||
virtual unsigned int GetFriendCoplayGame(steam_id steamIDFriend);
|
virtual bool SendClanChatMessage(steam_id steamIDClanChat, const char* pchText);
|
||||||
virtual unsigned long long JoinClanChatRoom(steam_id steamIDClan);
|
virtual int GetClanChatMessage(steam_id steamIDClanChat, int iMessage, void* prgchText, int cchTextMax,
|
||||||
virtual bool LeaveClanChatRoom(steam_id steamIDClan);
|
unsigned int* peChatEntryType, steam_id* pSteamIDChatter);
|
||||||
virtual int GetClanChatMemberCount(steam_id steamIDClan);
|
virtual bool IsClanChatAdmin(steam_id steamIDClanChat, steam_id steamIDUser);
|
||||||
virtual steam_id GetChatMemberByIndex(steam_id steamIDClan, int iUser);
|
virtual bool IsClanChatWindowOpenInSteam(steam_id steamIDClanChat);
|
||||||
virtual bool SendClanChatMessage(steam_id steamIDClanChat, const char* pchText);
|
virtual bool OpenClanChatWindowInSteam(steam_id steamIDClanChat);
|
||||||
virtual int GetClanChatMessage(steam_id steamIDClanChat, int iMessage, void* prgchText, int cchTextMax, unsigned int* peChatEntryType, steam_id* pSteamIDChatter);
|
virtual bool CloseClanChatWindowInSteam(steam_id steamIDClanChat);
|
||||||
virtual bool IsClanChatAdmin(steam_id steamIDClanChat, steam_id steamIDUser);
|
virtual bool SetListenForFriendsMessages(bool bInterceptEnabled);
|
||||||
virtual bool IsClanChatWindowOpenInSteam(steam_id steamIDClanChat);
|
virtual bool ReplyToFriendMessage(steam_id steamIDFriend, const char* pchMsgToSend);
|
||||||
virtual bool OpenClanChatWindowInSteam(steam_id steamIDClanChat);
|
virtual int GetFriendMessage(steam_id steamIDFriend, int iMessageID, void* pvData, int cubData,
|
||||||
virtual bool CloseClanChatWindowInSteam(steam_id steamIDClanChat);
|
unsigned int* peChatEntryType);
|
||||||
virtual bool SetListenForFriendsMessages(bool bInterceptEnabled);
|
virtual unsigned long long GetFollowerCount(steam_id steamID);
|
||||||
virtual bool ReplyToFriendMessage(steam_id steamIDFriend, const char* pchMsgToSend);
|
virtual unsigned long long IsFollowing(steam_id steamID);
|
||||||
virtual int GetFriendMessage(steam_id steamIDFriend, int iMessageID, void* pvData, int cubData, unsigned int* peChatEntryType);
|
virtual unsigned long long EnumerateFollowingList(unsigned int unStartIndex);
|
||||||
virtual unsigned long long GetFollowerCount(steam_id steamID);
|
};
|
||||||
virtual unsigned long long IsFollowing(steam_id steamID);
|
}
|
||||||
virtual unsigned long long EnumerateFollowingList(unsigned int unStartIndex);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -3,202 +3,202 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
bool game_server::InitGameServer(unsigned int unGameIP, unsigned short unGamePort, unsigned short usQueryPort,
|
||||||
|
unsigned int unServerFlags, unsigned int nAppID, const char* pchVersion)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool game_server::InitGameServer(unsigned int unGameIP, unsigned short unGamePort, unsigned short usQueryPort, unsigned int unServerFlags, unsigned int nAppID, const char* pchVersion)
|
void game_server::SetProduct(const char* pchProductName)
|
||||||
{
|
{
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void game_server::SetProduct(const char* pchProductName)
|
void game_server::SetGameDescription(const char* pchGameDescription)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetGameDescription(const char* pchGameDescription)
|
void game_server::SetModDir(const char* pchModDir)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetModDir(const char* pchModDir)
|
void game_server::SetDedicatedServer(bool bDedicatedServer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetDedicatedServer(bool bDedicatedServer)
|
void game_server::LogOn(const char* pszAccountName, const char* pszPassword)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::LogOn(const char* pszAccountName, const char* pszPassword)
|
void game_server::LogOnAnonymous()
|
||||||
{
|
{
|
||||||
}
|
auto* const retvals = calloc(1, 1);
|
||||||
|
const auto result = callbacks::register_call();
|
||||||
|
callbacks::return_call(retvals, 0, 101, result);
|
||||||
|
}
|
||||||
|
|
||||||
void game_server::LogOnAnonymous()
|
void game_server::LogOff()
|
||||||
{
|
{
|
||||||
auto* const retvals = calloc(1, 1);
|
}
|
||||||
const auto result = callbacks::register_call();
|
|
||||||
callbacks::return_call(retvals, 0, 101, result);
|
|
||||||
}
|
|
||||||
|
|
||||||
void game_server::LogOff()
|
bool game_server::BLoggedOn()
|
||||||
{
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool game_server::BLoggedOn()
|
bool game_server::BSecure()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool game_server::BSecure()
|
steam_id game_server::GetSteamID()
|
||||||
{
|
{
|
||||||
return false;
|
return SteamUser()->GetSteamID();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id game_server::GetSteamID()
|
bool game_server::WasRestartRequested()
|
||||||
{
|
{
|
||||||
return SteamUser()->GetSteamID();
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool game_server::WasRestartRequested()
|
void game_server::SetMaxPlayerCount(int cPlayersMax)
|
||||||
{
|
{
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void game_server::SetMaxPlayerCount(int cPlayersMax)
|
void game_server::SetBotPlayerCount(int cBotPlayers)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetBotPlayerCount(int cBotPlayers)
|
void game_server::SetServerName(const char* pszServerName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetServerName(const char* pszServerName)
|
void game_server::SetMapName(const char* pszMapName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetMapName(const char* pszMapName)
|
void game_server::SetPasswordProtected(bool bPasswordProtected)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetPasswordProtected(bool bPasswordProtected)
|
void game_server::SetSpectatorPort(unsigned short unSpectatorPort)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetSpectatorPort(unsigned short unSpectatorPort)
|
void game_server::SetSpectatorServerName(const char* pszSpectatorServerName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetSpectatorServerName(const char* pszSpectatorServerName)
|
void game_server::ClearAllKeyValues()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::ClearAllKeyValues()
|
void game_server::SetKeyValue(const char* pKey, const char* pValue)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetKeyValue(const char* pKey, const char* pValue)
|
void game_server::SetGameTags(const char* pchGameTags)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetGameTags(const char* pchGameTags)
|
void game_server::SetGameData(const char* pchGameData)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetGameData(const char* pchGameData)
|
void game_server::SetRegion(const char* pchRegionName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetRegion(const char* pchRegionName)
|
int game_server::SendUserConnectAndAuthenticate(unsigned int unIPClient, const void* pvAuthBlob,
|
||||||
{
|
unsigned int cubAuthBlobSize, steam_id* pSteamIDUser)
|
||||||
}
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int game_server::SendUserConnectAndAuthenticate(unsigned int unIPClient, const void* pvAuthBlob, unsigned int cubAuthBlobSize, steam_id* pSteamIDUser)
|
steam_id game_server::CreateUnauthenticatedUserConnection()
|
||||||
{
|
{
|
||||||
return 0;
|
return SteamUser()->GetSteamID();
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id game_server::CreateUnauthenticatedUserConnection()
|
void game_server::SendUserDisconnect(steam_id steamIDUser)
|
||||||
{
|
{
|
||||||
return SteamUser()->GetSteamID();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void game_server::SendUserDisconnect(steam_id steamIDUser)
|
bool game_server::BUpdateUserData(steam_id steamIDUser, const char* pchPlayerName, unsigned int uScore)
|
||||||
{
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool game_server::BUpdateUserData(steam_id steamIDUser, const char* pchPlayerName, unsigned int uScore)
|
int game_server::GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int game_server::GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket)
|
int game_server::BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int game_server::BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID)
|
void game_server::EndAuthSession(steam_id steamID)
|
||||||
{
|
{
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void game_server::EndAuthSession(steam_id steamID)
|
void game_server::CancelAuthTicket(int hAuthTicket)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::CancelAuthTicket(int hAuthTicket)
|
int game_server::UserHasLicenseForApp(steam_id steamID, unsigned int appID)
|
||||||
{
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int game_server::UserHasLicenseForApp(steam_id steamID, unsigned int appID)
|
bool game_server::RequestUserGroupStatus(steam_id steamIDUser, steam_id steamIDGroup)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool game_server::RequestUserGroupStatus(steam_id steamIDUser, steam_id steamIDGroup)
|
void game_server::GetGameplayStats()
|
||||||
{
|
{
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void game_server::GetGameplayStats()
|
unsigned long long game_server::GetServerReputation()
|
||||||
{
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long game_server::GetServerReputation()
|
unsigned int game_server::GetPublicIP()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int game_server::GetPublicIP()
|
bool game_server::HandleIncomingPacket(const void* pData, int cbData, unsigned int srcIP, unsigned short srcPort)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool game_server::HandleIncomingPacket(const void* pData, int cbData, unsigned int srcIP, unsigned short srcPort)
|
int game_server::GetNextOutgoingPacket(void* pOut, int cbMaxOut, unsigned int* pNetAdr, unsigned short* pPort)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int game_server::GetNextOutgoingPacket(void* pOut, int cbMaxOut, unsigned int* pNetAdr, unsigned short* pPort)
|
void game_server::EnableHeartbeats(bool bActive)
|
||||||
{
|
{
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void game_server::EnableHeartbeats(bool bActive)
|
void game_server::SetHeartbeatInterval(int iHeartbeatInterval)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::SetHeartbeatInterval(int iHeartbeatInterval)
|
void game_server::ForceHeartbeat()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_server::ForceHeartbeat()
|
unsigned long long game_server::AssociateWithClan(steam_id clanID)
|
||||||
{
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long game_server::AssociateWithClan(steam_id clanID)
|
unsigned long long game_server::ComputeNewPlayerCompatibility(steam_id steamID)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
unsigned long long game_server::ComputeNewPlayerCompatibility(steam_id steamID)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -2,56 +2,56 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
class game_server
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~game_server() = default;
|
||||||
|
|
||||||
class game_server
|
virtual bool InitGameServer(unsigned int unGameIP, unsigned short unGamePort, unsigned short usQueryPort,
|
||||||
{
|
unsigned int unServerFlags, unsigned int nAppID, const char* pchVersion);
|
||||||
public:
|
virtual void SetProduct(const char* pchProductName);
|
||||||
~game_server() = default;
|
virtual void SetGameDescription(const char* pchGameDescription);
|
||||||
|
virtual void SetModDir(const char* pchModDir);
|
||||||
virtual bool InitGameServer(unsigned int unGameIP, unsigned short unGamePort, unsigned short usQueryPort, unsigned int unServerFlags, unsigned int nAppID, const char* pchVersion);
|
virtual void SetDedicatedServer(bool bDedicatedServer);
|
||||||
virtual void SetProduct(const char* pchProductName);
|
virtual void LogOn(const char* pszAccountName, const char* pszPassword);
|
||||||
virtual void SetGameDescription(const char* pchGameDescription);
|
virtual void LogOnAnonymous();
|
||||||
virtual void SetModDir(const char* pchModDir);
|
virtual void LogOff();
|
||||||
virtual void SetDedicatedServer(bool bDedicatedServer);
|
virtual bool BLoggedOn();
|
||||||
virtual void LogOn(const char* pszAccountName, const char* pszPassword);
|
virtual bool BSecure();
|
||||||
virtual void LogOnAnonymous();
|
virtual steam_id GetSteamID();
|
||||||
virtual void LogOff();
|
virtual bool WasRestartRequested();
|
||||||
virtual bool BLoggedOn();
|
virtual void SetMaxPlayerCount(int cPlayersMax);
|
||||||
virtual bool BSecure();
|
virtual void SetBotPlayerCount(int cBotPlayers);
|
||||||
virtual steam_id GetSteamID();
|
virtual void SetServerName(const char* pszServerName);
|
||||||
virtual bool WasRestartRequested();
|
virtual void SetMapName(const char* pszMapName);
|
||||||
virtual void SetMaxPlayerCount(int cPlayersMax);
|
virtual void SetPasswordProtected(bool bPasswordProtected);
|
||||||
virtual void SetBotPlayerCount(int cBotPlayers);
|
virtual void SetSpectatorPort(unsigned short unSpectatorPort);
|
||||||
virtual void SetServerName(const char* pszServerName);
|
virtual void SetSpectatorServerName(const char* pszSpectatorServerName);
|
||||||
virtual void SetMapName(const char* pszMapName);
|
virtual void ClearAllKeyValues();
|
||||||
virtual void SetPasswordProtected(bool bPasswordProtected);
|
virtual void SetKeyValue(const char* pKey, const char* pValue);
|
||||||
virtual void SetSpectatorPort(unsigned short unSpectatorPort);
|
virtual void SetGameTags(const char* pchGameTags);
|
||||||
virtual void SetSpectatorServerName(const char* pszSpectatorServerName);
|
virtual void SetGameData(const char* pchGameData);
|
||||||
virtual void ClearAllKeyValues();
|
virtual void SetRegion(const char* pchRegionName);
|
||||||
virtual void SetKeyValue(const char* pKey, const char* pValue);
|
virtual int SendUserConnectAndAuthenticate(unsigned int unIPClient, const void* pvAuthBlob,
|
||||||
virtual void SetGameTags(const char* pchGameTags);
|
unsigned int cubAuthBlobSize, steam_id* pSteamIDUser);
|
||||||
virtual void SetGameData(const char* pchGameData);
|
virtual steam_id CreateUnauthenticatedUserConnection();
|
||||||
virtual void SetRegion(const char* pchRegionName);
|
virtual void SendUserDisconnect(steam_id steamIDUser);
|
||||||
virtual int SendUserConnectAndAuthenticate(unsigned int unIPClient, const void* pvAuthBlob, unsigned int cubAuthBlobSize, steam_id* pSteamIDUser);
|
virtual bool BUpdateUserData(steam_id steamIDUser, const char* pchPlayerName, unsigned int uScore);
|
||||||
virtual steam_id CreateUnauthenticatedUserConnection();
|
virtual int GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket);
|
||||||
virtual void SendUserDisconnect(steam_id steamIDUser);
|
virtual int BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID);
|
||||||
virtual bool BUpdateUserData(steam_id steamIDUser, const char* pchPlayerName, unsigned int uScore);
|
virtual void EndAuthSession(steam_id steamID);
|
||||||
virtual int GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket);
|
virtual void CancelAuthTicket(int hAuthTicket);
|
||||||
virtual int BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID);
|
virtual int UserHasLicenseForApp(steam_id steamID, unsigned int appID);
|
||||||
virtual void EndAuthSession(steam_id steamID);
|
virtual bool RequestUserGroupStatus(steam_id steamIDUser, steam_id steamIDGroup);
|
||||||
virtual void CancelAuthTicket(int hAuthTicket);
|
virtual void GetGameplayStats();
|
||||||
virtual int UserHasLicenseForApp(steam_id steamID, unsigned int appID);
|
virtual unsigned long long GetServerReputation();
|
||||||
virtual bool RequestUserGroupStatus(steam_id steamIDUser, steam_id steamIDGroup);
|
virtual unsigned int GetPublicIP();
|
||||||
virtual void GetGameplayStats();
|
virtual bool HandleIncomingPacket(const void* pData, int cbData, unsigned int srcIP, unsigned short srcPort);
|
||||||
virtual unsigned long long GetServerReputation();
|
virtual int GetNextOutgoingPacket(void* pOut, int cbMaxOut, unsigned int* pNetAdr, unsigned short* pPort);
|
||||||
virtual unsigned int GetPublicIP();
|
virtual void EnableHeartbeats(bool bActive);
|
||||||
virtual bool HandleIncomingPacket(const void* pData, int cbData, unsigned int srcIP, unsigned short srcPort);
|
virtual void SetHeartbeatInterval(int iHeartbeatInterval);
|
||||||
virtual int GetNextOutgoingPacket(void* pOut, int cbMaxOut, unsigned int* pNetAdr, unsigned short* pPort);
|
virtual void ForceHeartbeat();
|
||||||
virtual void EnableHeartbeats(bool bActive);
|
virtual unsigned long long AssociateWithClan(steam_id clanID);
|
||||||
virtual void SetHeartbeatInterval(int iHeartbeatInterval);
|
virtual unsigned long long ComputeNewPlayerCompatibility(steam_id steamID);
|
||||||
virtual void ForceHeartbeat();
|
};
|
||||||
virtual unsigned long long AssociateWithClan(steam_id clanID);
|
}
|
||||||
virtual unsigned long long ComputeNewPlayerCompatibility(steam_id steamID);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -3,231 +3,228 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
int matchmaking::GetFavoriteGameCount()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int matchmaking::GetFavoriteGameCount()
|
bool matchmaking::GetFavoriteGame(int iGame, unsigned int* pnAppID, unsigned int* pnIP, unsigned short* pnConnPort,
|
||||||
{
|
unsigned short* pnQueryPort, unsigned int* punFlags,
|
||||||
return 0;
|
unsigned int* pRTime32LastPlayedOnServer)
|
||||||
}
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool matchmaking::GetFavoriteGame(int iGame, unsigned int* pnAppID, unsigned int* pnIP, unsigned short* pnConnPort,
|
int matchmaking::AddFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
||||||
unsigned short* pnQueryPort, unsigned int* punFlags,
|
unsigned short nQueryPort, unsigned int unFlags,
|
||||||
unsigned int* pRTime32LastPlayedOnServer)
|
unsigned int rTime32LastPlayedOnServer)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int matchmaking::AddFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
bool matchmaking::RemoveFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
||||||
unsigned short nQueryPort, unsigned int unFlags,
|
unsigned short nQueryPort, unsigned int unFlags)
|
||||||
unsigned int rTime32LastPlayedOnServer)
|
{
|
||||||
{
|
return false;
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool matchmaking::RemoveFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
unsigned long long matchmaking::RequestLobbyList()
|
||||||
unsigned short nQueryPort, unsigned int unFlags)
|
{
|
||||||
{
|
return 0;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long long matchmaking::RequestLobbyList()
|
void matchmaking::AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch,
|
||||||
{
|
int eComparisonType)
|
||||||
return 0;
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void matchmaking::AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch,
|
void matchmaking::AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch,
|
||||||
int eComparisonType)
|
int eComparisonType)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void matchmaking::AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch,
|
void matchmaking::AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo)
|
||||||
int eComparisonType)
|
{
|
||||||
{
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void matchmaking::AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo)
|
void matchmaking::AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void matchmaking::AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable)
|
void matchmaking::AddRequestLobbyListDistanceFilter(int eLobbyDistanceFilter)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void matchmaking::AddRequestLobbyListDistanceFilter(int eLobbyDistanceFilter)
|
void matchmaking::AddRequestLobbyListResultCountFilter(int cMaxResults)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void matchmaking::AddRequestLobbyListResultCountFilter(int cMaxResults)
|
void matchmaking::AddRequestLobbyListCompatibleMembersFilter(steam_id steamID)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void matchmaking::AddRequestLobbyListCompatibleMembersFilter(steam_id steamID)
|
steam_id matchmaking::GetLobbyByIndex(int iLobby)
|
||||||
{
|
{
|
||||||
}
|
steam_id id;
|
||||||
|
|
||||||
steam_id matchmaking::GetLobbyByIndex(int iLobby)
|
id.raw.account_id = SteamUser()->GetSteamID().raw.account_id;
|
||||||
{
|
id.raw.universe = 1;
|
||||||
steam_id id;
|
id.raw.account_type = 8;
|
||||||
|
id.raw.account_instance = 0x40000;
|
||||||
|
|
||||||
id.raw.account_id = SteamUser()->GetSteamID().raw.account_id;
|
return id;
|
||||||
id.raw.universe = 1;
|
}
|
||||||
id.raw.account_type = 8;
|
|
||||||
id.raw.account_instance = 0x40000;
|
|
||||||
|
|
||||||
return id;
|
unsigned long long matchmaking::CreateLobby(int eLobbyType, int cMaxMembers)
|
||||||
}
|
{
|
||||||
|
const auto result = callbacks::register_call();
|
||||||
|
auto retvals = static_cast<lobby_created*>(calloc(1, sizeof(lobby_created)));
|
||||||
|
//::Utils::Memory::AllocateArray<LobbyCreated>();
|
||||||
|
steam_id id;
|
||||||
|
|
||||||
unsigned long long matchmaking::CreateLobby(int eLobbyType, int cMaxMembers)
|
id.raw.account_id = SteamUser()->GetSteamID().raw.account_id;
|
||||||
{
|
id.raw.universe = 1;
|
||||||
const auto result = callbacks::register_call();
|
id.raw.account_type = 8;
|
||||||
auto retvals = static_cast<lobby_created*>(calloc(1, sizeof(lobby_created)));
|
id.raw.account_instance = 0x40000;
|
||||||
//::Utils::Memory::AllocateArray<LobbyCreated>();
|
|
||||||
steam_id id;
|
|
||||||
|
|
||||||
id.raw.account_id = SteamUser()->GetSteamID().raw.account_id;
|
retvals->m_e_result = 1;
|
||||||
id.raw.universe = 1;
|
retvals->m_ul_steam_id_lobby = id;
|
||||||
id.raw.account_type = 8;
|
|
||||||
id.raw.account_instance = 0x40000;
|
|
||||||
|
|
||||||
retvals->m_e_result = 1;
|
callbacks::return_call(retvals, sizeof(lobby_created), lobby_created::callback_id, result);
|
||||||
retvals->m_ul_steam_id_lobby = id;
|
|
||||||
|
|
||||||
callbacks::return_call(retvals, sizeof(lobby_created), lobby_created::callback_id, result);
|
matchmaking::JoinLobby(id);
|
||||||
|
|
||||||
matchmaking::JoinLobby(id);
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
unsigned long long matchmaking::JoinLobby(steam_id steamIDLobby)
|
||||||
}
|
{
|
||||||
|
const auto result = callbacks::register_call();
|
||||||
|
auto* retvals = static_cast<lobby_enter*>(calloc(1, sizeof(lobby_enter)));
|
||||||
|
//::Utils::Memory::AllocateArray<LobbyEnter>();
|
||||||
|
retvals->m_b_locked = false;
|
||||||
|
retvals->m_e_chat_room_enter_response = 1;
|
||||||
|
retvals->m_rgf_chat_permissions = 0xFFFFFFFF;
|
||||||
|
retvals->m_ul_steam_id_lobby = steamIDLobby;
|
||||||
|
|
||||||
unsigned long long matchmaking::JoinLobby(steam_id steamIDLobby)
|
callbacks::return_call(retvals, sizeof(lobby_enter), lobby_enter::callback_id, result);
|
||||||
{
|
|
||||||
const auto result = callbacks::register_call();
|
|
||||||
auto* retvals = static_cast<lobby_enter*>(calloc(1, sizeof(lobby_enter)));
|
|
||||||
//::Utils::Memory::AllocateArray<LobbyEnter>();
|
|
||||||
retvals->m_b_locked = false;
|
|
||||||
retvals->m_e_chat_room_enter_response = 1;
|
|
||||||
retvals->m_rgf_chat_permissions = 0xFFFFFFFF;
|
|
||||||
retvals->m_ul_steam_id_lobby = steamIDLobby;
|
|
||||||
|
|
||||||
callbacks::return_call(retvals, sizeof(lobby_enter), lobby_enter::callback_id, result);
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
void matchmaking::LeaveLobby(steam_id steamIDLobby)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void matchmaking::LeaveLobby(steam_id steamIDLobby)
|
bool matchmaking::InviteUserToLobby(steam_id steamIDLobby, steam_id steamIDInvitee)
|
||||||
{
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
int matchmaking::GetNumLobbyMembers(steam_id steamIDLobby)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
bool matchmaking::InviteUserToLobby(steam_id steamIDLobby, steam_id steamIDInvitee)
|
steam_id matchmaking::GetLobbyMemberByIndex(steam_id steamIDLobby, int iMember)
|
||||||
{
|
{
|
||||||
return true;
|
return SteamUser()->GetSteamID();
|
||||||
}
|
}
|
||||||
|
|
||||||
int matchmaking::GetNumLobbyMembers(steam_id steamIDLobby)
|
const char* matchmaking::GetLobbyData(steam_id steamIDLobby, const char* pchKey)
|
||||||
{
|
{
|
||||||
return 1;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id matchmaking::GetLobbyMemberByIndex(steam_id steamIDLobby, int iMember)
|
bool matchmaking::SetLobbyData(steam_id steamIDLobby, const char* pchKey, const char* pchValue)
|
||||||
{
|
{
|
||||||
return SteamUser()->GetSteamID();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* matchmaking::GetLobbyData(steam_id steamIDLobby, const char* pchKey)
|
int matchmaking::GetLobbyDataCount(steam_id steamIDLobby)
|
||||||
{
|
{
|
||||||
return "";
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matchmaking::SetLobbyData(steam_id steamIDLobby, const char* pchKey, const char* pchValue)
|
bool matchmaking::GetLobbyDataByIndex(steam_id steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize,
|
||||||
{
|
char* pchValue, int cchValueBufferSize)
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
int matchmaking::GetLobbyDataCount(steam_id steamIDLobby)
|
bool matchmaking::DeleteLobbyData(steam_id steamIDLobby, const char* pchKey)
|
||||||
{
|
{
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matchmaking::GetLobbyDataByIndex(steam_id steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize,
|
const char* matchmaking::GetLobbyMemberData(steam_id steamIDLobby, steam_id steamIDUser, const char* pchKey)
|
||||||
char* pchValue, int cchValueBufferSize)
|
{
|
||||||
{
|
return "";
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool matchmaking::DeleteLobbyData(steam_id steamIDLobby, const char* pchKey)
|
void matchmaking::SetLobbyMemberData(steam_id steamIDLobby, const char* pchKey, const char* pchValue)
|
||||||
{
|
{
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const char* matchmaking::GetLobbyMemberData(steam_id steamIDLobby, steam_id steamIDUser, const char* pchKey)
|
bool matchmaking::SendLobbyChatMsg(steam_id steamIDLobby, const void* pvMsgBody, int cubMsgBody)
|
||||||
{
|
{
|
||||||
return "";
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void matchmaking::SetLobbyMemberData(steam_id steamIDLobby, const char* pchKey, const char* pchValue)
|
int matchmaking::GetLobbyChatEntry(steam_id steamIDLobby, int iChatID, steam_id* pSteamIDUser, void* pvData,
|
||||||
{
|
int cubData, int* peChatEntryType)
|
||||||
}
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool matchmaking::SendLobbyChatMsg(steam_id steamIDLobby, const void* pvMsgBody, int cubMsgBody)
|
bool matchmaking::RequestLobbyData(steam_id steamIDLobby)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int matchmaking::GetLobbyChatEntry(steam_id steamIDLobby, int iChatID, steam_id* pSteamIDUser, void* pvData,
|
void matchmaking::SetLobbyGameServer(steam_id steamIDLobby, unsigned int unGameServerIP,
|
||||||
int cubData, int* peChatEntryType)
|
unsigned short unGameServerPort, steam_id steamIDGameServer)
|
||||||
{
|
{
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool matchmaking::RequestLobbyData(steam_id steamIDLobby)
|
bool matchmaking::GetLobbyGameServer(steam_id steamIDLobby, unsigned int* punGameServerIP,
|
||||||
{
|
unsigned short* punGameServerPort, steam_id* psteamIDGameServer)
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void matchmaking::SetLobbyGameServer(steam_id steamIDLobby, unsigned int unGameServerIP,
|
bool matchmaking::SetLobbyMemberLimit(steam_id steamIDLobby, int cMaxMembers)
|
||||||
unsigned short unGameServerPort, steam_id steamIDGameServer)
|
{
|
||||||
{
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matchmaking::GetLobbyGameServer(steam_id steamIDLobby, unsigned int* punGameServerIP,
|
int matchmaking::GetLobbyMemberLimit(steam_id steamIDLobby)
|
||||||
unsigned short* punGameServerPort, steam_id* psteamIDGameServer)
|
{
|
||||||
{
|
return 0;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool matchmaking::SetLobbyMemberLimit(steam_id steamIDLobby, int cMaxMembers)
|
bool matchmaking::SetLobbyType(steam_id steamIDLobby, int eLobbyType)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int matchmaking::GetLobbyMemberLimit(steam_id steamIDLobby)
|
bool matchmaking::SetLobbyJoinable(steam_id steamIDLobby, bool bLobbyJoinable)
|
||||||
{
|
{
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matchmaking::SetLobbyType(steam_id steamIDLobby, int eLobbyType)
|
steam_id matchmaking::GetLobbyOwner(steam_id steamIDLobby)
|
||||||
{
|
{
|
||||||
return true;
|
return SteamUser()->GetSteamID();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matchmaking::SetLobbyJoinable(steam_id steamIDLobby, bool bLobbyJoinable)
|
bool matchmaking::SetLobbyOwner(steam_id steamIDLobby, steam_id steamIDNewOwner)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id matchmaking::GetLobbyOwner(steam_id steamIDLobby)
|
bool matchmaking::SetLinkedLobby(steam_id steamIDLobby, steam_id steamIDLobby2)
|
||||||
{
|
{
|
||||||
return SteamUser()->GetSteamID();
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bool matchmaking::SetLobbyOwner(steam_id steamIDLobby, steam_id steamIDNewOwner)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool matchmaking::SetLinkedLobby(steam_id steamIDLobby, steam_id steamIDLobby2)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -2,80 +2,78 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
struct lobby_created final
|
||||||
|
{
|
||||||
|
enum { callback_id = 513 };
|
||||||
|
|
||||||
struct lobby_created final
|
int m_e_result;
|
||||||
{
|
int m_pad;
|
||||||
enum { callback_id = 513 };
|
steam_id m_ul_steam_id_lobby;
|
||||||
|
};
|
||||||
|
|
||||||
int m_e_result;
|
struct lobby_enter final
|
||||||
int m_pad;
|
{
|
||||||
steam_id m_ul_steam_id_lobby;
|
enum { callback_id = 504 };
|
||||||
};
|
|
||||||
|
|
||||||
struct lobby_enter final
|
steam_id m_ul_steam_id_lobby;
|
||||||
{
|
int m_rgf_chat_permissions;
|
||||||
enum { callback_id = 504 };
|
bool m_b_locked;
|
||||||
|
int m_e_chat_room_enter_response;
|
||||||
|
};
|
||||||
|
|
||||||
steam_id m_ul_steam_id_lobby;
|
class matchmaking
|
||||||
int m_rgf_chat_permissions;
|
{
|
||||||
bool m_b_locked;
|
public:
|
||||||
int m_e_chat_room_enter_response;
|
~matchmaking() = default;
|
||||||
};
|
|
||||||
|
|
||||||
class matchmaking
|
virtual int GetFavoriteGameCount();
|
||||||
{
|
virtual bool GetFavoriteGame(int iGame, unsigned int* pnAppID, unsigned int* pnIP, unsigned short* pnConnPort,
|
||||||
public:
|
unsigned short* pnQueryPort, unsigned int* punFlags,
|
||||||
~matchmaking() = default;
|
unsigned int* pRTime32LastPlayedOnServer);
|
||||||
|
virtual int AddFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
||||||
virtual int GetFavoriteGameCount();
|
unsigned short nQueryPort, unsigned int unFlags,
|
||||||
virtual bool GetFavoriteGame(int iGame, unsigned int* pnAppID, unsigned int* pnIP, unsigned short* pnConnPort,
|
unsigned int rTime32LastPlayedOnServer);
|
||||||
unsigned short* pnQueryPort, unsigned int* punFlags,
|
virtual bool RemoveFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
||||||
unsigned int* pRTime32LastPlayedOnServer);
|
unsigned short nQueryPort, unsigned int unFlags);
|
||||||
virtual int AddFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
virtual unsigned long long RequestLobbyList();
|
||||||
unsigned short nQueryPort, unsigned int unFlags,
|
virtual void AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch,
|
||||||
unsigned int rTime32LastPlayedOnServer);
|
int eComparisonType);
|
||||||
virtual bool RemoveFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
virtual void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch,
|
||||||
unsigned short nQueryPort, unsigned int unFlags);
|
int eComparisonType);
|
||||||
virtual unsigned long long RequestLobbyList();
|
virtual void AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo);
|
||||||
virtual void AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch,
|
virtual void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable);
|
||||||
int eComparisonType);
|
virtual void AddRequestLobbyListDistanceFilter(int eLobbyDistanceFilter);
|
||||||
virtual void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch,
|
virtual void AddRequestLobbyListResultCountFilter(int cMaxResults);
|
||||||
int eComparisonType);
|
virtual void AddRequestLobbyListCompatibleMembersFilter(steam_id steamID);
|
||||||
virtual void AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo);
|
virtual steam_id GetLobbyByIndex(int iLobby);
|
||||||
virtual void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable);
|
virtual unsigned long long CreateLobby(int eLobbyType, int cMaxMembers);
|
||||||
virtual void AddRequestLobbyListDistanceFilter(int eLobbyDistanceFilter);
|
virtual unsigned long long JoinLobby(steam_id steamIDLobby);
|
||||||
virtual void AddRequestLobbyListResultCountFilter(int cMaxResults);
|
virtual void LeaveLobby(steam_id steamIDLobby);
|
||||||
virtual void AddRequestLobbyListCompatibleMembersFilter(steam_id steamID);
|
virtual bool InviteUserToLobby(steam_id steamIDLobby, steam_id steamIDInvitee);
|
||||||
virtual steam_id GetLobbyByIndex(int iLobby);
|
virtual int GetNumLobbyMembers(steam_id steamIDLobby);
|
||||||
virtual unsigned long long CreateLobby(int eLobbyType, int cMaxMembers);
|
virtual steam_id GetLobbyMemberByIndex(steam_id steamIDLobby, int iMember);
|
||||||
virtual unsigned long long JoinLobby(steam_id steamIDLobby);
|
virtual const char* GetLobbyData(steam_id steamIDLobby, const char* pchKey);
|
||||||
virtual void LeaveLobby(steam_id steamIDLobby);
|
virtual bool SetLobbyData(steam_id steamIDLobby, const char* pchKey, const char* pchValue);
|
||||||
virtual bool InviteUserToLobby(steam_id steamIDLobby, steam_id steamIDInvitee);
|
virtual int GetLobbyDataCount(steam_id steamIDLobby);
|
||||||
virtual int GetNumLobbyMembers(steam_id steamIDLobby);
|
virtual bool GetLobbyDataByIndex(steam_id steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize,
|
||||||
virtual steam_id GetLobbyMemberByIndex(steam_id steamIDLobby, int iMember);
|
char* pchValue, int cchValueBufferSize);
|
||||||
virtual const char* GetLobbyData(steam_id steamIDLobby, const char* pchKey);
|
virtual bool DeleteLobbyData(steam_id steamIDLobby, const char* pchKey);
|
||||||
virtual bool SetLobbyData(steam_id steamIDLobby, const char* pchKey, const char* pchValue);
|
virtual const char* GetLobbyMemberData(steam_id steamIDLobby, steam_id steamIDUser, const char* pchKey);
|
||||||
virtual int GetLobbyDataCount(steam_id steamIDLobby);
|
virtual void SetLobbyMemberData(steam_id steamIDLobby, const char* pchKey, const char* pchValue);
|
||||||
virtual bool GetLobbyDataByIndex(steam_id steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize,
|
virtual bool SendLobbyChatMsg(steam_id steamIDLobby, const void* pvMsgBody, int cubMsgBody);
|
||||||
char* pchValue, int cchValueBufferSize);
|
virtual int GetLobbyChatEntry(steam_id steamIDLobby, int iChatID, steam_id* pSteamIDUser, void* pvData,
|
||||||
virtual bool DeleteLobbyData(steam_id steamIDLobby, const char* pchKey);
|
int cubData, int* peChatEntryType);
|
||||||
virtual const char* GetLobbyMemberData(steam_id steamIDLobby, steam_id steamIDUser, const char* pchKey);
|
virtual bool RequestLobbyData(steam_id steamIDLobby);
|
||||||
virtual void SetLobbyMemberData(steam_id steamIDLobby, const char* pchKey, const char* pchValue);
|
virtual void SetLobbyGameServer(steam_id steamIDLobby, unsigned int unGameServerIP,
|
||||||
virtual bool SendLobbyChatMsg(steam_id steamIDLobby, const void* pvMsgBody, int cubMsgBody);
|
unsigned short unGameServerPort, steam_id steamIDGameServer);
|
||||||
virtual int GetLobbyChatEntry(steam_id steamIDLobby, int iChatID, steam_id* pSteamIDUser, void* pvData,
|
virtual bool GetLobbyGameServer(steam_id steamIDLobby, unsigned int* punGameServerIP,
|
||||||
int cubData, int* peChatEntryType);
|
unsigned short* punGameServerPort, steam_id* psteamIDGameServer);
|
||||||
virtual bool RequestLobbyData(steam_id steamIDLobby);
|
virtual bool SetLobbyMemberLimit(steam_id steamIDLobby, int cMaxMembers);
|
||||||
virtual void SetLobbyGameServer(steam_id steamIDLobby, unsigned int unGameServerIP,
|
virtual int GetLobbyMemberLimit(steam_id steamIDLobby);
|
||||||
unsigned short unGameServerPort, steam_id steamIDGameServer);
|
virtual bool SetLobbyType(steam_id steamIDLobby, int eLobbyType);
|
||||||
virtual bool GetLobbyGameServer(steam_id steamIDLobby, unsigned int* punGameServerIP,
|
virtual bool SetLobbyJoinable(steam_id steamIDLobby, bool bLobbyJoinable);
|
||||||
unsigned short* punGameServerPort, steam_id* psteamIDGameServer);
|
virtual steam_id GetLobbyOwner(steam_id steamIDLobby);
|
||||||
virtual bool SetLobbyMemberLimit(steam_id steamIDLobby, int cMaxMembers);
|
virtual bool SetLobbyOwner(steam_id steamIDLobby, steam_id steamIDNewOwner);
|
||||||
virtual int GetLobbyMemberLimit(steam_id steamIDLobby);
|
virtual bool SetLinkedLobby(steam_id steamIDLobby, steam_id steamIDLobby2);
|
||||||
virtual bool SetLobbyType(steam_id steamIDLobby, int eLobbyType);
|
};
|
||||||
virtual bool SetLobbyJoinable(steam_id steamIDLobby, bool bLobbyJoinable);
|
}
|
||||||
virtual steam_id GetLobbyOwner(steam_id steamIDLobby);
|
|
||||||
virtual bool SetLobbyOwner(steam_id steamIDLobby, steam_id steamIDNewOwner);
|
|
||||||
virtual bool SetLinkedLobby(steam_id steamIDLobby, steam_id steamIDLobby2);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -3,121 +3,119 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
bool networking::SendP2PPacket(steam_id steamIDRemote, const void* pubData, unsigned int cubData, int eP2PSendType)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool networking::SendP2PPacket(steam_id steamIDRemote, const void* pubData, unsigned int cubData, int eP2PSendType)
|
bool networking::IsP2PPacketAvailable(unsigned int* pcubMsgSize, int idk)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::IsP2PPacketAvailable(unsigned int* pcubMsgSize, int idk)
|
bool networking::ReadP2PPacket(void* pubDest, unsigned int cubDest, unsigned int* pcubMsgSize,
|
||||||
{
|
steam_id* psteamIDRemote)
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool networking::ReadP2PPacket(void* pubDest, unsigned int cubDest, unsigned int* pcubMsgSize,
|
bool networking::AcceptP2PSessionWithUser(steam_id steamIDRemote)
|
||||||
steam_id* psteamIDRemote)
|
{
|
||||||
{
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool networking::AcceptP2PSessionWithUser(steam_id steamIDRemote)
|
bool networking::CloseP2PSessionWithUser(steam_id steamIDRemote)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::CloseP2PSessionWithUser(steam_id steamIDRemote)
|
bool networking::CloseP2PChannelWithUser(steam_id steamIDRemote, int iVirtualPort)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::CloseP2PChannelWithUser(steam_id steamIDRemote, int iVirtualPort)
|
bool networking::GetP2PSessionState(steam_id steamIDRemote, void* pConnectionState)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::GetP2PSessionState(steam_id steamIDRemote, void* pConnectionState)
|
bool networking::AllowP2PPacketRelay(bool bAllow)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::AllowP2PPacketRelay(bool bAllow)
|
unsigned int networking::CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort,
|
||||||
{
|
bool bAllowUseOfPacketRelay)
|
||||||
return false;
|
{
|
||||||
}
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int networking::CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort,
|
unsigned int networking::CreateP2PConnectionSocket(steam_id steamIDTarget, int nVirtualPort, int nTimeoutSec,
|
||||||
bool bAllowUseOfPacketRelay)
|
bool bAllowUseOfPacketRelay)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int networking::CreateP2PConnectionSocket(steam_id steamIDTarget, int nVirtualPort, int nTimeoutSec,
|
unsigned int networking::CreateConnectionSocket(unsigned int nIP, unsigned short nPort, int nTimeoutSec)
|
||||||
bool bAllowUseOfPacketRelay)
|
{
|
||||||
{
|
return NULL;
|
||||||
return NULL;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int networking::CreateConnectionSocket(unsigned int nIP, unsigned short nPort, int nTimeoutSec)
|
bool networking::DestroySocket(unsigned int hSocket, bool bNotifyRemoteEnd)
|
||||||
{
|
{
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::DestroySocket(unsigned int hSocket, bool bNotifyRemoteEnd)
|
bool networking::DestroyListenSocket(unsigned int hSocket, bool bNotifyRemoteEnd)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::DestroyListenSocket(unsigned int hSocket, bool bNotifyRemoteEnd)
|
bool networking::SendDataOnSocket(unsigned int hSocket, void* pubData, unsigned int cubData, bool bReliable)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::SendDataOnSocket(unsigned int hSocket, void* pubData, unsigned int cubData, bool bReliable)
|
bool networking::IsDataAvailableOnSocket(unsigned int hSocket, unsigned int* pcubMsgSize)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::IsDataAvailableOnSocket(unsigned int hSocket, unsigned int* pcubMsgSize)
|
bool networking::RetrieveDataFromSocket(unsigned int hSocket, void* pubDest, unsigned int cubDest,
|
||||||
{
|
unsigned int* pcubMsgSize)
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool networking::RetrieveDataFromSocket(unsigned int hSocket, void* pubDest, unsigned int cubDest,
|
bool networking::IsDataAvailable(unsigned int hListenSocket, unsigned int* pcubMsgSize, unsigned int* phSocket)
|
||||||
unsigned int* pcubMsgSize)
|
{
|
||||||
{
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool networking::IsDataAvailable(unsigned int hListenSocket, unsigned int* pcubMsgSize, unsigned int* phSocket)
|
bool networking::RetrieveData(unsigned int hListenSocket, void* pubDest, unsigned int cubDest,
|
||||||
{
|
unsigned int* pcubMsgSize, unsigned int* phSocket)
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool networking::RetrieveData(unsigned int hListenSocket, void* pubDest, unsigned int cubDest,
|
bool networking::GetSocketInfo(unsigned int hSocket, steam_id* pSteamIDRemote, int* peSocketStatus,
|
||||||
unsigned int* pcubMsgSize, unsigned int* phSocket)
|
unsigned int* punIPRemote, unsigned short* punPortRemote)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool networking::GetSocketInfo(unsigned int hSocket, steam_id* pSteamIDRemote, int* peSocketStatus,
|
bool networking::GetListenSocketInfo(unsigned int hListenSocket, unsigned int* pnIP, unsigned short* pnPort)
|
||||||
unsigned int* punIPRemote, unsigned short* punPortRemote)
|
{
|
||||||
{
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool networking::GetListenSocketInfo(unsigned int hListenSocket, unsigned int* pnIP, unsigned short* pnPort)
|
int networking::GetSocketConnectionType(unsigned int hSocket)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int networking::GetSocketConnectionType(unsigned int hSocket)
|
int networking::GetMaxPacketSize(unsigned int hSocket)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
int networking::GetMaxPacketSize(unsigned int hSocket)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -2,40 +2,38 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
class networking
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~networking() = default;
|
||||||
|
|
||||||
class networking
|
virtual bool SendP2PPacket(steam_id steamIDRemote, const void* pubData, unsigned int cubData, int eP2PSendType);
|
||||||
{
|
virtual bool IsP2PPacketAvailable(unsigned int* pcubMsgSize, int idk);
|
||||||
public:
|
virtual bool ReadP2PPacket(void* pubDest, unsigned int cubDest, unsigned int* pcubMsgSize,
|
||||||
~networking() = default;
|
steam_id* psteamIDRemote);
|
||||||
|
virtual bool AcceptP2PSessionWithUser(steam_id steamIDRemote);
|
||||||
virtual bool SendP2PPacket(steam_id steamIDRemote, const void* pubData, unsigned int cubData, int eP2PSendType);
|
virtual bool CloseP2PSessionWithUser(steam_id steamIDRemote);
|
||||||
virtual bool IsP2PPacketAvailable(unsigned int* pcubMsgSize, int idk);
|
virtual bool CloseP2PChannelWithUser(steam_id steamIDRemote, int iVirtualPort);
|
||||||
virtual bool ReadP2PPacket(void* pubDest, unsigned int cubDest, unsigned int* pcubMsgSize,
|
virtual bool GetP2PSessionState(steam_id steamIDRemote, void* pConnectionState);
|
||||||
steam_id* psteamIDRemote);
|
virtual bool AllowP2PPacketRelay(bool bAllow);
|
||||||
virtual bool AcceptP2PSessionWithUser(steam_id steamIDRemote);
|
virtual unsigned int CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort,
|
||||||
virtual bool CloseP2PSessionWithUser(steam_id steamIDRemote);
|
bool bAllowUseOfPacketRelay);
|
||||||
virtual bool CloseP2PChannelWithUser(steam_id steamIDRemote, int iVirtualPort);
|
virtual unsigned int CreateP2PConnectionSocket(steam_id steamIDTarget, int nVirtualPort, int nTimeoutSec,
|
||||||
virtual bool GetP2PSessionState(steam_id steamIDRemote, void* pConnectionState);
|
bool bAllowUseOfPacketRelay);
|
||||||
virtual bool AllowP2PPacketRelay(bool bAllow);
|
virtual unsigned int CreateConnectionSocket(unsigned int nIP, unsigned short nPort, int nTimeoutSec);
|
||||||
virtual unsigned int CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort,
|
virtual bool DestroySocket(unsigned int hSocket, bool bNotifyRemoteEnd);
|
||||||
bool bAllowUseOfPacketRelay);
|
virtual bool DestroyListenSocket(unsigned int hSocket, bool bNotifyRemoteEnd);
|
||||||
virtual unsigned int CreateP2PConnectionSocket(steam_id steamIDTarget, int nVirtualPort, int nTimeoutSec,
|
virtual bool SendDataOnSocket(unsigned int hSocket, void* pubData, unsigned int cubData, bool bReliable);
|
||||||
bool bAllowUseOfPacketRelay);
|
virtual bool IsDataAvailableOnSocket(unsigned int hSocket, unsigned int* pcubMsgSize);
|
||||||
virtual unsigned int CreateConnectionSocket(unsigned int nIP, unsigned short nPort, int nTimeoutSec);
|
virtual bool RetrieveDataFromSocket(unsigned int hSocket, void* pubDest, unsigned int cubDest,
|
||||||
virtual bool DestroySocket(unsigned int hSocket, bool bNotifyRemoteEnd);
|
unsigned int* pcubMsgSize);
|
||||||
virtual bool DestroyListenSocket(unsigned int hSocket, bool bNotifyRemoteEnd);
|
virtual bool IsDataAvailable(unsigned int hListenSocket, unsigned int* pcubMsgSize, unsigned int* phSocket);
|
||||||
virtual bool SendDataOnSocket(unsigned int hSocket, void* pubData, unsigned int cubData, bool bReliable);
|
virtual bool RetrieveData(unsigned int hListenSocket, void* pubDest, unsigned int cubDest,
|
||||||
virtual bool IsDataAvailableOnSocket(unsigned int hSocket, unsigned int* pcubMsgSize);
|
unsigned int* pcubMsgSize, unsigned int* phSocket);
|
||||||
virtual bool RetrieveDataFromSocket(unsigned int hSocket, void* pubDest, unsigned int cubDest,
|
virtual bool GetSocketInfo(unsigned int hSocket, steam_id* pSteamIDRemote, int* peSocketStatus,
|
||||||
unsigned int* pcubMsgSize);
|
unsigned int* punIPRemote, unsigned short* punPortRemote);
|
||||||
virtual bool IsDataAvailable(unsigned int hListenSocket, unsigned int* pcubMsgSize, unsigned int* phSocket);
|
virtual bool GetListenSocketInfo(unsigned int hListenSocket, unsigned int* pnIP, unsigned short* pnPort);
|
||||||
virtual bool RetrieveData(unsigned int hListenSocket, void* pubDest, unsigned int cubDest,
|
virtual int GetSocketConnectionType(unsigned int hSocket);
|
||||||
unsigned int* pcubMsgSize, unsigned int* phSocket);
|
virtual int GetMaxPacketSize(unsigned int hSocket);
|
||||||
virtual bool GetSocketInfo(unsigned int hSocket, steam_id* pSteamIDRemote, int* peSocketStatus,
|
};
|
||||||
unsigned int* punIPRemote, unsigned short* punPortRemote);
|
}
|
||||||
virtual bool GetListenSocketInfo(unsigned int hListenSocket, unsigned int* pnIP, unsigned short* pnPort);
|
|
||||||
virtual int GetSocketConnectionType(unsigned int hSocket);
|
|
||||||
virtual int GetMaxPacketSize(unsigned int hSocket);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -3,283 +3,281 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
bool remote_storage::FileWrite(const char* pchFile, const void* pvData, int cubData)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool remote_storage::FileWrite(const char* pchFile, const void* pvData, int cubData)
|
int remote_storage::FileRead(const char* pchFile, void* pvData, int cubDataToRead)
|
||||||
{
|
{
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int remote_storage::FileRead(const char* pchFile, void* pvData, int cubDataToRead)
|
bool remote_storage::FileForget(const char* pchFile)
|
||||||
{
|
{
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::FileForget(const char* pchFile)
|
bool remote_storage::FileDelete(const char* pchFile)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::FileDelete(const char* pchFile)
|
unsigned long long remote_storage::FileShare(const char* pchFile)
|
||||||
{
|
{
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::FileShare(const char* pchFile)
|
bool remote_storage::SetSyncPlatforms(const char* pchFile, unsigned int eRemoteStoragePlatform)
|
||||||
{
|
{
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::SetSyncPlatforms(const char* pchFile, unsigned int eRemoteStoragePlatform)
|
unsigned long long remote_storage::FileWriteStreamOpen(const char* pchFile)
|
||||||
{
|
{
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::FileWriteStreamOpen(const char* pchFile)
|
int remote_storage::FileWriteStreamWriteChunk(unsigned long long hStream, const void* pvData, int cubData)
|
||||||
{
|
{
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int remote_storage::FileWriteStreamWriteChunk(unsigned long long hStream, const void* pvData, int cubData)
|
int remote_storage::FileWriteStreamClose(unsigned long long hStream)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int remote_storage::FileWriteStreamClose(unsigned long long hStream)
|
int remote_storage::FileWriteStreamCancel(unsigned long long hStream)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int remote_storage::FileWriteStreamCancel(unsigned long long hStream)
|
bool remote_storage::FileExists(const char* pchFile)
|
||||||
{
|
{
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::FileExists(const char* pchFile)
|
bool remote_storage::FilePersisted(const char* pchFile)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::FilePersisted(const char* pchFile)
|
int remote_storage::GetFileSize(const char* pchFile)
|
||||||
{
|
{
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int remote_storage::GetFileSize(const char* pchFile)
|
long long remote_storage::GetFileTimestamp(const char* pchFile)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
long long remote_storage::GetFileTimestamp(const char* pchFile)
|
unsigned remote_storage::GetSyncPlatforms(const char* pchFile)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned remote_storage::GetSyncPlatforms(const char* pchFile)
|
int remote_storage::GetFileCount()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int remote_storage::GetFileCount()
|
const char* remote_storage::GetFileNameAndSize(int iFile, int* pnFileSizeInBytes)
|
||||||
{
|
{
|
||||||
return 0;
|
*pnFileSizeInBytes = 0;
|
||||||
}
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
const char* remote_storage::GetFileNameAndSize(int iFile, int* pnFileSizeInBytes)
|
bool remote_storage::GetQuota(int* pnTotalBytes, int* puAvailableBytes)
|
||||||
{
|
{
|
||||||
*pnFileSizeInBytes = 0;
|
*pnTotalBytes = 0x10000000;
|
||||||
return "";
|
*puAvailableBytes = 0x10000000;
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool remote_storage::GetQuota(int* pnTotalBytes, int* puAvailableBytes)
|
bool remote_storage::IsCloudEnabledForAccount()
|
||||||
{
|
{
|
||||||
*pnTotalBytes = 0x10000000;
|
return false;
|
||||||
*puAvailableBytes = 0x10000000;
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool remote_storage::IsCloudEnabledForAccount()
|
bool remote_storage::IsCloudEnabledForApp()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::IsCloudEnabledForApp()
|
void remote_storage::SetCloudEnabledForApp(bool bEnabled)
|
||||||
{
|
{
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void remote_storage::SetCloudEnabledForApp(bool bEnabled)
|
unsigned long long remote_storage::UGCDownload(unsigned long long hContent, unsigned int uUnk)
|
||||||
{
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::UGCDownload(unsigned long long hContent, unsigned int uUnk)
|
bool remote_storage::GetUGCDownloadProgress(unsigned long long hContent, unsigned int* puDownloadedBytes,
|
||||||
{
|
unsigned int* puTotalBytes)
|
||||||
return 0;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool remote_storage::GetUGCDownloadProgress(unsigned long long hContent, unsigned int* puDownloadedBytes,
|
bool remote_storage::GetUGCDetails(unsigned long long hContent, unsigned int* pnAppID, char** ppchName,
|
||||||
unsigned int* puTotalBytes)
|
int* pnFileSizeInBytes, steam_id* pSteamIDOwner)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::GetUGCDetails(unsigned long long hContent, unsigned int* pnAppID, char** ppchName,
|
int remote_storage::UGCRead(unsigned long long hContent, void* pvData, int cubDataToRead, unsigned int uOffset)
|
||||||
int* pnFileSizeInBytes, steam_id* pSteamIDOwner)
|
{
|
||||||
{
|
return 0;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
int remote_storage::UGCRead(unsigned long long hContent, void* pvData, int cubDataToRead, unsigned int uOffset)
|
int remote_storage::GetCachedUGCCount()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int remote_storage::GetCachedUGCCount()
|
unsigned long long remote_storage::GetCachedUGCHandle(int iCachedContent)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::GetCachedUGCHandle(int iCachedContent)
|
unsigned long long remote_storage::PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile,
|
||||||
{
|
unsigned int nConsumerAppId, const char* pchTitle,
|
||||||
return 0;
|
const char* pchDescription, unsigned int eVisibility,
|
||||||
}
|
int* pTags, unsigned int eWorkshopFileType)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile,
|
unsigned long long remote_storage::CreatePublishedFileUpdateRequest(unsigned long long unPublishedFileId)
|
||||||
unsigned int nConsumerAppId, const char* pchTitle,
|
{
|
||||||
const char* pchDescription, unsigned int eVisibility,
|
return 0;
|
||||||
int* pTags, unsigned int eWorkshopFileType)
|
}
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long long remote_storage::CreatePublishedFileUpdateRequest(unsigned long long unPublishedFileId)
|
bool remote_storage::UpdatePublishedFileFile(unsigned long long hUpdateRequest, const char* pchFile)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::UpdatePublishedFileFile(unsigned long long hUpdateRequest, const char* pchFile)
|
bool remote_storage::UpdatePublishedFilePreviewFile(unsigned long long hUpdateRequest, const char* pchPreviewFile)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::UpdatePublishedFilePreviewFile(unsigned long long hUpdateRequest, const char* pchPreviewFile)
|
bool remote_storage::UpdatePublishedFileTitle(unsigned long long hUpdateRequest, const char* pchTitle)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::UpdatePublishedFileTitle(unsigned long long hUpdateRequest, const char* pchTitle)
|
bool remote_storage::UpdatePublishedFileDescription(unsigned long long hUpdateRequest, const char* pchDescription)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::UpdatePublishedFileDescription(unsigned long long hUpdateRequest, const char* pchDescription)
|
bool remote_storage::UpdatePublishedFileVisibility(unsigned long long hUpdateRequest, unsigned int eVisibility)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::UpdatePublishedFileVisibility(unsigned long long hUpdateRequest, unsigned int eVisibility)
|
bool remote_storage::UpdatePublishedFileTags(unsigned long long hUpdateRequest, int* pTags)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool remote_storage::UpdatePublishedFileTags(unsigned long long hUpdateRequest, int* pTags)
|
unsigned long long remote_storage::CommitPublishedFileUpdate(unsigned long long hUpdateRequest)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::CommitPublishedFileUpdate(unsigned long long hUpdateRequest)
|
unsigned long long remote_storage::GetPublishedFileDetails(unsigned long long unPublishedFileId)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::GetPublishedFileDetails(unsigned long long unPublishedFileId)
|
unsigned long long remote_storage::DeletePublishedFile(unsigned long long unPublishedFileId)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::DeletePublishedFile(unsigned long long unPublishedFileId)
|
unsigned long long remote_storage::EnumerateUserPublishedFiles(unsigned int uStartIndex)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::EnumerateUserPublishedFiles(unsigned int uStartIndex)
|
unsigned long long remote_storage::SubscribePublishedFile(unsigned long long unPublishedFileId)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::SubscribePublishedFile(unsigned long long unPublishedFileId)
|
unsigned long long remote_storage::EnumerateUserSubscribedFiles(unsigned int uStartIndex)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::EnumerateUserSubscribedFiles(unsigned int uStartIndex)
|
unsigned long long remote_storage::UnsubscribePublishedFile(unsigned long long unPublishedFileId)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::UnsubscribePublishedFile(unsigned long long unPublishedFileId)
|
bool remote_storage::UpdatePublishedFileSetChangeDescription(unsigned long long hUpdateRequest,
|
||||||
{
|
const char* cszDescription)
|
||||||
return 0;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool remote_storage::UpdatePublishedFileSetChangeDescription(unsigned long long hUpdateRequest,
|
unsigned long long remote_storage::GetPublishedItemVoteDetails(unsigned long long unPublishedFileId)
|
||||||
const char* cszDescription)
|
{
|
||||||
{
|
return 0;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long long remote_storage::GetPublishedItemVoteDetails(unsigned long long unPublishedFileId)
|
unsigned long long remote_storage::UpdateUserPublishedItemVote(unsigned long long unPublishedFileId, bool bVoteUp)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::UpdateUserPublishedItemVote(unsigned long long unPublishedFileId, bool bVoteUp)
|
unsigned long long remote_storage::GetUserPublishedItemVoteDetails(unsigned long long unPublishedFileId)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::GetUserPublishedItemVoteDetails(unsigned long long unPublishedFileId)
|
unsigned long long remote_storage::EnumerateUserSharedWorkshopFiles(unsigned int nAppId, steam_id creatorSteamID,
|
||||||
{
|
unsigned int uStartIndex, int* pRequiredTags,
|
||||||
return 0;
|
int* pExcludedTags)
|
||||||
}
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::EnumerateUserSharedWorkshopFiles(unsigned int nAppId, steam_id creatorSteamID,
|
unsigned long long remote_storage::PublishVideo(unsigned int eVideoProvider, const char* cszVideoAccountName,
|
||||||
unsigned int uStartIndex, int* pRequiredTags,
|
const char* cszVideoIdentifier, const char* cszFileName,
|
||||||
int* pExcludedTags)
|
unsigned int nConsumerAppId, const char* cszTitle,
|
||||||
{
|
const char* cszDescription, unsigned int eVisibility, int* pTags)
|
||||||
return 0;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::PublishVideo(unsigned int eVideoProvider, const char* cszVideoAccountName,
|
unsigned long long remote_storage::SetUserPublishedFileAction(unsigned long long unPublishedFileId,
|
||||||
const char* cszVideoIdentifier, const char* cszFileName,
|
unsigned int eAction)
|
||||||
unsigned int nConsumerAppId, const char* cszTitle,
|
{
|
||||||
const char* cszDescription, unsigned int eVisibility, int* pTags)
|
return 0;
|
||||||
{
|
}
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long long remote_storage::SetUserPublishedFileAction(unsigned long long unPublishedFileId,
|
unsigned long long remote_storage::EnumeratePublishedFilesByUserAction(
|
||||||
unsigned int eAction)
|
unsigned int eAction, unsigned int uStartIndex)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::EnumeratePublishedFilesByUserAction(
|
unsigned long long remote_storage::EnumeratePublishedWorkshopFiles(unsigned int eType, unsigned int uStartIndex,
|
||||||
unsigned int eAction, unsigned int uStartIndex)
|
unsigned int cDays, unsigned int cCount,
|
||||||
{
|
int* pTags, int* pUserTags)
|
||||||
return 0;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::EnumeratePublishedWorkshopFiles(unsigned int eType, unsigned int uStartIndex,
|
unsigned long long remote_storage::UGCDownloadToLocation(unsigned long long hContent, const char* cszLocation,
|
||||||
unsigned int cDays, unsigned int cCount,
|
unsigned int uUnk)
|
||||||
int* pTags, int* pUserTags)
|
{
|
||||||
{
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long remote_storage::UGCDownloadToLocation(unsigned long long hContent, const char* cszLocation,
|
|
||||||
unsigned int uUnk)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -2,64 +2,77 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
class remote_storage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~remote_storage() = default;
|
||||||
|
|
||||||
class remote_storage
|
virtual bool FileWrite(const char* pchFile, const void* pvData, int cubData);
|
||||||
{
|
virtual int FileRead(const char* pchFile, void* pvData, int cubDataToRead);
|
||||||
public:
|
virtual bool FileForget(const char* pchFile);
|
||||||
~remote_storage() = default;
|
virtual bool FileDelete(const char* pchFile);
|
||||||
|
virtual unsigned long long FileShare(const char* pchFile);
|
||||||
virtual bool FileWrite(const char* pchFile, const void* pvData, int cubData);
|
virtual bool SetSyncPlatforms(const char* pchFile, unsigned int eRemoteStoragePlatform);
|
||||||
virtual int FileRead(const char* pchFile, void* pvData, int cubDataToRead);
|
virtual unsigned long long FileWriteStreamOpen(const char* pchFile);
|
||||||
virtual bool FileForget(const char* pchFile);
|
virtual int FileWriteStreamWriteChunk(unsigned long long hStream, const void* pvData, int cubData);
|
||||||
virtual bool FileDelete(const char* pchFile);
|
virtual int FileWriteStreamClose(unsigned long long hStream);
|
||||||
virtual unsigned long long FileShare(const char* pchFile);
|
virtual int FileWriteStreamCancel(unsigned long long hStream);
|
||||||
virtual bool SetSyncPlatforms(const char* pchFile, unsigned int eRemoteStoragePlatform);
|
virtual bool FileExists(const char* pchFile);
|
||||||
virtual unsigned long long FileWriteStreamOpen(const char* pchFile);
|
virtual bool FilePersisted(const char* pchFile);
|
||||||
virtual int FileWriteStreamWriteChunk(unsigned long long hStream, const void* pvData, int cubData);
|
virtual int GetFileSize(const char* pchFile);
|
||||||
virtual int FileWriteStreamClose(unsigned long long hStream);
|
virtual long long GetFileTimestamp(const char* pchFile);
|
||||||
virtual int FileWriteStreamCancel(unsigned long long hStream);
|
virtual unsigned int GetSyncPlatforms(const char* pchFile);
|
||||||
virtual bool FileExists(const char* pchFile);
|
virtual int GetFileCount();
|
||||||
virtual bool FilePersisted(const char* pchFile);
|
virtual const char* GetFileNameAndSize(int iFile, int* pnFileSizeInBytes);
|
||||||
virtual int GetFileSize(const char* pchFile);
|
virtual bool GetQuota(int* pnTotalBytes, int* puAvailableBytes);
|
||||||
virtual long long GetFileTimestamp(const char* pchFile);
|
virtual bool IsCloudEnabledForAccount();
|
||||||
virtual unsigned int GetSyncPlatforms(const char* pchFile);
|
virtual bool IsCloudEnabledForApp();
|
||||||
virtual int GetFileCount();
|
virtual void SetCloudEnabledForApp(bool bEnabled);
|
||||||
virtual const char* GetFileNameAndSize(int iFile, int* pnFileSizeInBytes);
|
virtual unsigned long long UGCDownload(unsigned long long hContent, unsigned int uUnk);
|
||||||
virtual bool GetQuota(int* pnTotalBytes, int* puAvailableBytes);
|
virtual bool GetUGCDownloadProgress(unsigned long long hContent, unsigned int* puDownloadedBytes,
|
||||||
virtual bool IsCloudEnabledForAccount();
|
unsigned int* puTotalBytes);
|
||||||
virtual bool IsCloudEnabledForApp();
|
virtual bool GetUGCDetails(unsigned long long hContent, unsigned int* pnAppID, char** ppchName,
|
||||||
virtual void SetCloudEnabledForApp(bool bEnabled);
|
int* pnFileSizeInBytes, steam_id* pSteamIDOwner);
|
||||||
virtual unsigned long long UGCDownload(unsigned long long hContent, unsigned int uUnk);
|
virtual int UGCRead(unsigned long long hContent, void* pvData, int cubDataToRead, unsigned int uOffset);
|
||||||
virtual bool GetUGCDownloadProgress(unsigned long long hContent, unsigned int* puDownloadedBytes, unsigned int* puTotalBytes);
|
virtual int GetCachedUGCCount();
|
||||||
virtual bool GetUGCDetails(unsigned long long hContent, unsigned int* pnAppID, char** ppchName, int* pnFileSizeInBytes, steam_id* pSteamIDOwner);
|
virtual unsigned long long GetCachedUGCHandle(int iCachedContent);
|
||||||
virtual int UGCRead(unsigned long long hContent, void* pvData, int cubDataToRead, unsigned int uOffset);
|
virtual unsigned long long PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile,
|
||||||
virtual int GetCachedUGCCount();
|
unsigned int nConsumerAppId, const char* pchTitle,
|
||||||
virtual unsigned long long GetCachedUGCHandle(int iCachedContent);
|
const char* pchDescription, unsigned int eVisibility, int* pTags,
|
||||||
virtual unsigned long long PublishWorkshopFile(const char* pchFile, const char* pchPreviewFile, unsigned int nConsumerAppId, const char* pchTitle, const char* pchDescription, unsigned int eVisibility, int* pTags, unsigned int eWorkshopFileType);
|
unsigned int eWorkshopFileType);
|
||||||
virtual unsigned long long CreatePublishedFileUpdateRequest(unsigned long long unPublishedFileId);
|
virtual unsigned long long CreatePublishedFileUpdateRequest(unsigned long long unPublishedFileId);
|
||||||
virtual bool UpdatePublishedFileFile(unsigned long long hUpdateRequest, const char* pchFile);
|
virtual bool UpdatePublishedFileFile(unsigned long long hUpdateRequest, const char* pchFile);
|
||||||
virtual bool UpdatePublishedFilePreviewFile(unsigned long long hUpdateRequest, const char* pchPreviewFile);
|
virtual bool UpdatePublishedFilePreviewFile(unsigned long long hUpdateRequest, const char* pchPreviewFile);
|
||||||
virtual bool UpdatePublishedFileTitle(unsigned long long hUpdateRequest, const char* pchTitle);
|
virtual bool UpdatePublishedFileTitle(unsigned long long hUpdateRequest, const char* pchTitle);
|
||||||
virtual bool UpdatePublishedFileDescription(unsigned long long hUpdateRequest, const char* pchDescription);
|
virtual bool UpdatePublishedFileDescription(unsigned long long hUpdateRequest, const char* pchDescription);
|
||||||
virtual bool UpdatePublishedFileVisibility(unsigned long long hUpdateRequest, unsigned int eVisibility);
|
virtual bool UpdatePublishedFileVisibility(unsigned long long hUpdateRequest, unsigned int eVisibility);
|
||||||
virtual bool UpdatePublishedFileTags(unsigned long long hUpdateRequest, int* pTags);
|
virtual bool UpdatePublishedFileTags(unsigned long long hUpdateRequest, int* pTags);
|
||||||
virtual unsigned long long CommitPublishedFileUpdate(unsigned long long hUpdateRequest);
|
virtual unsigned long long CommitPublishedFileUpdate(unsigned long long hUpdateRequest);
|
||||||
virtual unsigned long long GetPublishedFileDetails(unsigned long long unPublishedFileId);
|
virtual unsigned long long GetPublishedFileDetails(unsigned long long unPublishedFileId);
|
||||||
virtual unsigned long long DeletePublishedFile(unsigned long long unPublishedFileId);
|
virtual unsigned long long DeletePublishedFile(unsigned long long unPublishedFileId);
|
||||||
virtual unsigned long long EnumerateUserPublishedFiles(unsigned int uStartIndex);
|
virtual unsigned long long EnumerateUserPublishedFiles(unsigned int uStartIndex);
|
||||||
virtual unsigned long long SubscribePublishedFile(unsigned long long unPublishedFileId);
|
virtual unsigned long long SubscribePublishedFile(unsigned long long unPublishedFileId);
|
||||||
virtual unsigned long long EnumerateUserSubscribedFiles(unsigned int uStartIndex);
|
virtual unsigned long long EnumerateUserSubscribedFiles(unsigned int uStartIndex);
|
||||||
virtual unsigned long long UnsubscribePublishedFile(unsigned long long unPublishedFileId);
|
virtual unsigned long long UnsubscribePublishedFile(unsigned long long unPublishedFileId);
|
||||||
virtual bool UpdatePublishedFileSetChangeDescription(unsigned long long hUpdateRequest, const char* cszDescription);
|
virtual bool UpdatePublishedFileSetChangeDescription(unsigned long long hUpdateRequest,
|
||||||
virtual unsigned long long GetPublishedItemVoteDetails(unsigned long long unPublishedFileId);
|
const char* cszDescription);
|
||||||
virtual unsigned long long UpdateUserPublishedItemVote(unsigned long long unPublishedFileId, bool bVoteUp);
|
virtual unsigned long long GetPublishedItemVoteDetails(unsigned long long unPublishedFileId);
|
||||||
virtual unsigned long long GetUserPublishedItemVoteDetails(unsigned long long unPublishedFileId);
|
virtual unsigned long long UpdateUserPublishedItemVote(unsigned long long unPublishedFileId, bool bVoteUp);
|
||||||
virtual unsigned long long EnumerateUserSharedWorkshopFiles(unsigned int nAppId, steam_id creatorSteamID, unsigned int uStartIndex, int* pRequiredTags, int* pExcludedTags);
|
virtual unsigned long long GetUserPublishedItemVoteDetails(unsigned long long unPublishedFileId);
|
||||||
virtual unsigned long long PublishVideo(unsigned int eVideoProvider, const char* cszVideoAccountName, const char* cszVideoIdentifier, const char* cszFileName, unsigned int nConsumerAppId, const char* cszTitle, const char* cszDescription, unsigned int eVisibility, int* pTags);
|
virtual unsigned long long EnumerateUserSharedWorkshopFiles(unsigned int nAppId, steam_id creatorSteamID,
|
||||||
virtual unsigned long long SetUserPublishedFileAction(unsigned long long unPublishedFileId, unsigned int eAction);
|
unsigned int uStartIndex, int* pRequiredTags,
|
||||||
virtual unsigned long long EnumeratePublishedFilesByUserAction(unsigned int eAction, unsigned int uStartIndex);
|
int* pExcludedTags);
|
||||||
virtual unsigned long long EnumeratePublishedWorkshopFiles(unsigned int eType, unsigned int uStartIndex, unsigned int cDays, unsigned int cCount, int* pTags, int* pUserTags);
|
virtual unsigned long long PublishVideo(unsigned int eVideoProvider, const char* cszVideoAccountName,
|
||||||
virtual unsigned long long UGCDownloadToLocation(unsigned long long hContent, const char* cszLocation, unsigned int uUnk);
|
const char* cszVideoIdentifier, const char* cszFileName,
|
||||||
};
|
unsigned int nConsumerAppId, const char* cszTitle,
|
||||||
|
const char* cszDescription, unsigned int eVisibility, int* pTags);
|
||||||
} // namespace steam
|
virtual unsigned long long SetUserPublishedFileAction(unsigned long long unPublishedFileId,
|
||||||
|
unsigned int eAction);
|
||||||
|
virtual unsigned long long EnumeratePublishedFilesByUserAction(unsigned int eAction, unsigned int uStartIndex);
|
||||||
|
virtual unsigned long long EnumeratePublishedWorkshopFiles(unsigned int eType, unsigned int uStartIndex,
|
||||||
|
unsigned int cDays, unsigned int cCount, int* pTags,
|
||||||
|
int* pUserTags);
|
||||||
|
virtual unsigned long long UGCDownloadToLocation(unsigned long long hContent, const char* cszLocation,
|
||||||
|
unsigned int uUnk);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
@ -5,166 +5,167 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
std::string auth_ticket;
|
std::string auth_ticket;
|
||||||
|
|
||||||
steam_id generate_steam_id()
|
steam_id generate_steam_id()
|
||||||
{
|
{
|
||||||
steam_id id{};
|
steam_id id{};
|
||||||
id.bits = auth::get_guid();
|
id.bits = auth::get_guid();
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int user::GetHSteamUser()
|
int user::GetHSteamUser()
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user::LoggedOn()
|
bool user::LoggedOn()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_id user::GetSteamID()
|
steam_id user::GetSteamID()
|
||||||
{
|
{
|
||||||
static auto id = generate_steam_id();
|
static auto id = generate_steam_id();
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user::InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, steam_id steamIDGameServer,
|
int user::InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, steam_id steamIDGameServer,
|
||||||
unsigned int unIPServer, unsigned short usPortServer, bool bSecure)
|
unsigned int unIPServer, unsigned short usPortServer, bool bSecure)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void user::TerminateGameConnection(unsigned int unIPServer, unsigned short usPortServer)
|
void user::TerminateGameConnection(unsigned int unIPServer, unsigned short usPortServer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void user::TrackAppUsageEvent(steam_id gameID, int eAppUsageEvent, const char* pchExtraInfo)
|
void user::TrackAppUsageEvent(steam_id gameID, int eAppUsageEvent, const char* pchExtraInfo)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user::GetUserDataFolder(char* pchBuffer, int cubBuffer)
|
bool user::GetUserDataFolder(char* pchBuffer, int cubBuffer)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void user::StartVoiceRecording()
|
void user::StartVoiceRecording()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void user::StopVoiceRecording()
|
void user::StopVoiceRecording()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int user::GetAvailableVoice(unsigned int* pcbCompressed, unsigned int* pcbUncompressed,
|
int user::GetAvailableVoice(unsigned int* pcbCompressed, unsigned int* pcbUncompressed,
|
||||||
unsigned int nUncompressedVoiceDesiredSampleRate)
|
unsigned int nUncompressedVoiceDesiredSampleRate)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user::GetVoice(bool bWantCompressed, void* pDestBuffer, unsigned int cbDestBufferSize,
|
int user::GetVoice(bool bWantCompressed, void* pDestBuffer, unsigned int cbDestBufferSize,
|
||||||
unsigned int* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer,
|
unsigned int* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer,
|
||||||
unsigned int cbUncompressedDestBufferSize, unsigned int* nUncompressBytesWritten,
|
unsigned int cbUncompressedDestBufferSize, unsigned int* nUncompressBytesWritten,
|
||||||
unsigned int nUncompressedVoiceDesiredSampleRate)
|
unsigned int nUncompressedVoiceDesiredSampleRate)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user::DecompressVoice(void* pCompressed, unsigned int cbCompressed, void* pDestBuffer,
|
int user::DecompressVoice(void* pCompressed, unsigned int cbCompressed, void* pDestBuffer,
|
||||||
unsigned int cbDestBufferSize, unsigned int* nBytesWritten)
|
unsigned int cbDestBufferSize, unsigned int* nBytesWritten)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int user::GetVoiceOptimalSampleRate()
|
unsigned int user::GetVoiceOptimalSampleRate()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int user::GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket)
|
unsigned int user::GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket)
|
||||||
{
|
{
|
||||||
static uint32_t ticket = 0;
|
static uint32_t ticket = 0;
|
||||||
*pcbTicket = 1;
|
*pcbTicket = 1;
|
||||||
|
|
||||||
const auto result = callbacks::register_call();
|
const auto result = callbacks::register_call();
|
||||||
auto* response = static_cast<get_auth_session_ticket_response*>(calloc(1, sizeof(get_auth_session_ticket_response)));
|
auto* response = static_cast<get_auth_session_ticket_response*>(calloc(
|
||||||
response->m_h_auth_ticket = ++ticket;
|
1, sizeof(get_auth_session_ticket_response)));
|
||||||
response->m_e_result = 1; // k_EResultOK;
|
response->m_h_auth_ticket = ++ticket;
|
||||||
|
response->m_e_result = 1; // k_EResultOK;
|
||||||
|
|
||||||
callbacks::return_call(response, sizeof(get_auth_session_ticket_response), get_auth_session_ticket_response::callback_id, result);
|
callbacks::return_call(response, sizeof(get_auth_session_ticket_response),
|
||||||
return response->m_h_auth_ticket;
|
get_auth_session_ticket_response::callback_id, result);
|
||||||
}
|
return response->m_h_auth_ticket;
|
||||||
|
}
|
||||||
|
|
||||||
int user::BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID)
|
int user::BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void user::EndAuthSession(steam_id steamID)
|
void user::EndAuthSession(steam_id steamID)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void user::CancelAuthTicket(unsigned int hAuthTicket)
|
void user::CancelAuthTicket(unsigned int hAuthTicket)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int user::UserHasLicenseForApp(steam_id steamID, unsigned int appID)
|
unsigned int user::UserHasLicenseForApp(steam_id steamID, unsigned int appID)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user::BIsBehindNAT()
|
bool user::BIsBehindNAT()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void user::AdvertiseGame(steam_id steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer)
|
void user::AdvertiseGame(steam_id steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long user::RequestEncryptedAppTicket(void* pUserData, int cbUserData)
|
unsigned long long user::RequestEncryptedAppTicket(void* pUserData, int cbUserData)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("[steam_api]: [user]: request encrypted app ticket\n");
|
printf("[steam_api]: [user]: request encrypted app ticket\n");
|
||||||
#endif
|
#endif
|
||||||
// Generate the authentication ticket
|
// Generate the authentication ticket
|
||||||
const auto id = this->GetSteamID();
|
const auto id = this->GetSteamID();
|
||||||
|
|
||||||
auth_ticket = "S1";
|
auth_ticket = "S1";
|
||||||
auth_ticket.resize(32);
|
auth_ticket.resize(32);
|
||||||
auth_ticket.append(reinterpret_cast<char*>(pUserData), 24); // key
|
auth_ticket.append(reinterpret_cast<char*>(pUserData), 24); // key
|
||||||
auth_ticket.append(reinterpret_cast<const char*>(&id.bits), sizeof(id.bits)); // user id
|
auth_ticket.append(reinterpret_cast<const char*>(&id.bits), sizeof(id.bits)); // user id
|
||||||
auth_ticket.append((char*)&reinterpret_cast<char*>(pUserData)[24], 64); // user name
|
auth_ticket.append((char*)&reinterpret_cast<char*>(pUserData)[24], 64); // user name
|
||||||
|
|
||||||
// Create the call response
|
// Create the call response
|
||||||
const auto result = callbacks::register_call();
|
const auto result = callbacks::register_call();
|
||||||
auto retvals = static_cast<encrypted_app_ticket_response*>(calloc(1, sizeof(encrypted_app_ticket_response)));
|
auto retvals = static_cast<encrypted_app_ticket_response*>(calloc(1, sizeof(encrypted_app_ticket_response)));
|
||||||
//::Utils::Memory::AllocateArray<EncryptedAppTicketResponse>();
|
//::Utils::Memory::AllocateArray<EncryptedAppTicketResponse>();
|
||||||
retvals->m_e_result = 1;
|
retvals->m_e_result = 1;
|
||||||
|
|
||||||
// Return the call response
|
// Return the call response
|
||||||
callbacks::return_call(retvals, sizeof(encrypted_app_ticket_response),
|
callbacks::return_call(retvals, sizeof(encrypted_app_ticket_response),
|
||||||
encrypted_app_ticket_response::callback_id, result);
|
encrypted_app_ticket_response::callback_id, result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user::GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket)
|
bool user::GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("[steam_api]: [user]: sending encrypted app ticket\n");
|
printf("[steam_api]: [user]: sending encrypted app ticket\n");
|
||||||
#endif
|
#endif
|
||||||
if (cbMaxTicket < 0 || auth_ticket.empty()) return false;
|
if (cbMaxTicket < 0 || auth_ticket.empty()) return false;
|
||||||
|
|
||||||
const auto size = std::min(size_t(cbMaxTicket), auth_ticket.size());
|
const auto size = std::min(size_t(cbMaxTicket), auth_ticket.size());
|
||||||
std::memcpy(pTicket, auth_ticket.data(), size);
|
std::memcpy(pTicket, auth_ticket.data(), size);
|
||||||
*pcbTicket = static_cast<unsigned>(size);
|
*pcbTicket = static_cast<unsigned>(size);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // namespace steam
|
|
||||||
|
@ -2,56 +2,54 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
struct encrypted_app_ticket_response final
|
||||||
|
{
|
||||||
|
enum { callback_id = 154 };
|
||||||
|
|
||||||
struct encrypted_app_ticket_response final
|
int m_e_result;
|
||||||
{
|
};
|
||||||
enum { callback_id = 154 };
|
|
||||||
|
|
||||||
int m_e_result;
|
struct get_auth_session_ticket_response
|
||||||
};
|
{
|
||||||
|
enum { callback_id = 163 };
|
||||||
|
|
||||||
struct get_auth_session_ticket_response
|
unsigned int m_h_auth_ticket;
|
||||||
{
|
int m_e_result;
|
||||||
enum { callback_id = 163 };
|
};
|
||||||
|
|
||||||
unsigned int m_h_auth_ticket;
|
class user
|
||||||
int m_e_result;
|
{
|
||||||
};
|
public:
|
||||||
|
~user() = default;
|
||||||
|
|
||||||
class user
|
virtual int GetHSteamUser();
|
||||||
{
|
virtual bool LoggedOn();
|
||||||
public:
|
virtual steam_id GetSteamID();
|
||||||
~user() = default;
|
|
||||||
|
|
||||||
virtual int GetHSteamUser();
|
virtual int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, steam_id steamIDGameServer,
|
||||||
virtual bool LoggedOn();
|
unsigned int unIPServer, unsigned short usPortServer, bool bSecure);
|
||||||
virtual steam_id GetSteamID();
|
virtual void TerminateGameConnection(unsigned int unIPServer, unsigned short usPortServer);
|
||||||
|
virtual void TrackAppUsageEvent(steam_id gameID, int eAppUsageEvent, const char* pchExtraInfo = "");
|
||||||
virtual int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, steam_id steamIDGameServer,
|
virtual bool GetUserDataFolder(char* pchBuffer, int cubBuffer);
|
||||||
unsigned int unIPServer, unsigned short usPortServer, bool bSecure);
|
virtual void StartVoiceRecording();
|
||||||
virtual void TerminateGameConnection(unsigned int unIPServer, unsigned short usPortServer);
|
virtual void StopVoiceRecording();
|
||||||
virtual void TrackAppUsageEvent(steam_id gameID, int eAppUsageEvent, const char* pchExtraInfo = "");
|
virtual int GetAvailableVoice(unsigned int* pcbCompressed, unsigned int* pcbUncompressed,
|
||||||
virtual bool GetUserDataFolder(char* pchBuffer, int cubBuffer);
|
unsigned int nUncompressedVoiceDesiredSampleRate);
|
||||||
virtual void StartVoiceRecording();
|
virtual int GetVoice(bool bWantCompressed, void* pDestBuffer, unsigned int cbDestBufferSize,
|
||||||
virtual void StopVoiceRecording();
|
unsigned int* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer,
|
||||||
virtual int GetAvailableVoice(unsigned int* pcbCompressed, unsigned int* pcbUncompressed,
|
unsigned int cbUncompressedDestBufferSize, unsigned int* nUncompressBytesWritten,
|
||||||
unsigned int nUncompressedVoiceDesiredSampleRate);
|
unsigned int nUncompressedVoiceDesiredSampleRate);
|
||||||
virtual int GetVoice(bool bWantCompressed, void* pDestBuffer, unsigned int cbDestBufferSize,
|
virtual int DecompressVoice(void* pCompressed, unsigned int cbCompressed, void* pDestBuffer,
|
||||||
unsigned int* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer,
|
unsigned int cbDestBufferSize, unsigned int* nBytesWritten);
|
||||||
unsigned int cbUncompressedDestBufferSize, unsigned int* nUncompressBytesWritten,
|
virtual unsigned int GetVoiceOptimalSampleRate();
|
||||||
unsigned int nUncompressedVoiceDesiredSampleRate);
|
virtual unsigned int GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket);
|
||||||
virtual int DecompressVoice(void* pCompressed, unsigned int cbCompressed, void* pDestBuffer,
|
virtual int BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID);
|
||||||
unsigned int cbDestBufferSize, unsigned int* nBytesWritten);
|
virtual void EndAuthSession(steam_id steamID);
|
||||||
virtual unsigned int GetVoiceOptimalSampleRate();
|
virtual void CancelAuthTicket(unsigned int hAuthTicket);
|
||||||
virtual unsigned int GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket);
|
virtual unsigned int UserHasLicenseForApp(steam_id steamID, unsigned int appID);
|
||||||
virtual int BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID);
|
virtual bool BIsBehindNAT();
|
||||||
virtual void EndAuthSession(steam_id steamID);
|
virtual void AdvertiseGame(steam_id steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer);
|
||||||
virtual void CancelAuthTicket(unsigned int hAuthTicket);
|
virtual unsigned long long RequestEncryptedAppTicket(void* pUserData, int cbUserData);
|
||||||
virtual unsigned int UserHasLicenseForApp(steam_id steamID, unsigned int appID);
|
virtual bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket);
|
||||||
virtual bool BIsBehindNAT();
|
};
|
||||||
virtual void AdvertiseGame(steam_id steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer);
|
}
|
||||||
virtual unsigned long long RequestEncryptedAppTicket(void* pUserData, int cbUserData);
|
|
||||||
virtual bool GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -3,230 +3,229 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
bool user_stats::RequestCurrentStats()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool user_stats::RequestCurrentStats()
|
bool user_stats::GetStat(const char* pchName, int* pData)
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetStat(const char* pchName, int* pData)
|
bool user_stats::GetStat(const char* pchName, float* pData)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetStat(const char* pchName, float* pData)
|
bool user_stats::SetStat(const char* pchName, int nData)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::SetStat(const char* pchName, int nData)
|
bool user_stats::SetStat(const char* pchName, float fData)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::SetStat(const char* pchName, float fData)
|
bool user_stats::UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength)
|
bool user_stats::GetAchievement(const char* pchName, bool* pbAchieved)
|
||||||
{
|
{
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetAchievement(const char* pchName, bool* pbAchieved)
|
bool user_stats::SetAchievement(const char* pchName)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::SetAchievement(const char* pchName)
|
bool user_stats::ClearAchievement(const char* pchName)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::ClearAchievement(const char* pchName)
|
bool user_stats::GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, unsigned int* punUnlockTime)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, unsigned int* punUnlockTime)
|
bool user_stats::StoreStats()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::StoreStats()
|
int user_stats::GetAchievementIcon(const char* pchName)
|
||||||
{
|
{
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user_stats::GetAchievementIcon(const char* pchName)
|
const char* user_stats::GetAchievementDisplayAttribute(const char* pchName, const char* pchKey)
|
||||||
{
|
{
|
||||||
return 0;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* user_stats::GetAchievementDisplayAttribute(const char* pchName, const char* pchKey)
|
bool user_stats::IndicateAchievementProgress(const char* pchName, unsigned int nCurProgress,
|
||||||
{
|
unsigned int nMaxProgress)
|
||||||
return "";
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool user_stats::IndicateAchievementProgress(const char* pchName, unsigned int nCurProgress,
|
unsigned int user_stats::GetNumAchievements()
|
||||||
unsigned int nMaxProgress)
|
{
|
||||||
{
|
return 0;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int user_stats::GetNumAchievements()
|
const char* user_stats::GetAchievementName(unsigned int iAchievement)
|
||||||
{
|
{
|
||||||
return 0;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* user_stats::GetAchievementName(unsigned int iAchievement)
|
unsigned long long user_stats::RequestUserStats(steam_id steamIDUser)
|
||||||
{
|
{
|
||||||
return "";
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long user_stats::RequestUserStats(steam_id steamIDUser)
|
bool user_stats::GetUserStat(steam_id steamIDUser, const char* pchName, int* pData)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetUserStat(steam_id steamIDUser, const char* pchName, int* pData)
|
bool user_stats::GetUserStat(steam_id steamIDUser, const char* pchName, float* pData)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetUserStat(steam_id steamIDUser, const char* pchName, float* pData)
|
bool user_stats::GetUserAchievement(steam_id steamIDUser, const char* pchName, bool* pbAchieved)
|
||||||
{
|
{
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetUserAchievement(steam_id steamIDUser, const char* pchName, bool* pbAchieved)
|
bool user_stats::GetUserAchievementAndUnlockTime(steam_id steamIDUser, const char* pchName, bool* pbAchieved,
|
||||||
{
|
unsigned int* punUnlockTime)
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool user_stats::GetUserAchievementAndUnlockTime(steam_id steamIDUser, const char* pchName, bool* pbAchieved,
|
bool user_stats::ResetAllStats(bool bAchievementsToo)
|
||||||
unsigned int* punUnlockTime)
|
{
|
||||||
{
|
return false;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool user_stats::ResetAllStats(bool bAchievementsToo)
|
unsigned long long user_stats::FindOrCreateLeaderboard(const char* pchLeaderboardName, int eLeaderboardSortMethod,
|
||||||
{
|
int eLeaderboardDisplayType)
|
||||||
return false;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long user_stats::FindOrCreateLeaderboard(const char* pchLeaderboardName, int eLeaderboardSortMethod,
|
unsigned long long user_stats::FindLeaderboard(const char* pchLeaderboardName)
|
||||||
int eLeaderboardDisplayType)
|
{
|
||||||
{
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long long user_stats::FindLeaderboard(const char* pchLeaderboardName)
|
const char* user_stats::GetLeaderboardName(unsigned long long hSteamLeaderboard)
|
||||||
{
|
{
|
||||||
return 0;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* user_stats::GetLeaderboardName(unsigned long long hSteamLeaderboard)
|
int user_stats::GetLeaderboardEntryCount(unsigned long long hSteamLeaderboard)
|
||||||
{
|
{
|
||||||
return "";
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user_stats::GetLeaderboardEntryCount(unsigned long long hSteamLeaderboard)
|
int user_stats::GetLeaderboardSortMethod(unsigned long long hSteamLeaderboard)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user_stats::GetLeaderboardSortMethod(unsigned long long hSteamLeaderboard)
|
int user_stats::GetLeaderboardDisplayType(unsigned long long hSteamLeaderboard)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user_stats::GetLeaderboardDisplayType(unsigned long long hSteamLeaderboard)
|
unsigned long long user_stats::DownloadLeaderboardEntries(unsigned long long hSteamLeaderboard,
|
||||||
{
|
int eLeaderboardDataRequest, int nRangeStart,
|
||||||
return 0;
|
int nRangeEnd)
|
||||||
}
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long user_stats::DownloadLeaderboardEntries(unsigned long long hSteamLeaderboard,
|
unsigned long long user_stats::DownloadLeaderboardEntriesForUsers(unsigned long long hSteamLeaderboard,
|
||||||
int eLeaderboardDataRequest, int nRangeStart, int nRangeEnd)
|
steam_id* prgUsers, int cUsers)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long user_stats::DownloadLeaderboardEntriesForUsers(unsigned long long hSteamLeaderboard,
|
bool user_stats::GetDownloadedLeaderboardEntry(unsigned long long hSteamLeaderboardEntries, int index,
|
||||||
steam_id* prgUsers, int cUsers)
|
int* pLeaderboardEntry, int* pDetails, int cDetailsMax)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetDownloadedLeaderboardEntry(unsigned long long hSteamLeaderboardEntries, int index,
|
unsigned long long user_stats::UploadLeaderboardScore(unsigned long long hSteamLeaderboard,
|
||||||
int* pLeaderboardEntry, int* pDetails, int cDetailsMax)
|
int eLeaderboardUploadScoreMethod, int nScore,
|
||||||
{
|
const int* pScoreDetails, int cScoreDetailsCount)
|
||||||
return false;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long long user_stats::UploadLeaderboardScore(unsigned long long hSteamLeaderboard,
|
unsigned long long user_stats::AttachLeaderboardUGC(unsigned long long hSteamLeaderboard, unsigned long long hUGC)
|
||||||
int eLeaderboardUploadScoreMethod, int nScore,
|
{
|
||||||
const int* pScoreDetails, int cScoreDetailsCount)
|
return 0;
|
||||||
{
|
}
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long long user_stats::AttachLeaderboardUGC(unsigned long long hSteamLeaderboard, unsigned long long hUGC)
|
unsigned long long user_stats::GetNumberOfCurrentPlayers()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long user_stats::GetNumberOfCurrentPlayers()
|
unsigned long long user_stats::RequestGlobalAchievementPercentages()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long user_stats::RequestGlobalAchievementPercentages()
|
int user_stats::GetMostAchievedAchievementInfo(char* pchName, unsigned int unNameBufLen, float* pflPercent,
|
||||||
{
|
bool* pbAchieved)
|
||||||
return 0;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int user_stats::GetMostAchievedAchievementInfo(char* pchName, unsigned int unNameBufLen, float* pflPercent,
|
int user_stats::GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char* pchName, unsigned int unNameBufLen,
|
||||||
bool* pbAchieved)
|
float* pflPercent, bool* pbAchieved)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user_stats::GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char* pchName, unsigned int unNameBufLen,
|
bool user_stats::GetAchievementAchievedPercent(const char* pchName, float* pflPercent)
|
||||||
float* pflPercent, bool* pbAchieved)
|
{
|
||||||
{
|
return true;
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool user_stats::GetAchievementAchievedPercent(const char* pchName, float* pflPercent)
|
unsigned long long user_stats::RequestGlobalStats(int nHistoryDays)
|
||||||
{
|
{
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long user_stats::RequestGlobalStats(int nHistoryDays)
|
bool user_stats::GetGlobalStat(const char* pchStatName, long long* pData)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetGlobalStat(const char* pchStatName, long long* pData)
|
bool user_stats::GetGlobalStat(const char* pchStatName, double* pData)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool user_stats::GetGlobalStat(const char* pchStatName, double* pData)
|
int user_stats::GetGlobalStatHistory(const char* pchStatName, long long* pData, unsigned int cubData)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int user_stats::GetGlobalStatHistory(const char* pchStatName, long long* pData, unsigned int cubData)
|
int user_stats::GetGlobalStatHistory(const char* pchStatName, double* pData, unsigned int cubData)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
int user_stats::GetGlobalStatHistory(const char* pchStatName, double* pData, unsigned int cubData)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -2,66 +2,64 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
class user_stats
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~user_stats() = default;
|
||||||
|
|
||||||
class user_stats
|
virtual bool RequestCurrentStats();
|
||||||
{
|
virtual bool GetStat(const char* pchName, int* pData);
|
||||||
public:
|
virtual bool GetStat(const char* pchName, float* pData);
|
||||||
~user_stats() = default;
|
virtual bool SetStat(const char* pchName, int nData);
|
||||||
|
virtual bool SetStat(const char* pchName, float fData);
|
||||||
virtual bool RequestCurrentStats();
|
virtual bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength);
|
||||||
virtual bool GetStat(const char* pchName, int* pData);
|
virtual bool GetAchievement(const char* pchName, bool* pbAchieved);
|
||||||
virtual bool GetStat(const char* pchName, float* pData);
|
virtual bool SetAchievement(const char* pchName);
|
||||||
virtual bool SetStat(const char* pchName, int nData);
|
virtual bool ClearAchievement(const char* pchName);
|
||||||
virtual bool SetStat(const char* pchName, float fData);
|
virtual bool GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, unsigned int* punUnlockTime);
|
||||||
virtual bool UpdateAvgRateStat(const char* pchName, float flCountThisSession, double dSessionLength);
|
virtual bool StoreStats();
|
||||||
virtual bool GetAchievement(const char* pchName, bool* pbAchieved);
|
virtual int GetAchievementIcon(const char* pchName);
|
||||||
virtual bool SetAchievement(const char* pchName);
|
virtual const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey);
|
||||||
virtual bool ClearAchievement(const char* pchName);
|
virtual bool IndicateAchievementProgress(const char* pchName, unsigned int nCurProgress,
|
||||||
virtual bool GetAchievementAndUnlockTime(const char* pchName, bool* pbAchieved, unsigned int* punUnlockTime);
|
unsigned int nMaxProgress);
|
||||||
virtual bool StoreStats();
|
virtual unsigned int GetNumAchievements();
|
||||||
virtual int GetAchievementIcon(const char* pchName);
|
virtual const char* GetAchievementName(unsigned int iAchievement);
|
||||||
virtual const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey);
|
virtual unsigned long long RequestUserStats(steam_id steamIDUser);
|
||||||
virtual bool IndicateAchievementProgress(const char* pchName, unsigned int nCurProgress,
|
virtual bool GetUserStat(steam_id steamIDUser, const char* pchName, int* pData);
|
||||||
unsigned int nMaxProgress);
|
virtual bool GetUserStat(steam_id steamIDUser, const char* pchName, float* pData);
|
||||||
virtual unsigned int GetNumAchievements();
|
virtual bool GetUserAchievement(steam_id steamIDUser, const char* pchName, bool* pbAchieved);
|
||||||
virtual const char* GetAchievementName(unsigned int iAchievement);
|
virtual bool GetUserAchievementAndUnlockTime(steam_id steamIDUser, const char* pchName, bool* pbAchieved,
|
||||||
virtual unsigned long long RequestUserStats(steam_id steamIDUser);
|
unsigned int* punUnlockTime);
|
||||||
virtual bool GetUserStat(steam_id steamIDUser, const char* pchName, int* pData);
|
virtual bool ResetAllStats(bool bAchievementsToo);
|
||||||
virtual bool GetUserStat(steam_id steamIDUser, const char* pchName, float* pData);
|
virtual unsigned long long FindOrCreateLeaderboard(const char* pchLeaderboardName, int eLeaderboardSortMethod,
|
||||||
virtual bool GetUserAchievement(steam_id steamIDUser, const char* pchName, bool* pbAchieved);
|
int eLeaderboardDisplayType);
|
||||||
virtual bool GetUserAchievementAndUnlockTime(steam_id steamIDUser, const char* pchName, bool* pbAchieved,
|
virtual unsigned long long FindLeaderboard(const char* pchLeaderboardName);
|
||||||
unsigned int* punUnlockTime);
|
virtual const char* GetLeaderboardName(unsigned long long hSteamLeaderboard);
|
||||||
virtual bool ResetAllStats(bool bAchievementsToo);
|
virtual int GetLeaderboardEntryCount(unsigned long long hSteamLeaderboard);
|
||||||
virtual unsigned long long FindOrCreateLeaderboard(const char* pchLeaderboardName, int eLeaderboardSortMethod,
|
virtual int GetLeaderboardSortMethod(unsigned long long hSteamLeaderboard);
|
||||||
int eLeaderboardDisplayType);
|
virtual int GetLeaderboardDisplayType(unsigned long long hSteamLeaderboard);
|
||||||
virtual unsigned long long FindLeaderboard(const char* pchLeaderboardName);
|
virtual unsigned long long DownloadLeaderboardEntries(unsigned long long hSteamLeaderboard,
|
||||||
virtual const char* GetLeaderboardName(unsigned long long hSteamLeaderboard);
|
int eLeaderboardDataRequest, int nRangeStart,
|
||||||
virtual int GetLeaderboardEntryCount(unsigned long long hSteamLeaderboard);
|
int nRangeEnd);
|
||||||
virtual int GetLeaderboardSortMethod(unsigned long long hSteamLeaderboard);
|
virtual unsigned long long DownloadLeaderboardEntriesForUsers(unsigned long long hSteamLeaderboard,
|
||||||
virtual int GetLeaderboardDisplayType(unsigned long long hSteamLeaderboard);
|
steam_id* prgUsers, int cUsers);
|
||||||
virtual unsigned long long DownloadLeaderboardEntries(unsigned long long hSteamLeaderboard,
|
virtual bool GetDownloadedLeaderboardEntry(unsigned long long hSteamLeaderboardEntries, int index,
|
||||||
int eLeaderboardDataRequest, int nRangeStart,
|
int* pLeaderboardEntry, int* pDetails, int cDetailsMax);
|
||||||
int nRangeEnd);
|
virtual unsigned long long UploadLeaderboardScore(unsigned long long hSteamLeaderboard,
|
||||||
virtual unsigned long long DownloadLeaderboardEntriesForUsers(unsigned long long hSteamLeaderboard,
|
int eLeaderboardUploadScoreMethod, int nScore,
|
||||||
steam_id* prgUsers, int cUsers);
|
const int* pScoreDetails, int cScoreDetailsCount);
|
||||||
virtual bool GetDownloadedLeaderboardEntry(unsigned long long hSteamLeaderboardEntries, int index,
|
virtual unsigned long long AttachLeaderboardUGC(unsigned long long hSteamLeaderboard, unsigned long long hUGC);
|
||||||
int* pLeaderboardEntry, int* pDetails, int cDetailsMax);
|
virtual unsigned long long GetNumberOfCurrentPlayers();
|
||||||
virtual unsigned long long UploadLeaderboardScore(unsigned long long hSteamLeaderboard,
|
virtual unsigned long long RequestGlobalAchievementPercentages();
|
||||||
int eLeaderboardUploadScoreMethod, int nScore,
|
virtual int GetMostAchievedAchievementInfo(char* pchName, unsigned int unNameBufLen, float* pflPercent,
|
||||||
const int* pScoreDetails, int cScoreDetailsCount);
|
bool* pbAchieved);
|
||||||
virtual unsigned long long AttachLeaderboardUGC(unsigned long long hSteamLeaderboard, unsigned long long hUGC);
|
virtual int GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char* pchName, unsigned int unNameBufLen,
|
||||||
virtual unsigned long long GetNumberOfCurrentPlayers();
|
float* pflPercent, bool* pbAchieved);
|
||||||
virtual unsigned long long RequestGlobalAchievementPercentages();
|
virtual bool GetAchievementAchievedPercent(const char* pchName, float* pflPercent);
|
||||||
virtual int GetMostAchievedAchievementInfo(char* pchName, unsigned int unNameBufLen, float* pflPercent,
|
virtual unsigned long long RequestGlobalStats(int nHistoryDays);
|
||||||
bool* pbAchieved);
|
virtual bool GetGlobalStat(const char* pchStatName, long long* pData);
|
||||||
virtual int GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char* pchName, unsigned int unNameBufLen,
|
virtual bool GetGlobalStat(const char* pchStatName, double* pData);
|
||||||
float* pflPercent, bool* pbAchieved);
|
virtual int GetGlobalStatHistory(const char* pchStatName, long long* pData, unsigned int cubData);
|
||||||
virtual bool GetAchievementAchievedPercent(const char* pchName, float* pflPercent);
|
virtual int GetGlobalStatHistory(const char* pchStatName, double* pData, unsigned int cubData);
|
||||||
virtual unsigned long long RequestGlobalStats(int nHistoryDays);
|
};
|
||||||
virtual bool GetGlobalStat(const char* pchStatName, long long* pData);
|
}
|
||||||
virtual bool GetGlobalStat(const char* pchStatName, double* pData);
|
|
||||||
virtual int GetGlobalStatHistory(const char* pchStatName, long long* pData, unsigned int cubData);
|
|
||||||
virtual int GetGlobalStatHistory(const char* pchStatName, double* pData, unsigned int cubData);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -3,123 +3,121 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
unsigned int utils::GetSecondsSinceAppActive()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int utils::GetSecondsSinceAppActive()
|
unsigned int utils::GetSecondsSinceComputerActive()
|
||||||
{
|
{
|
||||||
return 0;
|
return (uint32_t)GetTickCount64() / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int utils::GetSecondsSinceComputerActive()
|
int utils::GetConnectedUniverse()
|
||||||
{
|
{
|
||||||
return (uint32_t)GetTickCount64() / 1000;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int utils::GetConnectedUniverse()
|
unsigned int utils::GetServerRealTime()
|
||||||
{
|
{
|
||||||
return 1;
|
return (uint32_t)time(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int utils::GetServerRealTime()
|
const char* utils::GetIPCountry()
|
||||||
{
|
{
|
||||||
return (uint32_t)time(NULL);
|
return "US";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* utils::GetIPCountry()
|
bool utils::GetImageSize(int iImage, unsigned int* pnWidth, unsigned int* pnHeight)
|
||||||
{
|
{
|
||||||
return "US";
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool utils::GetImageSize(int iImage, unsigned int* pnWidth, unsigned int* pnHeight)
|
bool utils::GetImageRGBA(int iImage, unsigned char* pubDest, int nDestBufferSize)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool utils::GetImageRGBA(int iImage, unsigned char* pubDest, int nDestBufferSize)
|
bool utils::GetCSERIPPort(unsigned int* unIP, unsigned short* usPort)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool utils::GetCSERIPPort(unsigned int* unIP, unsigned short* usPort)
|
unsigned char utils::GetCurrentBatteryPower()
|
||||||
{
|
{
|
||||||
return false;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char utils::GetCurrentBatteryPower()
|
unsigned int utils::GetAppID()
|
||||||
{
|
{
|
||||||
return 255;
|
return 209660;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int utils::GetAppID()
|
void utils::SetOverlayNotificationPosition(int eNotificationPosition)
|
||||||
{
|
{
|
||||||
return 209660;
|
//const auto& overlay = steam_proxy::get_overlay_module();
|
||||||
}
|
//if (overlay)
|
||||||
|
//{
|
||||||
|
// overlay.invoke<void>("SetNotificationPosition", eNotificationPosition);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
void utils::SetOverlayNotificationPosition(int eNotificationPosition)
|
bool utils::IsAPICallCompleted(unsigned long long hSteamAPICall, bool* pbFailed)
|
||||||
{
|
{
|
||||||
//const auto& overlay = steam_proxy::get_overlay_module();
|
return false;
|
||||||
//if (overlay)
|
}
|
||||||
//{
|
|
||||||
// overlay.invoke<void>("SetNotificationPosition", eNotificationPosition);
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool utils::IsAPICallCompleted(unsigned long long hSteamAPICall, bool* pbFailed)
|
int utils::GetAPICallFailureReason(unsigned long long hSteamAPICall)
|
||||||
{
|
{
|
||||||
return false;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int utils::GetAPICallFailureReason(unsigned long long hSteamAPICall)
|
bool utils::GetAPICallResult(unsigned long long hSteamAPICall, void* pCallback, int cubCallback,
|
||||||
{
|
int iCallbackExpected, bool* pbFailed)
|
||||||
return -1;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool utils::GetAPICallResult(unsigned long long hSteamAPICall, void* pCallback, int cubCallback,
|
void utils::RunFrame()
|
||||||
int iCallbackExpected, bool* pbFailed)
|
{
|
||||||
{
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void utils::RunFrame()
|
unsigned int utils::GetIPCCallCount()
|
||||||
{
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int utils::GetIPCCallCount()
|
void utils::SetWarningMessageHook(void (*pFunction)(int hpipe, const char* message))
|
||||||
{
|
{
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void utils::SetWarningMessageHook(void (*pFunction)(int hpipe, const char* message))
|
bool utils::IsOverlayEnabled()
|
||||||
{
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool utils::IsOverlayEnabled()
|
bool utils::BOverlayNeedsPresent()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool utils::BOverlayNeedsPresent()
|
unsigned long long utils::CheckFileSignature(const char* szFileName)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long utils::CheckFileSignature(const char* szFileName)
|
bool utils::ShowGamepadTextInput(int eInputMode, int eInputLineMode, const char* szText, unsigned int uMaxLength)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool utils::ShowGamepadTextInput(int eInputMode, int eInputLineMode, const char* szText, unsigned int uMaxLength)
|
unsigned int utils::GetEnteredGamepadTextLength()
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int utils::GetEnteredGamepadTextLength()
|
bool utils::GetEnteredGamepadTextInput(char* pchValue, unsigned int cchValueMax)
|
||||||
{
|
{
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bool utils::GetEnteredGamepadTextInput(char* pchValue, unsigned int cchValueMax)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -2,37 +2,36 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
class utils
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~utils() = default;
|
||||||
|
|
||||||
class utils
|
virtual unsigned int GetSecondsSinceAppActive();
|
||||||
{
|
virtual unsigned int GetSecondsSinceComputerActive();
|
||||||
public:
|
virtual int GetConnectedUniverse();
|
||||||
~utils() = default;
|
virtual unsigned int GetServerRealTime();
|
||||||
|
virtual const char* GetIPCountry();
|
||||||
|
virtual bool GetImageSize(int iImage, unsigned int* pnWidth, unsigned int* pnHeight);
|
||||||
|
virtual bool GetImageRGBA(int iImage, unsigned char* pubDest, int nDestBufferSize);
|
||||||
|
virtual bool GetCSERIPPort(unsigned int* unIP, unsigned short* usPort);
|
||||||
|
virtual unsigned char GetCurrentBatteryPower();
|
||||||
|
virtual unsigned int GetAppID();
|
||||||
|
virtual void SetOverlayNotificationPosition(int eNotificationPosition);
|
||||||
|
virtual bool IsAPICallCompleted(unsigned long long hSteamAPICall, bool* pbFailed);
|
||||||
|
virtual int GetAPICallFailureReason(unsigned long long hSteamAPICall);
|
||||||
|
virtual bool GetAPICallResult(unsigned long long hSteamAPICall, void* pCallback, int cubCallback,
|
||||||
|
int iCallbackExpected, bool* pbFailed);
|
||||||
|
virtual void RunFrame();
|
||||||
|
virtual unsigned int GetIPCCallCount();
|
||||||
|
virtual void SetWarningMessageHook(void (*pFunction)(int hpipe, const char* message));
|
||||||
|
virtual bool IsOverlayEnabled();
|
||||||
|
virtual bool BOverlayNeedsPresent();
|
||||||
|
virtual unsigned long long CheckFileSignature(const char* szFileName);
|
||||||
|
|
||||||
virtual unsigned int GetSecondsSinceAppActive();
|
virtual bool ShowGamepadTextInput(int eInputMode, int eInputLineMode, const char* szText,
|
||||||
virtual unsigned int GetSecondsSinceComputerActive();
|
unsigned int uMaxLength);
|
||||||
virtual int GetConnectedUniverse();
|
virtual unsigned int GetEnteredGamepadTextLength();
|
||||||
virtual unsigned int GetServerRealTime();
|
virtual bool GetEnteredGamepadTextInput(char* pchValue, unsigned int cchValueMax);
|
||||||
virtual const char* GetIPCountry();
|
};
|
||||||
virtual bool GetImageSize(int iImage, unsigned int* pnWidth, unsigned int* pnHeight);
|
}
|
||||||
virtual bool GetImageRGBA(int iImage, unsigned char* pubDest, int nDestBufferSize);
|
|
||||||
virtual bool GetCSERIPPort(unsigned int* unIP, unsigned short* usPort);
|
|
||||||
virtual unsigned char GetCurrentBatteryPower();
|
|
||||||
virtual unsigned int GetAppID();
|
|
||||||
virtual void SetOverlayNotificationPosition(int eNotificationPosition);
|
|
||||||
virtual bool IsAPICallCompleted(unsigned long long hSteamAPICall, bool* pbFailed);
|
|
||||||
virtual int GetAPICallFailureReason(unsigned long long hSteamAPICall);
|
|
||||||
virtual bool GetAPICallResult(unsigned long long hSteamAPICall, void* pCallback, int cubCallback,
|
|
||||||
int iCallbackExpected, bool* pbFailed);
|
|
||||||
virtual void RunFrame();
|
|
||||||
virtual unsigned int GetIPCCallCount();
|
|
||||||
virtual void SetWarningMessageHook(void (*pFunction)(int hpipe, const char* message));
|
|
||||||
virtual bool IsOverlayEnabled();
|
|
||||||
virtual bool BOverlayNeedsPresent();
|
|
||||||
virtual unsigned long long CheckFileSignature(const char* szFileName);
|
|
||||||
|
|
||||||
virtual bool ShowGamepadTextInput(int eInputMode, int eInputLineMode, const char* szText, unsigned int uMaxLength);
|
|
||||||
virtual unsigned int GetEnteredGamepadTextLength();
|
|
||||||
virtual bool GetEnteredGamepadTextInput(char* pchValue, unsigned int cchValueMax);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -3,239 +3,236 @@
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
uint64_t callbacks::call_id_ = 0;
|
||||||
|
std::recursive_mutex callbacks::mutex_;
|
||||||
|
std::map<uint64_t, bool> callbacks::calls_;
|
||||||
|
std::map<uint64_t, callbacks::base*> callbacks::result_handlers_;
|
||||||
|
std::vector<callbacks::result> callbacks::results_;
|
||||||
|
std::vector<callbacks::base*> callbacks::callback_list_;
|
||||||
|
|
||||||
uint64_t callbacks::call_id_ = 0;
|
uint64_t callbacks::register_call()
|
||||||
std::recursive_mutex callbacks::mutex_;
|
{
|
||||||
std::map<uint64_t, bool> callbacks::calls_;
|
std::lock_guard<std::recursive_mutex> _(mutex_);
|
||||||
std::map<uint64_t, callbacks::base*> callbacks::result_handlers_;
|
calls_[++call_id_] = false;
|
||||||
std::vector<callbacks::result> callbacks::results_;
|
return call_id_;
|
||||||
std::vector<callbacks::base*> callbacks::callback_list_;
|
}
|
||||||
|
|
||||||
uint64_t callbacks::register_call()
|
void callbacks::register_callback(base* handler, const int callback)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> _(mutex_);
|
std::lock_guard<std::recursive_mutex> _(mutex_);
|
||||||
calls_[++call_id_] = false;
|
handler->set_i_callback(callback);
|
||||||
return call_id_;
|
callback_list_.push_back(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
void callbacks::register_callback(base* handler, const int callback)
|
void callbacks::unregister_callback(base* handler)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> _(mutex_);
|
std::lock_guard<std::recursive_mutex> _(mutex_);
|
||||||
handler->set_i_callback(callback);
|
for (auto i = callback_list_.begin(); i != callback_list_.end();)
|
||||||
callback_list_.push_back(handler);
|
{
|
||||||
}
|
if (*i == handler)
|
||||||
|
{
|
||||||
|
i = callback_list_.erase(i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void callbacks::unregister_callback(base* handler)
|
void callbacks::register_call_result(const uint64_t call, base* result)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> _(mutex_);
|
std::lock_guard<std::recursive_mutex> _(mutex_);
|
||||||
for (auto i = callback_list_.begin(); i != callback_list_.end();)
|
result_handlers_[call] = result;
|
||||||
{
|
}
|
||||||
if (*i == handler)
|
|
||||||
{
|
|
||||||
i = callback_list_.erase(i);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void callbacks::register_call_result(const uint64_t call, base* result)
|
void callbacks::unregister_call_result(const uint64_t call, base* /*result*/)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> _(mutex_);
|
std::lock_guard<std::recursive_mutex> _(mutex_);
|
||||||
result_handlers_[call] = result;
|
const auto i = result_handlers_.find(call);
|
||||||
}
|
if (i != result_handlers_.end())
|
||||||
|
{
|
||||||
|
result_handlers_.erase(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void callbacks::unregister_call_result(const uint64_t call, base* /*result*/)
|
void callbacks::return_call(void* data, const int size, const int type, const uint64_t call)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> _(mutex_);
|
std::lock_guard<std::recursive_mutex> _(mutex_);
|
||||||
const auto i = result_handlers_.find(call);
|
|
||||||
if (i != result_handlers_.end())
|
|
||||||
{
|
|
||||||
result_handlers_.erase(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void callbacks::return_call(void* data, const int size, const int type, const uint64_t call)
|
result result{};
|
||||||
{
|
result.call = call;
|
||||||
std::lock_guard<std::recursive_mutex> _(mutex_);
|
result.data = data;
|
||||||
|
result.size = size;
|
||||||
|
result.type = type;
|
||||||
|
|
||||||
result result{};
|
calls_[call] = true;
|
||||||
result.call = call;
|
|
||||||
result.data = data;
|
|
||||||
result.size = size;
|
|
||||||
result.type = type;
|
|
||||||
|
|
||||||
calls_[call] = true;
|
results_.emplace_back(result);
|
||||||
|
}
|
||||||
|
|
||||||
results_.emplace_back(result);
|
void callbacks::run_callbacks()
|
||||||
}
|
{
|
||||||
|
std::lock_guard<std::recursive_mutex> _(mutex_);
|
||||||
|
|
||||||
void callbacks::run_callbacks()
|
for (const auto& result : results_)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> _(mutex_);
|
if (result_handlers_.find(result.call) != result_handlers_.end())
|
||||||
|
{
|
||||||
|
result_handlers_[result.call]->run(result.data, false, result.call);
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto& result : results_)
|
for (const auto& callback : callback_list_)
|
||||||
{
|
{
|
||||||
if (result_handlers_.find(result.call) != result_handlers_.end())
|
if (callback && callback->get_i_callback() == result.type)
|
||||||
{
|
{
|
||||||
result_handlers_[result.call]->run(result.data, false, result.call);
|
callback->run(result.data, false, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto& callback : callback_list_)
|
if (result.data)
|
||||||
{
|
{
|
||||||
if (callback && callback->get_i_callback() == result.type)
|
free(result.data);
|
||||||
{
|
}
|
||||||
callback->run(result.data, false, 0);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.data)
|
results_.clear();
|
||||||
{
|
}
|
||||||
free(result.data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
results_.clear();
|
extern "C" {
|
||||||
}
|
|
||||||
|
|
||||||
extern "C"
|
bool SteamAPI_RestartAppIfNecessary()
|
||||||
{
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool SteamAPI_RestartAppIfNecessary()
|
bool SteamAPI_Init()
|
||||||
{
|
{
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SteamAPI_Init()
|
void SteamAPI_RegisterCallResult(callbacks::base* result, const uint64_t call)
|
||||||
{
|
{
|
||||||
return true;
|
callbacks::register_call_result(call, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SteamAPI_RegisterCallResult(callbacks::base* result, const uint64_t call)
|
void SteamAPI_RegisterCallback(callbacks::base* handler, const int callback)
|
||||||
{
|
{
|
||||||
callbacks::register_call_result(call, result);
|
callbacks::register_callback(handler, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SteamAPI_RegisterCallback(callbacks::base* handler, const int callback)
|
void SteamAPI_RunCallbacks()
|
||||||
{
|
{
|
||||||
callbacks::register_callback(handler, callback);
|
callbacks::run_callbacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SteamAPI_RunCallbacks()
|
void SteamAPI_Shutdown()
|
||||||
{
|
{
|
||||||
callbacks::run_callbacks();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void SteamAPI_Shutdown()
|
void SteamAPI_UnregisterCallResult(callbacks::base* result, const uint64_t call)
|
||||||
{
|
{
|
||||||
}
|
callbacks::unregister_call_result(call, result);
|
||||||
|
}
|
||||||
|
|
||||||
void SteamAPI_UnregisterCallResult(callbacks::base* result, const uint64_t call)
|
void SteamAPI_UnregisterCallback(callbacks::base* handler)
|
||||||
{
|
{
|
||||||
callbacks::unregister_call_result(call, result);
|
callbacks::unregister_callback(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SteamAPI_UnregisterCallback(callbacks::base* handler)
|
const char* SteamAPI_GetSteamInstallPath()
|
||||||
{
|
{
|
||||||
callbacks::unregister_callback(handler);
|
static std::string install_path{};
|
||||||
}
|
if (!install_path.empty())
|
||||||
|
{
|
||||||
|
return install_path.data();
|
||||||
|
}
|
||||||
|
|
||||||
const char* SteamAPI_GetSteamInstallPath()
|
HKEY reg_key;
|
||||||
{
|
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\WOW6432Node\\Valve\\Steam", 0, KEY_QUERY_VALUE,
|
||||||
static std::string install_path{};
|
®_key) ==
|
||||||
if (!install_path.empty())
|
ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
return install_path.data();
|
char path[MAX_PATH] = {0};
|
||||||
}
|
DWORD length = sizeof(path);
|
||||||
|
RegQueryValueExA(reg_key, "InstallPath", nullptr, nullptr, reinterpret_cast<BYTE*>(path),
|
||||||
|
&length);
|
||||||
|
RegCloseKey(reg_key);
|
||||||
|
|
||||||
HKEY reg_key;
|
install_path = path;
|
||||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\WOW6432Node\\Valve\\Steam", 0, KEY_QUERY_VALUE,
|
}
|
||||||
®_key) ==
|
|
||||||
ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
char path[MAX_PATH] = { 0 };
|
|
||||||
DWORD length = sizeof(path);
|
|
||||||
RegQueryValueExA(reg_key, "InstallPath", nullptr, nullptr, reinterpret_cast<BYTE*>(path),
|
|
||||||
&length);
|
|
||||||
RegCloseKey(reg_key);
|
|
||||||
|
|
||||||
install_path = path;
|
return install_path.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
return install_path.data();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool SteamGameServer_Init()
|
bool SteamGameServer_Init()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SteamGameServer_RunCallbacks()
|
void SteamGameServer_RunCallbacks()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void SteamGameServer_Shutdown()
|
void SteamGameServer_Shutdown()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
friends* SteamFriends()
|
friends* SteamFriends()
|
||||||
{
|
{
|
||||||
static friends friends;
|
static friends friends;
|
||||||
return &friends;
|
return &friends;
|
||||||
}
|
}
|
||||||
|
|
||||||
matchmaking* SteamMatchmaking()
|
matchmaking* SteamMatchmaking()
|
||||||
{
|
{
|
||||||
static matchmaking matchmaking;
|
static matchmaking matchmaking;
|
||||||
return &matchmaking;
|
return &matchmaking;
|
||||||
}
|
}
|
||||||
|
|
||||||
game_server* SteamGameServer()
|
game_server* SteamGameServer()
|
||||||
{
|
{
|
||||||
static game_server game_server;
|
static game_server game_server;
|
||||||
return &game_server;
|
return &game_server;
|
||||||
}
|
}
|
||||||
|
|
||||||
networking* SteamNetworking()
|
networking* SteamNetworking()
|
||||||
{
|
{
|
||||||
static networking networking;
|
static networking networking;
|
||||||
return &networking;
|
return &networking;
|
||||||
}
|
}
|
||||||
|
|
||||||
remote_storage* SteamRemoteStorage()
|
remote_storage* SteamRemoteStorage()
|
||||||
{
|
{
|
||||||
static remote_storage remote_storage;
|
static remote_storage remote_storage;
|
||||||
return &remote_storage;
|
return &remote_storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
user* SteamUser()
|
user* SteamUser()
|
||||||
{
|
{
|
||||||
static user user;
|
static user user;
|
||||||
return &user;
|
return &user;
|
||||||
}
|
}
|
||||||
|
|
||||||
utils* SteamUtils()
|
utils* SteamUtils()
|
||||||
{
|
{
|
||||||
static utils utils;
|
static utils utils;
|
||||||
return &utils;
|
return &utils;
|
||||||
}
|
}
|
||||||
|
|
||||||
apps* SteamApps()
|
apps* SteamApps()
|
||||||
{
|
{
|
||||||
static apps apps;
|
static apps apps;
|
||||||
return &apps;
|
return &apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
user_stats* SteamUserStats()
|
user_stats* SteamUserStats()
|
||||||
{
|
{
|
||||||
static user_stats user_stats;
|
static user_stats user_stats;
|
||||||
return &user_stats;
|
return &user_stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // extern C
|
}
|
||||||
|
}
|
||||||
} // namespace steam
|
|
||||||
|
@ -4,30 +4,30 @@
|
|||||||
|
|
||||||
struct raw_steam_id final
|
struct raw_steam_id final
|
||||||
{
|
{
|
||||||
unsigned int account_id : 32;
|
unsigned int account_id : 32;
|
||||||
unsigned int account_instance : 20;
|
unsigned int account_instance : 20;
|
||||||
unsigned int account_type : 4;
|
unsigned int account_type : 4;
|
||||||
int universe : 8;
|
int universe : 8;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
raw_steam_id raw;
|
raw_steam_id raw;
|
||||||
unsigned long long bits;
|
unsigned long long bits;
|
||||||
} steam_id;
|
} steam_id;
|
||||||
|
|
||||||
#pragma pack( push, 1 )
|
#pragma pack( push, 1 )
|
||||||
struct raw_game_id final
|
struct raw_game_id final
|
||||||
{
|
{
|
||||||
unsigned int app_id : 24;
|
unsigned int app_id : 24;
|
||||||
unsigned int type : 8;
|
unsigned int type : 8;
|
||||||
unsigned int mod_id : 32;
|
unsigned int mod_id : 32;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
raw_game_id raw;
|
raw_game_id raw;
|
||||||
unsigned long long bits;
|
unsigned long long bits;
|
||||||
} game_id;
|
} game_id;
|
||||||
#pragma pack( pop )
|
#pragma pack( pop )
|
||||||
|
|
||||||
@ -43,81 +43,79 @@ typedef union
|
|||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
class callbacks
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
class base
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
base() : flags_(0), callback_(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
class callbacks
|
virtual void run(void* pv_param) = 0;
|
||||||
{
|
virtual void run(void* pv_param, bool failure, uint64_t handle) = 0;
|
||||||
public:
|
virtual int get_callback_size_bytes() = 0;
|
||||||
class base
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
base() : flags_(0), callback_(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void run(void* pv_param) = 0;
|
int get_i_callback() const { return callback_; }
|
||||||
virtual void run(void* pv_param, bool failure, uint64_t handle) = 0;
|
void set_i_callback(const int i_callback) { callback_ = i_callback; }
|
||||||
virtual int get_callback_size_bytes() = 0;
|
|
||||||
|
|
||||||
int get_i_callback() const { return callback_; }
|
protected:
|
||||||
void set_i_callback(const int i_callback) { callback_ = i_callback; }
|
~base() = default;
|
||||||
|
|
||||||
protected:
|
unsigned char flags_;
|
||||||
~base() = default;
|
int callback_;
|
||||||
|
};
|
||||||
|
|
||||||
unsigned char flags_;
|
struct result final
|
||||||
int callback_;
|
{
|
||||||
};
|
void* data{};
|
||||||
|
int size{};
|
||||||
|
int type{};
|
||||||
|
uint64_t call{};
|
||||||
|
};
|
||||||
|
|
||||||
struct result final
|
static uint64_t register_call();
|
||||||
{
|
|
||||||
void* data{};
|
|
||||||
int size{};
|
|
||||||
int type{};
|
|
||||||
uint64_t call{};
|
|
||||||
};
|
|
||||||
|
|
||||||
static uint64_t register_call();
|
static void register_callback(base* handler, int callback);
|
||||||
|
static void unregister_callback(base* handler);
|
||||||
|
|
||||||
static void register_callback(base* handler, int callback);
|
static void register_call_result(uint64_t call, base* result);
|
||||||
static void unregister_callback(base* handler);
|
static void unregister_call_result(uint64_t call, base* result);
|
||||||
|
|
||||||
static void register_call_result(uint64_t call, base* result);
|
static void return_call(void* data, int size, int type, uint64_t call);
|
||||||
static void unregister_call_result(uint64_t call, base* result);
|
static void run_callbacks();
|
||||||
|
|
||||||
static void return_call(void* data, int size, int type, uint64_t call);
|
private:
|
||||||
static void run_callbacks();
|
static uint64_t call_id_;
|
||||||
|
static std::recursive_mutex mutex_;
|
||||||
|
static std::map<uint64_t, bool> calls_;
|
||||||
|
static std::map<uint64_t, base*> result_handlers_;
|
||||||
|
static std::vector<result> results_;
|
||||||
|
static std::vector<base*> callback_list_;
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
STEAM_EXPORT bool SteamAPI_RestartAppIfNecessary();
|
||||||
static uint64_t call_id_;
|
STEAM_EXPORT bool SteamAPI_Init();
|
||||||
static std::recursive_mutex mutex_;
|
STEAM_EXPORT void SteamAPI_RegisterCallResult(callbacks::base* result, uint64_t call);
|
||||||
static std::map<uint64_t, bool> calls_;
|
STEAM_EXPORT void SteamAPI_RegisterCallback(callbacks::base* handler, int callback);
|
||||||
static std::map<uint64_t, base*> result_handlers_;
|
STEAM_EXPORT void SteamAPI_RunCallbacks();
|
||||||
static std::vector<result> results_;
|
STEAM_EXPORT void SteamAPI_Shutdown();
|
||||||
static std::vector<base*> callback_list_;
|
STEAM_EXPORT void SteamAPI_UnregisterCallResult(callbacks::base* result, const uint64_t call);
|
||||||
};
|
STEAM_EXPORT void SteamAPI_UnregisterCallback(callbacks::base* handler);
|
||||||
|
STEAM_EXPORT const char* SteamAPI_GetSteamInstallPath();
|
||||||
|
|
||||||
STEAM_EXPORT bool SteamAPI_RestartAppIfNecessary();
|
STEAM_EXPORT bool SteamGameServer_Init();
|
||||||
STEAM_EXPORT bool SteamAPI_Init();
|
STEAM_EXPORT void SteamGameServer_RunCallbacks();
|
||||||
STEAM_EXPORT void SteamAPI_RegisterCallResult(callbacks::base* result, uint64_t call);
|
STEAM_EXPORT void SteamGameServer_Shutdown();
|
||||||
STEAM_EXPORT void SteamAPI_RegisterCallback(callbacks::base* handler, int callback);
|
|
||||||
STEAM_EXPORT void SteamAPI_RunCallbacks();
|
|
||||||
STEAM_EXPORT void SteamAPI_Shutdown();
|
|
||||||
STEAM_EXPORT void SteamAPI_UnregisterCallResult(callbacks::base* result, const uint64_t call);
|
|
||||||
STEAM_EXPORT void SteamAPI_UnregisterCallback(callbacks::base* handler);
|
|
||||||
STEAM_EXPORT const char* SteamAPI_GetSteamInstallPath();
|
|
||||||
|
|
||||||
STEAM_EXPORT bool SteamGameServer_Init();
|
STEAM_EXPORT friends* SteamFriends();
|
||||||
STEAM_EXPORT void SteamGameServer_RunCallbacks();
|
STEAM_EXPORT matchmaking* SteamMatchmaking();
|
||||||
STEAM_EXPORT void SteamGameServer_Shutdown();
|
STEAM_EXPORT game_server* SteamGameServer();
|
||||||
|
STEAM_EXPORT networking* SteamNetworking();
|
||||||
STEAM_EXPORT friends* SteamFriends();
|
STEAM_EXPORT remote_storage* SteamRemoteStorage();
|
||||||
STEAM_EXPORT matchmaking* SteamMatchmaking();
|
STEAM_EXPORT user* SteamUser();
|
||||||
STEAM_EXPORT game_server* SteamGameServer();
|
STEAM_EXPORT utils* SteamUtils();
|
||||||
STEAM_EXPORT networking* SteamNetworking();
|
STEAM_EXPORT apps* SteamApps();
|
||||||
STEAM_EXPORT remote_storage* SteamRemoteStorage();
|
STEAM_EXPORT user_stats* SteamUserStats();
|
||||||
STEAM_EXPORT user* SteamUser();
|
}
|
||||||
STEAM_EXPORT utils* SteamUtils();
|
|
||||||
STEAM_EXPORT apps* SteamApps();
|
|
||||||
STEAM_EXPORT user_stats* SteamUserStats();
|
|
||||||
|
|
||||||
} // namespace steam
|
|
||||||
|
@ -52,7 +52,8 @@ namespace utils
|
|||||||
for (auto i = this->key_value_pairs_.begin(); i != this->key_value_pairs_.end(); ++i)
|
for (auto i = this->key_value_pairs_.begin(); i != this->key_value_pairs_.end(); ++i)
|
||||||
{
|
{
|
||||||
//if (first) first = false;
|
//if (first) first = false;
|
||||||
/*else*/ info_string.append("\\");
|
/*else*/
|
||||||
|
info_string.append("\\");
|
||||||
|
|
||||||
info_string.append(i->first); // Key
|
info_string.append(i->first); // Key
|
||||||
info_string.append("\\");
|
info_string.append("\\");
|
||||||
|
@ -118,6 +118,8 @@ namespace utils::io
|
|||||||
|
|
||||||
void copy_folder(const std::filesystem::path& src, const std::filesystem::path& target)
|
void copy_folder(const std::filesystem::path& src, const std::filesystem::path& target)
|
||||||
{
|
{
|
||||||
std::filesystem::copy(src, target, std::filesystem::copy_options::overwrite_existing | std::filesystem::copy_options::recursive);
|
std::filesystem::copy(src, target,
|
||||||
|
std::filesystem::copy_options::overwrite_existing |
|
||||||
|
std::filesystem::copy_options::recursive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,29 +10,29 @@ namespace utils::hook
|
|||||||
{
|
{
|
||||||
this->mask_.clear();
|
this->mask_.clear();
|
||||||
this->pattern_.clear();
|
this->pattern_.clear();
|
||||||
|
|
||||||
uint8_t nibble = 0;
|
uint8_t nibble = 0;
|
||||||
auto has_nibble = false;
|
auto has_nibble = false;
|
||||||
|
|
||||||
for(auto val : pattern)
|
for (auto val : pattern)
|
||||||
{
|
{
|
||||||
if (val == ' ') continue;
|
if (val == ' ') continue;
|
||||||
if(val == '?')
|
if (val == '?')
|
||||||
{
|
{
|
||||||
this->mask_.push_back(val);
|
this->mask_.push_back(val);
|
||||||
this->pattern_.push_back(0);
|
this->pattern_.push_back(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if((val < '0' || val > '9') && (val < 'A' || val > 'F') && (val < 'a' || val> 'f'))
|
if ((val < '0' || val > '9') && (val < 'A' || val > 'F') && (val < 'a' || val > 'f'))
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Invalid pattern");
|
throw std::runtime_error("Invalid pattern");
|
||||||
}
|
}
|
||||||
|
|
||||||
char str[] = { val, 0 };
|
char str[] = {val, 0};
|
||||||
const auto current_nibble = static_cast<uint8_t>(strtol(str, nullptr, 16));
|
const auto current_nibble = static_cast<uint8_t>(strtol(str, nullptr, 16));
|
||||||
|
|
||||||
if(!has_nibble)
|
if (!has_nibble)
|
||||||
{
|
{
|
||||||
has_nibble = true;
|
has_nibble = true;
|
||||||
nibble = current_nibble;
|
nibble = current_nibble;
|
||||||
@ -54,7 +54,7 @@ namespace utils::hook
|
|||||||
this->pattern_.pop_back();
|
this->pattern_.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->has_sse_support())
|
if (this->has_sse_support())
|
||||||
{
|
{
|
||||||
while (this->pattern_.size() < 16)
|
while (this->pattern_.size() < 16)
|
||||||
{
|
{
|
||||||
@ -62,7 +62,7 @@ namespace utils::hook
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(has_nibble)
|
if (has_nibble)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Invalid pattern");
|
throw std::runtime_error("Invalid pattern");
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ namespace utils::hook
|
|||||||
std::vector<size_t> signature::process_range_vectorized(uint8_t* start, const size_t length) const
|
std::vector<size_t> signature::process_range_vectorized(uint8_t* start, const size_t length) const
|
||||||
{
|
{
|
||||||
std::vector<size_t> result;
|
std::vector<size_t> result;
|
||||||
__declspec(align(16)) char desired_mask[16] = { 0 };
|
__declspec(align(16)) char desired_mask[16] = {0};
|
||||||
|
|
||||||
for (size_t i = 0; i < this->mask_.size(); i++)
|
for (size_t i = 0; i < this->mask_.size(); i++)
|
||||||
{
|
{
|
||||||
@ -117,7 +117,8 @@ namespace utils::hook
|
|||||||
{
|
{
|
||||||
const auto address = start + i;
|
const auto address = start + i;
|
||||||
const auto value = _mm_loadu_si128(reinterpret_cast<const __m128i*>(address));
|
const auto value = _mm_loadu_si128(reinterpret_cast<const __m128i*>(address));
|
||||||
const auto comparison = _mm_cmpestrm(value, 16, comparand, static_cast<int>(this->mask_.size()), _SIDD_CMP_EQUAL_EACH);
|
const auto comparison = _mm_cmpestrm(value, 16, comparand, static_cast<int>(this->mask_.size()),
|
||||||
|
_SIDD_CMP_EQUAL_EACH);
|
||||||
|
|
||||||
const auto matches = _mm_and_si128(mask, comparison);
|
const auto matches = _mm_and_si128(mask, comparison);
|
||||||
const auto equivalence = _mm_xor_si128(mask, matches);
|
const auto equivalence = _mm_xor_si128(mask, matches);
|
||||||
@ -143,21 +144,22 @@ namespace utils::hook
|
|||||||
signature::signature_result signature::process_serial() const
|
signature::signature_result signature::process_serial() const
|
||||||
{
|
{
|
||||||
const auto sub = this->has_sse_support() ? 16 : this->mask_.size();
|
const auto sub = this->has_sse_support() ? 16 : this->mask_.size();
|
||||||
return { this->process_range(this->start_, this->length_ - sub) };
|
return {this->process_range(this->start_, this->length_ - sub)};
|
||||||
}
|
}
|
||||||
|
|
||||||
signature::signature_result signature::process_parallel() const
|
signature::signature_result signature::process_parallel() const
|
||||||
{
|
{
|
||||||
const auto sub = this->has_sse_support() ? 16 : this->mask_.size();
|
const auto sub = this->has_sse_support() ? 16 : this->mask_.size();
|
||||||
const auto range = this->length_ - sub;
|
const auto range = this->length_ - sub;
|
||||||
const auto cores = std::max(1u, std::thread::hardware_concurrency() / 2); // Only use half of the available cores
|
const auto cores = std::max(1u, std::thread::hardware_concurrency() / 2);
|
||||||
|
// Only use half of the available cores
|
||||||
const auto grid = range / cores;
|
const auto grid = range / cores;
|
||||||
|
|
||||||
std::mutex mutex;
|
std::mutex mutex;
|
||||||
std::vector<size_t> result;
|
std::vector<size_t> result;
|
||||||
std::vector<std::thread> threads;
|
std::vector<std::thread> threads;
|
||||||
|
|
||||||
for(auto i = 0u; i < cores; ++i)
|
for (auto i = 0u; i < cores; ++i)
|
||||||
{
|
{
|
||||||
const auto start = this->start_ + (grid * i);
|
const auto start = this->start_ + (grid * i);
|
||||||
const auto length = (i + 1 == cores) ? (this->start_ + this->length_ - sub) - start : grid;
|
const auto length = (i + 1 == cores) ? (this->start_ + this->length_ - sub) - start : grid;
|
||||||
@ -167,23 +169,23 @@ namespace utils::hook
|
|||||||
if (local_result.empty()) return;
|
if (local_result.empty()) return;
|
||||||
|
|
||||||
std::lock_guard _(mutex);
|
std::lock_guard _(mutex);
|
||||||
for(const auto& address : local_result)
|
for (const auto& address : local_result)
|
||||||
{
|
{
|
||||||
result.push_back(address);
|
result.push_back(address);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto& t : threads)
|
for (auto& t : threads)
|
||||||
{
|
{
|
||||||
if(t.joinable())
|
if (t.joinable())
|
||||||
{
|
{
|
||||||
t.join();
|
t.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(result.begin(), result.end());
|
std::sort(result.begin(), result.end());
|
||||||
return { std::move(result) };
|
return {std::move(result)};
|
||||||
}
|
}
|
||||||
|
|
||||||
bool signature::has_sse_support() const
|
bool signature::has_sse_support() const
|
||||||
|
@ -12,12 +12,11 @@ namespace utils::hook
|
|||||||
public:
|
public:
|
||||||
signature_result(std::vector<size_t>&& matches) : matches_(std::move(matches))
|
signature_result(std::vector<size_t>&& matches) : matches_(std::move(matches))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] uint8_t* get(const size_t index) const
|
[[nodiscard]] uint8_t* get(const size_t index) const
|
||||||
{
|
{
|
||||||
if(index >= this->count())
|
if (index >= this->count())
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Invalid index");
|
throw std::runtime_error("Invalid index");
|
||||||
}
|
}
|
||||||
@ -33,7 +32,7 @@ namespace utils::hook
|
|||||||
private:
|
private:
|
||||||
std::vector<size_t> matches_;
|
std::vector<size_t> matches_;
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit signature(const std::string& pattern, const nt::library library = {})
|
explicit signature(const std::string& pattern, const nt::library library = {})
|
||||||
: signature(pattern, library.get_ptr(), library.get_optional_header()->SizeOfImage)
|
: signature(pattern, library.get_ptr(), library.get_optional_header()->SizeOfImage)
|
||||||
{
|
{
|
||||||
@ -55,7 +54,7 @@ namespace utils::hook
|
|||||||
private:
|
private:
|
||||||
std::string mask_;
|
std::string mask_;
|
||||||
std::basic_string<uint8_t> pattern_;
|
std::basic_string<uint8_t> pattern_;
|
||||||
|
|
||||||
uint8_t* start_;
|
uint8_t* start_;
|
||||||
size_t length_;
|
size_t length_;
|
||||||
|
|
||||||
|
@ -138,11 +138,11 @@ namespace utils::string
|
|||||||
std::string result;
|
std::string result;
|
||||||
result.reserve(wstr.size());
|
result.reserve(wstr.size());
|
||||||
|
|
||||||
for(const auto& chr : wstr)
|
for (const auto& chr : wstr)
|
||||||
{
|
{
|
||||||
result.push_back(static_cast<char>(chr));
|
result.push_back(static_cast<char>(chr));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,11 +151,11 @@ namespace utils::string
|
|||||||
std::wstring result;
|
std::wstring result;
|
||||||
result.reserve(str.size());
|
result.reserve(str.size());
|
||||||
|
|
||||||
for(const auto& chr : str)
|
for (const auto& chr : str)
|
||||||
{
|
{
|
||||||
result.push_back(static_cast<wchar_t>(chr));
|
result.push_back(static_cast<wchar_t>(chr));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
Loading…
Reference in New Issue
Block a user