SP Support

This commit is contained in:
Federico Cecchetto 2022-06-10 18:54:34 +02:00
parent f05fdd33e9
commit 97e39635e0
11 changed files with 293 additions and 148 deletions

View File

@ -169,7 +169,7 @@ namespace gsc
utils::hook::detour scr_settings_hook;
void scr_settings_stub(int /*developer*/, int developer_script, int /*abort_on_error*/, int inst)
{
scr_settings_hook.invoke<void>(SELECT_VALUE(0x0, 0x55D010), developer_script, developer_script, 0, inst);
scr_settings_hook.invoke<void>(developer_script, developer_script, 0, inst);
}
}
@ -177,20 +177,21 @@ namespace gsc
{
void add_internal(const std::string& name, const function_t& function)
{
functions[name] = function;
const auto call_wrap = wrap_function_call(name);
function_wraps[name] = call_wrap;
const auto name_ = utils::string::to_lower(name);
functions[name_] = function;
const auto call_wrap = wrap_function_call(name_);
function_wraps[name_] = call_wrap;
}
}
namespace method
{
template <typename F>
void add_internal(const std::string& name, const function_t& method)
{
methods[name] = method;
const auto call_wrap = wrap_method_call(name);
method_wraps[name] = call_wrap;
const auto name_ = utils::string::to_lower(name);
methods[name_] = method;
const auto call_wrap = wrap_method_call(name_);
method_wraps[name_] = call_wrap;
}
}
@ -200,16 +201,16 @@ namespace gsc
void post_unpack() override
{
// Don't com_error on gsc errors
utils::hook::nop(SELECT_VALUE(0x0, 0x4D9BB1), 5);
utils::hook::jump(SELECT_VALUE(0x0, 0x568B90), print);
utils::hook::nop(SELECT_VALUE(0x5A17E1, 0x4D9BB1), 5);
utils::hook::jump(SELECT_VALUE(0x5DFC40, 0x568B90), print);
scr_settings_hook.create(SELECT_VALUE(0x0, 0x55D010), scr_settings_stub);
get_function_hook.create(SELECT_VALUE(0x0, 0x465E20), get_function_stub);
get_method_hook.create(SELECT_VALUE(0x0, 0x555580), get_method_stub);
scr_settings_hook.create(SELECT_VALUE(0x4CEEA0, 0x55D010), scr_settings_stub);
get_function_hook.create(SELECT_VALUE(0x52BF80, 0x465E20), get_function_stub);
get_method_hook.create(SELECT_VALUE(0x68A640, 0x555580), get_method_stub);
// \n******* script runtime error *******\n%s\n
utils::hook::set<char>(0xAABA68 + 40, '\n');
utils::hook::set<char>(0xAABA68 + 41, '\0');
utils::hook::set<char>(SELECT_VALUE(0x9FC5C0 + 40, 0xAABA68 + 40), '\n');
utils::hook::set<char>(SELECT_VALUE(0x9FC5C0 + 41, 0xAABA68 + 41), '\0');
}
};
}

View File

@ -9,11 +9,6 @@ BOOL APIENTRY DllMain(HMODULE /*module_*/, DWORD ul_reason_for_call, LPVOID /*re
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
if (game::plutonium::is_up_to_date())
{
utils::hook::jump(reinterpret_cast<uintptr_t>(&printf), game::plutonium::printf);
}
component_loader::post_unpack();
}

View File

@ -27,6 +27,34 @@ namespace game
AddRefToValue_(inst, value->type, value->u);
}
void RemoveRefToValue(scriptInstance_t inst, const int type, VariableUnion value)
{
if (game::environment::is_mp())
{
mp::RemoveRefToValue(inst, type, value);
}
else
{
game::VariableValue var{};
var.type = type;
var.u = value;
sp::RemoveRefToValue(inst, &var);
}
}
unsigned int GetObjectType(scriptInstance_t, unsigned int id)
{
if (game::environment::is_sp())
{
return game::scr_VarGlob->variableList_sp[id + 1].w.type & 0x1F;
}
else
{
return game::scr_VarGlob->variableList_mp[id + 1].w.type & 0x1F;
}
}
unsigned int AllocVariable(scriptInstance_t inst)
{
static const auto func = utils::hook::assemble([](utils::hook::assembler& a)
@ -67,16 +95,13 @@ namespace game
unsigned int Scr_GetSelf(scriptInstance_t, unsigned int threadId)
{
return game::scr_VarGlob->variableList[threadId + 1].u.o.u.self;
}
namespace plutonium
{
bool is_up_to_date()
if (game::environment::is_sp())
{
//const auto value = *reinterpret_cast<DWORD*>(0);
//return value == 0;
return false;
return game::scr_VarGlob->variableList_sp[threadId + 1].u.o.size;
}
else
{
return game::scr_VarGlob->variableList_mp[threadId + 1].u.o.u.self;
}
}
}

View File

@ -57,15 +57,14 @@ namespace game
};
void AddRefToValue(scriptInstance_t inst, const VariableValue* value);
void RemoveRefToValue(scriptInstance_t inst, const int type, VariableUnion value);
unsigned int GetObjectType(scriptInstance_t, unsigned int id);
unsigned int AllocVariable(scriptInstance_t inst);
VariableValue Scr_GetArrayIndexValue(scriptInstance_t inst, unsigned int name);
unsigned int Scr_GetSelf(scriptInstance_t inst, unsigned int threadId);
namespace plutonium
{
bool is_up_to_date();
}
}
#include "symbols.hpp"

View File

@ -4,6 +4,57 @@
namespace scripting
{
namespace
{
std::vector<script_value> get_keys_sp(unsigned int id)
{
std::vector<script_value> result;
auto current = game::scr_VarGlob->variableList_sp[id + 1].nextSibling;
while (current)
{
const auto var = &game::scr_VarGlob->variableList_sp[current + 0x6000];
const auto key_value = game::Scr_GetArrayIndexValue(game::SCRIPTINSTANCE_SERVER, var->w.status >> 8);
result.push_back(key_value);
const auto next_sibling = game::scr_VarGlob->variableList_sp[current + 0x6000].nextSibling;
if (!next_sibling)
{
break;
}
current = static_cast<unsigned __int16>(game::scr_VarGlob->variableList_sp[next_sibling + 0x6000].id);
}
return result;
}
std::vector<script_value> get_keys_mp(unsigned int id)
{
std::vector<script_value> result;
auto current = game::scr_VarGlob->variableList_mp[id + 1].nextSibling;
while (current)
{
const auto var = &game::scr_VarGlob->variableList_mp[current + 0x8000];
const auto key_value = game::Scr_GetArrayIndexValue(game::SCRIPTINSTANCE_SERVER, var->w.status >> 8);
result.push_back(key_value);
const auto next_sibling = game::scr_VarGlob->variableList_mp[current + 0x8000].nextSibling;
if (!next_sibling)
{
break;
}
current = game::scr_VarGlob->variableList_mp[next_sibling + 0x8000].hash.id;
}
return result;
}
}
array_value::array_value(unsigned int parent_id, unsigned int id)
: id_(id)
, parent_id_(parent_id)
@ -13,12 +64,22 @@ namespace scripting
return;
}
const auto value = game::scr_VarGlob->variableList[this->id_];
game::VariableValue variable{};
variable.u = value.u.u;
variable.type = value.w.type & 0x1F;
game::VariableValue variable_{};
this->value_ = variable;
if (game::environment::is_sp())
{
const auto variable = &game::scr_VarGlob->variableList_sp[this->id_ + 0x6000];
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
}
else
{
const auto variable = &game::scr_VarGlob->variableList_mp[this->id_ + 0x8000];
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
}
this->value_ = variable_;
}
void array_value::operator=(const script_value& value)
@ -30,16 +91,29 @@ namespace scripting
const auto& value_0 = value.get_raw();
const auto variable = &game::scr_VarGlob->variableList[this->id_];
game::VariableValue variable_{};
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
game::VariableValue previous{};
if (game::environment::is_sp())
{
const auto variable = &game::scr_VarGlob->variableList_sp[this->id_ + 0x6000];
previous.type = variable->w.type & 0x1F;
previous.u = variable->u.u;
variable->w.type |= value_0.type;
variable->u.u = value_0.u;
}
else
{
const auto variable = &game::scr_VarGlob->variableList_mp[this->id_ + 0x8000];
previous.type = variable->w.type & 0x1F;
previous.u = variable->u.u;
variable->w.type |= value_0.type;
variable->u.u = value_0.u;
}
game::AddRefToValue(game::SCRIPTINSTANCE_SERVER, &value_0);
game::RemoveRefToValue(game::SCRIPTINSTANCE_SERVER, variable_.type, variable_.u);
variable->w.type = value_0.type & 0x1F;
variable->u.u = value_0.u;
game::RemoveRefToValue(game::SCRIPTINSTANCE_SERVER, previous.type, previous.u);
this->value_ = value_0;
}
@ -121,26 +195,7 @@ namespace scripting
std::vector<script_value> array::get_keys() const
{
std::vector<script_value> result;
auto current = game::scr_VarGlob->variableList[this->id_ + 1].nextSibling;
while (current)
{
const auto var = &game::scr_VarGlob->variableList[current + 0x8000];
const auto key_value = game::Scr_GetArrayIndexValue(game::SCRIPTINSTANCE_SERVER, var->w.status >> 8);
result.push_back(key_value);
const auto next_sibling = game::scr_VarGlob->variableList[current + 0x8000].nextSibling;
if (!next_sibling)
{
break;
}
current = game::scr_VarGlob->variableList[next_sibling + 0x8000].hash.id;
}
return result;
return SELECT_VALUE(get_keys_sp, get_keys_mp)(this->id_);
}
int array::size() const
@ -190,12 +245,22 @@ namespace scripting
return {};
}
const auto value = game::scr_VarGlob->variableList[variable_id + 0x8000];
game::VariableValue variable{};
variable.u = value.u.u;
variable.type = value.w.type & 0x1F;
game::VariableValue variable_{};
return variable;
if (game::environment::is_sp())
{
const auto variable = &game::scr_VarGlob->variableList_sp[variable_id + 0x6000];
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
}
else
{
const auto variable = &game::scr_VarGlob->variableList_mp[variable_id + 0x8000];
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
}
return variable_;
}
script_value array::get(const unsigned int index) const
@ -207,12 +272,22 @@ namespace scripting
return {};
}
const auto value = game::scr_VarGlob->variableList[variable_id + 0x8000];
game::VariableValue variable{};
variable.u = value.u.u;
variable.type = value.w.type & 0x1F;
game::VariableValue variable_{};
return variable;
if (game::environment::is_sp())
{
const auto variable = &game::scr_VarGlob->variableList_sp[variable_id + 0x6000];
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
}
else
{
const auto variable = &game::scr_VarGlob->variableList_mp[variable_id + 0x8000];
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
}
return variable_;
}
script_value array::get(const script_value& key) const
@ -240,16 +315,29 @@ namespace scripting
return;
}
const auto variable = &game::scr_VarGlob->variableList[variable_id + 0x8000];
game::VariableValue variable_{};
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
game::VariableValue previous{};
if (game::environment::is_sp())
{
const auto variable = &game::scr_VarGlob->variableList_sp[variable_id + 0x6000];
previous.type = variable->w.type & 0x1F;
previous.u = variable->u.u;
variable->w.type |= value_.type;
variable->u.u = value_.u;
}
else
{
const auto variable = &game::scr_VarGlob->variableList_mp[variable_id + 0x8000];
previous.type = variable->w.type & 0x1F;
previous.u = variable->u.u;
variable->w.type |= value_.type;
variable->u.u = value_.u;
}
game::AddRefToValue(game::SCRIPTINSTANCE_SERVER, &value_);
game::RemoveRefToValue(game::SCRIPTINSTANCE_SERVER, variable_.type, variable_.u);
variable->w.type |= value_.type;
variable->u.u = value_.u;
game::RemoveRefToValue(game::SCRIPTINSTANCE_SERVER, previous.type, previous.u);
}
void array::set(const unsigned int index, const script_value& value) const
@ -262,17 +350,29 @@ namespace scripting
return;
}
auto variable_list = *game::scr_VarGlob;
const auto variable = &game::scr_VarGlob->variableList[variable_id + 0x8000];
game::VariableValue variable_{};
variable_.type = variable->w.type & 0x1F;
variable_.u = variable->u.u;
game::VariableValue previous{};
if (game::environment::is_sp())
{
const auto variable = &game::scr_VarGlob->variableList_sp[variable_id + 0x6000];
previous.type = variable->w.type & 0x1F;
previous.u = variable->u.u;
variable->w.type |= value_.type;
variable->u.u = value_.u;
}
else
{
const auto variable = &game::scr_VarGlob->variableList_mp[variable_id + 0x8000];
previous.type = variable->w.type & 0x1F;
previous.u = variable->u.u;
variable->w.type |= value_.type;
variable->u.u = value_.u;
}
game::AddRefToValue(game::SCRIPTINSTANCE_SERVER, &value_);
game::RemoveRefToValue(game::SCRIPTINSTANCE_SERVER, variable_.type, variable_.u);
variable->w.type |= value_.type;
variable->u.u = value_.u;
game::RemoveRefToValue(game::SCRIPTINSTANCE_SERVER, previous.type, previous.u);
}
void array::set(const script_value& key, const script_value& _value) const

View File

@ -149,12 +149,6 @@ namespace scripting
unsigned int make_object()
{
unsigned int index = 0;
const auto id = game::AllocVariable(game::SCRIPTINSTANCE_SERVER);
const auto variable = &game::scr_VarGlob->variableList[id + 1];
variable->w.type = game::SCRIPT_STRUCT;
variable->u.o.refCount = 0;
return index;
return 0;
}
}

View File

@ -258,7 +258,7 @@ namespace scripting
}
const auto id = this->get_raw().u.uintValue;
const auto type = game::scr_VarGlob->variableList[id + 1].w.type & 0x1F;
const auto type = game::GetObjectType(game::SCRIPTINSTANCE_SERVER, id);
return type == game::SCRIPT_ARRAY;
}
@ -282,7 +282,7 @@ namespace scripting
}
const auto id = this->get_raw().u.uintValue;
const auto type = game::scr_VarGlob->variableList[id + 1].w.type & 0x1F;
const auto type = game::GetObjectType(game::SCRIPTINSTANCE_SERVER, id);
return type == game::SCRIPT_STRUCT || type == game::SCRIPT_ENTITY;
}

View File

@ -46,7 +46,7 @@ namespace scripting
auto type_ = 0;
if (value.type == game::SCRIPT_OBJECT)
{
type_ = game::scr_VarGlob->variableList[value.u.uintValue].w.type & 0x1F;
type_ = game::GetObjectType(game::SCRIPTINSTANCE_SERVER, value.u.uintValue);
}
else
{

View File

@ -7,7 +7,7 @@ namespace scripting
{
thread::thread(unsigned int id)
: id_(id)
, type_(game::scr_VarGlob->variableList[id].w.type & 0x7F)
, type_(game::GetObjectType(game::SCRIPTINSTANCE_SERVER, id))
{
}
@ -32,12 +32,12 @@ namespace scripting
unsigned int thread::get_wait_time() const
{
return game::scr_VarGlob->variableList[this->id_].w.waitTime >> 8;
return 0;
}
unsigned int thread::get_notify_name_id() const
{
return game::scr_VarGlob->variableList[this->id_].w.notifyName >> 8;
return 0;
}
unsigned int thread::get_self() const

View File

@ -210,23 +210,51 @@ namespace game
unsigned int index;
};
struct VariableValueInternal
namespace sp
{
Variable hash;
VariableValueInternal_u u;
VariableValueInternal_w w;
VariableValueInternal_v v;
unsigned int nextSibling;
};
struct ObjectInfo
{
unsigned __int16 refCount;
unsigned __int16 size;
};
static_assert(sizeof(VariableValueInternal) == 28);
static_assert(offsetof(VariableValueInternal, hash) == 0);
static_assert(offsetof(VariableValueInternal, u) == 8);
static_assert(offsetof(VariableValueInternal, w) == 16);
union VariableValueInternal_u
{
VariableUnion u;
ObjectInfo o;
};
struct scrVarGlob_t
struct VariableValueInternal
{
unsigned int id;
VariableValueInternal_u u;
VariableValueInternal_w w;
char __pad1[2];
unsigned __int16 nextSibling;
};
static_assert(sizeof(VariableValueInternal) == 16);
static_assert(offsetof(VariableValueInternal, nextSibling) == 14);
static_assert(offsetof(VariableValueInternal, u) == 4);
static_assert(offsetof(VariableValueInternal, w) == 8);
}
namespace mp
{
VariableValueInternal* variableList;
struct VariableValueInternal
{
Variable hash;
VariableValueInternal_u u;
VariableValueInternal_w w;
VariableValueInternal_v v;
unsigned int nextSibling;
};
}
union scrVarGlob_t
{
sp::VariableValueInternal* variableList_sp;
mp::VariableValueInternal* variableList_mp;
};
struct scr_classStruct_t

View File

@ -37,23 +37,31 @@ namespace game
WEAK symbol<void(scriptInstance_t inst, float* value)> Scr_AddVector{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst, unsigned int id)> Scr_AddObject{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst)> Scr_ClearOutParams{0x0, 0x588680};
WEAK symbol<void(scriptInstance_t inst)> Scr_ClearOutParams{0x654D10, 0x588680};
WEAK symbol<unsigned int(scriptInstance_t inst)> AllocObject{0x0, 0x0};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int id)> AllocThread{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst, unsigned int id)> RemoveRefToObject{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst, const float* vectorValue)> RemoveRefToVector{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst, const int type, VariableUnion value)> AddRefToValue_{0x0, 0x6706B0};
WEAK symbol<void(scriptInstance_t inst, const int type, VariableUnion value)> RemoveRefToValue{0x0, 0x4249C0};
WEAK symbol<void(scriptInstance_t inst, const int type, VariableUnion value)> AddRefToValue_{0x53FD50, 0x6706B0};
namespace mp
{
WEAK symbol<void(scriptInstance_t inst, const int type, VariableUnion value)> RemoveRefToValue{0x0, 0x4249C0};
}
namespace sp
{
WEAK symbol<void(scriptInstance_t inst, VariableValue* value)> RemoveRefToValue{0x556830, 0x0};
}
WEAK symbol<void(scriptInstance_t inst, unsigned int parentId, unsigned int index)> RemoveVariableValue{0x0, 0x0};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int id)> FindVariable{0x0, 0x5DF7E0};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int id)> FindArrayVariable{0x0, 0x509230};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int id)> FindVariable{0x476720, 0x5DF7E0};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int id)> FindArrayVariable{0x62F8E0, 0x509230};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int id)> GetVariable{0x0, 0x0};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int name)> GetNewVariable{0x0, 0x5B3750};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int unsignedValue)> GetNewArrayVariable{0x0, 0x468BC0};
WEAK symbol<VariableValueInternal_u*(scriptInstance_t inst, unsigned int id)> GetVariableValueAddress{0x0, 0x651390};
WEAK symbol<void(scriptInstance_t inst, unsigned int id, const VariableValue* value)> SetNewVariableValue{0x0, 0x4DCA30};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int name)> GetNewVariable{0x674820, 0x5B3750};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int parentId, unsigned int unsignedValue)> GetNewArrayVariable{0x689C60, 0x468BC0};
WEAK symbol<void(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{0x0, 0x0};
WEAK symbol<VariableValue(scriptInstance_t inst, unsigned int classnum, int entnum, int clientNum, int offset)> GetEntityFieldValue{0x0, 0x0};
@ -62,8 +70,8 @@ namespace game
WEAK symbol<void(scriptInstance_t inst, int clientNum, unsigned int id, unsigned int stringValue, unsigned int paramcount)> Scr_NotifyId{0x0, 0x0};
WEAK symbol<void(int entnum, unsigned int classnum, unsigned int stringValue, unsigned int paramcount)> Scr_NotifyNum{0x0, 0x0};
WEAK symbol<unsigned int(const char* str, unsigned int user, scriptInstance_t inst)> SL_GetString{0x0, 0x4B1770};
WEAK symbol<const char*(unsigned int stringValue, scriptInstance_t inst)> SL_ConvertToString{0x0, 0x624C70};
WEAK symbol<unsigned int(const char* str, unsigned int user, scriptInstance_t inst)> SL_GetString{0x463130, 0x4B1770};
WEAK symbol<const char*(unsigned int stringValue, scriptInstance_t inst)> SL_ConvertToString{0x687530, 0x624C70};
WEAK symbol<unsigned int(const char* str, bool is_static)> SL_GetCanonicalString{0x0, 0x0};
WEAK symbol<int(scriptInstance_t inst)> Scr_GetNumParam{0x0, 0x0};
@ -72,18 +80,18 @@ namespace game
WEAK symbol<int(scriptInstance_t inst, int index)> Scr_GetInt{0x0, 0x0};
WEAK symbol<const char*(scriptInstance_t inst, int index)> Scr_GetString{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst, int index, float* out)> Scr_GetVector{0x0, 0x0};
WEAK symbol<const float*(scriptInstance_t inst, const float* v)> Scr_AllocVector{0x0, 0x4C4440};
WEAK symbol<const float*(scriptInstance_t inst, const float* v)> Scr_AllocVector{0x41B400, 0x4C4440};
WEAK symbol<int(scriptInstance_t inst, const char* filename,
const char* name, unsigned int* checksum, bool errorIfMissing)> Scr_GetFunctionHandle{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst, unsigned int classnum, char const* name, unsigned int offset)> Scr_AddClassField{0x0, 0x0};
WEAK symbol<unsigned int(scriptInstance_t inst, int entnum, unsigned int classnum, int clientNum)> Scr_GetEntityId{0x0, 0x6A07D0};
WEAK symbol<unsigned int(scriptInstance_t inst, int entnum, unsigned int classnum, int clientNum)> Scr_GetEntityId{0x4B7050, 0x6A07D0};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int localId)> GetStartLocalId{0x0, 0x0};
WEAK symbol<unsigned int(scriptInstance_t inst, unsigned int localId)> Scr_TerminateRunningThread{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst, const char* error, bool force_terminal)> Scr_Error{0x0, 0x6245E0};
WEAK symbol<void(scriptInstance_t inst, const char* error, bool force_terminal)> Scr_Error{0x4B5940, 0x6245E0};
WEAK symbol<void(scriptInstance_t inst, unsigned int paramIndex, const char* error)> Scr_ParamError{0x0, 0x0};
WEAK symbol<void(scriptInstance_t inst, const char* error)> Scr_ObjectError{0x0, 0x0};
WEAK symbol<scr_entref_t*(scr_entref_t* refref, scriptInstance_t inst, unsigned int entId)> Scr_GetEntityIdRef{0x0, 0x6A53C0};
WEAK symbol<unsigned int(scriptInstance_t inst)> Scr_AllocArray{0x0, 0x5B8400};
WEAK symbol<scr_entref_t*(scr_entref_t* refref, scriptInstance_t inst, unsigned int entId)> Scr_GetEntityIdRef{0x433B60, 0x6A53C0};
WEAK symbol<unsigned int(scriptInstance_t inst)> Scr_AllocArray{0x438800, 0x5B8400};
WEAK symbol<gentity_s*(scr_entref_t entref)> GetPlayerEntity{0x0, 0x0};
@ -96,17 +104,17 @@ namespace game
WEAK symbol<void*(int valueIndex)> Sys_GetValue{0x0, 0x0};
WEAK symbol<int()> Sys_Milliseconds{0x0, 0x0};
WEAK symbol<void*(jmp_buf* Buf, int Value)> longjmp{0x0, 0x9D05C4};
WEAK symbol<int(jmp_buf* Buf, int a2)> _setjmp{0x0, 0x9CED5C};
WEAK symbol<void*(jmp_buf* Buf, int Value)> longjmp{0x96B980, 0x9D05C4};
WEAK symbol<int(jmp_buf* Buf, int a2)> _setjmp{0x969EAC, 0x9CED5C};
// Variables
WEAK symbol<int> g_script_error_level{0x0, 0x3DD4A18};
WEAK symbol<jmp_buf> g_script_error{0x0, 0x3DD3998};
WEAK symbol<int> g_script_error_level{0x32D1E18, 0x3DD4A18};
WEAK symbol<jmp_buf> g_script_error{0x32D0D98, 0x3DD3998};
WEAK symbol<scrVmPub_t> scr_VmPub{0x0, 0x3DCB338};
WEAK symbol<scrVarGlob_t> scr_VarGlob{0x0, 0x3DCB180};
WEAK symbol<scrVarPub_t> scr_VarPub{0x0, 0x3DCB280};
WEAK symbol<scrVmPub_t> scr_VmPub{0x32C8738, 0x3DCB338};
WEAK symbol<scrVarGlob_t> scr_VarGlob{0x32C8580, 0x3DCB180};
WEAK symbol<scrVarPub_t> scr_VarPub{0x32C8680, 0x3DCB280};
WEAK symbol<int> scr_starttime{0x0, 0x0};
WEAK symbol<function_stack_t> fs{0x0, 0x0};
@ -118,9 +126,4 @@ namespace game
WEAK symbol<unsigned int> levelEntityId{0x0, 0x0};
WEAK symbol<client_s> svs_clients{0x0, 0x0};
namespace plutonium
{
WEAK symbol<int(const char* fmt, ...)> printf{0x0, 0x0};
}
}