exult and patch dir

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

exult and patch dir

Post by artaxerxes »

the source code of exult shows that you load the usecode file and if it exists, you load a usecode file found in the patch dir.

Obviously then, you can override certain functions.

However, it is not the same for the flx and the shp files. It seems to either load one or the other.

Is it technically possible to make the process identical to usecode's way?

Artaxerxes
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: exult and patch dir

Post by drcode »

Hmm... my head is starting to spin:-) Loading two usecode files was easy because we load the whole file at once. Functions in the second file that have the same ID as in the first just replace them.

Ryan wrote code so that the same thing happens with .vga files, even though they're not read entirely. I guess the same thing could be done for .flx files. In fact, a .vga file really is a .flx file, so maybe the .vga handling should be rewritten.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult and patch dir

Post by artaxerxes »

In the loading of fonts.vga for instance, the code is:
shapes/fontvga.cc @ L63:
const char *fname = U7exists(PATCH_FONTS)? PATCH_FONTS : FONTS_VGA;


how can this code overwrite the specific shapes?
just curious.

Artaxerxes
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: exult and patch dir

Post by drcode »

You're right; it's not handled for fonts yet. I think it could be, though, at least for the .vga fonts.
Locked