This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Major Game Upgrade + New Images: Specula is now Opal 2.0


>> But I am not sure that we should continue to keep all images in one imf.dir
>> even if IMFApp can handle it. The only point of having it is that you don't
>> need to include the relevant *.imf files in the game file,
>
>Right. And that is quite convenient, wouldn't you agree? Why get rid of it?

Well, here is one reason (from imf.c):

if (images == NULL) {
    images = (ImageFamily **) xmalloc(MAXIMAGEFAMILIES * sizeof(ImageFamily
*));
}

MAXIMAGEFAMILIES is currently set to 3000, to accomodate all image families
in imf.dir. This is not primarily because of IMFApp, but because Xconq
needs it, since all image families in imf.dir are allocated in every Xconq
game. This is true even if you run duel.g which has only one image family
(the tank). This is also why you don't need to include stuff from imf.dir
in your game files - it gets allocated anyway, for better or for worse.

So if we get rid of imf.dir (or more precisly its current use in Xconq) we
gain the memory footprint of 2999 image families in the Duel game. Somewhat
less in more complicated games. This would probably make it easier to run
Xconq on pre-NT Windows systems (98, ME) that have limited graphics memory.

Another solution is, as we already discussed, to rewrite the imaging code
so that only stuff that is needed in the game is allocated.

>I suppose that you weren't implying that we get rid of the master
>catalog concept, but rather just split it up along the lines of genre or
>something. Or, at least, that would be my suggestion....

Yes. In fact, many *.imf files, including those that I have added over the
years, are already pretty much along genre lines.

Hans




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]