Merge pull request #471 from diamante0018/fix/symbol

fix symbol definitions
This commit is contained in:
Maurice Heumann 2022-10-13 14:17:15 +02:00 committed by GitHub
commit 84dda7ee00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -233,7 +233,7 @@ namespace gsc
return game::DB_FindXAssetHeader(game::ASSET_TYPE_SCRIPTFILE, name, 1).scriptfile;
}
int db_is_xasset_default(game::XAssetType type, const char* name)
int db_is_x_asset_default(game::XAssetType type, const char* name)
{
if (loaded_scripts.contains(name))
{
@ -327,10 +327,8 @@ namespace gsc
{
return decompile_script_file(name, real_name);
}
else
{
throw std::runtime_error(std::format("Could not load gsc file '{}'", real_name));
}
throw std::runtime_error(std::format("Could not load gsc file '{}'", real_name));
}
std::vector<std::uint8_t> result;
@ -341,7 +339,7 @@ namespace gsc
// ProcessScript
utils::hook::call(0x1403F7317, find_script);
utils::hook::call(0x1403F7327, db_is_xasset_default);
utils::hook::call(0x1403F7327, db_is_x_asset_default);
// GScr_LoadScripts
utils::hook::call(0x140330B19, gscr_load_game_type_script_stub);

View File

@ -55,8 +55,8 @@ namespace game
WEAK symbol<const char* (const XAsset* asset)> DB_GetXAssetName{0x140151C00, 0x140240DD0};
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<bool(XAssetType type, const char* name)> DB_XAssetExists{0x0, 0x1402750F0};
WEAK symbol<bool(XAssetType type, const char* name)> DB_IsXAssetDefault{0x0, 0x140270320};
WEAK symbol<int(XAssetType type, const char* name)> DB_XAssetExists{0x0, 0x1402750F0};
WEAK symbol<int(XAssetType type, const char* name)> DB_IsXAssetDefault{0x0, 0x140270320};
WEAK symbol<int(const RawFile* rawfile)> DB_GetRawFileLen{0x0, 0x14026FCC0};
WEAK symbol<void(const RawFile* rawfile, char* buf, int size)> DB_GetRawBuffer{0x0, 0x14026FB90};