Page 1 of 1

LevelMod Extension c++ lib

Posted: Wed Jun 10, 2020 5:50 am
by Vadru
http://www.mediafire.com/file/byiiephpk ... n.rar/file

I was supposed to release this years ago, but got too busy to rewrite the code to be able to export the functions and make it easier to understand how it works etc.

Current features:
-Call ingame collision raytracing functions
-Add new values/functions that you can access/call from QB
-Call QB functions from your program
-Modify QB values and arrays
-D3D8 presenthook
-And some more


To add your own functions to QB use this code:

Code: Select all

CompiledScript scripts[] = { {"ScriptName",         CFunctionName}, etc... };

for (int i = 0; i < sizeof(scripts) / sizeof(CompiledScript); i++)
{
    QBKeyHeader* header = AddQBKeyHeader(Checksum(scripts[i].name), 1);
    if (header)
    {
        header->type = QBKeyHeader::COMPILED_FUNCTION;
        header->pFunction = scripts[i].pFunction;
    }
    else
        MessageBox(0, "couldn't add script", scripts[i].name, 0);
}
To get pointer to game class use this codes:

Code: Select all

Skater* skater = Skater::GetSkater();

Re: LevelMod Extension c++ lib

Posted: Tue Jun 16, 2020 10:15 am
by Vadru
I have now made a github for this project.

https://github.com/Vadru93/THPS3-QB-Extension