[CF-Devel] 'Light' question

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Thu Feb 12 15:35:46 CST 2004


On Thu, Feb 12, 2004 at 10:11:14PM +0100, Nicolas Weeger wrote:
>
     
      Browsing the code, i found that a 'light source' has 2 different types in 
     
     >
     
      the code:
     
     >
     
     
     >
     
      in object structure,
     
     >
     
          sint16	glow_radius;	/* indicates the glow radius of the object */
     
     >
     
     
     >
     
      but in mapspace structure:
     
     >
     
          sint8	light;		/* How much light this space provides */
     
     >
     
     
     >
     
      Maybe those should be made coherent, specially since map.c:update_position 
     
     >
     
      will update the space with the object's value...
     
     
not sure about this particular instance, but there re two
different light values: the glow radius, and the light level.
The light level is something that ranges from "completely
bright" to "completely dark".  Take a walk to the dragon
hatchery to see it in use.

The radius works by decreasing the light level by 1 every N
squares; I don't remember, but I think N is so that if you are
glow_radius+1 squares from the light source, it provides zero
light (so if there are no other sources, you'll be seeing the
map's ambient level).

You probably know this better than I do, but I'll post this
anyway in the hopes of throwing some light into the subject (heh)

[]s,
                                               |alo
                                               +----
--
            Those who trade freedom for security
               lose both and deserve neither.
--
     
     http://www.laranja.org/
     
                     mailto:
     
     lalo at laranja.org
     
     
         pgp key: 
     
     http://www.laranja.org/pessoal/pgp
     
     

GNU: never give up freedom                 
     
     http://www.gnu.org/
     
     

_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list