Jump to content
  • 0

game_sa Loading IMG Archive (CD)


Igor4048

Question

ENG:

 

Hello. I am working on implementation of Fastman Limit Adjuster encryption in client (namely game_sa module). To support encryption (enhanced IMG archives), I need to call a custom function to load IMG archives ( CD ) in GTA SA is a function like ( LoadCdDirectory ) in FLA is a function:/

/// Loads CD directory in GTA SA. Works only if enhanced IMG archives are enabled!

F92_LA_API void LoadCdDirectoryInGTASA(

 tImgDescriptorInGTASA *pIMGdescriptor,

 int imgId,

 tGTASAimgLoadingCall* pLoadingCall

);

 

The question is whether there is already a hook function to load the archives of the standard GTA SA ( approximate name ~ LoadCdDirectory ).  In the MTA client source code, in particular in the module game_sa pored in game_sa could not find exactly the hook for loading the IMG archive itself.

 

RU:

Здравствуйте. Занимаюсь внедрением шифровки от Fastman Limit Adjuster в клиент( а именно модуль game_sa ). Чтобы шифровка поддерживалась(enhanced IMG archives), мне надо вызвать кастомную функцию подгрузки IMG архивов ( CD ) в GTA SA это функция типо ( LoadCdDirectory )  в FLA это функция:

//// Loads CD directory in GTA SA. Works only if enhanced IMG archives are enabled!
    F92_LA_API void LoadCdDirectoryInGTASA(
            tImgDescriptorInGTASA *pIMGdescriptor,
            int imgId,
            tGTASAimgLoadingCall* pLoadingCall
        );

Вопрос заключаеться в том, есть ли уже хук функции подгрузки архивов стандартной GTA SA ( примерное название ~ LoadCdDirectory ). В клиенте МТА, в частности в модуле game_sa Порылся в game_sa не смог найти именно хука подгурзки самого IMG архива

Edited by Igor4048
Link to comment

3 answers to this question

Recommended Posts

  • 0

ENG:

Found the LoadCdDirectory function addresse.

It is 0x5B6170

typedef void(__cdecl* tLoadCdDirectory)(const char* ArchiveName, int archiveID);

tLoadCdDirectory oLoadCdDirectory = nullptr;

Hook can be installed using the method from MTA HookInstall

 

RU:

Нашёл аддресс функции LoadCdDirectory.
Это 0x5B6170

typedef void(__cdecl* tLoadCdDirectory)(const char* ArchiveName, int archiveID);
tLoadCdDirectory oLoadCdDirectory = nullptr;

Хук можно установить методом из МТА HookInstall

Link to comment
  • 0
Posted (edited)

mtasa-blue-master\Shared\data\MTA San Andreas\MTA
найди файл sa.dat, если его переименовать в sa.zip он откроеться как архив 
в архиве есть файл gta.dat я думаю через него можна добавить свои .IMG, .IPL, .IDE

имей ввиду MainFunctions.cpp проверяет хеш sa.dat перед запуском

 

Edited by jordskjelv
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...