glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Cleanups...


From: simon schuler
Subject: Re: [glob2-devel] Cleanups...
Date: Mon, 24 Jan 2005 20:49:09 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041229

Stéphane Magnenat wrote:

On Monday 24 January 2005 19.43, simon schuler wrote:
I've got a question:
in Ressource.h there is:

#define MAX_NB_RESSOURCES 15
#define MAX_RESSOURCES 8

MAX_NB_RESSOURCES is the maximum number of ressources we can add without major game format breaking. MAX_RESSOURCES is the actual number of ressources. MAX_NB_RESSOURCES is required because in several places, such as units or buildings, a static array of ressources is a good solution.

Does it helps?

Steph

Yeah, now I understand, thank you.

For the Uint8 *ressourcesGradient[32][MAX_NB_RESSOURCES][2] array, I think we should use MAX_RESSOURCES, because if a function requests a gradient for an ressource biger than MAX_RESSOURCES this function is buggy anyway. (The only reason i'd see to use MAX_NB_RESSOURCES would be for savegame compatibility, but as far as I know, the gradients aren't saved. The resizing would save 1792 Bytes on my arch, but nothing else would be changed, so it's not very urgent. Perhaps I will resize it in a following cleanup patch.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]