Jump to content

[REL|OpenSrc] Silent's ASI Loader


Recommended Posts

  • 3 weeks later...
  • 1 month later...
  • 5 months later...
  • 11 months later...
  • 4 months later...

What? No, it doesn't.

  • 1 month later...
  • 2 months later...
  • 3 months later...
  • 2 months later...
Lemonadegrandas
Hi

Hello, how are you, brother? Can you help me with the GTA SAN ANDREAS BETA EDITION project? I write my name in the first names :)

I'm sorry, I wrote my name in the first person. I just want your help to edit the game scripts. If you can help me, thank you very much, brother.

I write your name in the first one

Basically, you do the main work, brother

5 hours ago, Lemonadegrandas said:

Basically, you do the main work, brother

 

Bugs Bunny's "No" - Meming Wiki

  • 1 year later...
MrAmHamoham

Sir, why asi loader can't load some of mods in Windows7

for Example > First Person Mod , Fastman92 Limit Adjuster ,and more

 

Help!

Quote

Asi loader error in load fp mod >asi loader can't load hooks.asi

😐

Edited by MrAmHamoham
I add emoji
  • 2 years later...
fastman92

I have noticed a problem today with the way your loader loads ASI libraries. This can create an issue for some users.


Log:

Found file aerofix.asi
Found file CLEO.asi
Found file exdisp.asi
Found file III.VC.SA.WindowedMode.asi
Found file LanguageLoader.asi
Found file scrlog.asi
Found file SilentPatchSA.asi
Found file $fastman92limitAdjusterExternalLoader.asi


As it can be seen, my ASI has been loaded last. The order of ASI libraries matters though. The FLA modifies game code, like moving an array CModelInfo::ms_modelInfoPtrs. SilentPatchSA.asi should then be loaded later and read the modified pointer.
 

void FindFiles(WIN32_FIND_DATA* fd, ExcludedEntriesList* list)
{
    HANDLE asiFile = FindFirstFile ("*.asi", fd);
    if (asiFile != INVALID_HANDLE_VALUE)
    {

        do {
            if (!(fd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {

                unsigned int pos = 5;
                while (fd->cFileName[pos])
                    ++pos;
                if (fd->cFileName[pos-4] == '.' &&
                    (fd->cFileName[pos-3] == 'a' || fd->cFileName[pos-3] == 'A') &&
                    (fd->cFileName[pos-2] == 's' || fd->cFileName[pos-2] == 'S') &&
                    (fd->cFileName[pos-1] == 'i' || fd->cFileName[pos-1] == 'I'))
                {
                    if ( !list || !ExcludedEntriesListHasEntry(list, fd->cFileName) )
                        LoadLibrary (fd->cFileName);
                }
            }

        } while (FindNextFile (asiFile, fd));
        FindClose (asiFile);
    }
}

FindFirstFile() does not and can not sort the files it returns. https://stackoverflow.com/questions/646673/how-can-i-get-findfirstfile-to-sort-files

I hope you can add sorting of file names to your ASI loader. 

Edited by fastman92

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.