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 18:43:53 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041229

I've got a question:
in Ressource.h there is:

#define MAX_NB_RESSOURCES 15
#define MAX_RESSOURCES 8

What does MAX_NB_RESSOURCES mean?

I ask because of this line in Map.h:

Uint8 *ressourcesGradient[32][MAX_NB_RESSOURCES][2];

I only found 1 place in the code, where the second index of ressourcesGradient[][][] was bigger than MAX_RESSOURCES and this place is in Map.cpp:

for (int t=0; t<32; t++)
       for (int r=0; r<MAX_NB_RESSOURCES; r++)
           for (int s=0; s<2; s++)
           {
               ressourcesGradient[t][r][s] = NULL;
               gradientUpdated[t][r][s] = false;
           }

which could of course easily be changed. So wouldn't the correct size be Uint8 *ressourcesGradient[32][MAX_RESSOURCES][2]; ? (without my previos patch, the same thing applies for gradientUpdated[t][r][s])






reply via email to

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