ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.268 by root, Sun Jul 20 02:57:43 2008 UTC vs.
Revision 1.270 by root, Sun Jul 20 15:05:13 2008 UTC

671 const_iv (SDL_GL_ACCUM_ALPHA_SIZE), 671 const_iv (SDL_GL_ACCUM_ALPHA_SIZE),
672 const_iv (SDL_GL_STEREO), 672 const_iv (SDL_GL_STEREO),
673 const_iv (SDL_GL_MULTISAMPLEBUFFERS), 673 const_iv (SDL_GL_MULTISAMPLEBUFFERS),
674 const_iv (SDL_GL_MULTISAMPLESAMPLES), 674 const_iv (SDL_GL_MULTISAMPLESAMPLES),
675 const_iv (SDL_GL_ACCELERATED_VISUAL), 675 const_iv (SDL_GL_ACCELERATED_VISUAL),
676 const_iv (SDL_GL_SWAP_CONTROL) 676 const_iv (SDL_GL_SWAP_CONTROL),
677
678 const_iv (FOW_DARKNESS)
677# undef const_iv 679# undef const_iv
678 }; 680 };
679 681
680 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 682 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
681 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 683 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
698 RETVAL 700 RETVAL
699 701
700NV floor (NV x) 702NV floor (NV x)
701 703
702NV ceil (NV x) 704NV ceil (NV x)
705
706NV ceilabs (NV x)
707 CODE:
708 RETVAL = x < 0. ? - ceil (-x) : ceil (x);
709 OUTPUT:
710 RETVAL
703 711
704IV minpot (UV n) 712IV minpot (UV n)
705 713
706IV popcount (UV n) 714IV popcount (UV n)
707 715
2234 SvCUR_set (darkness3_sv, sw34 * sh3); 2242 SvCUR_set (darkness3_sv, sw34 * sh3);
2235 2243
2236 mx += self->x - 1; 2244 mx += self->x - 1;
2237 my += self->y - 1; 2245 my += self->y - 1;
2238 2246
2239 memset (darkness1, 255, sw1 * sh1); 2247 memset (darkness1, 255 - FOW_DARKNESS, sw1 * sh1);
2240 2248
2241 for (y = 0; y < sh1; y++) 2249 for (y = 0; y < sh1; y++)
2242 if (0 <= y + my && y + my < self->rows) 2250 if (0 <= y + my && y + my < self->rows)
2243 { 2251 {
2244 maprow *row = self->row + (y + my); 2252 maprow *row = self->row + (y + my);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines