Example of the Pakfile of RW3.7 PC has a problem

xiaoxiao2021-03-29  201

One of the solutions:

Put

Struct Pakfilesystem

{

RTFILESYSTEM DFS;

Pakopenfile * files;

}

Change to

Struct Pakfilesystem

{

RTWINFILESYSTEM DFS;

Pakopenfile * files;

}

And this structure must be rwmalloc or rwcalloc, because it is to be released through RWFree, cannot be global variables.

Because this custom file system uses the FSCLOSE function pointer points to the default file system's function, that is, Windows, that function will access an RTWINFILESYSTEM structure, which is through the incoming RTFileSystem type pointer.

But RTWInfileSystem is larger than RTFileSystem. Leading upwards.

The Windows default file system is installed in Win.C RWBool PsinstallFileSystem (Void), then RTWINFSYSTEMINIT (). Refer to the function in RTFSWIN.C in the SRC, fs-> fsclose = tkinfsclose;

Static void TkwinfsClose (RTFileSystem * WinFileSystem).

I used to rely on this issue for Renderware Support, and their solutions were different from me, as if they were replaced by FSCLOSE points to.

转载请注明原文地址:https://www.9cbs.com/read-130468.html

New Post(0)